MachineFlow · executable example
Shor quantum circuit
Follow a factorization from problem selection through quantum period finding and classical recovery.
Circuit
Period-finding pipeline
- 01Initialize
Prepare counting qubits in superposition and the work register in |1⟩.
- 02Modular power
Apply controlled multiplication by powers of the selected base modulo N.
- 03Inverse QFT
Convert periodic phase information into measurable counting-register peaks.
- 04Measure
Sample a phase candidate and infer the modular period with classical arithmetic.
- 05Recover factors
Evaluate gcd(a^(r/2) − 1, N) and gcd(a^(r/2) + 1, N).
Hilbert space · finite timeline
Bounded input
N = 15 and a = 2 select one deterministic educational experiment. No quantum process has run.
productBoth toy qubits begin in the |0⟩ basis state.
Σ probability = 1.000000
- Re
- 1.000
- Im
- 0.000
- phase
- 0.000 rad
- P
- 100.0%
- Re
- 0.000
- Im
- 0.000
- phase
- 0.000 rad
- P
- 0.0%
- Re
- 0.000
- Im
- 0.000
- phase
- 0.000 rad
- P
- 0.0%
- Re
- 0.000
- Im
- 0.000
- phase
- 0.000 rad
- P
- 0.0%
A normalized two-qubit teaching projection alongside deterministic Shor arithmetic; not quantum hardware or a gate-accurate emulator.
Measurement