-
Notifications
You must be signed in to change notification settings - Fork 130
Add Kochen-Specker inequality implementation #449
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
base: main
Are you sure you want to change the base?
Add Kochen-Specker inequality implementation #449
Conversation
| virtual_z_half_turns: float = 0.0, | ||
| add_ancilla_to_measure_key: bool = False, | ||
| ) -> cirq.FrozenCircuit: | ||
| """Circuit to measure the idx'th col or row of this magic square. |
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.
idx is not a parameter to this function? I am not sure I understand this docstring.
| for idx in indices | ||
| } | ||
|
|
||
| def pauli_key(row: int, col: int, axis: Axis) -> PauliKey: |
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 recommend pulling this out instead of having it be an inline function (it's more testable that way).
| measure_key: str | None, | ||
| virtual_z_half_turns: float = 0.0, | ||
| ) -> cirq.FrozenCircuit: | ||
| """Make a circuit to perform a QND measurement of the specified Pauli. |
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.
What's a QND measurement? We should define this in the docstring or link to something.
|
|
||
| def measure_reset_circuit( | ||
| q0: cirq.Qid, q1: cirq.Qid, anc: cirq.Qid, measure_key: str | None | ||
| ) -> cirq.FrozenCircuit: |
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.
missing docstring.
| @@ -0,0 +1,889 @@ | |||
| # Copyright 2025 Google | |||
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.
Please add tests.
No description provided.