N/M Quantum AI
Train a variational quantum circuit directly in your browser. Declare trainable parameters, define a cost from a Pauli expectation, and watch a parameter-shift gradient optimizer converge - no setup, no hardware.
01 / Variational systems
A training run you can inspect.
Choose an N/M model, follow every optimization step, and carry the same source into the Playground. The browser simulator keeps the experiment local and reproducible.
module rotation_fit;
fn main() {
let q: QReg<1> = qreg[1];
param w: Angle = 0.3;
Ry(q[0], w);
let cost = expect Z(q[0]);
metric z = expect Z(q[0]);
return cost;
}Model files and comparisonsExport, import, compare optimizers, or run the optional kernel tool.
Train a single-qubit model to animate its Bloch-sphere trajectory.
Pick a model and press Train to watch the cost converge.
Classical and quantum model comparison
Compare four fixed model families on the same held-out data: a majority baseline, logistic regression, RBF kernel ridge and a variational quantum classifier. This experiment uses the selected dataset, not the circuit in the editor.
02 / Applied experiments
From decision boundaries to molecular energy.
Use the same measured-cost workflow across classification, VQE, bond scans, and trainability analysis. Each panel states its model, output, and practical limit.
Variational quantum classifier
A labeled toy dataset of two blobs. Each point is angle-encoded into one qubit; the model predicts a class from sign(<Z>). Training optimizes the weights so the learned decision boundary separates the classes. The shaded region is the model's prediction across feature space.
Train the classifier to see the learned decision boundary.
VQE - molecular ground state
The variational quantum eigensolver: minimize <H> of a two-qubit, H2-flavored Hamiltonian over a hardware-efficient ansatz. The optimizer drives the energy down to the exact ground-state energy - the canonical near-term quantum algorithm.
Run VQE to watch <H> converge to the ground-state energy.
Dissociation curve (bond-length scan)
Run VQE across a range of bond lengths to trace the potential-energy surface of a model H2 molecule. The orange points are VQE energies; the purple dashed line is the exact ground state. The well's bottom marks the equilibrium bond length.
Run the scan to trace the molecule's potential-energy curve.
Barren plateau explorer
Some circuit families and objectives develop very small gradients as they scale. This explorer samples random hardware-efficient ansatze with 1–5 qubits and measures Var(d<Z>/dtheta). This small experiment does not establish an exponential scaling law.
Run the analysis to compare sampled gradient variance across qubit counts.