Quantum Kitchen Sinks: An algorithm for machine learning on near-term quantum computers

C. M. Wilson, Johannes Otterbach, Nikolas Tezak, Robert Smith, Anthony Polloreno, Peter J. Karalekas, Steven Heidel, Mahabubul Alam, Gavin E. Crooks, M. P. da SilvaarXiv 2018 · DOI

Abstract

Noisy intermediate-scale quantum (NISQ) computing devices are an exciting platform for the exploration of the power of near-term quantum applications. Performing nontrivial tasks in such devices requires a fundamentally different approach than what would be used on an error-corrected quantum computer. One such approach is to use hybrid algorithms, where problems are reduced to a parameterized quantum circuit that is often optimized in a classical feedback loop. Here we describe one such hybrid algorithm for machine learning tasks by building upon the classical algorithm known as random kitchen sinks. Our technique, called quantum kitchen sinks (QKS), uses quantum circuits to nonlinearly transform classical inputs into features that can then be used in a number of machine learning algorithms. We demonstrate the power and flexibility of this proposal by using it to solve binary classification problems for synthetic datasets as well as handwritten digits from the MNIST database. Using the Rigetti quantum virtual machine, we show that small quantum circuits provide significant performance lift over standard linear classical algorithms, reducing classification error rates from 50% to <0.1%, and from 4.1% to 1.4% in these two examples, respectively. Further, we are able to run the MNIST classification problem, using full-sized MNIST images, on a Rigetti quantum processing unit, finding a modest performance lift over the linear baseline.

Introduction

The current era of quantum computing is defined by Noisy Intermediate-Scale Quantum (NISQ) devices. While these processors lack error correction, they offer a unique playground for hybrid quantum-classical algorithms. Most existing approaches utilize variational circuits—closed-loop systems where circuit parameters are iteratively optimized via classical feedback. However, this iterative process is computationally taxing, often requiring thousands of QPU calls, and it can be difficult to distinguish the "quantum" contribution from the classical optimization's power.

Quantum Kitchen Sinks (QKS) addresses these challenges by adopting an "open-loop" architecture. Inspired by the classical Random Kitchen Sinks (RKS) method, QKS uses fixed, random quantum circuits to map classical data into a high-dimensional feature space, where a simple linear classifier can then be applied.

The Quantum Kitchen Sinks Algorithm

The QKS workflow consists of three primary stages: encoding, transformation, and classification.

  1. Linear Encoding: Classical input data $u$ is mapped linearly to rotation angles $\theta$ for gates within a quantum circuit.
  2. Quantum Transformation: These angles parameterize a family of random quantum circuits. These "sinks" utilize entangling gates (e.g., CNOTs) to generate complex, nonlinear relationships between input features.
  3. Measurement and Concatenation: Each circuit is measured to produce a bitstring. This process is repeated for $E$ "episodes" using different random circuit parameters. The resulting bitstrings are concatenated into a high-dimensional feature vector.
  4. Linear Classification: Finally, this feature vector is fed into a strictly linear classical classifier, such as Logistic Regression.
The QKS architecture consists of a quantum nonlinearity followed by linear post-processing. The QPU block details the linear encoding of input data into circuit parameters.

By maintaining a strictly linear classical head, any performance improvement over a standard linear baseline can be directly attributed to the nonlinear transformations performed by the quantum circuits.

Experimental Results

The authors evaluated QKS on two distinct tasks: a synthetic "Picture Frames" dataset and a subset of the MNIST handwritten digit database.

Synthetic "Picture Frames"

The synthetic dataset consists of two concentric squares, a classic non-linearly separable problem. A standard linear model fails completely on this task, achieving only 50% accuracy. In contrast, QKS achieved >99.9% accuracy, demonstrating its ability to project data into a space where linear separation is possible.

MNIST Digit Classification

For the MNIST task, the authors focused on distinguishing between the digits "3" and "5". Using full-sized 28x28 images partitioned into tiles, they compared QKS against a linear baseline (LR) and a classical non-linear baseline (SVM with an RBF kernel).

Classification error rates for the MNIST (3 vs 5) task. QKS+LR significantly outperforms the linear baseline (LR) and approaches the performance of SVM+RBF.

As shown in the results, the linear baseline error rate of 4.1% was reduced to 1.4% in simulation using QKS. Experiments on a physical Rigetti QPU also demonstrated a performance lift, achieving over 96% accuracy despite hardware noise.

Discussion and Conclusion

QKS offers a computationally efficient alternative to variational algorithms. By avoiding iterative optimization, it requires significantly fewer QPU calls—$O(\epsilon^{-2}M)$ compared to $O(\epsilon^{-2}M^4)$ for some other quantum kernel methods. The study also highlighted the importance of entanglement; circuits with CNOT gates consistently outperformed those without, suggesting that quantum correlations are vital for generating rich feature sets.

While QKS shows great promise, challenges remain. Increasing the number of qubits beyond a certain point led to higher error rates in some MNIST tests, likely due to overfitting or suboptimal circuit architectures. Future work will focus on refining circuit design and establishing formal theoretical bounds for quantum advantage in these feature-mapping tasks.

Summary updated

Abstract

Noisy intermediate-scale quantum computing devices are an exciting platform for the exploration of the power of near-term quantum applications. Performing nontrivial tasks in such devices requires a fundamentally different approach than what would be used on an error-corrected quantum computer. One such approach is to use hybrid algorithms, where problems are reduced to a parameterized quantum circuit that is often optimized in a classical feedback loop. Here we describe one such hybrid algorithm for machine learning tasks by building upon the classical algorithm known as random kitchen sinks. Our technique, called quantum kitchen sinks, uses quantum circuits to nonlinearly transform classical inputs into features that can then be used in a number of machine learning algorithms. We demonstrate the power and flexibility of this proposal by using it to solve binary classification problems for synthetic datasets as well as handwritten digits from the MNIST database. Using the Rigetti quantum virtual machine, we show that small quantum circuits provide significant performance lift over standard linear classical algorithms, reducing classification error rates from 50% to $&lt;0.1\%$, and from $4.1\%$ to $1.4\%$ in these two examples, respectively. Further, we are able to run the MNIST classification problem, using full-sized MNIST images, on a Rigetti quantum processing unit, finding a modest performance lift over the linear baseline.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
Low-dimensional synthetic classification (picture frames)Quantum kitchen sinks (QKS) with logistic regressionClassification accuracy>99.9%Classification · p=2 · q=2 · r=1 · hardware=Rigetti quantum virtual machine
Source quote
L339: The best classification accuracy achieved was >99.9%, a remarkable
MNIST · digits 3 vs. 5Quantum kitchen sinks (QKS) with logistic regressionClassification accuracy98.6%+2.7 vs baselineImage Classification · resolution=28×28 · subset=digits 3 vs. 5 · encoding=tiled
Source quote
L545: 98.6% in a high-dimensional dataset consisting of the
Picture frames datasetQuantum kitchen sinks (QKS), two-qubit ansatzClassification accuracy100%Classification · split: test · qubits=2 · episodes=1000 · hardware=Rigetti QPU · test_examples=400
Source quote
L432: \sigma=1.0, we achieved 100% accuracy on a test set of 400 examples and training set of 1600 examples, even
MNIST · digits 3 vs. 5Quantum kitchen sinks (QKS), one-qubit circuitError rate3.3%Image Classification · qubits=1 · subset=digits 3 vs. 5 · episodes=10000 · hardware=Rigetti QPU
Source quote
L442: rate of 3.3%. Even for this simplest circuit, we find QKS provides a performance lift over a linear suport
Reported baseline / comparator measurements (2)
BenchmarkMethodMetricScoreProtocol / Evidence
Low-dimensional synthetic classificationLogistic regression (linear classifier) baselineClassification accuracy50%Classification · model=logistic regression
Source quote
L543: accuracy of a logistic regression classifier can be boosted from 50%
MNIST · digits 3 vs. 5Logistic regression (linear baseline) baselineClassification accuracy95.9%Image Classification · model=logistic regression · subset=digits 3 vs. 5
Source quote
L351: ``5''. The classification accuracy we obtain with LR is 95.9%,
BibTeX
@misc{wilson2018quantum,
  author = {C. M. Wilson and Johannes Otterbach and Nikolas Tezak and Robert Smith and Anthony Polloreno and Peter J. Karalekas and Steven Heidel and Mahabubul Alam and Gavin E. Crooks and M. P. da Silva},
  title = {{Quantum Kitchen Sinks: An algorithm for machine learning on near-term quantum computers}},
  year = {2018},
  eprint = {1806.08321},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1806.08321},
}

Loading related content...

Figure