Tomography and No-Cloning
One copy of a quantum state tells you almost nothing. Thousands of copies, measured three ways, tell you everything — and the theorem that says you cannot make the copies yourself.
Tomography and No-Cloning visualization
Single-qubit tomography · 100 shots on each of X, Y, Z
Error against N · press Sweep N
Teal bars are the reconstruction from this one experiment; the black whiskers are one standard error either side; the dashed violet lines are the true components (hidden while you play the guessing game). The lower plot is log–log: a straight line of slope −½ is the 1/√N law, and each teal dot is the RMS error over eight fresh experiments at that N.
The counts, and what they say
| Axis | n₊ | n₋ | Estimate | ± 1σ | True |
|---|---|---|---|---|---|
| ⟨X⟩ | 84 | 16 | +0.680 | 0.073 | +0.750 |
| ⟨Y⟩ | 65 | 35 | +0.300 | 0.095 | +0.433 |
| ⟨Z⟩ | 80 | 20 | +0.600 | 0.080 | +0.500 |
Estimated Bloch vector length 0.955.
What you are doing when you do tomography
A single qubit’s state is a point on the Bloch sphere — three numbers, ⟨X⟩, ⟨Y⟩ and ⟨Z⟩. Measuring along Z once gives you one bit: up or down. It does not give you ⟨Z⟩, and it leaves the qubit as whichever eigenstate you got, so you cannot ask it anything else.
The only way through is many identically prepared copies. Take N of them, measure along Z, and the fraction that came up is your estimate of (1 + ⟨Z⟩)/2. Do the same along X and Y with fresh copies. The three averages are the Bloch vector, and the whiskers on the bars above are the binomial standard error √((1 − r²)/N) on each one.
Press Sweep N. Every time N goes up by a factor of 100, the error goes down by a factor of 10 — the dots fall along the dashed line of slope −½. That is the same 1/√N a coin flip obeys, and there is no cleverer choice of three measurement axes that beats it for a state you know nothing about. Ten thousand copies buy you two decimal places.
Try the hidden random state at N = 10 first, guess from the bars, then push N up and see when your guess would have been wrong. And drop the Bloch length below 1: a mixed state — one entangled with something else, or partly decohered — is an arrow inside the sphere, and tomography finds that too. The length of the arrow is not something any single copy carries.
Two qubits, nine bases
Two qubits have fifteen unknowns. Measuring both in every pairing of X, Y and Z — nine experiments of N shots — yields all fifteen, and the density matrix is a formula away. The formula has a problem.
Real parts as colour — teal positive, rose negative — with the imaginary part printed underneath when it is not zero. Rows and columns are |00⟩, |01⟩, |10⟩, |11⟩, first qubit on the left.
| Basis | ++ | +− | −+ | −− | ⟨AB⟩ |
|---|---|---|---|---|---|
| X⊗X | 14 | 0 | 0 | 18 | +1.000 |
| X⊗Y | 5 | 12 | 6 | 9 | -0.125 |
| X⊗Z | 7 | 9 | 8 | 8 | -0.063 |
| Y⊗X | 8 | 11 | 7 | 6 | -0.125 |
| Y⊗Y | 0 | 17 | 15 | 0 | -1.000 |
| Y⊗Z | 6 | 12 | 9 | 5 | -0.313 |
| Z⊗X | 7 | 8 | 7 | 10 | +0.063 |
| Z⊗Y | 8 | 8 | 11 | 5 | -0.188 |
| Z⊗Z | 23 | 0 | 0 | 9 | +1.000 |
The unphysical eigenvalue, and the fix
Linear inversion writes ρ = ¼ Σ ⟨σ_a ⊗ σ_b⟩ σ_a ⊗ σ_b and drops the measured averages straight in. Nothing in that formula knows that a density matrix must have eigenvalues between 0 and 1. For a pure state the true eigenvalues are 1, 0, 0, 0 — right at the edge — so the statistical noise pushes some of them negative almost every time. Keep N at 30 and press Measure again: the rose bar in the middle row is a probability less than zero. Predict a measurement with that matrix and you can get a negative count.
The simple fix is the one Smolin, Gambetta and Smith gave in 2012: keep the eigenvectors, set the most negative eigenvalue to zero, share what you removed equally among the others, and repeat until nothing is negative. That is the maximum-likelihood state when the noise is Gaussian, and it is also the closest physical matrix to the linear-inversion one. It never moves you further from the truth — the bottom row is always at least as good as the middle one in Hilbert–Schmidt distance, and usually better in trace distance too.
Then push N to 100,000 and the problem goes away on its own — both estimates land on the true matrix to three decimals, and the fix has nothing left to do. Tomography is honest at large N and needs help at small N, which is where every real experiment lives: fifteen numbers for two qubits, 4ⁿ − 1 for n, each needing its own N. Full tomography of ten qubits is a million parameters. Nobody does it.
Try to build a cloner
Tomography would be trivial if you could copy the state first. Here is the bench: q0 carries an unknown |ψ⟩, q1 starts blank in |0⟩, q2 is a spare you may use. Build any circuit and it is tested on |0⟩, |1⟩ and a third state of your choosing.
One CNOT from the input onto the blank qubit. Copies |0⟩ and |1⟩ perfectly.
- CX
| Input | Pair = |ψ⟩|ψ⟩ | q0 alone | q1 alone |
|---|---|---|---|
| |0⟩ | 1.000 | 1.000 | 1.000 |
| |1⟩ | 1.000 | 1.000 | 1.000 |
| probe, 90° · direct run | 0.500 | 0.500 | 0.500 |
| probe · from linearity | 0.500 | 0.500 | 0.500 |
Copies |0⟩ and |1⟩ perfectly — and that is exactly why it fails on the probe. The circuit’s output on cos(θ/2)|0⟩ + eiφsin(θ/2)|1⟩ is fixed by linearity before it runs: it must be cos(θ/2)·U|0,00⟩ + eiφsin(θ/2)·U|1,00⟩, a superposition of the two basis outputs. That state has pair fidelity 0.500 with |ψ⟩|ψ⟩; the direct run gives 0.500, the same to 0.0e+0. At 90° the ceiling for any basis-perfect cloner is ½. No rearrangement of gates changes this, because every circuit is linear.
Sweeping the probe from |0⟩ to |1⟩ at the chosen φ. The violet ceiling is (cos³(θ/2) + sin³(θ/2))² — what linearity allows any machine that copies the basis states perfectly. The amber line is 5/6, the best a machine can do on every state at once.
Why no circuit can do it
Suppose a machine U copied two states: U|ψ⟩|0⟩ = |ψ⟩|ψ⟩ and U|φ⟩|0⟩ = |φ⟩|φ⟩. Take the inner product of the two equations. The left side gives ⟨ψ|φ⟩ because U preserves inner products; the right side gives ⟨ψ|φ⟩². A number equal to its own square is 0 or 1: the states were orthogonal, or they were the same state. Anything in between — |0⟩ and |+⟩, say — cannot both be copied by the same machine. That is the whole proof; it was written down by Wootters and Zurek and by Dieks in 1982, on one page each.
The bench above is that proof made physical. The CNOT copier is a perfectly good cloner of |0⟩ and |1⟩ — that is all a classical copier ever had to be. Fed |+⟩ it produces a Bell pair, and a Bell pair is not two |+⟩s: each half on its own is a coin flip, fidelity ½ with everything. The from linearity row is computed without running the circuit on the probe at all, just by adding the |0⟩ and |1⟩ outputs with the probe’s amplitudes. It matches the direct run to fifteen decimals. There is nothing to tune.
Which is why tomography costs what it costs. If one copy could be turned into a thousand, a single qubit would carry unlimited classical information and the error bars in the first section would be a choice rather than a law. The 1/√N you measured up there and the ½ you measured down here are the same fact from two sides.
What is and isn't real here
The measurement statistics are exact Born-rule sampling from the stated density matrix, with no detector noise, no state-preparation error and no drift between shots — so the only thing in the error bars is finite N. Real tomography adds all three, and gauge ambiguities between them are a research field of their own. The maximum-likelihood fix shown is the closed-form projection; iterative MLE with full multinomial likelihoods, compressed sensing and shadow tomography all exist and all scale better than the nine-basis brute force here.
The no-cloning bench tests unitary circuits only. Measure-and-prepare strategies are also allowed in principle and also fail — an optimal one reaches 2/3 per copy against the universal cloner’s 5/6 — but this page does not simulate them. The numbers you see are checked in lib/quantum/tomography.test.ts and lib/quantum/noCloning.test.ts against the binomial error formula, the hand-written Bell-state Pauli table, the Smolin–Gambetta–Smith worked spectra, the ½ of the CNOT copier on |+⟩ and the 5/6 of the Bužek–Hillery network.