Benchmarks
Bytes, qubits, and xubits on separate levels. A count is not a millisecond, and a millisecond is not a price.
A dual-rail xubit
Drag the phase or let it run. The glow on each rail is the ideal photon probability. The QPU fringe later on this page is the same curve, measured as a qubit image on hardware. The covariance chain is a different state and a different chart.
One photon, two rails
Logical zero is a photon in mode 0 and vacuum in mode 1. Logical one swaps those occupation numbers. The picture is that dual-rail state.
Phase 1.57 rad. Ideal P(1) is sin(phase/2) squared, now 0.500. The same curve is what the IBM fringe measured on the qubit image.
Two modes of covariance take 128 bytes and are not this photon. Cutoff-4 Fock for these two modes is 256 bytes. The qubit image is 32 bytes.
A linear-optical Bell measurement tells two of the four Bell states apart, so photonic teleport succeeds on half the attempts. The gate-model image can be deterministic. Those are different experiments.
What XQL removes before it runs
XQL lowers to the same scheduler as the Python circuit API. Before a Gaussian program runs, adjacent phases on one mode add, adjacent squeezes add, adjacent displacements add, and a zero gate is dropped. A phase can slide past a gate that does not touch its mode. It does not slide through a beamsplitter on that mode. The covariance after the rewrite matches the source. This is a compiler pass, not a faster device, and it does not replace the 32-mode scoreboard. The next section adds beamsplitter angles, full-turn removal, and displacement pushing on a second program.
Gates in one 4-mode program
One 4-mode Gaussian program. The rewrite composes redundant gates. The covariance matches. Not the committed 32-mode row and not a QPU time.
Rewrite check
Source gates 12. Optimized gates 3. Fusions recorded 8.
Largest covariance difference 2.22e-16. A value near zero means the state was kept.
let binds a number. repeat unrolls a block from 1 to 8. Both stay inside the netlist. They do not call Python.
A second XQL pass
Expressions may use sin, cos, exp, sqrt, and powers. On this program the first pass only fuses neighbors. The second pass adds beamsplitter angles on one pair, drops a phase of 2π, lets a sign flip pass a real squeeze, and pushes each displacement through the linear gates behind it. Kerr on that mode stays a barrier. The covariance still matches. Two redundant dual-rail programs compile to an empty circuit and to one Mach-Zehnder. The QPU measures those compiled one-qubit images. The Gaussian state stays on this machine.
Gates after each pass
One 4-mode Gaussian program. The first pass fuses adjacent gates. The second pass adds beamsplitter angles on the same pair, drops a full turn, lets a sign flip pass a real squeeze, and pushes displacements through linear gates. The covariance matches. This is a compiler pass, not a QPU time and not a speedup. It does not replace the 4-mode study in xql-opt.json.
Compiled image on the QPU
XQL removed cancelling couplers and full turns on this CPU. The QPU measured the compiled one-qubit image. The Gaussian covariance was not sent. This is not a speedup.
Covariance difference 2.22e-16. Backend ibm_marrakesh. Job dbi8o8ghoj4c73b5njbg. QPU seconds 2.0. Status DONE.
- compiled-identity: 4 source gates, 0 compiled gates, ideal P(1) 0.000.
- compiled-fringe: 8 source gates, 3 compiled gates, ideal P(1) 0.118.
Fourth pass, 2026-11-09
A run of phases, squeezes, and couplers on one mode or on one pair is one symplectic matrix. The fourth pass multiplies the run and writes the matrix back as a shorter gate list when one exists. On the six existing study programs it removes no further gate: each one stays at its cluster count in the table below. The only gain is on v2-demo, a program written for this pass, which goes from 22 gates to 11. On a single run the rewrite costs more than it saves: on v2-demo, reaching 11 gates took 1.177 ms against 0.215 ms for the 22-gate cluster list, while running the whole program took 0.092 ms before and 0.019 ms after (the after time also uses one kernel binding per run). A run from vacuum can also skip gates that act only on modes still in vacuum, which leaves 1 gate to run for the 4-mode program. That matches the state from vacuum. It is not a shorter circuit for hardware.
| Program | Source | optimize | cluster | Fourth pass | Run from vacuum |
|---|---|---|---|---|---|
| opt-demo | 12 | 3 | 3 | 3 | 1 |
| compile-demo | 14 | 5 | 5 | 5 | 3 |
| xql-lm-1-mixer | 64 | 16 | 16 | 16 | 0 |
| cluster-demo | 3 | 3 | 1 | 1 | 0 |
| image-identity | 4 | 0 | 0 | 0 | 0 |
| image-fringe | 8 | 3 | 3 | 3 | 0 |
| v2-demo | 23 | 22 | 22 | 11 | 5 |
One kernel binding per run took the 32-mode chain from 0.428 ms to 0.145 ms. A two-mode Fock run of 24 gates at cutoff 6 with 2 photons went from 3.931 ms to 0.239 ms with a cached eigenbasis and diagonal gates, and 0.142 ms at the cutoff the photon number allows. These are medians of 41 on this CPU at load average 15.47 while other jobs were running, so only rows of this one file compare. Every state matches the unoptimised run to 1e-9. This is a compiler and kernel pass on a CPU. It is not a quantum speedup and not a QPU time. The two older files were not rewritten.
Teleportation
A byte copy writes 8 bits and leaves the original. A qubit teleport measures the payload, sends 2 classical bits, and spends one Bell pair. An xubit is that logical qubit held as one photon in two modes, so three logical qubits are six modes. Linear optics can tell only two of the four Bell states apart, so that photonic attempt succeeds on half the shots unless more photons are added. The gate-model image can apply a CNOT, so its ideal success is 1. Device noise is a separate measurement.
Ideal success of a move
Probability the destination holds the state. Not a wall-clock time.
Classical bits used
A copy moves 8 bits. Teleport and dense coding use 2.
Operations
Each row is one operation. Blank success means that row is not a success probability.
| Operation | Kind | Classical bits | Ebits | Qubits | Modes | Ideal success | Original | Note |
|---|---|---|---|---|---|---|---|---|
| Copy 1 byte | byte | 8 | 0 | 0 | 0 | 1 | yes | Eight bits are duplicated and the original byte stays. |
| Teleport one qubit | qubit | 2 | 1 | 3 | 0 | 1 | no | Gate model. The payload is measured. X and Z rebuild it. |
| Teleport one xubit, linear optics | xubit | 2 | 1 | 3 | 6 | 0.5 | no | A linear-optical Bell measurement distinguishes 2 of 4 Bell states. Without extra photons the attempt succeeds half the time. |
| Teleport image on a gate-model QPU | xubit | 2 | 1 | 3 | 6 | 1 | no | The submitted circuit is 3 qubits, not 6. Six is the dual-rail mode count of that image. Ideal success ignores device noise. |
| Dense coding | qubit | 2 | 1 | 2 | 0 | 1 | no | Two classical bits arrive by sending one half of a shared Bell pair. |
| Bell pair | qubit | 0 | 1 | 2 | 4 | 1 | n/a | The entanglement teleportation spends. Four modes is the dual-rail picture of two logical qubits. |
| Hong-Ou-Mandel | xubit | 0 | 0 | 0 | 2 | — | n/a | P(1,1) is 0 and each bunching port is 1/2. That is interference, not a teleport success. |
| Mach-Zehnder | xubit | 0 | 0 | 1 | 2 | 1 | n/a | Phi 0 stays on port 0. Phi pi swaps the port. The qubit image is H, Rz, H. |
| No-cloning of |+> | qubit | 0 | 1 | 2 | 4 | — | no | Overlap with |+>|+> is 1/2. A byte copy of the same symbol has overlap 1. |
| GHZ | qubit | 0 | 0 | 3 | 6 | 1 | n/a | P(000) and P(111) are each 1/2 on the local statevector. Six modes is the dual-rail count. |
| Swap |1> | qubit | 0 | 0 | 2 | 4 | 1 | moved | Three CNOTs move the state. Teleport consumes it and rebuilds it from two classical bits. |
What is occupied
Qubits in the gate-model picture, modes in the dual-rail picture.
Hong-Ou-Mandel
Two photons, 50/50 coupler, cutoff 4. A byte stream does not bunch.
Mach-Zehnder ports
Fock ports. The qubit image matches these two phases.
Information
Teleport does not copy. The sender's payload is measured. What moves across the classical channel is two bits. A dual-rail xubit carries one logical qubit in two optical modes. The Gaussian covariance of those modes is a different state: it is not a single-photon dual-rail qubit, and it is not teleported by the qubit circuit.
Bits duplicated
Zero means the original unknown state was not left in place.
Representation size
These are bytes required to store the picture. The lab keeps a Fock vector for two modes. The 16-mode Fock number is a size, not a vector sitting in memory, and not a time.
log10 of stored bytes
Gaussian covariance, dual-rail qubit image, Fock cutoff 4.
Bytes, not milliseconds
| Modes | Gaussian | Qubit image | Fock cutoff 4 |
|---|---|---|---|
| 2 | 128 B | 32 B | 256 B |
| 4 | 512 B | 64 B | 4.1 kB |
| 8 | 2.0 kB | 256 B | 1.05 MB |
| 16 | 8.2 kB | 4.1 kB | 68.72 GB |
Local statevector
Exact amplitudes on this CPU. The no-cloning bar is an overlap with a forbidden copy, so 0.5 is the honest result.
Local amplitudes
Run `prompt <name>` in the terminal to print the same templates.
Where the stack stays cheap
A linear-optical program stays in a covariance whose bytes grow with the square of the mode count. A photon-number question drops into Fock space, and this lab only allocates that vector for two modes. The chart is a short median-of-3 on this CPU. It is a different measurement from the committed 32-mode row. The Fock time, when present, is one 2-mode Mach–Zehnder, not a 16-mode chain.
Gaussian chain versus mode count
Median of 3. 2026-10-30
What was not allocated
At 16 modes the covariance is 8 kB and the chain above was timed. A cutoff-4 Fock vector for those 16 modes is about 69 GB. It was not stored and it was not timed.
2-mode Fock Mach–Zehnder: 0.254 ms. That circuit is the native xubit interferometer. It is not the 16-mode covariance update.
Short median-of-3 Gaussian chains on this CPU. Not the committed 32-mode row. The Fock number is one 2-mode Mach-Zehnder, not a 16-mode chain.
Local CPU
The Gaussian row is the committed 32-mode chain, median of 5, dated 2026-10-28. This page does not time it again. The chart is reading sim/results/latest.json.
32-mode Gaussian chain
Milliseconds. Same symplectic update. Rust is the fast CPU row.
Next-character model
Bits per byte and tokens per second. This is not a photonic gate time and not a QPU count.
3.011 BPB
1,594,686 tokens / second
Final loss 2.087 nats. Compare a later run at the same steps, batch, and learning rate.
gpu-batched-gemm
not measured. Many independent covariances in one GEMM. A single 32-mode chain is small, and the copy onto the card can lose to Rust. Time a stated batch, then compare per circuit.
npu-matmul
not measured. The same covariance multiply on a neural accelerator. No NPU is attached. A vendor throughput figure is not a gate time.
photonic-hardware
not measured. The chip evolves the optical state. It does not accelerate the CPU covariance update. Compare the wall time of one prepared shot, including compile and queue, with the Rust row for the same netlist.
gate-model-qpu
not measured. Runs the dual-rail Mach-Zehnder image only. It does not run the Gaussian covariance or a Kerr state. A qubit count is not a speedup over Rust.
How a phase moves an xubit
The dual-rail Mach–Zehnder sends one photon through two paths. The qubit image is H, Rz(phi), H. Ideal P(1) is sin(phi/2) squared: phi 0 stays on the first mode, phi pi arrives on the second, and the points between split. Measured points are the same image on the IBM backend. Noise moves them off the curve. This is not a covariance and not a speedup.
Measured on ibm_marrakesh
Job dbi4f48hoj4c73b5i8gg. Shots 512. QPU seconds 3.000.
Mach-Zehnder fringe on the gate-model image. Ideal P(1) is sin(phi/2)^2. The Gaussian covariance was not sent. This is how the phase moves the photon between the two dual-rail modes, aside from noise.
Distance from the ideal fringe
Absolute gap between measured P(1) and sin(phi/2) squared. Hardware noise, not a language error.
Six preparations, one qubit
Each bar is its own preparation of one qubit, the gate-model image of one dual-rail xubit. Z+ is |0>, Z− is |1>, and the X and Y pairs are the other eigenstates. The chip measures Z after a rotation, and the expectation is (n0 − n1) / shots. Ideals sit at +1 and −1. These six numbers are not one Bloch vector. Noise pulls a measured value toward 0. The Gaussian covariance was not sent, and this is not a speedup over the Rust row. The fringe and the five-circuit suite stay on their own charts.
Expectations on ibm_fez
Job dbi5ubtep8hs73an8nq0. Shots 512. QPU seconds 3.000.
Six preparations of one qubit, the gate-model image of one dual-rail xubit. Each circuit measures one Pauli by rotating into Z. The expectation is (n0-n1)/shots and the ideals are +1 and -1. These six numbers are six preparations, not one Bloch vector. The Gaussian covariance was not sent. This is not a speedup over the Rust row.
How close each preparation landed
Score is 1 minus half the distance from the ideal expectation. A value near 1 means that preparation was close. It is not a fidelity of one combined state.
Entanglement of two xubits
Drag the volume or let it turn. The cube is the range of two-qubit correlators. The octahedron inside it is the separable bound. The white corner is the ideal Bell point. The violet point is the same three correlators from one Sampler job: prepare the pair, then measure ZZ, XX, or YY. Two dual-rail xubits are four modes. This job sent the gate-model image, H then CNOT.
Two xubits, one paired state
Each logical xubit is one photon shared by two modes. The paired state uses four modes: both logical zeros, or both logical ones. The picture is the gate-model image of that pair.
The teal octahedron is every point with |XX| + |YY| + |ZZ| at most 1. A product of two separate xubits lands inside it. The white point is the ideal Bell correlators, (1, −1, 1), on a corner of the cube. Its absolute sum is 3.
Measured XX 0.914, YY -0.879, ZZ 0.902. Absolute sum 2.695. The separable bound is 1.
A linear-optical Bell measurement distinguishes two of the four Bell states. This volume is the superconducting image, where CNOT is available. The covariance matrix is a different state.
Bell pair on the gate-model image of two dual-rail xubits. ZZ, XX, and YY are three correlators of that one state. A separable state has |XX|+|YY|+|ZZ| at most 1. The ideal point is (1, -1, 1). The Gaussian covariance was not sent. This is not a speedup over the Rust row.
Correlators on ibm_fez
Job dbi6jg01h92s7382sp10. Shots 512. QPU seconds 3.000.
Classical operations on basis xubits
A computational-basis bit maps onto one dual-rail xubit. NOT is an X gate. XOR is a CNOT. AND is a Toffoli onto a third bit that starts at zero. The bar is the share of shots that landed on the truth-table output. The same CNOT, with a plus state on the control, is the Bell pair in the volume above: the basis table is followed, and a superposition is shared rather than copied. The covariance was not sent.
Truth table on ibm_fez
Job dbi6jv01h92s7382spm0. Shots 512. QPU seconds 4.000. Ten basis inputs. This is not a faster arithmetic unit.
Computational-basis truth table on the gate-model image. NOT is X, XOR is CNOT, and AND is Toffoli. The same CNOT, with a plus state on the control, is the Bell pair in the witness study. Basis bits follow the table. A superposition is shared, not copied. The Gaussian covariance was not sent. This is not a speedup over the Rust row.
Real QPU
Counts come from one Sampler job on the IBM Quantum instance in the environment. The circuits are the gate-model image: Bell, Mach-Zehnder at 0 and pi, teleport of |1|, and teleport of |+> checked in the X basis. Corrections are applied when the counts are scored. The Gaussian covariance was not sent. A missing file is not a count of zero.
Status
DONE
Backend
ibm_marrakesh
Shots
1024
QPU seconds
4.000
Job dbi42aohoj4c73b5hq2g. Region us-east. Pending jobs at submit: 0. Gate-model image on a superconducting QPU. The Gaussian covariance was not sent. Linear-optical Bell measurement succeeds on half the attempts; this chip can apply a CNOT, so the teleport image can land aside from noise. Counts are not a speedup over the Rust covariance row.
Measured score against the ideal image
1 is the ideal local statevector. Hardware noise pulls the bar down. This is not a speedup.
bell: P(00)+P(11) 0.9648 of ideal 1. Shots 1024.