Before a quantum model can do anything at all, your data has to become qubits. This is not a boring setup detail — it decides how big your circuit is, how many qubits you need, and whether any claimed speed-up is real.
one bit per qubit
trivial to prepare, no compression
one feature per rotation angle
shallow circuits; what most QML papers use
features become amplitudes
exponentially compact — but preparing it usually costs what you saved
Basis: one bit per qubit
Write the number in binary and give each digit its own qubit. The number 5 becomes |101⟩.
Simple and exact. Also the least useful, because eight bits still need eight qubits and you have gained precisely nothing over an ordinary computer.
Angle: one number per qubit
Turn each of your numbers into an angle, and rotate a qubit by it.
Ten features, ten qubits, one layer deep. It is quick, it slots neatly into the trainable part that follows, and it is what most practical work uses. A reasonable default.
One gotcha: scale your numbers first. Angles wrap round after a full turn, so an unscaled value can quietly end up meaning the same as a totally different one.
Amplitude: the tempting one
Here is where it gets interesting. You can pack a thousand numbers into just ten qubits, by using them as the amplitudes.
That sounds like exactly the enormous compression the field promises.
Why the loading circuit gets repeated
The circuit that does the loading is called a feature map, and choosing it is like choosing the lens you look at your data through. It decides what patterns the model can possibly see.
A common move is to apply it more than once, with entangling gates in between. That makes the lens more interesting — genuinely harder for an ordinary computer to imitate, which is the point.
It also makes the circuit deeper, and depth is what noise punishes. The two pressures pull against each other, and finding the balance is most of the actual work.
- fixed by the data
- trained by the optimizer
Worth remembering
- Basis loading is exact and offers no saving: one bit, one qubit.
- Angle loading gives one number per qubit in a shallow circuit — the sensible default.
- Amplitude loading is wonderfully compact but usually costs as much to set up as it saves.
- The loading circuit decides what patterns the model can see.
- Repeating it buys expressiveness and costs depth.