Skip to content
ExperimentsExperiment 14 Β· Quantum AI

Quantum Machine Learning

Train a 2-qubit variational classifier with the parameter-shift rule.

  1. 1. Learn
  2. 2. Watch
  3. 3. Interact
  4. 4. Predict
  5. 5. Run
  6. 6. Observe
  7. 7. Record
  8. 8. Answer
  9. 9. Research
β‘  What is the problem?

Can a quantum circuit learn to classify data?

β‘‘ How does a classical computer approach it?

A classical model (e.g. logistic regression) adjusts weights to reduce error.

β‘’ How does the quantum approach differ?

A parameterized circuit encodes data as rotation angles; trainable angles are adjusted so the measured probability predicts the class.

β‘£ What is happening mathematically?
Prediction f(x;w) = P(q₁=1). Gradient by parameter shift: βˆ‚f/βˆ‚w = [f(w+Ο€/2) βˆ’ f(wβˆ’Ο€/2)]/2.
β‘€ What does the simulation show?
Data, the circuit, the decision map and the loss curve β€” every value from the statevector simulator.
β‘₯ What did we learn?
QML is a young research field. Small circuits can learn simple patterns; practical quantum advantage has not been demonstrated for problems like this.
⑦ What can you experiment with?
Switch datasets and retrain. How many epochs until accuracy is 100%?
πŸ““ Record: my lab notebook