PHYSICS / ENGINEERING / COMPUTING
Quantum computing models
Work from state vectors and gates to entanglement, simple algorithms, measurement statistics, and noise through twenty explicit examples.
Matter pathway: atom → solid → liquid → gas → plasma. Quantum mechanics and quantum field theory provide foundations across the pathway; they are not additional phases. This is a connected modeling route, not a universal heating curve. Actual phases depend on pressure, composition, and kinetics.
1. Qubits, gates, and measurement
Definitions & inputs. |ψ⟩=α|0⟩+β|1⟩; α,β complex amplitudes. Basis ordering for two qubits is |q0 q1⟩.
The Born rule maps amplitudes to measurement probabilities.
Unitary gates preserve normalization.
Matrix multiplication gives a tunable measurement probability.
Interpretation. Global phase is unobservable; relative phase can affect later measurements.
↑ Return to definitions and contents2. Bell states and density matrices
Definitions & inputs. ρ is a density operator; Tr traces over a basis; ZA,ZB are Pauli-Z observables on the two qubits.
A Hadamard and controlled-NOT prepare a Bell state.
Each subsystem is maximally mixed although the joint state is pure.
Local randomness coexists with perfect joint correlation.
Interpretation. Entanglement correlations do not permit faster-than-light signaling.
↑ Return to definitions and contents3. Interference in small algorithms
Definitions & inputs. N search items, one marked item; θ=arcsin(1/√N); r Grover iterations; m phase-estimation bits.
Two reflections rotate amplitude in the marked/unmarked subspace.
Controlled powers and inverse Fourier transform recover an exactly representable eigenphase on an exact eigenstate.
The Fourier transform changes phases; a basis input yields uniform computational-basis outcome probabilities.
Interpretation. Algorithmic advantage depends on data access, oracle cost, errors, and classical alternatives.
↑ Return to definitions and contents4. Noise and finite-shot inference
Definitions & inputs. T1 is energy relaxation time, T2 phase-coherence time, nshots independent measurements, and p a measured-event probability.
Separate population loss from off-diagonal coherence.
Pure dephasing adds to the coherence decay rate in this simple model.
A binomial model gives sampling uncertainty, distinct from device bias.
Interpretation. A simulator result is not a hardware validation; real error budgets include preparation, gates, readout, and correlations.
↑ Return to definitions and contents5. Algorithm foundations: reversible queries and phase kickback
Definitions & inputs. x is an n-bit candidate, f(x) is a Boolean predicate, ⊕ is addition modulo two, |−⟩=(|0⟩−|1⟩)/√2. An oracle is a reversible circuit computing the predicate, not a source that reveals the answer for free.
Store the predicate in a target qubit while preserving the candidate, which makes the map reversible.
The minus state is an eigenstate of the bit-flip gate with eigenvalue −1.
A controlled bit flip therefore becomes a phase on the candidate. The ancilla separates from the data.
Hadamard gates prepare equal amplitudes. An immediate measurement still returns a uniformly random candidate.
Interpretation. Algorithms create useful interference before measurement. They do not provide simultaneous classical access to all amplitudes. Oracle synthesis and data loading contribute real cost.
↑ Return to definitions and contents6. Grover: derive the two-reflection rotation
Definitions & inputs. N candidates contain M marked answers, 0<M<N. |G⟩ and |B⟩ are normalized uniform superpositions of good and bad candidates. θ=arcsin√(M/N). Basis ordering below is (|G⟩, |B⟩).
Group equal candidate amplitudes into a two-dimensional subspace.
Within this subspace the oracle reflects the good component. On the full space its projector includes every marked basis state.
Expand the outer product. The diffuser reflects about the initial state.
Apply the oracle first, then the diffuser: two reflections give a rotation toward the good axis.
Multiply once and use the angle-addition identities; induction proves the expression for k iterations.
Square the good amplitude. Compare neighboring nonnegative integers around k* to choose the first peak.
For sparse solutions this is a quadratic query improvement over classical unstructured search.
Interpretation. More iterations can reduce success: the state rotates past the good direction. Verify a measured candidate classically. Unknown M calls for an adaptive search or counting method; the quadratic oracle count does not remove the cost of implementing each oracle.
↑ Return to definitions and contents7. Grover worked examples: four and eight candidates
Definitions & inputs. First mark |11⟩ among four two-qubit strings. Amplitude vectors use order 00,01,10,11. Second use one marked answer among eight candidates.
For the two-qubit example a controlled-Z gate marks |11⟩.
The diffuser maps each amplitude to its reflection about the mean amplitude, not the mean probability.
All unmarked amplitudes cancel and the target amplitude becomes one.
The same derivation works beyond the special exact two-qubit case.
Two oracle queries give 94.53125% success in the eight-candidate example.
A third iteration overshoots and drops success to about 33.0%.
Interpretation. The diffuser circuit is H⊗n(2|0…0⟩⟨0…0|−I)H⊗n. A circuit implementing the negative of this operator differs only by a global phase for ordinary Grover search. Relative and global phase must not be confused.
↑ Return to definitions and contents8. Quantum Fourier transform and phase estimation
Definitions & inputs. U|u⟩=exp(2πiφ)|u⟩ with 0≤φ<1. A t-qubit control register has Q=2ᵗ states. y is the measured integer. This derivation uses the inverse QFT sign convention shown.
Initialize a uniform control superposition and the target eigenstate.
Controlled U, U², U⁴, … combine according to the binary digits of x. Eigenphase is kicked back to the control register.
The inverse transform converts a phase gradient into an integer peak.
Collect the amplitude of output y.
Sum the geometric series and take its squared magnitude, using the limiting value at removable singularities.
A worked exact phase produces the bit string 011 under the stated integer ordering; other grid outputs vanish.
Interpretation. When Qφ is not an integer, nearby outcomes have nonzero probability. A standard exact t-qubit QFT uses Hadamards, controlled phase rotations of angles π/2, π/4, …, and final swaps; its inverse reverses gate order and phase signs. The gate count is O(t²), excluding controlled-U synthesis.
↑ Return to definitions and contents9. Shor: reduce factoring to order finding
Definitions & inputs. N is an odd composite integer after classical checks for even numbers and perfect powers. Choose 1<a<N coprime to N. The order r is the least positive integer satisfying aʳ≡1 mod N.
Run Euclid’s classical algorithm first; only a coprime base needs quantum order finding.
Factor a difference of squares after obtaining an even order.
A nontrivial square root of one can separate factors of N.
The gcd extracts divisors without requiring a quantum measurement to return the factors directly.
Verify each proposed divisor. Repeat the base selection if the order is odd or the square root is trivial.
Interpretation. Shor’s speedup concerns a structured arithmetic problem. The quantum component estimates a period; modular arithmetic and continued fractions do the classical postprocessing. Factoring arbitrary large cryptographic integers also requires sufficiently accurate, fault-tolerant hardware.
↑ Return to definitions and contents10. Shor: derive the order-finding eigenstates and period readout
Definitions & inputs. Ua maps |y⟩ to |ay mod N⟩ for 0≤y<N and acts as identity on unused computational basis states. Since gcd(a,N)=1 this is a permutation. |us⟩ labels eigenphases s/r for s=0,…,r−1.
Superpose the cyclic orbit of one with Fourier phases.
Shift k to k+1, relabel the cyclic sum, and factor out exp(2πis/r).
Fourier orthogonality cancels every orbit basis state except k=0. A simple target initialization therefore supplies a uniform eigenphase mixture for measurement.
Controlled modular powers a^(2ʲ) implement the phase-estimation interaction without enumerating every x classically.
Use the preceding phase-estimation derivation. An ideal experiment samples different s values; it does not always return 1/r.
A sufficiently close sample permits rational reconstruction. The nearest-grid outcome with Q≥N² satisfies this error bound, but not every measurement is nearest-grid.
Test candidate denominators, appropriate multiples, or combine samples and rerun. A shared factor gcd(s,r)>1 can produce only a divisor of the true order.
Interpretation. The order must be validated before taking gcds. A sample y=0 is uninformative. Efficient reversible modular exponentiation and the QFT give polynomial scaling in log N; this is not a claim that a tiny demonstration circuit scales directly to useful factoring.
↑ Return to definitions and contents11. Shor worked example: factor 15, including failed samples
Definitions & inputs. N=15, a=2, Q=256 (eight control qubits); four target qubits encode residues. In the ideal arithmetic circuit the order is r=4.
List this small orbit to check the result independently: the first return occurs after four steps.
All four phases lie exactly on the Q=256 grid, so each listed output has probability 1/4.
The continued fraction immediately supplies denominator four, which passes the order test.
The two gcds recover 15=3×5.
The reduced fraction loses a factor of two in the denominator. Test a multiple or gather another sample; do not call two the order.
Even a correct order can fail the factor-extraction condition for a poor base. For a=14 both gcd outputs are trivial.
Interpretation. For this example, the two coprime phase numerators 1 and 3 directly yield the full order, together with probability 1/2. Verification and repeated sampling are part of the algorithm, not optional repairs.
↑ Return to definitions and contentsGraphical worked example
Twenty worked examples
Open a problem to see its defined inputs, assumptions, equation, numerical substitution, result, and interpretation. Values are illustrative analytical exercises.
Example 01. Born probability
Definitions & inputs. State 0.8|0⟩+0.6|1⟩.
Choose the governing model and isolate the requested quantity.
Insert the stated inputs in consistent units or the explicitly defined normalized units.
Evaluate the expression; the result uses the units shown.
Interpretation. The two probabilities sum to one.
↑ Return to definitions and contentsExample 02. Hadamard outcome
Definitions & inputs. Input |0⟩, apply H, measure Z.
Choose the governing model and isolate the requested quantity.
Insert the stated inputs in consistent units or the explicitly defined normalized units.
Evaluate the expression; the result uses the units shown.
Interpretation. Equal amplitudes give equal probabilities.
↑ Return to definitions and contentsExample 03. Y rotation
Definitions & inputs. Apply Ry(π/3) to |0⟩.
Choose the governing model and isolate the requested quantity.
Insert the stated inputs in consistent units or the explicitly defined normalized units.
Evaluate the expression; the result uses the units shown.
Interpretation. Rotation angle is twice the amplitude angle.
↑ Return to definitions and contentsExample 04. Relative phase becomes probability
Definitions & inputs. State (|0⟩+exp(iπ/3)|1⟩)/√2, then H.
Choose the governing model and isolate the requested quantity.
Insert the stated inputs in consistent units or the explicitly defined normalized units.
Evaluate the expression; the result uses the units shown.
Interpretation. The second Hadamard converts relative phase into a population difference.
↑ Return to definitions and contentsExample 05. Bell-state joint outcome
Definitions & inputs. State (|00⟩+|11⟩)/√2.
Choose the governing model and isolate the requested quantity.
Insert the stated inputs in consistent units or the explicitly defined normalized units.
Evaluate the expression; the result uses the units shown.
Interpretation. Outcomes 01 and 10 have zero probability.
↑ Return to definitions and contentsExample 06. Bell correlation
Definitions & inputs. Same Bell state; eigenvalues Z are ±1.
Choose the governing model and isolate the requested quantity.
Insert the stated inputs in consistent units or the explicitly defined normalized units.
Evaluate the expression; the result uses the units shown.
Interpretation. Individual results are random but the product is always +1.
↑ Return to definitions and contentsExample 07. Mixed-state purity
Definitions & inputs. ρ=diag(0.7,0.3).
Choose the governing model and isolate the requested quantity.
Insert the stated inputs in consistent units or the explicitly defined normalized units.
Evaluate the expression; the result uses the units shown.
Interpretation. Purity below one indicates a mixed state.
↑ Return to definitions and contentsExample 08. Maximally mixed entropy
Definitions & inputs. ρ=I/2; base-two logarithms.
Choose the governing model and isolate the requested quantity.
Insert the stated inputs in consistent units or the explicitly defined normalized units.
Evaluate the expression; the result uses the units shown.
Interpretation. A pure Bell pair has mixed one-qubit reductions.
↑ Return to definitions and contentsExample 09. Ideal CHSH value
Definitions & inputs. Maximally entangled pair and optimal measurement axes.
Choose the governing model and isolate the requested quantity.
Insert the stated inputs in consistent units or the explicitly defined normalized units.
Evaluate the expression; the result uses the units shown.
Interpretation. This exceeds the local-hidden-variable bound two.
↑ Return to definitions and contentsExample 10. Grover with four items
Definitions & inputs. N=4, one marked item, r=1.
Choose the governing model and isolate the requested quantity.
Insert the stated inputs in consistent units or the explicitly defined normalized units.
Evaluate the expression; the result uses the units shown.
Interpretation. One ideal iteration succeeds with certainty for this special size.
↑ Return to definitions and contentsExample 11. Four-point Fourier measurement
Definitions & inputs. Apply QFT4 to |1⟩ and measure in the computational basis.
Choose the governing model and isolate the requested quantity.
Insert the stated inputs in consistent units or the explicitly defined normalized units.
Evaluate the expression; the result uses the units shown.
Interpretation. The output phases differ although all four outcome probabilities match.
↑ Return to definitions and contentsExample 12. Exact phase-estimation integer
Definitions & inputs. φ=3/8, m=3 phase qubits, eigenstate input.
Choose the governing model and isolate the requested quantity.
Insert the stated inputs in consistent units or the explicitly defined normalized units.
Evaluate the expression; the result uses the units shown.
Interpretation. The logical bit string is 011 in most-significant-bit-first notation.
↑ Return to definitions and contentsExample 13. Shot uncertainty
Definitions & inputs. p=0.5, nshots=1000.
Choose the governing model and isolate the requested quantity.
Insert the stated inputs in consistent units or the explicitly defined normalized units.
Evaluate the expression; the result uses the units shown.
Interpretation. About 0.0158 is a one-standard-deviation sampling uncertainty.
↑ Return to definitions and contentsExample 14. Required shots
Definitions & inputs. Worst-case p=0.5; target standard deviation 0.01.
Choose the governing model and isolate the requested quantity.
Insert the stated inputs in consistent units or the explicitly defined normalized units.
Evaluate the expression; the result uses the units shown.
Interpretation. This is a standard-deviation target, not a confidence interval guarantee.
↑ Return to definitions and contentsExample 15. Relaxation survival
Definitions & inputs. Start in |1⟩; t=20 µs, T1=100 µs.
Choose the governing model and isolate the requested quantity.
Insert the stated inputs in consistent units or the explicitly defined normalized units.
Evaluate the expression; the result uses the units shown.
Interpretation. Population decays toward the ground state.
↑ Return to definitions and contentsExample 16. Pure-dephasing time
Definitions & inputs. T1=100 µs, T2=80 µs.
Choose the governing model and isolate the requested quantity.
Insert the stated inputs in consistent units or the explicitly defined normalized units.
Evaluate the expression; the result uses the units shown.
Interpretation. This separates relaxation-limited coherence from pure dephasing.
↑ Return to definitions and contentsExample 17. Dephased plus-state readout
Definitions & inputs. Initial |+⟩; t/T2=1; measure in X basis.
Choose the governing model and isolate the requested quantity.
Insert the stated inputs in consistent units or the explicitly defined normalized units.
Evaluate the expression; the result uses the units shown.
Interpretation. Loss of coherence moves X outcomes toward one half.
↑ Return to definitions and contentsExample 18. Independent gate-success estimate
Definitions & inputs. 100 gates, independent stochastic failure p=0.001 per gate.
Choose the governing model and isolate the requested quantity.
Insert the stated inputs in consistent units or the explicitly defined normalized units.
Evaluate the expression; the result uses the units shown.
Interpretation. This is a no-error-event probability, not a general circuit fidelity.
↑ Return to definitions and contentsExample 19. Three-bit repetition failure
Definitions & inputs. Independent bit flips p=0.01; majority decoding.
Choose the governing model and isolate the requested quantity.
Insert the stated inputs in consistent units or the explicitly defined normalized units.
Evaluate the expression; the result uses the units shown.
Interpretation. Two or more flips defeat this decoder; phase errors are not corrected.
↑ Return to definitions and contentsExample 20. Statevector memory
Definitions & inputs. n=30 qubits; 16 bytes per complex amplitude.
Choose the governing model and isolate the requested quantity.
Insert the stated inputs in consistent units or the explicitly defined normalized units.
Evaluate the expression; the result uses the units shown.
Interpretation. This is 16 GiB for amplitudes alone, before simulator overhead.
↑ Return to definitions and contentsSymbols and units
Each derivation and problem defines its own symbols and inputs. Symbols may be reused with different meanings in other subjects. Keep units consistent, retain sufficient precision during calculation, and apply the stated validity limits.