Classical shadows, briefly
Measuring a quantum state destroys it. To learn everything about an n-qubit state with full tomography, you need a number of measurements that grows exponentially with n. Past a handful of qubits, that’s hopeless.
Most of the time you don’t need everything, though. You need a few hundred properties: some energies, some correlations, a fidelity or two. Classical shadows, introduced by Huang, Kueng and Preskill in 2020, are built for exactly that.
The trick
- Apply a random unitary to the state. A common choice is a random Pauli measurement on each qubit.
- Measure in the computational basis and write down the outcome.
- Invert the measurement channel on paper to get a snapshot, a rough classical estimate of the state.
A single snapshot is a bad estimate. The average of many is a good one. The useful part is how many you need. To predict M observables, the number of snapshots grows with log M, not with the size of the Hilbert space. For local observables and random Pauli measurements, the cost depends on how local the observable is, not on the total number of qubits.
So you measure once, keep the snapshots, and decide later which properties to estimate. It works like a photograph you can keep asking questions of.
Below, a four-qubit state is measured with random Pauli measurements, simulated exactly in your browser. Each dot is the estimate of one property, the tick is its true value. Add snapshots and watch the estimates settle, then ask other questions of the same snapshots.
- Z₃·
- X₂·
- X₁·
- X₃·
- Z₀ X₁·
- X₂ Z₃·
- X₁ X₂·
- Z₀ Z₁·
What I’m building
With a collaborator, I’m working on an encoding protocol built around classical shadows. The theory is done. The current work is the less glamorous half: experiment infrastructure.
- a uv workspace, so the data layer, the experiment framework and the experiments are separate packages
shadows-data, a shared package for generating and loading snapshots- Hydra for configuration, so every run can be reproduced from one config
- MLflow for tracking, so results don’t live in a folder called
final_v3
I’ll write more once there are results worth showing.