Skip to content

A binomial code stores a qubit in finite superpositions of oscillator number states. Spacing the occupied numbers separates losses from gains; binomial probabilities make selected number moments equal in the two logical states. The first property helps identify errors, and the second prevents their probabilities from revealing the logical state.

These codes exactly correct a chosen finite set of operators. Correcting a physical channel over a finite interval requires more: no-loss evolution changes amplitudes, several events can share a syndrome, and the recovery itself can fail. We will start with the smallest example, prove the general construction, and distinguish the measurements needed for loss and for dephasing.

Required background. Bosonic Codes introduces oscillator encodings and channel-level recovery. Why Quantum Error Correction Is Possible explains the Knill–Laflamme condition, and Number States supplies the ladder-operator action. Erasure and Loss Channels derives attenuation.

Write n=a†an=a^\dagger a and choose

∣0L⟩=(∣0⟩+∣4⟩)/2,∣1L⟩=∣2⟩.\begin{aligned} |0_L\rangle&=(|0\rangle+|4\rangle)/\sqrt2,\\ |1_L\rangle&=|2\rangle. \end{aligned}

Both states have even parity and mean occupation two. The vacuum component of logical zero balances its four-photon component. Applying a∣m⟩=m∣m−1⟩a|m\rangle=\sqrt m|m-1\rangle gives

a∣0L⟩=2∣3⟩,a∣1L⟩=2∣1⟩.\begin{aligned} a|0_L\rangle&=\sqrt2|3\rangle,\\ a|1_L\rangle&=\sqrt2|1\rangle. \end{aligned}

For any normalized logical amplitudes u,vu,v, the normalized one-loss state is u∣3⟩+v∣1⟩u|3\rangle+v|1\rangle. The amplitudes survive because both branches acquire the same factor 2\sqrt2. Odd parity identifies the error subspace without distinguishing the two branches. Measuring the exact number, however, distinguishes them and destroys their coherence.

A coherent recovery maps ∣3⟩|3\rangle back to ∣0L⟩|0_L\rangle and ∣1⟩|1\rangle back to ∣1L⟩|1_L\rangle. These are maps between orthonormal pairs, so a unitary extension exists. It must restore both the energy and the superposition; a parity measurement alone does neither. Michael and collaborators (2016) introduced this code as the simplest member of the binomial family.

For code projector PP, the error set {I,a}\{I,a\} obeys

PaP=0,Pa†aP=2P.PaP=0,\qquad Pa^\dagger aP=2P.

The first identity follows from parity; the second uses equal means and disjoint number supports. Together with PIP=PPIP=P, these are all the error-product conditions. Two losses already fail:

a2∣0L⟩=6∣2⟩,a2∣1L⟩=2∣0⟩.\begin{aligned} a^2|0_L\rangle&=\sqrt6|2\rangle,\\ a^2|1_L\rangle&=\sqrt2|0\rangle. \end{aligned}

Their images overlap the original code, and their norms differ. Returning to even parity therefore does not establish successful storage.

Finite binomial weights and separated number states

Section titled “Finite binomial weights and separated number states”

Suppose the desired error set contains losses through aLa^L, gains through (a†)G(a^\dagger)^G, and number powers through nDn^D:

E={I,a,…,aL,(a†),…,(a†)G,n,…,nD}.\mathcal E=\{I,a,\ldots,a^L, (a^\dagger),\ldots,(a^\dagger)^G, n,\ldots,n^D\}.

Omit any range whose upper order is zero. The order DD describes a polynomial approximation to number dephasing, not a universal count of phase-noise events. Correction of this set also corrects its linear span; it does not automatically include arbitrary products of its members.

Use spacing M=L+G+1M=L+G+1 and moment order K=max⁡{L,G,2D}K=\max\{L,G,2D\}. We consider K≥1K\ge1, as occurs for every nontrivial choice above. Define, for μ=0,1\mu=0,1,

∣μL⟩=2−K/2∑0≤p≤K+1p≡μ(mod2)(K+1p) ∣pM⟩.|\mu_L\rangle=2^{-K/2} \sum_{\substack{0\le p\le K+1\\p\equiv\mu\;({\rm mod}\;2)}} \sqrt{\binom{K+1}{p}}\,|pM\rangle.

Thus logical zero selects even pp, and logical one selects odd pp. The sum of the even binomial coefficients and the sum of the odd coefficients both equal 2K2^K. The states are normalized and have disjoint support, hence are exactly orthogonal. Their largest occupied number and common mean are

nmax⁡=(K+1)M,nˉ=(K+1)M2.n_{\max}=(K+1)M,\qquad \bar n=\frac{(K+1)M}{2}.

Finite support makes preparation and numerical representation concrete. Increasing the protection order nevertheless increases the required cutoff and generally the mean loss rate κnˉ\kappa\bar n. The construction is sufficient for the stated error set; it is not a proof of globally minimal energy among all possible codes. Larger MM or KK can supply additional separation or matched moments.

Each product Ei†EjE_i^\dagger E_j either preserves number or changes it by a nonzero integer of magnitude at most L+G=M−1L+G=M-1. A nonzero shift in this range cannot connect two occupied numbers, since every occupied number is a multiple of MM. Its entire compression to the code therefore vanishes.

This includes products between a loss or gain and a power of nn: diagonal number factors change the weights but not the shift. It also includes a loss–gain cross product, whose shift can be as large as L+GL+G. Choosing M=max⁡(L,G)+1M=\max(L,G)+1 would not generally separate that pair.

Zero-shift products are diagonal polynomials in nn. They have no off-diagonal logical matrix elements because the two codewords occupy disjoint number states. We still need their two diagonal expectations to agree.

Finite differences match the diagonal moments

Section titled “Finite differences match the diagonal moments”

The difference between logical expectations of nqn^q is

Δq=Mq2K∑p=0K+1(−1)p(K+1p)pq.\Delta_q=\frac{M^q}{2^K} \sum_{p=0}^{K+1}(-1)^p\binom{K+1}{p}p^q.

The alternating sum is the (K+1)(K+1)st finite difference of a polynomial of degree qq. Such a difference vanishes when q≤Kq\le K. To see why, start with (1−z)K+1(1-z)^{K+1} and apply (z d/dz)q(z\,d/dz)^q: this produces the same weighted sum, and for q≤Kq\le K every term still contains a positive power of 1−z1-z. Evaluation at z=1z=1 gives zero.

Therefore the codewords match every number moment through order KK. The products relevant for loss and gain are falling and rising factorials,

(a†)rar=n(n−1)⋯(n−r+1),ar(a†)r=(n+1)⋯(n+r).\begin{aligned} (a^\dagger)^r a^r&=n(n-1)\cdots(n-r+1),\\ a^r(a^\dagger)^r&=(n+1)\cdots(n+r). \end{aligned}

These have degree rr. Products of the number-dephasing errors reach degree 2D2D, explaining the choice of KK. Consequently every required compression has the form PEi†EjP=cijPPE_i^\dagger E_jP=c_{ij}P. The spacing and moment arguments solve different parts of the Knill–Laflamme condition; neither replaces the other.

The first unmatched moment is also informative. For q=K+1q=K+1, the alternating sum is (−1)K+1(K+1)!(-1)^{K+1}(K+1)!, so moment matching stops at a definite order rather than continuing indefinitely.

Modular syndromes and the missing dephasing information

Section titled “Modular syndromes and the missing dephasing information”

The rotation RM=e2πin/MR_M=e^{2\pi i n/M} acts as identity on the code. A measurement of number modulo MM resolves its eigenspaces. Starting from residue zero, ℓ\ell losses give residue −ℓ-\ell and gg gains give +g+g, both modulo MM. The integers −L,…,G-L,\ldots,G fill MM different residues, so the modeled loss and gain events are distinguishable.

For example, when L=2L=2 and G=1G=1, M=4M=4:

Event Net number shift Residue
No shift 0 0
One loss −1-1 3
Two losses −2-2 2
One gain +1+1 1

The measurement must preserve coherence within each residue. Resolving the full photon number would reveal which logical support was occupied. Also, RMR_M is only one check: its identity eigenspace contains infinitely many states outside the finite binomial code.

Number dephasing does not change the residue

Section titled “Number dephasing does not change the residue”

A power of nn leaves every number label unchanged. Modular measurement cannot by itself distinguish II from nn, even when the code mathematically corrects both. The error images can overlap without violating correction: their Gram matrix cijc_{ij} need not be diagonal. A recovery can first choose orthogonal combinations of those images.

Take L=1,G=0,D=1L=1,G=0,D=1, so M=2,K=2M=2,K=2:

∣0L⟩=(∣0⟩+3∣4⟩)/2,∣1L⟩=(3∣2⟩+∣6⟩)/2.\begin{aligned} |0_L\rangle&=(|0\rangle+\sqrt3|4\rangle)/2,\\ |1_L\rangle&=(\sqrt3|2\rangle+|6\rangle)/2. \end{aligned}

Both means are three and both second moments are twelve. The two states

∣eμ⟩=n−33∣μL⟩|e_\mu\rangle=\frac{n-3}{\sqrt3}|\mu_L\rangle

are normalized, orthogonal to each other, and orthogonal to the original code. They remain even, so parity does not distinguish the two subspaces. Yet

n∣ψL⟩=3∣ψL⟩+3∣eψ⟩,n|\psi_L\rangle=3|\psi_L\rangle+\sqrt3|e_\psi\rangle,

where ∣eψ⟩=u∣e0⟩+v∣e1⟩|e_\psi\rangle=u|e_0\rangle+v|e_1\rangle. Projecting onto the code or the two-dimensional error subspace preserves u,vu,v in either outcome. The latter outcome needs the coherent map ∣eμ⟩↦∣μL⟩|e_\mu\rangle\mapsto|\mu_L\rangle. This illustrates the additional measurement required for number dephasing; Michael and collaborators discuss such orthogonalized error spaces explicitly.

For noisy repeated measurements, the residue is only one input to a decoder. Several events can have the same final residue, and readout errors can mimic changes. In a pure-loss interval the lowest code has no initial support above four photons, so odd parity can mean one or three losses, not arbitrarily many. Gain, drives, or previous faulty operations can change that support and the appropriate probabilities.

Finite-time loss changes more than the residue

Section titled “Finite-time loss changes more than the residue”

For transmissivity η=e−κΔt\eta=e^{-\kappa\Delta t}, the pure-loss Kraus operators are

Aℓ=(1−η)ℓℓ! ηn/2aℓ.A_\ell=\sqrt{\frac{(1-\eta)^\ell}{\ell!}}\, \eta^{n/2}a^\ell.

Their ordering matters: aℓa^\ell lowers the state before attenuation acts on the remaining occupation. On the full oscillator there are infinitely many operators. On a code with cutoff nmax⁡n_{\max}, every branch with ℓ>nmax⁡\ell>n_{\max} vanishes. Exact full-channel correction still fails in general; an infinite number of nonzero loss branches is not the reason.

For the lowest code, the no-loss operator A0=ηn/2A_0=\eta^{n/2} gives

A0∣0L⟩=(∣0⟩+η2∣4⟩)/2,A0∣1L⟩=η∣2⟩.\begin{aligned} A_0|0_L\rangle&=(|0\rangle+\eta^2|4\rangle)/\sqrt2,\\ A_0|1_L\rangle&=\eta|2\rangle. \end{aligned}

The no-loss probabilities are p0∣0=(1+η4)/2p_{0|0}=(1+\eta^4)/2 and p0∣1=η2p_{0|1}=\eta^2. Their difference is (1−η2)2/2(1-\eta^2)^2/2, positive for every 0≤η<10\le\eta<1. Thus the environment can learn something about the logical state even by seeing no emitted photons. No deterministic recovery can exactly correct that information loss for all unknown inputs.

Number distributions of the lowest binomial code and unequal no-loss probabilities despite equal mean occupation

Top: the logical states have equal means, but different second moments. Bottom: their exact no-loss probabilities agree to first order near η=1\eta=1, then separate. Finite support and exact correction of {I,a}\{I,a\} do not remove this state dependence of the finite-time channel.

There is also deformation outside the original code. With ∣0⊥⟩=(∣0⟩−∣4⟩)/2|0_\perp\rangle=(|0\rangle-|4\rangle)/\sqrt2,

A0∣0L⟩=1+η22∣0L⟩+1−η22∣0⊥⟩.A_0|0_L\rangle =\frac{1+\eta^2}{2}|0_L\rangle +\frac{1-\eta^2}{2}|0_\perp\rangle.

The leakage amplitude is first order in 1−η1-\eta, although its probability is second order. Saying that the first projected correction is scalar does not mean the full state stayed in the code.

Higher-order binomial codes match more moments and correct more loss operators. Expanding attenuation and designing the corresponding recovery gives systematic small-time improvements. The coefficients depend on factorial moments such as ⟨n(n−1)⟩\langle n(n-1)\rangle, not only on the mean occupation. Albert and collaborators (2018) compare complete bosonic channels and optimized recoveries; the finite operator count alone is not a performance metric.

For example, L=2,G=0,D=1L=2,G=0,D=1 gives M=3,K=2M=3,K=2, with number support 0,3,6,90,3,6,9 and mean 9/29/2. It corrects {I,a,a2,n}\{I,a,a^2,n\}, but increases raw loss exposure and recovery complexity. Shorter cycles reduce unobserved multiple losses while invoking faulty ancillas and controls more frequently. Their balance sets a useful cadence.

The half-angle rotation eiπn/Me^{i\pi n/M} is logical ZZ: it multiplies a component ∣pM⟩|pM\rangle by (−1)p(-1)^p. A generic intermediate rotation eiθn/Me^{i\theta n/M} does not necessarily preserve the code, since components within one logical word acquire different phases. Logical XX requires a coherent exchange of the two finite envelopes; it is not supplied by the modular check.

Rotation-symmetric methods can use number-selective control, additional modes, or teleportation to implement gates and recovery; Grimsmo, Combes, and Baragiola (2020) develop this broader framework. Physical controls and ancilla imperfections are discussed in Bosonic Qubits.

An error-transparent Hamiltonian produces the same logical evolution in the code and the modeled error spaces. A sufficient intertwining condition is

HrErP=ErH0P.H_r E_rP=E_rH_0P.

It makes the recovered operation independent of when that particular error occurred. A scalar energy offset in an error sector changes only its overall trajectory phase and can be allowed as well. The condition must be tested for the relevant faults: protecting a bare jump does not alone protect no-jump deformation or ancilla failure. Ma and collaborators (2020) demonstrate error-transparent phase operations, while Wetherbee and collaborators (2025) analyze amplitude-mixing constructions and distinguish jump protection from full-channel protection.

As a concrete memory benchmark, Ni and collaborators (2023) reported a corrected binomial memory exceeding their stated physical reference lifetime by about 16%. Such a fixed-code comparison tests a complete correction protocol; it does not by itself establish suppression with increasing code order or protected universal gates. Error-Correction Case Studies develops those comparisons in context.

Use (1+z)K+1(1+z)^{K+1} to prove normalization and the common occupation (K+1)M/2(K+1)M/2 for K≥1K\ge1. What changes at K=0K=0?

Solution

Evaluation at z=1z=1 and z=−1z=-1 gives a total coefficient sum 2K+12^{K+1} and alternating sum zero. Each parity sum is 2K2^K. Applying z d/dzz\,d/dz first gives total first-moment sum (K+1)2K(K+1)2^K and alternating first-moment sum zero for K≥1K\ge1. Divide each parity half by 2K2^K and multiply by MM to obtain the mean. At K=0K=0 the two words are ∣0⟩|0\rangle and ∣M⟩|M\rangle: they remain normalized but do not have equal means. This is the trivial no-protection limit.

Evaluate ΔK+1\Delta_{K+1} and check it for the lowest code.

Solution

Only the term with K+1K+1 derivatives survives at z=1z=1, yielding

ΔK+1=(−1)K+1MK+1(K+1)!2K.\Delta_{K+1} =\frac{(-1)^{K+1}M^{K+1}(K+1)!}{2^K}.

For K=1,M=2K=1,M=2, this is four. Directly the second moments are eight and four. The matched first moments therefore do not imply equal number distributions.

Apply aa to (∣0L⟩+i∣1L⟩)/2(|0_L\rangle+i|1_L\rangle)/\sqrt2 in the lowest code. Compare parity measurement with exact number measurement.

Solution

The normalized error state is (∣3⟩+i∣1⟩)/2(|3\rangle+i|1\rangle)/\sqrt2. Its parity is certainly odd, so an ideal parity measurement leaves it unchanged. The coherent inverse map restores the input. A number measurement instead yields three or one with equal probability and removes the relative phase; even if each observed state is re-encoded correctly, the average result is an incoherent mixture.

4. Test spacing with both losses and gains

Section titled “4. Test spacing with both losses and gains”

For L=2,G=1,D=0L=2,G=1,D=0, find M,KM,K, the codewords, and all four modeled residues. Why does M=3M=3 fail to distinguish the errors?

Solution

Here M=4,K=2M=4,K=2, so

∣0L⟩=(∣0⟩+3∣8⟩)/2,∣1L⟩=(3∣4⟩+∣12⟩)/2.\begin{aligned} |0_L\rangle&=(|0\rangle+\sqrt3|8\rangle)/2,\\ |1_L\rangle&=(\sqrt3|4\rangle+|12\rangle)/2. \end{aligned}

No shift, one loss, two losses, and one gain give residues 0,3,2,10,3,2,1. With spacing three, two losses and one gain both give residue one. Their cross product can shift number by three and connect occupied components. Matching diagonal moments does not repair this missing error separation.

Take L=2,G=0,D=1L=2,G=0,D=1. Write the codewords and calculate the common squared norm of a2∣μL⟩a^2|\mu_L\rangle.

Solution

The parameters are M=3,K=2M=3,K=2, giving

∣0L⟩=(∣0⟩+3∣6⟩)/2,∣1L⟩=(3∣3⟩+∣9⟩)/2.\begin{aligned} |0_L\rangle&=(|0\rangle+\sqrt3|6\rangle)/2,\\ |1_L\rangle&=(\sqrt3|3\rangle+|9\rangle)/2. \end{aligned}

Both means are 9/29/2 and both second moments are 2727. Therefore ⟨n(n−1)⟩=45/2\langle n(n-1)\rangle=45/2 in either word, which is the common squared two-loss norm. The cutoff is nine. Number residues separate losses zero, one, and two; the matched second moments also permit correction of the operator nn, with the additional subspace measurement described above.

For the lowest code at η=0.8\eta=0.8, find the two no-loss probabilities and the population in ∣0⊥⟩|0_\perp\rangle conditioned on no loss for input ∣0L⟩|0_L\rangle.

Solution

The probabilities are p0∣0=0.7048p_{0|0}=0.7048 and p0∣1=0.64p_{0|1}=0.64. The unnormalized orthogonal amplitude is (1−η2)/2=0.18(1-\eta^2)/2=0.18, so the conditional population is 0.182/0.7048≃0.04600.18^2/0.7048\simeq0.0460. A state can acquire deformation even when the detector observes no photon. These probabilities refer to the emitted-photon trajectory, not merely to an even endpoint parity, which also includes two- and four-loss events.

For L≥1L\ge1, minimize the toy logical error rate Γ(Δt)=AΔtL+q/Δt\Gamma(\Delta t)=A\Delta t^L+q/\Delta t, where A,q>0A,q>0. State its physical assumptions.

Solution

Differentiation gives ALΔtL−1−q/Δt2=0AL\Delta t^{L-1}-q/\Delta t^2=0, hence

Δt∗=(q/(AL))1/(L+1).\Delta t_*=(q/(AL))^{1/(L+1)}.

The data term assumes a small-time expansion with leading uncorrectable probability proportional to ΔtL+1\Delta t^{L+1} per cycle. The control term assumes a small fixed error qq per cycle and negligible cycle duration. A real optimum must respect control time, correlations and the validity range of both approximations.

8. Build the additional dephasing syndrome

Section titled “8. Build the additional dephasing syndrome”

For the M=2,K=2M=2,K=2 code, calculate ∣eμ⟩=(n−3)∣μL⟩/3|e_\mu\rangle=(n-3)|\mu_L\rangle/\sqrt3. Show how the same recovery corrects any error cI+dncI+dn on every encoded superposition.

Solution

The orthonormal error words are

∣e0⟩=(−3∣0⟩+∣4⟩)/2,∣e1⟩=(−∣2⟩+3∣6⟩)/2.\begin{aligned} |e_0\rangle&=(-\sqrt3|0\rangle+|4\rangle)/2,\\ |e_1\rangle&=(-|2\rangle+\sqrt3|6\rangle)/2. \end{aligned}

They are orthogonal to both original words but share their even parity. For any ∣ψL⟩|\psi_L\rangle,

(cI+dn)∣ψL⟩=(c+3d)∣ψL⟩+3d∣eψ⟩.(cI+dn)|\psi_L\rangle ={}(c+3d)|\psi_L\rangle +\sqrt3d|e_\psi\rangle.

Project onto the code and error subspaces without distinguishing their individual basis states. The first outcome already has the right logical amplitudes; the second needs ∣eμ⟩↦∣μL⟩|e_\mu\rangle\mapsto|\mu_L\rangle. Both branch probabilities are independent of those amplitudes. A full recovery completes the map on the remaining oscillator states. Parity alone gives the same answer in both branches and cannot implement this recovery.