HomeQuantum PhysicsParameter-Shift Rule: Training a Quantum Neural Network

Parameter-Shift Rule: Training a Quantum Neural Network

Watch a single-qubit quantum neural network train by gradient descent: the exact parameter-shift rule evaluates the circuit at +/-90 degree shifts to compute real quantum gradients on a live 3D cost landscape.

Quantum Physics3DAdvanced60 FPS📱 Mobile-adapted
qe-topic-96 ↗ Open standalone

A quantum neural network is a parameterized quantum circuit whose rotation angles play the role of weights, trained by gradient descent just like a classical network — except a quantum computer cannot backpropagate. This simulator renders the full 3D cost landscape of a single-qubit QNN, R_z(θ₂)R_y(θ₁)|0⟩ measured in X, and trains it live using the exact parameter-shift rule: at every step the circuit is re-evaluated at each parameter shifted by ±π/2, and the difference of those two runs gives the true gradient. Watch the marker roll downhill toward whatever target expectation value you set, with the four shift-rule evaluation points highlighted at each step, live readouts of the cost, output, both angles and the gradient magnitude, and a fading trail of the optimizer's path across the landscape.

⚙ Under the hood

Train a single-qubit quantum neural network by gradient descent on a live 3D cost landscape, using the exact parameter-shift rule -- +/-90 degree circuit re-evaluations -- to compute real quantum gradients the way variational circuits are trained on actual hardware.

quantum computingquantum machine learninggradient descentparameter-shift rulevariational circuitcost landscape

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)