Local time in Bucharest

All notes

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

  1. Apply a random unitary to the state. A common choice is a random Pauli measurement on each qubit.
  2. Measure in the computational basis and write down the outcome.
  3. 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.

  1. Z₃·
  2. X₂·
  3. X₁·
  4. X₃·
  5. Z₀ X₁·
  6. X₂ Z₃·
  7. X₁ X₂·
  8. Z₀ Z₁·
dot: estimate · line: its spread · tick: true valueno snapshots yet

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.

more notes

|mcnu⟩.ro
© 2026 Andrei Mocanubuild eecef49