Photonic quantum computers run at room temperature and hold their quantum state longer than most rivals, but they are tiny, their circuits are hardwired, they expose only a handful of tunable knobs, and they lose photons to noise — so nobody had built a real machine-learning classifier on one; this work from Northeastern University and Rice University builds ProxiML, which spreads each image feature across every gate, decides classes by comparing two measurement outcomes instead of thresholding one, and even switches off some photon sources on purpose, reaching over 90 percent accuracy on hard four-class image tasks on Xanadu's real X8 device.
The argument in one glance
-
Problem
Photonic quantum machines are promising, but nobody had built a real classifier on one
Photonic quantum computing is emerging as a serious rival to superconducting and trapped-ion machines: it runs at room temperature, its quantum states stay coherent for a long time, and it integrates naturally with classical optics. But a real photonic device is a hostile place for machine learning. Xanadu's X8, the machine in this study, has just eight qumodes, a circuit whose structure is hardwired and cannot be rearranged, only twelve knobs that actually change the output, and severe photon loss and noise. Whether an effective machine-learning classifier could even run on such hardware was an open question.
-
What people did
Port the standard variational-classifier recipe from other quantum machines
The natural move is to reuse the recipe that works on superconducting devices: run a variational quantum circuit, encode the input image's features directly into the first few gates, use the remaining gates as trainable parameters, and classify by looking at the single most probable output state — if its probability clears a fixed threshold, call it one class, otherwise the other. Train this in simulation, then run inference on the real machine.
-
Why it fell short
On the real machine, the textbook recipe collapses
It works in simulation and falls apart on hardware, losing roughly thirty percentage points of accuracy. Direct encoding forces each feature to cost a training parameter, so with only twelve knobs you can barely fit any features, and it concentrates each feature on one gate, so a single faulty gate wrecks the answer. Worse, the fixed threshold on the top output state is set by a probability the photon loss physically shifts, so noise slides the decision boundary and the classifier misreads.
-
This paper's idea
Co-design the classifier around the machine's actual physics and noise
ProxiML redesigns every piece to be noise-aware. It spreads each feature across all twelve gates with a linear parametric encoding, so no gate is critical and more features fit. It classifies by comparing the probabilities of two carefully chosen output states rather than thresholding one, removing the noise-sensitive threshold. It picks those states from the busiest orbit and along its diagonal, where loss hits both similarly. And it deliberately switches off some photon sources to raise the signal it reads. Together these reach over 90 percent on hard four-class image tasks on the real X8.
Why this problem is worth solving
To see why the textbook approach fails, it helps to understand the peculiar hardware ProxiML must live on. A photonic quantum computer stores information in qumodes, and the state of a qumode is described by how many photons it holds. On Xanadu’s X8 there are eight qumodes, split into four signal and four idler qumodes that cannot exchange photons with each other. Two kinds of gate act on them: squeezing gates, which are photon generators that can be switched only fully on or off, and interferometer gates (Mach-Zehnder and rotation gates), which mix photons among qumodes without creating or destroying any. Of all the machine’s knobs, only twelve — the Mach-Zehnder parameters — actually change the output distribution, so those twelve must carry both the input image and the trainable model. You run the circuit thousands of times (“shots”) and count photons at the end, building up a probability distribution over output states. States are grouped into orbits by their total photon count; ideally, since photons are conserved, only certain orbits should appear. A classifier must somehow turn this distribution over photon-count patterns into a class label — with only twelve shared knobs to work with.
The reason porting the standard recipe fails is that a real photonic machine leaks photons, and that leak moves exactly the quantities the classifier depends on. On an ideal machine photons are conserved, so output states stay within their orbit and the probabilities behave as the math predicts. A real device is far from ideal: the X8 has about eight decibels of photon loss and weak entanglement, so photons vanish and states leak into orbits that should have zero probability. This wrecks the textbook classifier two ways. First, direct encoding puts one feature on one gate, so with only twelve knobs shared between features and trainable weights, you can encode at most a handful of features and each one you add steals a weight — and because a feature lives on a single gate, if that gate is noisy the feature is lost. Second, the standard decision rule thresholds the probability of the single highest-probability state against a fixed value, but that probability is precisely what loss drives down, so the threshold that was calibrated in simulation is in the wrong place on the machine. The net effect is a thirty-point accuracy collapse. Making a classifier that survives on real photonic hardware means designing every step so that photon loss, which is unavoidable, does not move the answer — which is what makes the redesign worth doing.
What people did before, and where it broke
- Direct feature encoding (from superconducting machines). Put each input feature on its own gate and use the rest as trainable weights. Where it broke. With only twelve usable knobs, each feature both caps how many you can encode and costs a training weight, and putting a feature on a single gate means one faulty gate destroys it — so accuracy is low and fragile on the real machine.
- Threshold the highest-probability output state. Train against the median probability of the single most likely state and classify by whether the observed probability clears that threshold. Where it broke. Photon loss physically lowers that probability, so the simulation-calibrated threshold is misplaced on hardware; even continuously re-tuning it from live machine measurements never becomes competitive.
- Turn on all photon generators to fight loss. Since loss destroys photons, generate as many as possible by switching every squeezing gate on. Where it broke. Piling in photons spreads probability thinly across many orbits, lowering the signal-to-noise ratio of the states you actually read, which slows training and hurts real-machine accuracy.
- Pick the highest-probability state for multi-class labels. For n classes, read n output states and assign the class of whichever is most probable. Where it broke. Under noise several states have similar probabilities, so the single top state is unreliable, and the scheme needs one clean state per class — quickly exhausting the few high-quality states a small machine has.
- The gap. Every piece of the standard recipe assumed an idealized machine where probabilities mean what the math says. On real photonic hardware, loss moves those probabilities, concentrates fragility on single gates, and blurs the top state — so what was missing was a classifier co-designed around loss at every step, which is exactly what a practical photonic classifier needs.
How ProxiML works
Co-designing a photonic classifier that survives photon loss
-
-
new
-
new
-
new
-
new
-
new
The idea
Spread the information across every gate so no single faulty gate can wreck it. The textbook encoding places one feature on one gate, which both wastes the machine’s tiny budget of knobs and makes each feature hostage to a single noisy gate. ProxiML’s parametric encoding instead makes every gate parameter a trainable mix of all the features, so each feature is smeared across the whole circuit; a gate that misbehaves now degrades every feature a little instead of destroying one outright, and the circuit becomes more expressive besides. Distributing a value across many physical components so that a localized fault cannot destroy it is the same principle behind the quantum error-correcting-code synthesis work covered elsewhere on this site, which encodes one logical qubit across many physical ones precisely so that noise striking any single component can be absorbed rather than being fatal.
Decide by relative comparison, calibrated to what the real machine actually does. The fragile part of the old recipe was the absolute threshold, a number set in simulation that photon loss then physically moves on the hardware. ProxiML replaces it with a comparison between two output states: the class is simply whichever is more probable, a decision that survives loss because loss pushes both down together. Crucially, ProxiML chooses those states by measuring the real machine — finding which orbit it actually populates and which states share a loss profile — rather than trusting the idealized model. Designing to what the hardware measurably does, instead of to the clean abstraction, is the discipline the deep-learning-on-GPUs retrospective covered elsewhere on this site argues for, insisting that the real behavior of the silicon, not the datasheet ideal, is what a system must be built around.
Generate fewer photons on purpose, because the counterintuitive truth only shows up on the real machine. The obvious way to fight photon loss is to make more photons, turning on every generator. ProxiML discovers the opposite: switching some squeezing gates off concentrates probability into the orbit it reads, raising the signal-to-noise ratio of exactly the states it classifies on, which trains faster and reads more cleanly under noise. This inversion of the intuitive strategy is visible only in the machine’s own measured behavior, not in the textbook picture — the kind of hardware-specific truth the GPU-kernel study work covered elsewhere on this site is built to surface, learning what a device really rewards by studying its actual execution rather than assuming the naive optimum.
Following a hard four-class image task through ProxiML
Classifying handwritten digits 4, 7, 8, and 9 on the X8 machine
Tracing the hardest four-class task shows how each noise-aware choice earns its accuracy.
Step 1 of 5
Reduce the images to features and rank the task difficulty
ProxiML runs principal component analysis on the MNIST images to extract their most informative features, taking the top thirty-two. It also ranks how hard each class combination is with a Frechet Inception Distance score, so 4 versus 7 versus 8 versus 9 is identified as the hardest four-class case.
The digits 4, 7, 8, and 9 look alike, so their images are hard to tell apart even before quantum noise enters.
Why it works
- Parametric encoding smears each feature across all gates, so no single gate is a point of failure. Direct encoding puts a feature on one gate and spends a weight per feature → but a trainable linear mix distributes every feature onto all twelve gates while keeping every gate’s weights → so a faulty gate only slightly dents each feature and the circuit fits far more features and trains better.
- Relative comparison removes the threshold that photon loss physically moves. A fixed threshold on one state’s probability is calibrated in simulation but shifted by loss on hardware → but deciding by which of two states is more probable depends only on their order → so the classification survives the loss that drags both probabilities down together.
- Reading diagonal states in the busiest orbit keeps the comparison meaningful under noise. Arbitrary states differ in how much loss they suffer and how likely they are → but states within one orbit share a conserved total probability, and its diagonal states are the most occupied and most similarly affected → so the two probabilities being compared stay high-signal and move together, not apart.
- Switching off some photon sources raises the signal you actually classify on. Turning on all generators spreads probability thinly across many orbits → but activating only two squeezing gates concentrates probability into the target orbit, raising its states’ maximum probability → so the signal-to-noise ratio climbs, training converges faster, and real-machine accuracy improves.
- Relative-ordering multi-class needs only logarithmically many clean states, so it scales. Picking the top state needs one clean state per class and breaks when noise blurs them → but forming a few pairwise comparisons needs only about two-log-of-n diagonal states → so ProxiML classifies more classes without dipping into the noisy off-diagonal states a small machine would otherwise be forced to use.
What it costs (trade-offs and scope)
- The scalability results are mostly simulation, not silicon. Accuracy on larger X12 and X16 machines and on ten-class tasks is obtained by simulating those machines, because they do not physically exist yet; only the X8 numbers are from real hardware.
- It is punishingly slow. A hundred test images take three or more hours on the X8, a single four-class training run takes more than ten hours on a classical cluster, and the full experimental campaign spanned over three months of real-machine access.
- It is demonstrated on one device and one topology. All hardware results come from Xanadu’s X8; the authors expect the ideas to generalize to other photonic machines but note that different topologies may need additional, topology-aware optimizations.
- Cross-platform comparisons are acknowledged as not apples-to-apples. ProxiML’s 91 percent on a hard four-class task looks strong beside reported superconducting and trapped-ion numbers, but the authors are explicit that noise types and technology maturity differ, so the comparison only contextualizes rather than proves superiority.
- Some gains cost training time, and the hardest tasks still lag. Parametric encoding with many features lengthens training up to three times, feature benefits saturate around sixteen, and on the hardest Fashion-MNIST four-class task real-machine accuracy is only about 66 to 69 percent.
- It is a hybrid classical-quantum method, not a demonstrated quantum speedup. Training happens on a classical simulator and the paper frames photonic QML as early-stage exploration, so ProxiML shows feasibility and noise resilience, not a proven advantage over classical classifiers.
The evaluation
The textbook photonic classifier versus ProxiML, choice by choice
| Property | Textbook variational classifier | ProxiML |
|---|---|---|
| Feature encoding | ||
| Class decision rule | ||
| Which states are read | ||
| Photon sources | ||
| Hardest four-class task on the real X8 |
Check yourself
Check your understanding
1. Why does the standard variational-classifier recipe from superconducting machines lose about thirty points of accuracy when run on the real X8 photonic device?
2. What is ProxiML's parametric encoding, and why is it more robust than direct encoding?
3. Why does ProxiML switch OFF some photon-generating squeezing gates instead of turning them all on to fight photon loss?
4. Which statement best reflects the scope and limits of ProxiML's results?
Sources
The paper is “ProxiML: Building Machine Learning Classifiers for Photonic Quantum Computing” by Aditya Ranjan, Tirthak Patel, Daniel Silver, Harshitta Gandhi, and Devesh Tiwari, published at ASPLOS 2024, DOI 10.1145/3620666.3651367. The authors are at Northeastern University and Rice University.
This explainer is written from the full 16-page text. Everything above comes from the paper’s own sections: the introduction and background on photonic quantum computing (qumodes, the Fock photon-number basis, squeezing gates as photon generators producing two-mode squeezed vacuum states, Mach-Zehnder and rotation interferometer gates, and the eight-qumode X8 machine with only twelve output-affecting parameters), and the motivation showing a baseline variational classifier losing about thirty points on the real machine because of an eight-decibel loss level and high noise-reduction factor; the four design elements — parametric encoding distributing features across all gates for expressibility and fault-resilience, state-to-state comparison replacing noise-sensitive thresholding, noise-aware selection of diagonal output states within the maximally occupied orbit, and selective two-of-four squeezing-gate activation to raise the maximum orbit probability and signal-to-noise ratio — plus the relative-ordering multi-class scheme needing only logarithmically many diagonal states; the experimental methodology on MNIST and Fashion-MNIST with Frechet Inception Distance difficulty ranking and the StrawberryFields, TensorFlow, and scikit-learn stack; and the evaluation over a three-month X8 campaign reporting over 95 percent binary and over 90 percent four-class accuracy (91 percent on the hardest four-class versus 76 percent for pick-the-highest), the ablations isolating each technique’s contribution, the sensitivity analyses, and the simulated scaling to X12 and X16 machines and ten-class tasks (81 percent on X16).