-
Notifications
You must be signed in to change notification settings - Fork 98
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
[Samples] Add samples for testing operations in Q# #1732
Conversation
302ca98
to
26b7174
Compare
qsharp.eval( | ||
"OperationEquivalence.TestEquivalence()" | ||
) |
Check notice
Code scanning / devskim
If untrusted data (data from HTTP requests, user submitted files, etc.) is included in an eval statement it can allow an attacker to inject their own code. Note test
qsharp.eval( | ||
"operation ApplySWAP(qs : Qubit[]) : Unit is Ctl + Adj { SWAP(qs[0], qs[1]); }" |
Check notice
Code scanning / devskim
If untrusted data (data from HTTP requests, user submitted files, etc.) is included in an eval statement it can allow an attacker to inject their own code. Note test
Thanks for merging main and confirming things work well with the new sample testing. I can see the auto-generated tests run successfully as well as the new tests added here. It looks great! |
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.
This looks a lot better, I like how the code got more concise and matrices in the test are human-readable!
I left some more comments, with them fixed this will be good to go!
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 good. Hopefully one last round of suggestions!
Thank you!
Co-authored-by: Mariia Mykhailova <michaylova@gmail.com>
Co-authored-by: Mariia Mykhailova <michaylova@gmail.com>
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 great! Thank you so much for working on this!
Fixes part of #1268
Added samples for testing operations using
dump_operation
.Also, using
CheckOperationsAreEqual
inside Fact function to demonstrate another wayHopefully, the new testing samples should be executed in CI. @tcNickolas could you please start a CI run. Snapshot from locally running
build.py
.Running in CI: