Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stricter ordering checks #112

Merged
merged 8 commits into from
Jan 26, 2024
Merged

stricter ordering checks #112

merged 8 commits into from
Jan 26, 2024

Conversation

Asa-Kosto-QTM
Copy link
Collaborator

better ordering checks for sub-commands

@Asa-Kosto-QTM Asa-Kosto-QTM requested a review from qartik January 26, 2024 18:42
qartik
qartik previously approved these changes Jan 26, 2024
Copy link
Member

@qartik qartik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, a suggestion for improving the test.

Comment on lines 114 to 124
assert phir["ops"][18]["qop"] == "R1XY"
assert phir["ops"][18]["angles"] == [[3.5, 0.0], "pi"]
assert phir["ops"][18]["args"] == [["q", 0]]
# rz(3.5*pi) q[1];
assert phir["ops"][20]["qop"] == "RZ"
assert phir["ops"][20]["angles"] == [[3.5], "pi"]
assert phir["ops"][20]["args"] == [["q", 1]]
# rx(1.0*pi) q[1];
assert phir["ops"][24]["qop"] == "R1XY"
assert phir["ops"][24]["angles"] == [[1.0, 0.0], "pi"]
assert phir["ops"][24]["args"] == [["q", 1]]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For these tests, it might be easier to compare directly with the JSON output per op, e.g.:

assert phir["ops"][18] == {
    "qop": "R1XY",
    "angles": [[3.5, 0.0], "pi"],
    "args": [["q", 0]],
}

qartik
qartik previously approved these changes Jan 26, 2024
@qartik qartik merged commit 636b509 into main Jan 26, 2024
6 checks passed
@qartik qartik deleted the ordering branch January 26, 2024 21:59
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