Ten live demonstrations — four algorithms and protocols, one quantum ML circuit and five error-correcting codes — executed in real time on the BEAM by QxSim, a pure-Elixir state-vector simulator inside this service. The demos began on qx, Craig Richards' Elixir simulator (Apache-2.0, version 0.5.1), which we credit; QxSim is a separate implementation on Erlang tuples, and a comparison with every qx release (all built on Nx) found no shared code. Every result is computed fresh on each run.
Creates the maximally entangled Bell state |Φ⁺⟩ = (|00⟩+|11⟩)/√2 using a Hadamard and a CNOT gate. Measurement outcomes should be perfectly correlated.
Teleports a random state ψ (θ, φ drawn from the seed) from Alice (q0) to Bob (q2) through a shared Bell pair: Alice's Bell measurement, then Bob's corrections X and Z as controlled gates (deferred measurement). Bob then undoes the preparation of ψ: if ψ arrived intact, his qubit — the leftmost bit — reads 0 in every shot, while Alice's two bits are uniformly random. A copied bit would not pass: ψ carries a phase and a superposition.
Grover's search. Run: two qubits, the oracle marking |11⟩, one iteration finds it every time. Search: 2 to 10 qubits and any marked state (or a random one): the marked state's probability after every iteration, exact from the state vector beside theory, and shots sampled at the optimum, about (π/4)√N iterations — against N/2 tries on average for a classical search.
A simple variational quantum classifier using parameterised Rx rotations and CNOT entanglement layers. Demonstrates the building block of quantum machine learning circuits.
Shor's algorithm for N = 15, compiled for a = 7: three counting qubits and four work qubits, controlled ×7 and ×4 mod 15, the inverse QFT, then the classical step. 7⁴ ≡ 1 (mod 15), so the period is built into this circuit: it shows the structure, not a speedup. k = 2 and 6 give the period 4 and 3 × 5 directly (about half the shots); k = 4 gives it after checking multiples; k = 0 gives nothing. The general algorithm — N = 15 or 21, any a, 2n counting qubits, controlled multiplication by a^(2^j) mod N, continued fractions, nothing about the period put in — is /quantum/shor?N=21&a=2, and a card on the homepage.