-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Sync _has_stabilizer_effect_ implementations and use that for Clifford checks #3656
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
Conversation
…in CliffordSimulator and 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.
Thank you for cleaning this up. One point to confirm, but otherwise I think this is good to go.
@@ -217,6 +217,9 @@ def _from_json_dict_(cls, num_qubits, key, invert_mask, qid_shape=None, **kwargs | |||
qid_shape=None if qid_shape is None else tuple(qid_shape), | |||
) | |||
|
|||
def _has_stabilizer_effect_(self) -> Optional[bool]: | |||
return True |
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.
Is this correct? I had a vague impression that measurements, being non-unitary, could not be stabilizers, but it's possible I'm thinking of a different property.
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.
Yeah, that would be the Clifford group. Stabilizer = Clifford+measurement
Reference: https://www.scottaaronson.com/papers/chp6.pdf Fig 1 and the paragraph below it. Was initially just following the StabilizerState paper but this one seems to have a more succinct definition.
Brings has_stabilizer_effect protocol in line with actual implementations so that it can be used in all Clifford eligibility checks instead of a patchwork of custom conditions.
#2423