Standard textbook derivation of ancilla-based non-destructive parity and stabilizer measurement circuits.
doi.org/10.1017/cbo9780511976667 ↗Joint parity operator measurement
The joint parity operator Z^{⊗n} and its standard non-destructive ancilla-based measurement circuit, the core primitive behind stabilizer syndrome extraction.
Atlas stars stay in the public catalog. Saving this entry to your workspace starts an unstarred private copy.
Almost every stabilizer code, entanglement witness, and error-correction syndrome extraction reduces to the same primitive: measure the joint parity of a set of qubits without collapsing any other information about their individual states.
Circuit & simulation
What this takes and returns
TakesNothingWhat joins here
No input port, deliberately. You measure a state with this entry; you do not apply it and pass a register on.
Nothing in the Atlas meets this end.
ReturnsNothingWhat joins here
No output port, deliberately. An observable is measured with, never applied, so there is no register to hand on.
Nothing in the Atlas meets this end.
Not a stage. You measure a state with this; you do not apply it and pass a register on. It has a width and deliberately no ports. See all 60 →
How it works
The joint parity operator on qubits is
Spectrum. Since each has eigenvalues , has eigenvalue on basis state , where is the Hamming weight of the bit string : on even-weight strings, on odd-weight strings. since for every factor, so is both Hermitian and unitary — a valid observable with only two possible measurement outcomes.
Non-destructive measurement circuit. To measure without destroying superpositions within a fixed-parity eigenspace (essential for stabilizer codes, where you want to detect an error without collapsing the encoded logical information), introduce one ancilla in and apply for every data qubit . Since CNOT targeting the ancilla implements , measuring the ancilla in the basis returns the parity bit (equivalently, ) while leaving the data register's relative phases and any coherence within a parity sector completely undisturbed — only the parity value is extracted, exactly the property a syndrome measurement needs.
Where this shows up. GHZ-state and cluster-state verification protocols measure exactly this operator (or products of it, e.g. the stabilizer generators of the graph states elsewhere in this catalog are all built from parity-type -and--string measurements) to certify entanglement without full state tomography. In stabilizer error correction, syndrome bits are joint-parity measurements of - or -type check operators, and the non-destructive ancilla trick above is the literal circuit used to extract each syndrome bit without collapsing the encoded logical qubit.
Implementation
from qiskit import QuantumCircuit
from qiskit.quantum_info import Statevector
import numpy as np
def parity_measurement_circuit(n: int) -> QuantumCircuit:
qc = QuantumCircuit(n + 1, 1) # qubits 0..n-1 = data, qubit n = ancilla
for i in range(n):
qc.cx(i, n)
qc.measure(n, 0)
return qc
# Verify P = Z^{\otimes n} spectrum directly against Hamming weight
n = 4
for x in range(2 ** n):
bitstring = format(x, f"0{n}b")
weight = bitstring.count("1")
expected_parity = 1 if weight % 2 == 0 else -1
assert expected_parity == (-1) ** weight
qc = parity_measurement_circuit(n)
print(qc.draw())
FINAL_CIRCUIT = qcQuantum vs classical
Classical baseline
Use a classical state-vector or matrix simulation at the same width, precision, and measurement objective.
Quantum claim
The quantum record demonstrates a state or operator behavior; it does not make classical simulation or communication costs disappear.
How to compare
Compare fidelity, samples, gate depth, noise, memory, and the cost of preparing and reading the state.
Declared gaps
Nobody has reviewed this record for gaps yet.