dr.David
Rhodus
Chapter 2121 / 27

From Physical to Logical Qubits

Operating Quantum Computers · 4 min read

A logical qubit encodes quantum information across multiple physical degrees of freedom so that selected faults can be detected and corrected without directly measuring the encoded information. The operating objective is to preserve a logical state or operation with a quantified failure risk. Counting physical qubits is not enough to establish that objective.

Encoding does not clone an unknown state. For example, the transformation from (a|0⟩ + b|1⟩)|00⟩ to a|000⟩ + b|111⟩ distributes information across a joint encoded state. It does not produce three independent copies of the original qubit.

Learn from a deliberately restricted code

The three-qubit repetition example uses logical basis states |000⟩ and |111⟩ and parity checks Z0Z1 and Z1Z2. It can distinguish single X faults through their check outcomes under a bit-flip model. The checks reveal parity information while preserving superpositions within the code space when implemented ideally.

This is not a distance-three quantum code against arbitrary errors. A single physical Z can change the relative phase of the encoded superposition and act as a logical phase error without triggering these checks. Describe the example as protection against a restricted X-error model, not as complete quantum error correction.

A general quantum code needs protection appropriate to both bit and phase information, together with a fault-tolerant implementation of the checks and logical operations. Fault tolerance concerns how faults propagate through that implementation, not only the properties of an ideal codeword.

Worked example: two faults can imitate one

For the repetition example, use vector order [q0, q1, q2]. An X error vector [1,0,0] produces check bits [1,0]. The two-error vector [0,1,1] produces the same check bits. A minimum-weight decoder assuming rare independent X errors chooses the single-error explanation in both cases.

Starting from |000⟩, applying the decoder's interpretation to the first case recovers [0,0,0]. Applying it to the second produces [1,1,1], a logical X failure. The residual checks can look satisfied in both cases. A quiet syndrome is therefore not proof that the logical value is correct.

Under one independent X-error layer with probability 0.08 on each data qubit and otherwise perfect checks and readout, majority decoding fails when at least two bits flip. The probability is 3p²(1 − p) + p³ = 0.018176. This analytic model is distinct from the surface-code circuit used in the project's memory fixture.

Inspect a logical memory experiment

The implemented QEC experiment generates a rotated surface-code X-memory circuit in Stim, with the number of rounds equal to code distance. It samples detection events and logical-observable outcomes, then uses PyMatching to predict logical flips. A failure is disagreement between the prediction and the simulator's logical outcome for a complete trial.

Captured simulated surface-code memory failure rates and exact pointwise 95% intervals
Measured simulator output · Stim/PyMatching · whole memory experiments, not per-cycle error rates

Each plotted rate refers to a whole memory experiment. The distance-three runs contain three rounds; distance-five runs contain five. Their rates are not per-cycle probabilities. The noise model includes depolarization after Clifford operations and omits separate reset, idle, and measurement-noise terms. Its conclusions must remain tied to that scope.

At p = 0.005, the captured fixture has 67 failures in 10,000 distance-three experiments and 54 in 10,000 distance-five experiments. Their pointwise exact 95 percent intervals overlap. At p = 0.015, the corresponding counts are 435 and 908. These observations do not establish a universal threshold or show that increasing distance always helps.

Quantify what was learned

A memory experiment tests storage of its selected logical observable under its particular circuit and noise model. Universal computation adds logical gates, state preparation, measurements, routing, and other operations. A successful memory demonstration is valuable evidence, but cannot stand in for all of those capabilities.

Zero observed failures also require an interval. In 10,000 trials, zero failures gives a two-sided exact 95 percent upper bound of approximately 0.00036882 under the binomial sampling model. The empirical rate is zero; the evidence does not establish zero underlying failure probability.

Exercise: interpret a larger code

An engineer sees fewer failures at distance five and divides its measured failure rate by five to report a per-round error probability. Is that conversion justified?

Answer. No. The measured outcome concerns the complete experiment, and failures need not accumulate as independent identical per-round Bernoulli events. Inferring a per-round probability requires an additional justified model. Report the distance, rounds, noise model, trial count, failures, and pointwise interval directly.

Decoding, Pauli frames, and feedback deadlines explains the classical interpretation that turns check information into a logical decision.

Related reference readings