Why quantum computing matters, what a qubit actually is, and how a hybrid quantum-classical model learns. Three small simulators run in your browser so you can try each idea.
AdvancedInteractive lesson, simulated data
Why quantum computing gets attention
A quantum computer stores and processes information using the rules of quantum mechanics, the physics of matter and light at atomic scale. For some problems this gives algorithms that scale far better than any known classical method. Two consequences follow, and both matter to organizations:
New algorithmic power. Problems that are out of reach today, such as simulating molecules and materials, may become tractable.
A security shift. Much of today's public-key encryption rests on problems that a large, reliable quantum computer could solve.
1994
Shor's algorithm
Peter Shor showed that a quantum computer could find the prime factors of large numbers dramatically faster than the best known classical methods. Factoring and the related discrete-logarithm problem are hard classically. That hardness protects RSA (factoring) and both finite-field and elliptic-curve Diffie-Hellman key exchange (discrete logarithms), and Shor's method solves both problems.
2001
A first demonstration
About seven years later, IBM researchers ran Shor's algorithm on a very small quantum device and factored the number 15. It was a proof of principle: the algorithm could be carried out on real quantum hardware, though nowhere near the scale that would threaten encryption.
Today
Hard tech takes time
The transistor was invented in 1947, and it took decades of engineering before processors held millions of them. Quantum hardware is on a similar path: progress is real but gradual, and useful scale will grow steadily rather than arrive all at once.
What makes a qubit different
A classical bit is either 0 or 1. A qubit's state is a combination of both, written |ψ⟩ = α|0⟩ + β|1⟩. The numbers α and β are called amplitudes. When you measure the qubit you get 0 with probability α² and 1 with probability β² (more generally, the squared magnitudes), so α² + β² = 1. After the measurement the superposition is gone: you only ever read out a single bit.
Gates change the amplitudes before you measure. Four are enough to explore here:
X swaps the amplitudes of |0⟩ and |1⟩, like a classical NOT.
Z flips the sign of the |1⟩ amplitude. Probabilities do not change, but later gates can tell the difference.
H (Hadamard) turns |0⟩ into an equal mix of 0 and 1, and turns that mix back into |0⟩.
RY(θ) rotates the state smoothly by an angle you choose. This is the gate a model trains.
Single-qubit explorerSimulated
This circle is a slice through the Bloch sphere, the standard picture of one qubit. X, Z, H and RY keep amplitudes real, so the state always stays on this slice. Top is |0⟩, bottom is |1⟩, right and left are the two equal mixes |+⟩ and |−⟩.
Gates applied
none yet
Outcome
Amplitude
Probability
Share of shots
Each measurement gives one bit. Repeat it many times to estimate the probabilities.
Try this. Apply H, then measure: about half the shots give 0. Now apply H, Z, H. The probabilities in the middle step were 50/50 both times, yet the result is always 1. The sign that Z added was invisible to measurement but changed how the second H combined the amplitudes. This is interference, the effect quantum algorithms are built on.
Two qubits and entanglement
Two qubits have four possible outcomes, 00, 01, 10 and 11, and four amplitudes. Each extra qubit doubles the count, so n qubits carry 2n amplitudes. That growth is why simulating large quantum systems on classical computers is so hard, and why a quantum computer is a natural tool for it.
The CNOT gate flips the second qubit only when the first is 1. Put the first qubit in an equal mix with H, then apply CNOT, and you get a state where the two qubits always agree when measured, yet neither one has a definite value on its own. That is entanglement: the state cannot be written as one qubit's state times the other's.
Two-qubit statevector simulatorSimulated
q0
q1
Entangled? No
Outcome q0 q1
Amplitude
Probability
Share of shots
Measuring both qubits gives a two-bit outcome each time.
Try this. Press H on q0 and H on q1: all four outcomes are equally likely and the qubits are independent. Reset, then press H on q0 followed by CNOT: only 00 and 11 remain. Measure and notice that the two bits never disagree.
Why building one is hard
Qubits are physical systems, such as trapped ions, photons, or tiny superconducting circuits, and they are delicate. Vibration, heat and stray fields make them lose their quantum behaviour, a process called decoherence, and that shows up as errors. The error rate limits how many gates an algorithm can run before the answer is lost in noise.
The planned fix is error correction: many noisy physical qubits work together to act as one more reliable logical qubit. Large error-corrected machines need far more physical qubits than today's devices have, which is why commercial usefulness is expected to grow step by step as qubit counts rise and error rates fall.
How quantum machine learning fits in
Quantum computers are not expected to work alone. The likely pattern is a hybrid system that sends each task to the machine best suited to it, with quantum processors reached as a shared cloud service. In machine learning, the most studied hybrid design is a variational model:
Encode. Each data point's features set the angles of rotation gates.
Transform. A short circuit of trainable rotations and entangling CNOTs acts on the qubits.
Measure. Repeated measurement estimates a probability, which becomes the model's prediction.
Update. A classical computer compares predictions with labels and adjusts the angles, then the loop repeats.
The gradient for each angle can be found by running the same circuit twice, with that angle shifted up and down by 90° (the parameter-shift rule). That is how training works on real hardware, where you cannot look inside the circuit.
Toy variational classifierSimulated data
Class 0Class 1Shading: model's P(class 1)
Steps
0
Loss
-
Cross-entropy, lower is better
Training accuracy
-
On this sample only
What to notice. Each training step runs the circuit twice per angle per data point to get gradients, so even this five-angle model needs over a thousand circuit runs per step. Some starting angles get stuck at a poor fit; press "New starting angles" to see this. Trainability, noise, and the cost of repeated measurement are open research questions for variational models, and whether they beat classical models on practical data is not settled.
About the data: 120 points per set are generated in your browser from a fixed rule, with about 5% of labels flipped as noise. Nothing is uploaded. The simulator computes exact probabilities; real hardware would estimate them from a finite number of shots and add noise.
Where this goes next
The same building blocks scale up: more qubits, deeper circuits, and other ways of encoding data, including quantum kernels that compare data points through the overlap of their encoded states. Simulation of nature, the use quantum computing's early pioneers had in mind, remains one of the most promising directions. For most organizations today the practical step is understanding: knowing which problems might benefit, and preparing security infrastructure for a post-quantum world.
Source: adapted from the SciEncephalon quantum machine learning lesson (an R Markdown and Shiny presentation). The interactive simulators are new for this page and run on simulated data.