Generate 4 truly random bits using quantum superposition and measurement.
-
Updated
Feb 19, 2026 - OpenQASM
Generate 4 truly random bits using quantum superposition and measurement.
3-qubit code that corrects single phase-flip (Z) errors by encoding in the X basis.
W state: symmetric 3-qubit entangled state (|001⟩ + |010⟩ + |100⟩)/√3.
Find the hidden period s='11' of a 2-to-1 function f(x) = f(x⊕s) with exponential quantum speedup.
One first-order Trotter step simulating the 1D transverse-field Ising model on 4 qubits (J=1, h=0.5, dt=0.1).
Estimate the eigenphase φ=1/8 of the T gate: U|ψ⟩=e^{i2πφ}|ψ⟩ using 3 counting qubits.
Teleport an arbitrary single-qubit state from Alice to Bob using a shared Bell pair and two classical bits.
3-qubit repetition code that encodes 1 logical qubit and corrects single bit-flip (X) errors.
Demonstrate the phase kickback trick: a CNOT with ancilla in |−⟩ imprints a phase on the control qubit.
Fair coin flipping over a quantum channel: Alice and Bob each contribute randomness via entanglement.
Quadratic speedup for unstructured search: finds |11⟩ among 4 basis states with one Grover iteration.
Count the number of solutions to a 2-qubit oracle (marks |11⟩) using QPE applied to Grover's operator.
Reversible quantum half-adder: computes sum = a XOR b and carry = a AND b for 1-bit inputs.
Greenberger–Horne–Zeilinger (GHZ) state: maximally entangled 3-qubit state (|000⟩ + |111⟩)/√2.
Measure |⟨ψ|φ⟩|² between two quantum states using a Fredkin (controlled-SWAP) gate.
Detect (not correct) any single-qubit error using 4 physical qubits encoding 2 logical qubits.
First quantum error-correcting code: encodes 1 logical qubit into 9 physical qubits, correcting any single-qubit error.
4-qubit Quantum Fourier Transform (QFT): the quantum analogue of the discrete Fourier transform.
3-party quantum secret sharing using a GHZ state: Alice distributes a secret that requires Bob and Charlie to cooperate.
Estimate the amplitude a = sin²(π/8) ≈ 0.146 using 3 precision qubits via quantum phase estimation.
Add a description, image, and links to the openqc-algorithm topic page so that developers can more easily learn about it.
To associate your repository with the openqc-algorithm topic, visit your repo's landing page and select "manage topics."