·Qiskit · PyTorch · NumPy
Quantum Machine Learning
Can a neural network learn to emulate a quantum gate? The answer is about data, not architecture.
?
The questions
- When you train a neural network to imitate a quantum gate, does the representation of its output decide whether the learned gate composes?
◇
How it builds up
Each block answers a piece of the question and feeds the next — foundations at the top, the answer at the bottom.
flowchart TD Q(["Does the output representation<br/>decide if a learned gate composes?"]):::q D["exact data<br/>Qiskit statevectors"] P["probability mode<br/>trains on Born-rule p(b)"] U["unitary mode<br/>trains on (Re, Im) amplitudes"] C["composition test<br/>apply the gate U^k"] NZ["noisy channel<br/>density matrix vs populations"] Q --> D D --> P --> C D --> U --> C C -->|"phase squared away"| FAIL(["probability mode diverges"]):::a C -->|"phase kept"| HOLD(["unitary mode holds ~0.998"]):::a D --> NZ classDef q fill:#1a1206,stroke:#f0a83e,color:#f3c98a; classDef a fill:#f0a83e,stroke:#f0a83e,color:#10141a;
◇
Inside the build
Each stage of the calculation. Click one to expand its full write-up and validation figure.
01exact data generation — ground truth
02probability mode — phase discarded
03unitary mode — phase kept
04composition test — the tell
05noisy channel — generalization
◇
Figures
Click any figure to enlarge. Use ← → to move through the set.
◇
What it shows
- The barrier is the information in the target, not the network. Training on probabilities squares away phase, so U² diverges from the truth; training on amplitudes keeps phase and composition holds to ~0.998.
- It is a representation problem, provably so: feed the probability model tomographically complete (X/Y/Z-basis) data and it recovers phase after all — the wall is what the target encodes, not the architecture.
- The same logic extends to open systems: under noise the density matrix composes while its diagonal alone does not.