Quantum Machine Learning: A Trainable Rotation as the Simplest Quantum Classifier

Sweep a single-qubit rotation angle across 300 simulated encoded points and watch the classification boundary shift, live.

Quantum machine learning models often work by encoding data into qubit states, applying a parameterized rotation gate, and then measuring the result — the measurement probability becomes the model's prediction. A single-qubit Ry(θ) rotation is the simplest version of this idea, and the angle θ plays the same role a trainable weight plays in a classical model.

The Quantum Machine Learning Lab visualizes 300 data points encoded as angles around a circle, all passed through the same Ry(θ) rotation. Sweeping θ shifts every point's measurement probability at once, moving the classification boundary and changing how many points fall into each predicted class.

The detail worth sitting with here is that a single shared parameter moves every point's prediction simultaneously — there's no per-point adjustment, which is exactly why training a real quantum circuit means searching for the one shared parameter setting that works best across the whole encoded dataset at once.

🧪 Try it yourself: the Quantum Machine Learning Lab simulation lets you sweep the rotation angle and watch the classification outcome update live.

🧪 Try it yourself: the Quantum Machine Learning Lab simulation lets you experiment with everything described above directly in your browser.