Runnable quantum algorithms, with their limits visible
Inspect the exact standard-library carrier, run the verified example in Playground, and see the backend, qubit budget, expected outcome, and explicit limitation before using an algorithm.
What these preview releases guarantee
Every card maps one versioned stdlib package to one executable example and a checked conformance outcome. Experimental Pack 0.5 adds compiler-validated QFT/IQFT façades for N=1..5 and reuses bounded Grover for N=2..5; stable adoption, runtime-sized registers, remote networking, hardware execution, and fault-tolerant decoding are not implied.
Generate a bounded algorithm specialization
Choose compile-time parameters. The compiler resolves an exact package export, reports the concrete gate count, and creates a Playground link with the required experimental flag enabled.
Algorithm
Published ready range: N=1..5
- Local backend
- Statevector
- Concrete qubits
- 3
- Expanded gates
- 7
Compiler selection
algorithms.fourier@0.5:qft3experimental.genericCircuits
Inspect generated N/M source
module parametric_gallery_qft_3;
@target("browser-statevector");
use package.algorithms.fourier@0.5;
fn main() {
let q: QReg<3> = qreg[3];
qft<3>(q);
}NM-RFC-0010 · Experimental
Generic oracle compiler lab
This lab invokes the NM-RFC-0010 compiler with explicit negotiation. It does not create runtime-sized registers or dynamic oracle values.
Algorithm Pack 0.4 · Verified artifact
Inspect bounded QEC correction maps
Explore four algebraically verified single-error correction artifacts, their stabilizer generators, syndrome lookup maps, and explicit Tier 1/Tier 2 boundary.
N/M runtime · Seeded experiment
Measure how modeled noise changes an algorithm
Compare the same Bell circuit under five published N/M noise channels, bounded depth, finite shots, and compatible mitigation with the local-simulator evidence boundary always visible.
RFC roadmap for this surface
These cards expose planned programs. A proposed RFC is not an executable capability or implementation approval.
NM-RFC-0031ProposedImplementation lockedGeneric Simon program
- Proposed activation
- experimental.genericSimon=true
NM-RFC-0032ProposedImplementation lockedIterative phase estimation
- Proposed activation
- experimental.iterativePhaseEstimation=true
Family
Local backend
Showing 22 algorithms
NM-ALG-0201Deutsch–Jozsa
algorithms.deutsch_jozsa2@0.2Classify a fixed one-bit oracle as balanced with one quantum query.
- Family
- Oracle algorithms
- Local backend
- Statevector
- Minimum qubits
- 2
Verified teaching outcome
The query qubit is measured as 1 for the bundled balanced f(x)=x oracle.
Explicit boundary
The 0.2 entry freezes one balanced oracle; generic Oracle<N> composition is specified separately.
Inspect stdlib source
circuit deutsch_jozsa2(q: QReg<2>) {
X(q[1]);
H(q[0]);
H(q[1]);
CNOT(q[0], q[1]);
H(q[0]);
}NM-ALG-0202Bernstein–Vazirani
algorithms.bernstein_vazirani3@0.2Recover the fixed hidden string 101 through phase kickback.
- Family
- Oracle algorithms
- Local backend
- Statevector
- Minimum qubits
- 4
Verified teaching outcome
The three query measurements reproduce the secret mask in one oracle call.
Explicit boundary
The current stdlib entry is the bounded three-bit variant, not a runtime-sized oracle.
Inspect stdlib source
circuit bernstein_vazirani3(q: QReg<4>) {
X(q[3]);
H(q[0]);
H(q[1]);
H(q[2]);
H(q[3]);
CNOT(q[0], q[3]);
CNOT(q[2], q[3]);
H(q[0]);
H(q[1]);
H(q[2]);
}NM-ALG-0203Swap Test
algorithms.swap_test@0.2Estimate whether two caller-prepared pure states overlap.
- Family
- State comparison
- Local backend
- Statevector
- Minimum qubits
- 3
Verified teaching outcome
Identical states leave the ancilla deterministically in |0>.
Explicit boundary
The preview reports the ancilla experiment; it does not yet expose a first-class fidelity result type.
Inspect stdlib source
circuit swap_test(q: QReg<3>) {
H(q[0]);
CSWAP(q[0], q[1], q[2]);
H(q[0]);
}NM-ALG-0204Hadamard Test
algorithms.hadamard_test@0.2Read the real expectation of a fixed controlled-Z experiment.
- Family
- State comparison
- Local backend
- Statevector
- Minimum qubits
- 2
Verified teaching outcome
Preparing the target in |1> makes the ancilla return 1, representing Re⟨Z⟩=-1.
Explicit boundary
Arbitrary controlled unitary values wait for the Oracle<N>/Unitary<N> proposal.
Inspect stdlib source
circuit hadamard_test(q: QReg<2>) {
H(q[0]);
CZ(q[0], q[1]);
H(q[0]);
}NM-ALG-0205Small Phase Estimation
algorithms.phase_estimation2@0.2Estimate the exact binary phase of a fixed P(PI/2) eigenstate with two counting qubits.
- Family
- Phase estimation
- Local backend
- Statevector
- Minimum qubits
- 3
Verified teaching outcome
The counting register produces the exact two-bit phase carrier for 1/4 turn.
Explicit boundary
This is a fixed three-qubit teaching circuit, not generic QPE over arbitrary powered unitaries.
Inspect stdlib source
circuit phase_estimation2(q: QReg<3>) {
X(q[2]);
H(q[0]);
H(q[1]);
CP(q[0], q[2], PI);
CP(q[1], q[2], PI / 2);
SWAP(q[0], q[1]);
H(q[1]);
CP(q[0], q[1], -PI / 2);
H(q[0]);
}NM-ALG-0206Three-Qubit Phase-Flip Code
qec.phase_flip3@0.2Encode in the X basis, detect one injected Z error, and apply a bounded correction.
- Family
- Error correction
- Local backend
- Statevector
- Minimum qubits
- 3
Verified teaching outcome
Two X-parity syndromes identify the middle-qubit phase error.
Explicit boundary
The entry is an educational three-qubit code without a fault-tolerant logical-gate layer.
Inspect stdlib source
circuit phase_flip3(q: QReg<3>) {
CNOT(q[0], q[1]);
CNOT(q[0], q[2]);
H(q[0]);
H(q[1]);
H(q[2]);
}NM-ALG-0207Shor Nine-Qubit QEC Code
qec.shor9_code@0.2Encode one logical qubit across three GHZ-like blocks and inspect bit/phase syndromes.
- Family
- Error correction
- Local backend
- Stabilizer
- Minimum qubits
- 9
Verified teaching outcome
The stabilizer path detects and corrects one injected middle-block phase error.
Explicit boundary
This is the Shor error-correcting code, not Shor integer factorization and not a full fault-tolerant decoder.
Inspect stdlib source
circuit shor9_code(q: QReg<9>) {
CNOT(q[0], q[3]);
CNOT(q[0], q[6]);
H(q[0]);
H(q[3]);
H(q[6]);
CNOT(q[0], q[1]);
CNOT(q[0], q[2]);
CNOT(q[3], q[4]);
CNOT(q[3], q[5]);
CNOT(q[6], q[7]);
CNOT(q[6], q[8]);
}NM-ALG-0208Ising Trotter Evolution
chemistry.ising_trotter2@0.2Apply a bounded first-order ZZ plus transverse-X product-formula layer.
- Family
- Hamiltonian simulation
- Local backend
- Statevector
- Minimum qubits
- 2
Verified teaching outcome
Metrics expose the finite post-layer energy terms for comparison and teaching.
Explicit boundary
The 0.2 entry is one caller-parameterized Trotter layer and does not claim an error-bounded evolve statement.
Inspect stdlib source
circuit ising_trotter2(q: QReg<2>, gamma: Angle, beta: Angle) {
RZZ(q[0], q[1], gamma);
Rx(q[0], beta);
Rx(q[1], beta);
}NM-ALG-0301Simon Hidden Mask
algorithms.simon2@0.3Sample an equation orthogonal to the fixed hidden XOR mask 11.
- Family
- Oracle algorithms
- Local backend
- Statevector
- Minimum qubits
- 3
Verified teaching outcome
The two query bits are always equal, so the sampled carrier is 00 or 11 and satisfies y·s=0.
Explicit boundary
The 0.3 circuit freezes s=11 and compresses the two-valued oracle output into one qubit; it is not generic Simon<N>.
Inspect stdlib source
circuit simon2(q: QReg<3>) {
H(q[0]);
H(q[1]);
CNOT(q[0], q[2]);
CNOT(q[1], q[2]);
H(q[0]);
H(q[1]);
}NM-ALG-0302Superdense Coding 11
algorithms.superdense11@0.3Encode two fixed classical bits into one transmitted half of a shared Bell pair.
- Family
- Quantum communication
- Local backend
- Statevector
- Minimum qubits
- 2
Verified teaching outcome
The Bell decoder recovers the classical message 11 deterministically.
Explicit boundary
The bundled circuit fixes the payload to 11 and models the entanglement resource locally; it is not a network transport.
Inspect stdlib source
circuit superdense11(q: QReg<2>) {
H(q[0]);
CNOT(q[0], q[1]);
X(q[0]);
Z(q[0]);
CNOT(q[0], q[1]);
H(q[0]);
}NM-ALG-0303CHSH Correlation Witness
algorithms.chsh_pair@0.3Prepare four independent Bell experiments and evaluate the ideal CHSH correlation combination.
- Family
- Nonlocality witnesses
- Local backend
- Statevector
- Minimum qubits
- 2
Verified teaching outcome
The four exact expectations combine to |S|=2√2, above the classical bound of 2.
Explicit boundary
This is an exact local statevector witness, not a loophole-free sampled Bell experiment on separated hardware.
Inspect stdlib source
circuit chsh_pair(q: QReg<2>, aliceAngle: Angle, bobAngle: Angle) {
H(q[0]);
CNOT(q[0], q[1]);
Ry(q[0], aliceAngle);
Ry(q[1], bobAngle);
}NM-ALG-0304One-Step Coined Quantum Walk
algorithms.coined_walk_step3@0.3Entangle a Hadamard coin with two one-hot direction qubits in one bounded walk step.
- Family
- Quantum walks
- Local backend
- Statevector
- Minimum qubits
- 3
Verified teaching outcome
Exactly one direction qubit is occupied and its branch remains correlated with the coin.
Explicit boundary
The 0.3 entry is one step on two labeled directions; it does not implement a runtime-sized graph or multi-step boundary policy.
Inspect stdlib source
circuit coined_walk_step3(q: QReg<3>) {
H(q[0]);
CNOT(q[0], q[1]);
X(q[0]);
CNOT(q[0], q[2]);
X(q[0]);
}NM-ALG-0401Verified Quantum Teleportation
algorithms.teleportation3@0.4Teleport a caller-prepared qubit through two measured bits and branch-verified X/Z corrections.
- Family
- Quantum communication
- Local backend
- Statevector
- Minimum qubits
- 3
Verified teaching outcome
All four reachable measurement paths restore the receiver to the same reduced state, and the deferred circuit independently matches it.
Explicit boundary
The proof is a local five-qubit-bounded simulator artifact; it does not claim provider hardware latency or physical teleportation.
Inspect stdlib source
circuit teleportation3(q: QReg<3>) {
H(q[1]);
CNOT(q[1], q[2]);
CNOT(q[0], q[1]);
H(q[0]);
}NM-ALG-0402Verified Entanglement Swapping
algorithms.entanglement_swap4@0.4Measure the inner halves of two Bell pairs and restore one branch-invariant outer Bell pair.
- Family
- Quantum communication
- Local backend
- Statevector
- Minimum qubits
- 4
Verified teaching outcome
Four reachable inner-measurement paths preserve both outer marginals; the deferred reference proves the full outer-pair state.
Explicit boundary
The local proof does not model repeater distance, loss, memory lifetime, networking, or hardware feed-forward latency.
Inspect stdlib source
circuit entanglement_swap4(q: QReg<4>) {
H(q[0]);
CNOT(q[0], q[2]);
H(q[3]);
CNOT(q[3], q[1]);
CNOT(q[2], q[3]);
H(q[2]);
}NM-ALG-0403[[5,1,3]] Perfect-Code Correction
qec.perfect5_code@0.4Prepare logical |0>, inject one X error, read four exact stabilizer checks, and apply the verified discrete correction map.
- Family
- Error correction
- Local backend
- Stabilizer
- Minimum qubits
- 9
Verified teaching outcome
All four residual checks return deterministic +1 after the selected Pauli correction.
Explicit boundary
The artifact covers the frozen 15 single-Pauli cases; it is not a noise, multi-round decoder, fault-tolerance, or hardware result.
Inspect stdlib source
circuit perfect5_code(q: QReg<9>) {
H(q[0]);
H(q[1]);
H(q[2]);
H(q[3]);
H(q[4]);
CZ(q[0], q[1]);
CZ(q[0], q[2]);
CZ(q[0], q[3]);
CZ(q[0], q[4]);
CZ(q[1], q[3]);
CZ(q[2], q[3]);
CZ(q[2], q[4]);
H(q[0]);
X(q[1]);
X(q[2]);
X(q[3]);
X(q[4]);
}NM-ALG-0404[[7,1,3]] Steane-Code Correction
qec.steane7_code@0.4Prepare logical |0>, inject one Y error, read six exact checks, and apply the verified discrete correction map.
- Family
- Error correction
- Local backend
- Stabilizer
- Minimum qubits
- 13
Verified teaching outcome
All six residual checks return deterministic +1 after correction.
Explicit boundary
The artifact covers the frozen 21 single-Pauli cases and makes no logical-noise, threshold, or hardware claim.
Inspect stdlib source
circuit steane7_code(q: QReg<13>) {
H(q[0]);
H(q[1]);
H(q[2]);
H(q[3]);
H(q[4]);
H(q[5]);
H(q[6]);
CZ(q[0], q[3]);
CZ(q[0], q[5]);
CZ(q[0], q[6]);
CZ(q[1], q[3]);
CZ(q[1], q[5]);
CZ(q[2], q[3]);
CZ(q[2], q[6]);
CZ(q[4], q[5]);
CZ(q[4], q[6]);
H(q[0]);
H(q[1]);
H(q[2]);
H(q[4]);
}NM-ALG-0405Distance-3 Rotated Surface Patch
qec.surface_d3_patch@0.4Prepare the fixed logical |0> patch, inject one Z error, and decode eight exact stabilizer checks.
- Family
- Error correction
- Local backend
- Stabilizer
- Minimum qubits
- 17
Verified teaching outcome
All eight residual checks return deterministic +1; 27 errors map to 23 exact syndromes through verified degeneracy.
Explicit boundary
This is a fixed algebraic single-error map, not minimum-weight matching, repeated syndrome extraction, threshold evidence, or hardware.
Inspect stdlib source
circuit surface_d3_patch(q: QReg<17>) {
H(q[0]);
H(q[1]);
H(q[2]);
H(q[3]);
H(q[4]);
H(q[5]);
H(q[6]);
H(q[7]);
H(q[8]);
CZ(q[0], q[3]);
CZ(q[0], q[7]);
CZ(q[1], q[5]);
CZ(q[1], q[8]);
CZ(q[2], q[5]);
CZ(q[2], q[8]);
CZ(q[4], q[5]);
CZ(q[4], q[7]);
CZ(q[4], q[8]);
CZ(q[6], q[7]);
H(q[0]);
H(q[1]);
H(q[2]);
H(q[4]);
H(q[6]);
}NM-ALG-040625-Qubit Repetition-Code Correction
qec.repetition_code25@0.4Locate one middle bit flip with twelve adjacent parity checks and apply the exact single-X correction table.
- Family
- Error correction
- Local backend
- Stabilizer
- Minimum qubits
- 25
Verified teaching outcome
All twelve residual checks return deterministic +1 after correction.
Explicit boundary
Twelve syndrome bits exceed the eight-bit Tier 1 branch budget, so runtime evidence is explicitly Tier 2; the algebraic 13-error map remains exact.
Inspect stdlib source
circuit repetition_code25(q: QReg<25>) {
Z(q[0]);
Z(q[0]);
}NM-ALG-0407100-Qubit GHZ State
states.ghz100@0.4Prepare a 100-qubit GHZ chain with one Hadamard and 99 CNOT gates.
- Family
- State preparation
- Local backend
- Stabilizer
- Minimum qubits
- 100
Verified teaching outcome
The end-to-end Z parity is deterministic and the result stays on the stabilizer backend.
Explicit boundary
This is an ideal local stabilizer state, not a hardware-prepared 100-qubit entanglement claim.
Inspect stdlib source
circuit ghz100(q: QReg<100>) {
H(q[0]);
CNOT(q[0], q[1]);
CNOT(q[1], q[2]);
CNOT(q[2], q[3]);
CNOT(q[3], q[4]);
CNOT(q[4], q[5]);
CNOT(q[5], q[6]);
CNOT(q[6], q[7]);
CNOT(q[7], q[8]);
CNOT(q[8], q[9]);
CNOT(q[9], q[10]);
CNOT(q[10], q[11]);
CNOT(q[11], q[12]);
CNOT(q[12], q[13]);
CNOT(q[13], q[14]);
CNOT(q[14], q[15]);
CNOT(q[15], q[16]);
CNOT(q[16], q[17]);
CNOT(q[17], q[18]);
CNOT(q[18], q[19]);
CNOT(q[19], q[20]);
CNOT(q[20], q[21]);
CNOT(q[21], q[22]);
CNOT(q[22], q[23]);
CNOT(q[23], q[24]);
CNOT(q[24], q[25]);
CNOT(q[25], q[26]);
CNOT(q[26], q[27]);
CNOT(q[27], q[28]);
CNOT(q[28], q[29]);
CNOT(q[29], q[30]);
CNOT(q[30], q[31]);
CNOT(q[31], q[32]);
CNOT(q[32], q[33]);
CNOT(q[33], q[34]);
CNOT(q[34], q[35]);
CNOT(q[35], q[36]);
CNOT(q[36], q[37]);
CNOT(q[37], q[38]);
CNOT(q[38], q[39]);
CNOT(q[39], q[40]);
CNOT(q[40], q[41]);
CNOT(q[41], q[42]);
CNOT(q[42], q[43]);
CNOT(q[43], q[44]);
CNOT(q[44], q[45]);
CNOT(q[45], q[46]);
CNOT(q[46], q[47]);
CNOT(q[47], q[48]);
CNOT(q[48], q[49]);
CNOT(q[49], q[50]);
CNOT(q[50], q[51]);
CNOT(q[51], q[52]);
CNOT(q[52], q[53]);
CNOT(q[53], q[54]);
CNOT(q[54], q[55]);
CNOT(q[55], q[56]);
CNOT(q[56], q[57]);
CNOT(q[57], q[58]);
CNOT(q[58], q[59]);
CNOT(q[59], q[60]);
CNOT(q[60], q[61]);
CNOT(q[61], q[62]);
CNOT(q[62], q[63]);
CNOT(q[63], q[64]);
CNOT(q[64], q[65]);
CNOT(q[65], q[66]);
CNOT(q[66], q[67]);
CNOT(q[67], q[68]);
CNOT(q[68], q[69]);
CNOT(q[69], q[70]);
CNOT(q[70], q[71]);
CNOT(q[71], q[72]);
CNOT(q[72], q[73]);
CNOT(q[73], q[74]);
CNOT(q[74], q[75]);
CNOT(q[75], q[76]);
CNOT(q[76], q[77]);
CNOT(q[77], q[78]);
CNOT(q[78], q[79]);
CNOT(q[79], q[80]);
CNOT(q[80], q[81]);
CNOT(q[81], q[82]);
CNOT(q[82], q[83]);
CNOT(q[83], q[84]);
CNOT(q[84], q[85]);
CNOT(q[85], q[86]);
CNOT(q[86], q[87]);
CNOT(q[87], q[88]);
CNOT(q[88], q[89]);
CNOT(q[89], q[90]);
CNOT(q[90], q[91]);
CNOT(q[91], q[92]);
CNOT(q[92], q[93]);
CNOT(q[93], q[94]);
CNOT(q[94], q[95]);
CNOT(q[95], q[96]);
CNOT(q[96], q[97]);
CNOT(q[97], q[98]);
CNOT(q[98], q[99]);
}NM-ALG-0408100-Qubit Line Graph State
states.graph_state100@0.4Prepare a 100-node line graph state with exact canonical adjacency.
- Family
- State preparation
- Local backend
- Stabilizer
- Minimum qubits
- 100
Verified teaching outcome
The middle graph generator is deterministic +1 and the scale view exposes all 99 exact edges.
Explicit boundary
The topology is one fixed ideal line graph; runtime-sized graphs, noise, and hardware preparation are outside this entry.
Inspect stdlib source
circuit graph_state100(q: QReg<100>) {
H(q[0]);
H(q[1]);
H(q[2]);
H(q[3]);
H(q[4]);
H(q[5]);
H(q[6]);
H(q[7]);
H(q[8]);
H(q[9]);
H(q[10]);
H(q[11]);
H(q[12]);
H(q[13]);
H(q[14]);
H(q[15]);
H(q[16]);
H(q[17]);
H(q[18]);
H(q[19]);
H(q[20]);
H(q[21]);
H(q[22]);
H(q[23]);
H(q[24]);
H(q[25]);
H(q[26]);
H(q[27]);
H(q[28]);
H(q[29]);
H(q[30]);
H(q[31]);
H(q[32]);
H(q[33]);
H(q[34]);
H(q[35]);
H(q[36]);
H(q[37]);
H(q[38]);
H(q[39]);
H(q[40]);
H(q[41]);
H(q[42]);
H(q[43]);
H(q[44]);
H(q[45]);
H(q[46]);
H(q[47]);
H(q[48]);
H(q[49]);
H(q[50]);
H(q[51]);
H(q[52]);
H(q[53]);
H(q[54]);
H(q[55]);
H(q[56]);
H(q[57]);
H(q[58]);
H(q[59]);
H(q[60]);
H(q[61]);
H(q[62]);
H(q[63]);
H(q[64]);
H(q[65]);
H(q[66]);
H(q[67]);
H(q[68]);
H(q[69]);
H(q[70]);
H(q[71]);
H(q[72]);
H(q[73]);
H(q[74]);
H(q[75]);
H(q[76]);
H(q[77]);
H(q[78]);
H(q[79]);
H(q[80]);
H(q[81]);
H(q[82]);
H(q[83]);
H(q[84]);
H(q[85]);
H(q[86]);
H(q[87]);
H(q[88]);
H(q[89]);
H(q[90]);
H(q[91]);
H(q[92]);
H(q[93]);
H(q[94]);
H(q[95]);
H(q[96]);
H(q[97]);
H(q[98]);
H(q[99]);
CZ(q[0], q[1]);
CZ(q[1], q[2]);
CZ(q[2], q[3]);
CZ(q[3], q[4]);
CZ(q[4], q[5]);
CZ(q[5], q[6]);
CZ(q[6], q[7]);
CZ(q[7], q[8]);
CZ(q[8], q[9]);
CZ(q[9], q[10]);
CZ(q[10], q[11]);
CZ(q[11], q[12]);
CZ(q[12], q[13]);
CZ(q[13], q[14]);
CZ(q[14], q[15]);
CZ(q[15], q[16]);
CZ(q[16], q[17]);
CZ(q[17], q[18]);
CZ(q[18], q[19]);
CZ(q[19], q[20]);
CZ(q[20], q[21]);
CZ(q[21], q[22]);
CZ(q[22], q[23]);
CZ(q[23], q[24]);
CZ(q[24], q[25]);
CZ(q[25], q[26]);
CZ(q[26], q[27]);
CZ(q[27], q[28]);
CZ(q[28], q[29]);
CZ(q[29], q[30]);
CZ(q[30], q[31]);
CZ(q[31], q[32]);
CZ(q[32], q[33]);
CZ(q[33], q[34]);
CZ(q[34], q[35]);
CZ(q[35], q[36]);
CZ(q[36], q[37]);
CZ(q[37], q[38]);
CZ(q[38], q[39]);
CZ(q[39], q[40]);
CZ(q[40], q[41]);
CZ(q[41], q[42]);
CZ(q[42], q[43]);
CZ(q[43], q[44]);
CZ(q[44], q[45]);
CZ(q[45], q[46]);
CZ(q[46], q[47]);
CZ(q[47], q[48]);
CZ(q[48], q[49]);
CZ(q[49], q[50]);
CZ(q[50], q[51]);
CZ(q[51], q[52]);
CZ(q[52], q[53]);
CZ(q[53], q[54]);
CZ(q[54], q[55]);
CZ(q[55], q[56]);
CZ(q[56], q[57]);
CZ(q[57], q[58]);
CZ(q[58], q[59]);
CZ(q[59], q[60]);
CZ(q[60], q[61]);
CZ(q[61], q[62]);
CZ(q[62], q[63]);
CZ(q[63], q[64]);
CZ(q[64], q[65]);
CZ(q[65], q[66]);
CZ(q[66], q[67]);
CZ(q[67], q[68]);
CZ(q[68], q[69]);
CZ(q[69], q[70]);
CZ(q[70], q[71]);
CZ(q[71], q[72]);
CZ(q[72], q[73]);
CZ(q[73], q[74]);
CZ(q[74], q[75]);
CZ(q[75], q[76]);
CZ(q[76], q[77]);
CZ(q[77], q[78]);
CZ(q[78], q[79]);
CZ(q[79], q[80]);
CZ(q[80], q[81]);
CZ(q[81], q[82]);
CZ(q[82], q[83]);
CZ(q[83], q[84]);
CZ(q[84], q[85]);
CZ(q[85], q[86]);
CZ(q[86], q[87]);
CZ(q[87], q[88]);
CZ(q[88], q[89]);
CZ(q[89], q[90]);
CZ(q[90], q[91]);
CZ(q[91], q[92]);
CZ(q[92], q[93]);
CZ(q[93], q[94]);
CZ(q[94], q[95]);
CZ(q[95], q[96]);
CZ(q[96], q[97]);
CZ(q[97], q[98]);
CZ(q[98], q[99]);
}NM-ALG-0409Mermin–GHZ Witness
nonlocality.mermin_ghz3@0.4Read the exact XXX/XYY/YXY/YYX eigenvalue pattern of a three-qubit GHZ state.
- Family
- Nonlocality witnesses
- Local backend
- Stabilizer
- Minimum qubits
- 3
Verified teaching outcome
The deterministic bit pattern 0,1,1,1 corresponds to the ideal Mermin value four.
Explicit boundary
This is an exact local simulator witness, not a spacelike-separated loophole-free Bell experiment.
Inspect stdlib source
circuit mermin_ghz3(q: QReg<3>) {
H(q[0]);
CNOT(q[0], q[1]);
CNOT(q[1], q[2]);
}NM-ALG-0410100-Qubit Clifford Round Trip
benchmark.stabilizer_rb100@0.4Run a deterministic 398-gate Clifford sequence followed by its exact inverse.
- Family
- Simulator benchmarks
- Local backend
- Stabilizer
- Minimum qubits
- 100
Verified teaching outcome
The first and last Z checks return deterministic +1 on the restored all-zero state.
Explicit boundary
This is a simulator regression workload; it does not randomize sequences, fit decay, estimate fidelity, or claim hardware randomized benchmarking.
Inspect stdlib source
circuit stabilizer_rb100(q: QReg<100>) {
H(q[0]);
H(q[1]);
H(q[2]);
H(q[3]);
H(q[4]);
H(q[5]);
H(q[6]);
H(q[7]);
H(q[8]);
H(q[9]);
H(q[10]);
H(q[11]);
H(q[12]);
H(q[13]);
H(q[14]);
H(q[15]);
H(q[16]);
H(q[17]);
H(q[18]);
H(q[19]);
H(q[20]);
H(q[21]);
H(q[22]);
H(q[23]);
H(q[24]);
H(q[25]);
H(q[26]);
H(q[27]);
H(q[28]);
H(q[29]);
H(q[30]);
H(q[31]);
H(q[32]);
H(q[33]);
H(q[34]);
H(q[35]);
H(q[36]);
H(q[37]);
H(q[38]);
H(q[39]);
H(q[40]);
H(q[41]);
H(q[42]);
H(q[43]);
H(q[44]);
H(q[45]);
H(q[46]);
H(q[47]);
H(q[48]);
H(q[49]);
H(q[50]);
H(q[51]);
H(q[52]);
H(q[53]);
H(q[54]);
H(q[55]);
H(q[56]);
H(q[57]);
H(q[58]);
H(q[59]);
H(q[60]);
H(q[61]);
H(q[62]);
H(q[63]);
H(q[64]);
H(q[65]);
H(q[66]);
H(q[67]);
H(q[68]);
H(q[69]);
H(q[70]);
H(q[71]);
H(q[72]);
H(q[73]);
H(q[74]);
H(q[75]);
H(q[76]);
H(q[77]);
H(q[78]);
H(q[79]);
H(q[80]);
H(q[81]);
H(q[82]);
H(q[83]);
H(q[84]);
H(q[85]);
H(q[86]);
H(q[87]);
H(q[88]);
H(q[89]);
H(q[90]);
H(q[91]);
H(q[92]);
H(q[93]);
H(q[94]);
H(q[95]);
H(q[96]);
H(q[97]);
H(q[98]);
H(q[99]);
H(q[0]);
H(q[1]);
H(q[2]);
H(q[3]);
H(q[4]);
H(q[5]);
H(q[6]);
H(q[7]);
H(q[8]);
H(q[9]);
H(q[10]);
H(q[11]);
H(q[12]);
H(q[13]);
H(q[14]);
H(q[15]);
H(q[16]);
H(q[17]);
H(q[18]);
H(q[19]);
H(q[20]);
H(q[21]);
H(q[22]);
H(q[23]);
H(q[24]);
H(q[25]);
H(q[26]);
H(q[27]);
H(q[28]);
H(q[29]);
H(q[30]);
H(q[31]);
H(q[32]);
H(q[33]);
H(q[34]);
H(q[35]);
H(q[36]);
H(q[37]);
H(q[38]);
H(q[39]);
H(q[40]);
H(q[41]);
H(q[42]);
H(q[43]);
H(q[44]);
H(q[45]);
H(q[46]);
H(q[47]);
H(q[48]);
H(q[49]);
H(q[50]);
H(q[51]);
H(q[52]);
H(q[53]);
H(q[54]);
H(q[55]);
H(q[56]);
H(q[57]);
H(q[58]);
H(q[59]);
H(q[60]);
H(q[61]);
H(q[62]);
H(q[63]);
H(q[64]);
H(q[65]);
H(q[66]);
H(q[67]);
H(q[68]);
H(q[69]);
H(q[70]);
H(q[71]);
H(q[72]);
H(q[73]);
H(q[74]);
H(q[75]);
H(q[76]);
H(q[77]);
H(q[78]);
H(q[79]);
H(q[80]);
H(q[81]);
H(q[82]);
H(q[83]);
H(q[84]);
H(q[85]);
H(q[86]);
H(q[87]);
H(q[88]);
H(q[89]);
H(q[90]);
H(q[91]);
H(q[92]);
H(q[93]);
H(q[94]);
H(q[95]);
H(q[96]);
H(q[97]);
H(q[98]);
H(q[99]);
CZ(q[0], q[1]);
CZ(q[1], q[2]);
CZ(q[2], q[3]);
CZ(q[3], q[4]);
CZ(q[4], q[5]);
CZ(q[5], q[6]);
CZ(q[6], q[7]);
CZ(q[7], q[8]);
CZ(q[8], q[9]);
CZ(q[9], q[10]);
CZ(q[10], q[11]);
CZ(q[11], q[12]);
CZ(q[12], q[13]);
CZ(q[13], q[14]);
CZ(q[14], q[15]);
CZ(q[15], q[16]);
CZ(q[16], q[17]);
CZ(q[17], q[18]);
CZ(q[18], q[19]);
CZ(q[19], q[20]);
CZ(q[20], q[21]);
CZ(q[21], q[22]);
CZ(q[22], q[23]);
CZ(q[23], q[24]);
CZ(q[24], q[25]);
CZ(q[25], q[26]);
CZ(q[26], q[27]);
CZ(q[27], q[28]);
CZ(q[28], q[29]);
CZ(q[29], q[30]);
CZ(q[30], q[31]);
CZ(q[31], q[32]);
CZ(q[32], q[33]);
CZ(q[33], q[34]);
CZ(q[34], q[35]);
CZ(q[35], q[36]);
CZ(q[36], q[37]);
CZ(q[37], q[38]);
CZ(q[38], q[39]);
CZ(q[39], q[40]);
CZ(q[40], q[41]);
CZ(q[41], q[42]);
CZ(q[42], q[43]);
CZ(q[43], q[44]);
CZ(q[44], q[45]);
CZ(q[45], q[46]);
CZ(q[46], q[47]);
CZ(q[47], q[48]);
CZ(q[48], q[49]);
CZ(q[49], q[50]);
CZ(q[50], q[51]);
CZ(q[51], q[52]);
CZ(q[52], q[53]);
CZ(q[53], q[54]);
CZ(q[54], q[55]);
CZ(q[55], q[56]);
CZ(q[56], q[57]);
CZ(q[57], q[58]);
CZ(q[58], q[59]);
CZ(q[59], q[60]);
CZ(q[60], q[61]);
CZ(q[61], q[62]);
CZ(q[62], q[63]);
CZ(q[63], q[64]);
CZ(q[64], q[65]);
CZ(q[65], q[66]);
CZ(q[66], q[67]);
CZ(q[67], q[68]);
CZ(q[68], q[69]);
CZ(q[69], q[70]);
CZ(q[70], q[71]);
CZ(q[71], q[72]);
CZ(q[72], q[73]);
CZ(q[73], q[74]);
CZ(q[74], q[75]);
CZ(q[75], q[76]);
CZ(q[76], q[77]);
CZ(q[77], q[78]);
CZ(q[78], q[79]);
CZ(q[79], q[80]);
CZ(q[80], q[81]);
CZ(q[81], q[82]);
CZ(q[82], q[83]);
CZ(q[83], q[84]);
CZ(q[84], q[85]);
CZ(q[85], q[86]);
CZ(q[86], q[87]);
CZ(q[87], q[88]);
CZ(q[88], q[89]);
CZ(q[89], q[90]);
CZ(q[90], q[91]);
CZ(q[91], q[92]);
CZ(q[92], q[93]);
CZ(q[93], q[94]);
CZ(q[94], q[95]);
CZ(q[95], q[96]);
CZ(q[96], q[97]);
CZ(q[97], q[98]);
CZ(q[98], q[99]);
CZ(q[0], q[1]);
CZ(q[1], q[2]);
CZ(q[2], q[3]);
CZ(q[3], q[4]);
CZ(q[4], q[5]);
CZ(q[5], q[6]);
CZ(q[6], q[7]);
CZ(q[7], q[8]);
CZ(q[8], q[9]);
CZ(q[9], q[10]);
CZ(q[10], q[11]);
CZ(q[11], q[12]);
CZ(q[12], q[13]);
CZ(q[13], q[14]);
CZ(q[14], q[15]);
CZ(q[15], q[16]);
CZ(q[16], q[17]);
CZ(q[17], q[18]);
CZ(q[18], q[19]);
CZ(q[19], q[20]);
CZ(q[20], q[21]);
CZ(q[21], q[22]);
CZ(q[22], q[23]);
CZ(q[23], q[24]);
CZ(q[24], q[25]);
CZ(q[25], q[26]);
CZ(q[26], q[27]);
CZ(q[27], q[28]);
CZ(q[28], q[29]);
CZ(q[29], q[30]);
CZ(q[30], q[31]);
CZ(q[31], q[32]);
CZ(q[32], q[33]);
CZ(q[33], q[34]);
CZ(q[34], q[35]);
CZ(q[35], q[36]);
CZ(q[36], q[37]);
CZ(q[37], q[38]);
CZ(q[38], q[39]);
CZ(q[39], q[40]);
CZ(q[40], q[41]);
CZ(q[41], q[42]);
CZ(q[42], q[43]);
CZ(q[43], q[44]);
CZ(q[44], q[45]);
CZ(q[45], q[46]);
CZ(q[46], q[47]);
CZ(q[47], q[48]);
CZ(q[48], q[49]);
CZ(q[49], q[50]);
CZ(q[50], q[51]);
CZ(q[51], q[52]);
CZ(q[52], q[53]);
CZ(q[53], q[54]);
CZ(q[54], q[55]);
CZ(q[55], q[56]);
CZ(q[56], q[57]);
CZ(q[57], q[58]);
CZ(q[58], q[59]);
CZ(q[59], q[60]);
CZ(q[60], q[61]);
CZ(q[61], q[62]);
CZ(q[62], q[63]);
CZ(q[63], q[64]);
CZ(q[64], q[65]);
CZ(q[65], q[66]);
CZ(q[66], q[67]);
CZ(q[67], q[68]);
CZ(q[68], q[69]);
CZ(q[69], q[70]);
CZ(q[70], q[71]);
CZ(q[71], q[72]);
CZ(q[72], q[73]);
CZ(q[73], q[74]);
CZ(q[74], q[75]);
CZ(q[75], q[76]);
CZ(q[76], q[77]);
CZ(q[77], q[78]);
CZ(q[78], q[79]);
CZ(q[79], q[80]);
CZ(q[80], q[81]);
CZ(q[81], q[82]);
CZ(q[82], q[83]);
CZ(q[83], q[84]);
CZ(q[84], q[85]);
CZ(q[85], q[86]);
CZ(q[86], q[87]);
CZ(q[87], q[88]);
CZ(q[88], q[89]);
CZ(q[89], q[90]);
CZ(q[90], q[91]);
CZ(q[91], q[92]);
CZ(q[92], q[93]);
CZ(q[93], q[94]);
CZ(q[94], q[95]);
CZ(q[95], q[96]);
CZ(q[96], q[97]);
CZ(q[97], q[98]);
CZ(q[98], q[99]);
}