Skip to content

Conversation

@DRovara
Copy link
Collaborator

@DRovara DRovara commented Sep 19, 2024

Description

This small PR adds support for register arguments in assertions. Now, instead of having to write

qreg q[3];
assert-eq q[0], q[1], q[2] { 1, 0, 0, 0, 0, 0, 0, 0 }

users can write

qreg q[3];
assert-eq q { 1, 0, 0, 0, 0, 0, 0, 0 }

Mixing and matching is also supported (e.g. assert-eq q, psi[0]).
This new format works for all types of assertions.

Checklist:

  • The pull request only contains commits that are related to it.
  • I have added appropriate tests and documentation.
  • I have made sure that all CI jobs on GitHub pass.
  • The pull request introduces no new warnings and follows the project's style guidelines.

@codecov-commenter
Copy link

codecov-commenter commented Sep 19, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.8%. Comparing base (8d6a313) to head (8dae28e).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main     #21   +/-   ##
=====================================
  Coverage   98.7%   98.8%           
=====================================
  Files          9       9           
  Lines       1582    1616   +34     
  Branches     289     296    +7     
=====================================
+ Hits        1563    1598   +35     
+ Misses        19      18    -1     
Flag Coverage Δ
cpp 98.8% <100.0%> (+<0.1%) ⬆️
python 100.0% <ø> (ø)
Files with missing lines Coverage Δ
include/common/parsing/AssertionParsing.hpp 100.0% <100.0%> (ø)
src/common/parsing/AssertionParsing.cpp 100.0% <100.0%> (ø)
src/common/parsing/CodePreprocessing.cpp 98.7% <100.0%> (+0.1%) ⬆️

... and 1 file with indirect coverage changes

@DRovara DRovara merged commit 93ed2c2 into main Sep 19, 2024
@DRovara DRovara deleted the feature/registers-in-assertions branch September 19, 2024 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants