Learn the H-cat encoding
Short lessons covering the physics and engineering behind photonic quantum computing with cat states. Start anywhere.
What is a cat state?Beginner
A cat state is a quantum superposition of two coherent states of light: |cat> = N(|alpha> + |-alpha>). The name comes from Schrodinger's cat: the light field is simultaneously in two macroscopically distinguishable states (positive and negative amplitude).
In phase space, a cat state looks like two Gaussian blobs (the coherent states) connected by interference fringes at the origin. The fringes are the quantum signature: they disappear if decoherence turns the superposition into a classical mixture.
In the H-cat encoding (Lee et al., PRX Quantum 5, 030322, 2024) each cat is paired with a single photon. The logical states are |0_L> = |+>|C_alpha^+> and |1_L> = |->|C_(i alpha)^+>, where C^+ is an even cat, so both logical states carry an even cat. The cat's photon-number parity is a loss flag, not the logical value. Z_L is read from the single photon; X_L comes from the photon's H/V outcome times the cat photon count mod 4.
Squeezing and photon subtractionBeginner
To make a cat state in the lab, you start with squeezed vacuum: light whose quantum noise is reduced in one quadrature at the expense of the other. Squeezing is generated by parametric down-conversion in a nonlinear medium (or a microring resonator on chip).
Photon subtraction means tapping off a small fraction of the squeezed light and detecting a photon. Conditioned on that detection (heralding), the remaining light collapses into an approximate cat state. More squeezing and more subtractions give higher-fidelity cats.
Key parameters: squeezing level (dB), number of subtractions (k), and the Fock-space truncation (N). The SDK's generate_cat() models all of these.
Cat breedingIntermediate
Small cats (low alpha) are the easiest to make. Large cats are what the H-cat encoding needs (amplitude about 2.5 to 2.9), but they are hard to make directly. Breeding grows cats by interfering smaller ones: interfere two small cats on a beamsplitter, measure one output, and conditioned on the result the other output is a larger cat.
Breeding is probabilistic but heralded. A failure is flagged and the state is discarded; a heralded success can still carry errors from loss. The repo has not simulated cats at the needed amplitude and quality.
Hybrid CV-DV fusionIntermediate
Fusion creates entanglement between H-cat qubits. In the paper's design it is a destructive hybrid Bell measurement: the two cat modes are interfered and counted on photon-number-resolving detectors, and the two single photons are measured on their own detectors.
Every output is detected, and those detections are what flag lost photons. Loss inside the fusion still causes errors, so the per-mode loss budget is very tight.
Loss flags and erasuresIntermediate
In the H-cat encoding, one lost photon is detectable: it drops the cat's photon number by one, which flips the photon-number parity from even to odd. Parity is read when the cat's photons are counted, so the flag says which qubit lost a photon. Two lost photons restore even parity, so they go unflagged and cause a silent logical error.
A flagged error location is called an erasure. Erasures are much easier to correct than unknown errors: the erasure threshold for the surface code is around 50%, compared to about 1% for depolarizing noise. Flags help only if something physically produces them: in the paper's design, they come from detecting every output of every fusion.
The paper reports a best threshold of about 0.89 percent total loss per mode, from preparation to detection, at cat amplitude about 2.9. That budget has to cover every source, waveguide, switch and detector a photon passes through.
Surface codes and erasure decodingAdvanced
The surface code is a topological error-correcting code defined on a 2D grid of qubits. Each logical qubit uses d x d physical qubits (where d is the code distance). The code corrects any error pattern affecting fewer than d/2 qubits.
For erasures, the decoder knows which locations were flagged and gives them zero weight, which is why flagged errors are cheaper to correct than silent ones.
Dyber's research surface-code runs use stim (a fast stabilizer circuit simulator) and PyMatching (minimum-weight perfect matching) in an abstract circuit model with assumed loss heralds; the SDK's resource model uses a fit to those runs. Model value: abstract circuit model with assumed loss heralds. Not a hardware operating point.
Silicon nitride photonicsAdvanced
Dyber's design studies assumed silicon nitride (SiN) integrated photonics. SiN offers low propagation loss and enough nonlinearity for on-chip squeezing via four-wave mixing.
Key on-chip components are microring resonators for squeezing and filtering, directional couplers as beamsplitters, and grating couplers for fiber I/O. The encoding needs photon-number-resolving (PNR) detectors, such as transition-edge sensors at millikelvin temperatures, because it counts photons (the cat count mod 4), not just clicks.
Lessons are self-contained. For simulation details, see the Workbench SDK and the docs.