Data Re-uploading Classifier
Overview
Data re-uploading is a powerful technique that interleaves data encoding with variational layers. Remarkably, it achieves universal classification with just a single qubit.
The Key Insight
Traditional quantum classifiers encode data once, then apply variational layers. Data re-uploading encodes the same data multiple times, interspersed with trainable rotations:
CODE|0⟩ → [Encode(x)][Variational] → [Encode(x)][Variational] → ... → Measure
The Circuit
CODE┌─────────┐┌─────────┐┌─────────┐┌─────────┐┌─────────┐┌─────────┐ q_0: ┤ RX(x₀π) ├┤ RZ(x₁π) ├┤ RY(θ₀) ├┤ RZ(θ₁) ├┤ RX(x₀π) ├┤ RZ(x₁π) ├─... └─────────┘└─────────┘└─────────┘└─────────┘└─────────┘└─────────┘ Data Data Weights Weights Data Data Layer 1 Layer 2
Running the Circuit
PYTHONfrom circuit import run_circuit # Single qubit classifier result = run_circuit(x=[0.5, -0.3], n_layers=3) print(f"Qubits used: {result['n_qubits']}") # Just 1! print(f"Prediction: class {result['prediction']}")
Universality Theorem
Theorem: A single-qubit data re-uploading classifier with L layers can approximate any Boolean function on n-dimensional input, given sufficient layers.
This means:
- 1 qubit is enough for any classification task
- More layers = more complex decision boundaries
- Universal approximation capability
Parameters
| Layers | Parameters | Expressiveness |
|---|---|---|
| 1 | 2 | Linear boundaries |
| 2 | 4 | Simple curves |
| 3 | 6 | Complex boundaries |
| L | 2L | Increasingly complex |
Why It Works
Each layer applies a rotation that depends on both:
- Input data x: Encoded as rotation angles
- Trainable weights θ: Learned parameters
The composition creates rich, data-dependent transformations.
Advantages
- Minimal qubits: Just 1 qubit needed
- Noise-resilient: Single qubit = fewer errors
- Universal: Can learn any decision boundary
- Interpretable: Bloch sphere visualization
Comparison
| Classifier | Qubits | Universality |
|---|---|---|
| Data Re-uploading | 1 | Yes |
| Standard VQC | N (# features) | Depends on ansatz |
| Kernel SVM | N | Depends on kernel |
Applications
- Binary classification: Any 2-class problem
- NISQ devices: Minimal hardware requirements
- Educational: Simple to understand and implement