ExperimentsExperiment 14 Β· Quantum AI
Quantum Machine Learning
Train a 2-qubit variational classifier with the parameter-shift rule.
- 1. Learn
- 2. Watch
- 3. Interact
- 4. Predict
- 5. Run
- 6. Observe
- 7. Record
- 8. Answer
- 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%?