⚛ Quantum Machine Learning

A variational quantum circuit (qubits + entangling links) learns by nudging its rotation angles downhill on a cost landscape — the same loop used by VQE and quantum-kernel classifiers.

Circuit controls

Iteration0
Energy E(θ)0.000
Fidelity0%
How it works

Each qubit's Bloch arrow encodes a rotation angle θᵢ. Every training step follows the parameter-shift gradient of the expected energy, like a real variational quantum eigensolver:

E(θ) = ⟨ψ(θ)|H|ψ(θ)⟩   θ ← θ − η·∇E(θ)

Glowing particles along the wires are the entangling gates (CNOT-style) coupling neighbouring qubits; fidelity rises as every arrow settles onto its target orientation.

Quantum Machine Learning: a variational circuit that trains itself

This simulation renders a small variational quantum circuit — a row of qubits, each holding a rotation angle θᵢ shown as an arrow on its Bloch sphere, linked by animated entangling gates. Every training step computes the parameter-shift gradient of a toy Hamiltonian's expected energy E(θ) = ⟨ψ(θ)|H|ψ(θ)⟩ and updates θ ← θ − η·∇E(θ), exactly the hybrid quantum-classical loop used by the Variational Quantum Eigensolver (VQE) and by quantum kernel methods in frameworks such as PennyLane and Qiskit Machine Learning.

Watch the energy readout fall and the fidelity readout climb as the circuit converges: qubit count, learning rate, entanglement pattern (linear chain vs. fully connected) and training speed are all adjustable, mirroring the hyperparameters a quantum ML practitioner tunes when designing an ansatz for a real quantum processor.