---
title: "Keeping a chosen number of photons in a cavity"
description: "What distinguishes preparing a chosen number state from merely reporting that the controller has found it?"
canonical_url: "https://sandboxphysics.com/stories/quantum-evidence/quantum-feedback-photon-number-verification/"
language: "en"
page_type: "story"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/stories/quantum-evidence/quantum-feedback-photon-number-verification/"
last_modified: "2026-10-27"
---

[Quantum physics: reading the evidence](https://sandboxphysics.com/stories/quantum-evidence/)

Nobel A · Evidence and control

# Keeping a chosen number of photons in a cavity

Sandbox Physics · 2026-10-16

What distinguishes preparing a chosen number state from merely reporting that the controller has found it?

## The target was a particular photon number

In 2011 Sayrin and colleagues made a microwave field return toward a chosen photon number after it lost a photon. Atoms passed through a cavity and probed the stored light. A computer used their results to estimate the field state, then commanded a microwave source to apply small corrections. The loop combined measurement with an action on the light.

Measurement alone can narrow a field to a definite number state, meaning a state with exactly one photon number. The result is random, though: it need not be the number requested beforehand. Feedback adds a way to steer later results toward that target. Performance includes how often it succeeds and how long it takes, especially when success is declared only after favourable results appear.

Read the evidence: C. Sayrin et al. (2011), Real-Time Quantum Feedback Prepares and Stabilizes Photon Number States — author manuscript, arXiv:1107.4027; Nature 477, 73–77

## The same average can hide very different states

Take a target of exactly two photons. An equal mixture of vacuum and four photons has the same mean photon number, yet it never contains two. A meter that reads only the mean would report no error; a measurement that resolves photon number would find nothing in the target state.

For this known pure target, fidelity means the probability of finding exactly the requested photon number in an ideal measurement. In the formula, n with the subscript t denotes the target number, rho describes the field state, and F is that probability. It measures how much of the state occupies the target; reconstructing an arbitrary field, including coherence between number components, requires additional information.

$$
F_{n_{\mathrm t}}=\langle n_{\mathrm t}|\rho|n_{\mathrm t}\rangle
$$

Read the evidence: S. Haroche (2013), Nobel Lecture: Controlling Photons in a Box and Exploring the Quantum to Classical Boundary, Rev. Mod. Phys. 85, 1083–1102 — published version of the 2012 lecture

## A displacement does not add exactly one photon

The actuator in 2011 applied a small displacement to the light field, the quantum version of adding a controlled wave. It did not supply exactly one photon whenever the computer suspected a loss. Even displacing an empty cavity creates a spread of possible photon numbers.

The sequence worked by alternating those controlled nudges with number-sensitive probes. The probes narrowed the possibilities, the computer used the available record to choose the next nudge, and subsequent probes checked its effect. The interplay let a correction with uncertain photon number help steer the state toward a definite target.

The estimate combined the preparation, probe calibration, earlier actions and the latest detected atom with a model of relaxation and detection errors. An undetected atom could still have interacted with the field. Atoms also needed time to reach the detector, leaving a delay between their effect on the light and the arrival of their results.

The raw atom result, the estimated photon-number distribution and the commanded microwave pulse formed three different time streams. A correction responded to the information available then. The field could already have changed again before the news arrived.

Read the evidence: C. Sayrin et al. (2011), Real-Time Quantum Feedback Prepares and Stabilizes Photon Number States — author manuscript, arXiv:1107.4027; Nature 477, 73–77

## Fresh probes checked the prepared field

To check the prepared field, the researchers interrupted feedback and sent extra probe atoms. Those fresh data reconstructed the photon-number distribution independently of the feedback estimator, using the calibrated probe response. The paper compared both runs stopped after a fixed time and runs stopped once the estimated target probability had remained above a threshold.

Runs stopped at a threshold can end with higher fidelity because the procedure waits for favourable evidence. Runs stopped at a fixed time include some still recovering from a jump. Comparing their bars as if they came from one protocol hides the time cost and the definition of success. The distribution of waiting times is therefore part of the result.

Read the evidence: C. Sayrin et al. (2011), Real-Time Quantum Feedback Prepares and Stabilizes Photon Number States — author manuscript, arXiv:1107.4027; Nature 477, 73–77

## Recovering after photon loss

In an ideal vacuum-loss channel, each photon survives independently with the same probability, so a number state loses its first photon at a rate proportional to the number of photons. Larger targets leave the controller less time to gather information and act, and thermal gain and experimental errors make the job harder still.

The task was to stabilize a known number state. Protecting arbitrary unknown encoded information is a different task, because learning photon number can destroy coherence that an encoding needs. Here the measured number was exactly the information the controller wanted. Repeated sensing and small actions let it bring the field back toward that specified state after quantum jumps.

Read the evidence: S. Haroche (2013), Nobel Lecture: Controlling Photons in a Box and Exploring the Quantum to Classical Boundary, Rev. Mod. Phys. 85, 1083–1102 — published version of the 2012 lecture

## An unknown message needs a different kind of check

For an encoded unknown qubit, the useful measurement asks about relations between data qubits. In a three-qubit repetition code, two checks ask whether neighbouring bits agree. Both a codeword built from zeros and one built from ones give the same answers. A superposition can keep its unknown relative amplitudes because the checks do not distinguish those two messages. One bit flip changes a characteristic pair of answers, called the syndrome, and selects a repair.

Those agreement checks miss phase errors. Such an error can leave every reported check quiet and still change a phase-sensitive message. The five-qubit code of Laflamme and colleagues, published in 1996, provides four checks that distinguish the fifteen single-qubit Pauli errors and the no-error case. With ideal checking, it protects an arbitrary qubit against an error on any one data qubit. Multiple faults or faulty checks need further protection. A final test against a known prepared target can assess an experiment, but that test consumes the state; it cannot be used to read every unknown message during error correction.

Read the evidence: IBM Quantum Learning, Stabilizer codes: repetition, five-qubit and syndrome decoding R. Laflamme et al. (1996), Perfect Quantum Error Correction Code

## Continue with the models

These teaching Labs produce simulated data, which are separate from the historical observations discussed above.

- [Compare a limited feedback model with fresh verification data](https://sandboxphysics.com/labs/cavity-photon-qnd-feedback/)
- [Compare loss and dephasing](https://sandboxphysics.com/labs/decoherence-channels/)
- [Distinguish an estimated state from verification data](https://sandboxphysics.com/labs/quantum-state-process-tomography/)
- [Find errors while leaving an encoded message unread](https://sandboxphysics.com/labs/quantum-error-correction/)

## Sources and reading notes

The article follows Sayrin et al.’s 2011 Nature paper and arXiv manuscript, including the displacement actuator, delayed estimate and two stopping protocols, with Haroche’s published lecture. The equal-mean example and vacuum-loss limit are explanatory calculations. The linked QND Lab uses a finite number-diagonal model with declared stochastic number-changing actions, which differ from the historical coherent displacements. Verification uses newly generated probe outcomes on the same evolving cavity; this does not make the cavity states statistically independent. No historical spectrum or fidelity was refitted.

1. [IBM Quantum Learning, Stabilizer codes: repetition, five-qubit and syndrome decoding](https://quantum.cloud.ibm.com/learning/en/courses/foundations-of-quantum-error-correction/stabilizer-formalism/stabilizer-codes)
2. [R. Laflamme et al. (1996), Perfect Quantum Error Correction Code](https://arxiv.org/html/quant-ph/9602019v1)
3. [C. Sayrin et al. (2011), Real-Time Quantum Feedback Prepares and Stabilizes Photon Number States — author manuscript, arXiv:1107.4027; Nature 477, 73–77](https://arxiv.org/pdf/1107.4027)
4. [S. Haroche (2013), Nobel Lecture: Controlling Photons in a Box and Exploring the Quantum to Classical Boundary, Rev. Mod. Phys. 85, 1083–1102 — published version of the 2012 lecture](https://journals.aps.org/rmp/pdf/10.1103/RevModPhys.85.1083)

[Blackbody radiation: a whole curve, not one quantum](https://sandboxphysics.com/stories/quantum-evidence/blackbody-spectrum-planck-wien/) [Photoelectric evidence: the voltage is not yet the energy](https://sandboxphysics.com/stories/quantum-evidence/photoelectric-stopping-potential-contact/) [Oil drops: finding a charge unit in falling times](https://sandboxphysics.com/stories/quantum-evidence/millikan-oil-drop-charge-inference/) [Atomic spectra: evidence for states, not photographs of orbits](https://sandboxphysics.com/stories/quantum-evidence/atomic-spectra-stationary-states/) [Franck–Hertz: what a drop in current can show](https://sandboxphysics.com/stories/quantum-evidence/franck-hertz-discrete-excitation/) [Compton scattering: light must balance momentum too](https://sandboxphysics.com/stories/quantum-evidence/compton-scattering-energy-momentum/) [de Broglie: a wavelength for matter, a speed for the packet](https://sandboxphysics.com/stories/quantum-evidence/de-broglie-matter-waves-phase-packets/) [Matrices and waves: two routes to the same predictions](https://sandboxphysics.com/stories/quantum-evidence/matrix-wave-mechanics-observables/) [Born: how a scattering direction became a probability](https://sandboxphysics.com/stories/quantum-evidence/born-scattering-probability/) [Pauli: count the states before filling the shells](https://sandboxphysics.com/stories/quantum-evidence/pauli-spectra-exclusion-principle/) [Dirac’s electron: a successful equation with an unfinished story](https://sandboxphysics.com/stories/quantum-evidence/dirac-electron-spin-relativity/) [Why a magnetic field splits a spectral line](https://sandboxphysics.com/stories/quantum-evidence/zeeman-lines-polarization-lorentz/) [How an electric field splits hydrogen’s spectral lines](https://sandboxphysics.com/stories/quantum-evidence/stark-effect-electric-field-spectra/) [Reading atomic motion in the colours of canal rays](https://sandboxphysics.com/stories/quantum-evidence/stark-canal-rays-doppler-emitters/) [What two silver traces revealed about atoms](https://sandboxphysics.com/stories/quantum-evidence/stern-gerlach-silver-beam-spin/) [Measuring the proton’s magnetism with a hydrogen beam](https://sandboxphysics.com/stories/quantum-evidence/stern-proton-moment-molecular-hydrogen/) [How to tell when a nucleus is in resonance](https://sandboxphysics.com/stories/quantum-evidence/magnetic-resonance-beams-absorption-induction/) [How light moves atoms into states that stop absorbing](https://sandboxphysics.com/stories/quantum-evidence/optical-pumping-populations-double-resonance/) [How missing hydrogen atoms revealed the Lamb shift](https://sandboxphysics.com/stories/quantum-evidence/lamb-shift-microwave-evidence/) [How Kusch and Foley found the electron’s extra magnetism](https://sandboxphysics.com/stories/quantum-evidence/kusch-foley-electron-magnetic-moment/) [How a crystal takes the recoil of an emitting nucleus](https://sandboxphysics.com/stories/quantum-evidence/mossbauer-recoil-free-resonance/) [How Ramsey and ion traps gave atoms more time](https://sandboxphysics.com/stories/quantum-evidence/ramsey-ion-traps-measurement/) [Reading a cavity phase error in an atomic fountain](https://sandboxphysics.com/stories/quantum-evidence/ramsey-cavity-phase-frequency-bias/) [Counting the quantum noise left by a perfect detector](https://sandboxphysics.com/stories/quantum-evidence/quantum-projection-noise-population-counts/) [Following a fountain clock’s extrapolation to zero density](https://sandboxphysics.com/stories/quantum-evidence/fountain-clock-collision-density-extrapolation/) [How a changing electric field holds an ion](https://sandboxphysics.com/stories/quantum-evidence/paul-trap-dynamic-stability-micromotion/) [How Dehmelt listened to the spin of one electron](https://sandboxphysics.com/stories/quantum-evidence/dehmelt-single-electron-penning-spin-readout/) [When sodium atoms came out colder than expected](https://sandboxphysics.com/stories/quantum-evidence/laser-cooling-below-doppler-limit/) [Keeping a slowing atomic beam in tune with one laser](https://sandboxphysics.com/stories/quantum-evidence/zeeman-slowing-neutral-atom-beam/) [How six laser beams slowed Chu’s atoms](https://sandboxphysics.com/stories/quantum-evidence/chu-optical-molasses-diffusion-escape/) [Reading a cold-atom thermometer from the flight of the cloud](https://sandboxphysics.com/stories/quantum-evidence/cold-atom-ballistic-thermometry/) [How an atom loses energy climbing hills made of light](https://sandboxphysics.com/stories/quantum-evidence/sisyphus-cooling-polarization-energy/) [How helium atoms escaped the light and formed two narrow peaks](https://sandboxphysics.com/stories/quantum-evidence/subrecoil-cooling-dark-state-momentum/) [How one trapped ion switches its fluorescence off and on](https://sandboxphysics.com/stories/quantum-evidence/electron-shelving-single-ion-jumps/) [Reading the sidebands in the first ion ground-state cooling experiment](https://sandboxphysics.com/stories/quantum-evidence/sideband-asymmetry-ground-state-cooling/) [Let a second ion read out a narrow transition](https://sandboxphysics.com/stories/quantum-evidence/quantum-logic-spectroscopy-shared-motion/) [How to measure one quantum system and keep it available](https://sandboxphysics.com/stories/quantum-evidence/single-quantum-measurement-backaction/) [A cavity cat loses coherence before it loses its energy](https://sandboxphysics.com/stories/quantum-evidence/cavity-cat-coherence-energy-decay/) [Counting stored photons one atom at a time](https://sandboxphysics.com/stories/quantum-evidence/qnd-photon-counting-atomic-records/) [How Bell tests distinguish quantum correlations](https://sandboxphysics.com/stories/quantum-evidence/bell-tests-correlations-loopholes/) [Freedman and Clauser test Bell’s inequality with calcium light](https://sandboxphysics.com/stories/quantum-evidence/freedman-clauser-coincidence-normalization/) [Aspect changes the analyzers while photons are in flight](https://sandboxphysics.com/stories/quantum-evidence/aspect-switching-spacetime-records/) [A readiness signal makes the Bell trial countable](https://sandboxphysics.com/stories/quantum-evidence/event-ready-bell-trials-finite-statistics/) [Photon Bell tests keep the trials where detectors stay silent](https://sandboxphysics.com/stories/quantum-evidence/photon-bell-losses-optical-trials/) [Three-photon GHZ correlations defeat a shared answer sheet](https://sandboxphysics.com/stories/quantum-evidence/ghz-parity-three-photon-records/) [How the 1997 photon experiment transferred a quantum state](https://sandboxphysics.com/stories/quantum-evidence/quantum-teleportation-conditional-records/) [A photon announces when to look for its partner](https://sandboxphysics.com/stories/quantum-evidence/heralded-photon-anticorrelation-gates/) [Two photons leave the beam splitter together](https://sandboxphysics.com/stories/quantum-evidence/hong-ou-mandel-dip-mode-overlap/) [A joint measurement entangles two photons that never met](https://sandboxphysics.com/stories/quantum-evidence/entanglement-swapping-fourfold-records/) [The later measurement sorts earlier photon detections](https://sandboxphysics.com/stories/quantum-evidence/delayed-choice-swapping-sorted-records/) [Dense coding sends three distinguishable messages with one photon](https://sandboxphysics.com/stories/quantum-evidence/dense-coding-three-messages-resources/) [Reconstructing a photon state from calibrated counts](https://sandboxphysics.com/stories/quantum-evidence/photon-tomography-counts-physical-states/)
