Table of Contents
Fetching ...

An Efficient Quantum Classifier Based on Hamiltonian Representations

Federico Tiblias, Anna Schroeder, Yue Zhang, Mariami Gachechiladze, Iryna Gurevych

TL;DR

This work addresses the data-encoding bottleneck in quantum machine learning by proposing a Hamiltonian classifier that maps inputs to a small set of Pauli strings and makes predictions from their expectation values, achieving logarithmic qubit and gate scaling in the input dimension $d$. It introduces three variants—HAM (fully parameterized), PEFF (parameter-efficient bias), and SIM (Pauli-string-based simplification)—with distinct trade-offs in parameter count and sample complexity, enabling practical testing on NLP and vision tasks. Empirical results show HAM and SIM achieving competitive performance against classical and quantum baselines across text and image datasets, with SIM benefiting most from a larger number of Pauli strings, while ablations highlight the crucial roles of bias terms and Pauli-string richness. The work demonstrates the feasibility of scalable, flipped-model quantum classifiers on tasks with real-world relevance, and outlines avenues for further reducing sample costs and deploying on real hardware.

Abstract

Quantum machine learning (QML) is a discipline that seeks to transfer the advantages of quantum computing to data-driven tasks. However, many studies rely on toy datasets or heavy feature reduction, raising concerns about their scalability. Progress is further hindered by hardware limitations and the significant costs of encoding dense vector representations on quantum devices. To address these challenges, we propose an efficient approach called Hamiltonian classifier that circumvents the costs associated with data encoding by mapping inputs to a finite set of Pauli strings and computing predictions as their expectation values. In addition, we introduce two classifier variants with different scaling in terms of parameters and sample complexity. We evaluate our approach on text and image classification tasks, against well-established classical and quantum models. The Hamiltonian classifier delivers performance comparable to or better than these methods. Notably, our method achieves logarithmic complexity in both qubits and quantum gates, making it well-suited for large-scale, real-world applications. We make our implementation available on GitHub.

An Efficient Quantum Classifier Based on Hamiltonian Representations

TL;DR

This work addresses the data-encoding bottleneck in quantum machine learning by proposing a Hamiltonian classifier that maps inputs to a small set of Pauli strings and makes predictions from their expectation values, achieving logarithmic qubit and gate scaling in the input dimension . It introduces three variants—HAM (fully parameterized), PEFF (parameter-efficient bias), and SIM (Pauli-string-based simplification)—with distinct trade-offs in parameter count and sample complexity, enabling practical testing on NLP and vision tasks. Empirical results show HAM and SIM achieving competitive performance against classical and quantum baselines across text and image datasets, with SIM benefiting most from a larger number of Pauli strings, while ablations highlight the crucial roles of bias terms and Pauli-string richness. The work demonstrates the feasibility of scalable, flipped-model quantum classifiers on tasks with real-world relevance, and outlines avenues for further reducing sample costs and deploying on real hardware.

Abstract

Quantum machine learning (QML) is a discipline that seeks to transfer the advantages of quantum computing to data-driven tasks. However, many studies rely on toy datasets or heavy feature reduction, raising concerns about their scalability. Progress is further hindered by hardware limitations and the significant costs of encoding dense vector representations on quantum devices. To address these challenges, we propose an efficient approach called Hamiltonian classifier that circumvents the costs associated with data encoding by mapping inputs to a finite set of Pauli strings and computing predictions as their expectation values. In addition, we introduce two classifier variants with different scaling in terms of parameters and sample complexity. We evaluate our approach on text and image classification tasks, against well-established classical and quantum models. The Hamiltonian classifier delivers performance comparable to or better than these methods. Notably, our method achieves logarithmic complexity in both qubits and quantum gates, making it well-suited for large-scale, real-world applications. We make our implementation available on GitHub.

Paper Structure

This paper contains 22 sections, 7 equations, 5 figures, 6 tables.

Figures (5)

  • Figure 1: (Top) Schema of a flipped model: data is represented as a measurement avoiding input encoding. (Bottom) The proposed input-to-measurement mapping: data is vectorized, mapped to a Hamiltonian via outer product, decomposed into a small number of Pauli strings, and recomposed into a simplified Hamiltonian
  • Figure 2: The SIM model at a glance. In green, parts that are stored classically, in blue, parts that can be represented on quantum computers.
  • Figure 3: Performance on the test sets for different number of Pauli strings in the SIM model. First $10$ epochs out of $30$ shown.
  • Figure 4: Circuit ansätze explored in the experiment. For the sake of visualization, the image shows ansätze for $n=3$. Since the experiments use different values, we extend the patterns to act on more qubits. (a) Non-entangling ansatz (b) Ring ansatz (c) All-to-all ansatz. (b) and (c) are respectively circuit 14 and 6 from Sim2019circ
  • Figure 5: Performance on the train set for different number of Pauli strings in the SIM model. Error bars are shown for all choices but grow thin for the two largest models. First $10$ epochs out of $30$ shown.