deltakit.circuit.gates.MZ#
- class deltakit.circuit.gates.MZ(qubit: Qubit[T] | T, probability: float = 0.0, invert: bool = False, *, tag: str | None = None)#
Bases:
OneQubitMeasurementGate[T]Z-basis measurement (optionally noisy). Projects each target qubit into \(\ket{0}\) or \(\ket{1}\) and reports its value (false = \(\ket{0}\), true = \(\ket{1}\)).
- Parameters:
qubit (Qubit[T] | T) – The qubit that this gate acts on.
probability (float, optional) – A single float specifying the probability of flipping each reported measurement result, by default 0.0.
invert (bool, optional) – Whether to invert the result of this measurement.
Notes
If this gate is parameterized by a probability argument, the recorded result will be flipped with that probability. If not, the recorded result is noiseless. Note that the noise only affects the recorded result, not the target qubit’s state.
Stabilizer Generators:Z -> m xor chance(p)Z -> +ZDecomposition (into H, S, CX, M, R):The following circuit is equivalent (up to global phase) toM 0M 0(The decomposition is trivial because this gate is in the target gateset.)
Methods#
Determine whether two measurement gates are approximately equal within a tolerance. |
|
Convert the qubits this gate acts on to equivalent stim targets. |
|
Transform this gates's qubits according to the id mapping. |