A hybrid quantum-classical neural network feeds a many-body quantum state through a parameterized quantum circuit, measures it in the Z basis, and passes the measurement statistics to a classical dense network, with every parameter optimized end-to-end to classify the phase of matter the state belongs to.
The Three-Stage Pipeline
Hover or tab through the symbols below. Stage (a) is the input state on a qubit lattice with X and Z stabilizers, stage (b) is a parameterized circuit of Yθ rotations and CZθ entangling gates ending in Z readouts, and stage (c) is a classical dense network producing the output y.
Blue dots qubitsGreen squares X stabilizersPurple squares Z stabilizersBoxes parameterized gatesMeters Z readouts
Why Hybrid?
The division of labor matters: the quantum circuit acts where classical simulation is hard, while the classical network does what it does best with cheap, differentiable post-processing.
Quantum feature extraction
The parameterized circuit rotates entangled correlations into the measurement basis, exposing nonlocal order that single-qubit measurements alone would miss.
Yθ and CZθ gates form a shallow, hardware-friendly ansatz whose angles are trainable parameters.
Acts directly on the quantum state, so no exponentially large classical description is ever needed.
Classical post-processing
A small dense network maps Z-readout statistics to a phase label y, learning a decision boundary over measurement outcomes.
Gradients flow through both parts: circuit angles via parameter-shift rules, network weights via backpropagation.
Cheap to run and retrain, tolerant of shot noise, and easy to calibrate against labeled reference states.
Interactive Simulation: Sweeping the Field Strength h
Drag the slider (or use arrow keys) to sweep an external field h from 0 to 1 across a toy model. Below the critical point hc ≈ 0.33 the state is topologically ordered and the topological entanglement entropy stays near ln 2; past the dashed line it collapses to zero as the phase becomes trivial. Curves are canned data shaped like the paper's plots, not a real quantum backend.
h = 0.00Topological phase
Worked Example: 16 Z-Readouts Into the Network
Each shot of the circuit yields one Z-basis bit per measured qubit. Click any cell to flip a bit, then run the forward pass to watch the bits map to inputs in {-1,+1}, flow through a small dense layer, and produce a phase score y.
Measurement bitstring
Output y: run the forward pass to compute it.
Check Your Understanding
Five quick questions with instant feedback.
FAQ
What does end-to-end optimization mean here?
The circuit angles and the classical network weights are updated together against a single loss on the predicted phase label, so the quantum layer learns which correlations to expose and the classical layer learns how to read them.
Why measure only in the Z basis?
The trainable Y and CZ rotations before readout can steer any relevant observable into the Z basis, so fixed Z measurements are enough while keeping the hardware simple.
What is topological entanglement entropy?
A constant correction to the area law of entanglement that is nonzero (ln 2 for the toric code) in topologically ordered phases and vanishes in trivial ones, making it a sharp diagnostic of the transition.
Is this page running a real quantum computer?
No. All curves and forward passes use client-side canned data shaped to resemble published plots, so the physics intuition is faithful but the numbers are illustrative.