Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add has_stabilizer_effect protocol and support native Clifford simulator gates #2760
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 has_stabilizer_effect protocol and support native Clifford simulator gates #2760
Changes from all commits
4c8f599
0f0dfbf
58870cd
9a27357
8ef20a3
d6827a2
0093c8e
6434e56
021cabd
1c88b7e
cc0922e
07020d2
bd1e1b7
602338d
0e1fef7
b8be889
f853303
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Should be true not false.
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.
Should be true not false.
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.
Square root of Y is a stabilizer gate.
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.
As I mentioned in #2760 (comment), I'm just adding support for the operations that CliffordState supports right now (just like it was before this) and does not try to decompose.
Y**0.5
is a stabilizer gate and so isiSwap
but just restricting myself to the original 7 gates before #2803 adds all of them to CliffordState since right now the simulator would just balk atY**0.5
.If you feel we should add all these gates to the protocol at once, I can wait for the #2803 to go in. I can then have the protocol just do what is_supported_gate doing now as described in https://github.com/quantumlib/Cirq/pull/2803/files#r390152850. It would save on redundant work and definitely seems like a better option than having to define
_has_stabilizer_effect_
on all gates.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.
Should be true not false.
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.
Should be true not false.
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.
Should be true not false.
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.
You should also test that measurement is a stabilizer effect, and that gates like CCZ and the depolarizing channel are not.