Skip to content

Conversation

@alejogoogle
Copy link

No description provided.

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.
Copy link
Collaborator

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:
Copy link
Collaborator

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.
Copy link
Collaborator

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:
Copy link
Collaborator

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants