Skip to content

Standard

Textbook stabilizer circuits

19/19 passed in 154ms

TestWhat it doesResult
test_bell_correlationMeasuring both Bell qubits yields equal outcomes across many seeds.✅ pass
test_bell_stabilizersThe Bell state H(0).CX(0,1) has canonical stabilizers +XX, +ZZ.✅ pass
test_coherent_estimateFor H(0).RZ(0, theta), estimate of <X> tracks cos(theta).✅ pass
test_depolarize_flip_rateDEPOLARIZE1(0.75) on |0> gives a measured-one frequency near 0.5.✅ pass
test_fidelity_half|0> and |+> overlap with fidelity 0.5.✅ pass
test_fidelity_identicalTwo identical Bell states have fidelity 1.0.✅ pass
test_fidelity_orthogonalOrthogonal |Phi+> and |Phi-> have fidelity 0.0.✅ pass
test_ghz_correlationGHZ all-Z measurements collapse to either all-zero or all-one.✅ pass
test_ghz_stabilizersGHZ on 4 qubits via H + CX chain has the expected canonical stabilizers.✅ pass
test_measure_resetMR measures the prior value then leaves the qubit in |0>.✅ pass
test_measure_then_reuseA qubit measured and reset can be re-prepared and remeasured.✅ pass
test_noisy_flip_rateX_ERROR(p) flips |0> with empirical frequency close to p.✅ pass
test_reset_to_zeroR resets a qubit to |0>, so <Z> = +1 afterward.✅ pass
test_stabilizer_deterministicOn a Bell state, measure of ZZ and XX is a deterministic +1.✅ pass
test_stabilizer_randomOn a product state |00>, measuring XX is a random coin flip.✅ pass
test_teleport_minusTeleporting |-> gives <X> = -1 on the output qubit q2.✅ pass
test_teleport_oneTeleporting |1> gives <Z> = -1 on the output qubit q2.✅ pass
test_teleport_plusTeleporting |+> gives <X> = +1 on the output qubit q2.✅ pass
test_teleport_zeroTeleporting |0> gives <Z> = +1 on the output qubit q2.✅ pass