-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add test case to validate the rust->Python gate conversion #12623
Conversation
This commit adds a test to the test_rust_equivalence module to assert that the Python gate objects returned from the Rust CircuitData is the correct type.
One or more of the following people are relevant to this code:
|
Pull Request Test Coverage Report for Build 9604586227Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that the test is not behaving as intended, shouldn't it fail without fixing the wrong import paths we currently have for the T gates? (I did check it out locally and there it fails as expected). Maybe something related to the test config in CI?
There is a path where those imports don't get executed: https://github.com/Qiskit/qiskit/blob/main/crates/circuit/src/circuit_instruction.rs#L743-L785 If a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, so we might not be able to catch the fallback path on CI but the test is still good to have. I guess the best we can do in this case is keep this in mind and run the test locally when relevant.
I removed the PR from the queue because, if I'm not mistaken, it would fail if #12646 got merged. So maybe we can wait until all gates have been added to merge the test. |
I think it actually would be fine, because the test only validates if the python side class attribute |
Pull Request Test Coverage Report for Build 9652865752Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9679858189Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks to be working!
Summary
This commit adds a test to the test_rust_equivalence module to assert that the Python gate objects returned from the Rust CircuitData is the correct type.
Details and comments