Source-linked AI summary
Robust data encodings for quantum classifiers
Ryan LaRose, Brian Coyle
TL;DR
Near-term quantum classifiers must address both how data are encoded and how noise affects classification. This paper analyzes encodings for a common binary quantum classifier, proving that they control learnable decision boundaries and robustness, with analytical and numerical results across noise models.
Problem
Quantum machine learning faces practical challenges in efficiently inputting data and understanding the noise resilience of particular quantum classifiers.
Method
The paper defines encoding-dependent learnability and robust points for binary quantum classification, then analyzes channels, robust encodings, fidelity-based bounds, and numerical implementations.
Results
Different encodings determine learnable decision boundaries and robust sets; the paper characterizes robust points for example channels, proves existence results and fidelity-based upper bounds, and supports the findings numerically.
Takeaways & Limitations
Encoding choice is an important classifier-design consideration because it affects both the boundaries the model can learn and which points retain their classifications under noise.
Abstract
from arXiv · showhide
Data representation is crucial for the success of machine learning models. In the context of quantum machine learning with near-term quantum computers, equally important considerations of how to efficiently input (encode) data and effectively deal with noise arise. In this work, we study data encodings for binary quantum classification and investigate their properties both with and without noise. For the common classifier we consider, we show that encodings determine the classes of learnable decision boundaries as well as the set of points which retain the same classification in the presence of noise. After defining the notion of a robust data encoding, we prove several results on robustness for different channels, discuss the existence of robust encodings, and prove an upper bound on the number of robust points in terms of fidelities between noisy and noiseless states. Numerical results for several example implementations are provided to reinforce our findings.
I. INTRODUCTION
The paper frames binary quantum classification as a NISQ application while emphasizing unresolved questions about quantum-model advantages, noise resilience, and practical data input. It studies a common classifier architecture in which encoded states undergo trainable unitary evolution before measurement.
- NISQ processors remain small, short-lived, and noisy, making practical applications important despite the uncertain timeline for fault-tolerant quantum computing.
- Quantum machine learning combines variational quantum algorithms with machine-learning applications such as classification, but potential advantages over classical models remain unresolved.
- Noise resilience of particular variational quantum algorithms has not been thoroughly investigated, although understanding robustness is important for practical NISQ implementations.
- The paper focuses on binary classification and studies data encodings and their effects within a general unitary-evolution classifier model.
- The classifier encodes a feature vector into a quantum state, applies a trainable unitary ansatz, and measures one qubit to produce a predicted label.
B. Data Encodings
Data encoding loads classical feature vectors into quantum states, and its design affects both state-preparation requirements and the classifier’s learnable decision boundaries and robustness. The paper compares several encoding families, including angle, dense angle, general qubit, wavefunction, and amplitude encodings.
- Data encoding maps a classical feature vector into a quantum state so that a quantum neural network can process it.
- Wavefunction encoding represents N features with n = log2 N qubits, yielding exponential space savings but generally requiring O(2^n) state-preparation time.
- State-preparation circuits should be polynomial-size, bijective over feature vectors, shallow when possible, and hardware efficient for NISQ devices.
- Angle encoding uses one feature per qubit with a constant-depth circuit, making it amenable to NISQ computers.
- Dense angle encoding exploits relative phase to encode two features per qubit, while general qubit encoding replaces specific functions with arbitrary normalized functions.
- Different encodings produce different classes of learnable decision boundaries and different sets of robust points.
C. Noise in Quantum Systems
The paper models quantum noise with standard channels and represents noise as a quantum operation acting on states. It considers Pauli-family channels, depolarizing noise, global depolarizing noise, amplitude damping, and measurement noise.
- Quantum noise arises from environmental interactions and is represented by a quantum channel acting on the system state.
- The Pauli channel applies single-qubit Pauli operations with probabilities summing to one, and the Weyl channel generalizes this construction to d dimensions.
- Bit-flip and phase-flip channels are special cases of the Pauli channel, respectively flipping computational states or introducing relative phase.
- Depolarizing noise can replace a state by the maximally mixed state, with global depolarizing noise extending the model to multiqubit systems.
- Amplitude damping models decay from the excited state to the ground state through spontaneous photon emission.
- The paper also considers measurement noise in an appendix, while omitting its main-text definitions and results for brevity.
D. Robust Data Encodings
Robustness is defined by whether noise preserves a classifier’s predicted label for an encoded point, and robust sets depend on the encoding and channel. The paper distinguishes complete and partial robustness and relates robust points to channel fixed points.
- Robustness is motivated by coarse-grained classification: noise may move a state within the same decision region without changing its label.
- A robust point retains the same predicted label before and after a specified noise channel acts on the processed quantum state.
- The paper relates robust points to, but distinguishes them from, density-operator fixed points and uses this connection to prove existence results for robust encodings.
- A robust set collects all robust points, and its size can vary with the data encoding unless robustness is encoding-independent.
- Points near the decision boundary may require at least Nm = 1/epsilon^2 measurements to determine robustness when the noisy probability differs by epsilon.
- Complete robustness requires every possible encoded point to remain robust, whereas partial robustness allows only a specified fraction of points to remain robust.
III. ANALYTIC RESULTS
The analytic results show that data encodings determine which decision boundaries a binary quantum classifier can learn and how noise affects classification robustness. Robust points generalize fixed points, with their sets depending on the channel and encoding.
- Learnability: Different data encodings produce different classes of learnable decision boundaries for the same quantum classifier.The paper presents encoding-dependent analytic forms and numerical illustrations of these boundary classes.
- Learnability: The decision boundary is determined jointly by the encoding functions and the trainable unitary matrix elements.The encoding enters through f and g, while Uij act as hyperparameters defining the learnable boundary class.
- Learnability: Wavefunction encoding yields straight-line decision boundaries, whereas dense angle encoding yields sinusoidal boundary functions.For wavefunction encoding, the slope is −a/b and the intercept is 1/2b; dense angle encoding defines sinusoidal functions.
- Robust points: Robust points are a generalized fixed-point concept, but their set can be larger than the channel’s fixed-point set.For dephasing, every density operator is a robust point, while fixed points have the restricted diagonal form aΠ0 + bΠ1 with a+b = 1.
- Robust points: For an amplitude damping channel with p = 1, the only fixed point is Π0, illustrating channel-specific restrictions on robust behavior.The paper relates robust-point characterization to fixed points and separately identifies Π0 as the sole fixed point in this limiting channel.
C. Robustness Results
The paper proves channel-specific robustness results for binary quantum classifiers. Some channels provide encoding-independent robustness under stated noise conditions, while amplitude damping produces encoding- and unitary-dependent robust sets.
- Depolarizing channels: Depolarizing noise gives complete robustness for any encoding, and the result holds with measurements in any basis.The proof replaces the noiseless processed state by its depolarized state while preserving the classifier’s label threshold.
- Pauli channels: Under a Pauli channel with pX + pY ≤ 1/2, both noiseless labels are robust for any data encoding.The result is established separately for labels 0 and 1 using the computational-basis decision rule.
- Pauli channels: If pX + pY > 1/2, robustness is no longer guaranteed for every encoding and becomes encoding-dependent.A different measurement basis can restore robustness under a modified decision rule, with a corresponding condition such as pY + pZ ≤ 1/2.
- Robust encodings: A robust encoding exists for every trace-preserving quantum operation, although it may be trivial and therefore reflects a learnability–robustness tradeoff.For amplitude damping, the partially robust set is defined by the points satisfying the encoding- and unitary-dependent robustness condition.
- Multiqubit classifiers: For multiqubit classifiers, global depolarizing noise applied anywhere in the circuit preserves classification for any encoding.With factorizable noise, robustness of the classification qubit’s processed state suffices for robustness of the entire encoded state.
D. Existence of Robust Encodings
For any trace-preserving channel, a robust encoding exists for a given data point, although complete robustness can become trivial and conflict with learnability. The optimal unitary changes the robust set’s location but not its existence, highlighting a learnability–robustness tradeoff.
- Existence of robust encodings: At least one fixed point of every trace-preserving quantum operation yields a robust encoding for any chosen data point.The construction uses the inclusion of fixed points within the robust set.
- Existence of robust encodings: The optimal unitary affects the location of the robust set but not whether a robust encoding exists.
- Complete robustness: Complete robustness for an entire domain can be obtained by encoding every input as a channel’s unique fixed point, but this maps all training data identically.Such an encoding is impossible to train successfully as a classifier because all data collapse to one point.
- Learnability–robustness tradeoff: More learnability comes at the price of less robustness, while greater robustness can reduce learnability.Learnability concerns noiseless prediction accuracy, whereas robustness concerns preserving predictions under noise regardless of correctness.
E. Upper Bounds on Partial Robustness
The paper extends robustness analysis to a cost-based classifier and relates the noise-induced cost change to the fraction of robust training points. Fidelity and trace-distance inequalities then provide upper bounds on partial robustness.
- Cost-based robustness: A mixed-state classifier outputs a dataset-level cost rather than an individual predicted label, so robustness is assessed by comparing noisy and noiseless costs.The noisy cost replaces the evolved state with its channel-transformed version.
- Cost-based robustness: The indicator cost counts classification errors, and a decrease in noisy cost implies that some points became misclassified when noiseless classification was perfect.The cost decrease therefore serves as a proxy for robustness when individual robust points cannot be identified.
- Assumptions: The analysis assumes that the true labels are invariant under the noise channel, although more general channels could act on the entire system.
- Upper bounds: The cost change ΔE C equals the fraction of robust points in the dataset under the paper’s indicator cost and δ-robustness definition.
- Upper bounds: Fidelity between noisy and noiseless states supplies an upper bound on the size of the partially robust set.The paper also derives an alternative inequality based on average trace distance between encoded states.
IV. NUMERICAL RESULTS
Numerical experiments reinforce the theoretical results by examining learnable decision boundaries, robust sets, encoding hyperparameters, and bounds on robust-set size across example datasets.
- Numerical results: The numerical section studies decision-boundary classes, partially robust sets, encoding-hyperparameter training, and fidelity-based robust-set bounds.Experiments use moons, vertical, and diagonal datasets for single-qubit classifiers.
A. Decision Boundaries and Implementations
Encoding choices determine both the geometry of learnable decision boundaries and classification performance, while also changing qubit requirements and robustness under amplitude damping. The numerical examples show that learnability and robustness vary substantially across encodings.
- Decision boundaries: Wavefunction encoding produces straight-line decision boundaries, whereas dense angle encoding produces sinusoidal boundaries for the same classifier.These classes are visualized in Fig. 4.
- Decision boundaries: Superdense angle encoding produces a striped decision boundary by combining features linearly in a single-qubit angle encoding.For one qubit, the encoding uses θx1 + φx2, with θ = π and φ = 2π in the figure.
- Implementations: Two features per qubit reduce the Iris implementation from four qubits to two, illustrating an encoding-based resource reduction.Fewer qubits can reduce two-qubit gates, crosstalk, and readout errors in NISQ applications.
- Implementations: 100% accuracy is achieved on the Iris example with wavefunction and dense angle encodings, while superdense angle encoding performs worse.The table reports overall accuracy using an 80% train-test split on classes 0 and 2.
- Robust sets: For dense angle encoding under amplitude damping, noiseless training accuracy is ∼99% but test accuracy falls to ∼78% at p = 0.2.The encoding is therefore partially robust, with robust points occupying specific regions of the dataset.
- Robust sets: For wavefunction encoding, test accuracy falls from ∼82% without noise to ∼43% at p = 0.4 and ∼61% at p = 0.2.The robust sets differ across the two amplitude-damping strengths.
C. Encoding Learning Algorithm
The encoding learning algorithm adapts encoding hyperparameters under noise to increase the set of robustly classified points. Numerical implementations show that encoding choice affects learnability, robustness, and fidelity-based robustness bounds.
- Algorithm: The algorithm first trains the classifier unitary with fixed encoding parameters, then optimizes those parameters in a noisy environment to reduce cost and increase robust points.It adapts encoding hyperparameters rather than changing the trained unitary during this stage.
- Numerical implementations: The method was tested on linearly separable and nonlinearly separable datasets using dense angle, superdense angle, and generalized wavefunction encodings.The experiments use three encodings across three datasets.
- Numerical results: The encoding learning algorithm recovered noiseless classification accuracy and sometimes outperformed it on the tested datasets.These results are reported as proof-of-principle implementations.
- Numerical results: Fidelity-based upper bounds on partial robustness differ across encodings, especially at small noise values, while cost-function errors differ notably for bit-flip and dephasing noise.Average fidelity behaved qualitatively similarly across the three encodings in the Iris experiments.
- Conclusions: The paper concludes that encodings determine learnable decision boundaries and robust sets, with an empirically observed tradeoff between learnability and robustness.It also introduces robustness concepts and fidelity-based upper bounds for the classifier.
- Future work: Future work includes testing on NISQ hardware, analyzing more realistic effects such as crosstalk, and generalizing results to broader channel classes and additional datasets.The authors also identify quantifying the learnability–robustness tradeoff as an open task.
- Conclusions: Robust data encoding is presented as a problem-specific alternative to error mitigation or correction that aims to make occurring errors have no effect on the final result.The strategy uses data representation to target robust sets.
Appendix A: Preliminaries and useful formulae
The appendix supplies single-qubit operator and unitary identities used in the paper’s proofs, then develops measurement-noise robustness results for the binary classifier.
- Appendix A: Preliminaries and useful formulae: The appendix introduces single-qubit Pauli operators and a single-qubit state represented through matrix elements ρij.These preliminaries support later algebraic derivations.
- Appendix A: Preliminaries and useful formulae: Projectors Π0 = |0⟩⟨0| and Π1 = |1⟩⟨1| are used to express measurement probabilities and related operator identities.The appendix derives these relations for Hermitian matrices and unitary transformations.
- Appendix A: Preliminaries and useful formulae: The appendix specializes the single-qubit unitary to Rz(2α1)Ry(2α2)Rz(2α3), up to a global phase, and derives the resulting terms and conditions.The displayed expressions provide the component-level formulas used in the classifier analysis.
- Appendix B: Proofs and Additional Results: Appendix B records explicit proofs for remaining theorems and additional results introduced in the main text.It serves as the proof supplement for the paper’s analytic claims.
- 1. Robustness to measurement noise: Measurement noise is modeled by modifying the standard computational-basis POVM through an assignment matrix with probabilities pkl.The probabilities obey normalization constraints and are assumed more likely to preserve than flip each outcome.
- 1. Robustness to measurement noise: The treatment restricts measurement analysis to one classification qubit; multi-qubit measurements and majority-vote classifiers are outside the paper’s scope.The general n-qubit measurement definition is noted but not required for the considered decision function.
- 1. Robustness to measurement noise: For single-qubit measurement, complete robustness holds for any encoding when p00 > p01 and p11 > p10.The proof uses the pre-noise classification probability threshold and the assignment-probability conditions.
- 1. Robustness to measurement noise: The single-qubit measurement result can be combined with other noise by applying a channel to the ideal state before measurement, although joint noise analysis may yield looser restrictions.The dense angle encoding is used to illustrate the theorem numerically in Figure 11.
2. Robustness for Factorizable Noise
For noise that factorizes into a channel on the classification qubit and an arbitrary channel on the other qubits, robustness of the classification qubit transfers to the full classifier.
- Theorem 9: If a noise channel factorizes into a single-qubit channel Ec and a multiqubit channel acting on the other qubits, the classifier can inherit robustness from Ec.The factorization isolates the channel acting on the measured classification qubit.
- Theorem 9: The theorem assumes the classifier state satisfies the robust-classification requirements for the single-qubit error channel Ec.The remaining-qubit channel may act arbitrarily under the stated factorization.
- Numerical illustration: Measurement-noise results are illustrated through misclassification percentages parameterized by assignment probabilities p00 and p11.The example focuses on dense angle encoding for a vertical dataset.
- Interpretation: Only errors occurring before measurement and involving the classification qubit can corrupt the measured classification outcome.This is identified as a consequence of circuit causality.
- Fidelity bound: The appendix derives a fidelity bound for robustness using Hölder, Fuchs–van de Graaf, and triangle inequalities.The derivation also uses the operator-norm relation ||D||∞ = 1.
- Numerical illustration: The appendix also references single-qubit datasets including vertical, diagonal, and rotated moons examples used in the numerical analysis.These datasets differ in which encoding can classify them well.
Appendix C: More Details on Numerical Results
The appendix details datasets, classifier ansätze, and numerical procedures, then reports parameter choices for noiseless accuracy and amplitude-damping robustness. It also illustrates Pauli-noise misclassification and the circuit decompositions used in the numerical results.
- Datasets: The vertical and diagonal datasets are linearly separable, while the moons dataset is nonlinear.
- Parameter optimization: θ ≈2.9 performs best in the noiseless environment, θ ≈1.6 under amplitude damping, and θ = 0 gives maximal robustness across the dataset.The noisy parameters [θ, φ] = [1.6, 3.9] achieve 81% δ-Robustness, compared with 70% for the noiseless-environment parameters, because they encode points closer to |0⟩.
- Classifier ansätze: The single-qubit ansatz uses z- and y-axis rotations, while the two-qubit ansatz has 12 parameters and can realize any two-qubit unitary up to global phase.The single-qubit ansatz can represent any element of U(2); the two-qubit decomposition omits a final bottom-qubit rotation because only the first qubit is measured.
- Learning procedure: The Quantum Encoding Learning Algorithm initializes encodings and parameters, selects data, encodes samples, and adds noise according to noise parameters.The supplied pseudocode excerpts identify initialization, data selection, encoding, and noise-injection steps.
- Pauli-noise results: For Pauli noise with pZ = 0, classification remains robust when pX + pY < 1/2, followed by a sharp transition to maximal misclassification beyond that constraint.Correct classification denotes points receiving the same classification with and without noise.