arXiv:2610.06176quant-phOct 2026

Manuscript Offprint

arXiv:2610.06176

What Does It Cost to Simulate a Quantum Sentence Classifier? An Energy and Compute Perspective on Near-Term QNLP

Kishlay Kashyap, Sandipan Ganguly

Abstract

Near-term quantum natural language processing (QNLP) experiments often run on classical simulators, so simulator cost is part of the field's practical compute burden, yet accuracy tables do not show it. We measure that cost for a variational quantum classifier (VQC) on binary SST-2 sentiment classification, using PennyLane's state-vector simulator over a controlled grid of 27 configurations: three balanced training-set sizes ( N∈{200,500,1000}N \in \{200, 500, 1000\}), three qubit counts (4, 6, 8), and three circuit depths. Each VQC is compared with logistic regression on the same PCA-reduced input; full TF-IDF logistic regression gives an uncompressed reference. The VQC beats its matched baseline in 6 of 27 single-seed comparisons. After reruns at two further seeds, only 1 of these 6 keeps a positive mean advantage larger than its paired seed-to-seed variability, and paired tests on the fixed validation set do not establish it. VQC training is 886–21,127× slower in measured wall-clock time than the matched classical fit (median 3,158×); going from 4 to 8 qubits roughly doubles simulator time, and within the tested range per-step cost is well approximated by a linear function of the parameter count. CodeCarbon energy and CO2CO_{2} estimates are secondary: they imply an almost constant power of about 41 W, so they add little beyond runtime, and we do not build an energy ratio from them. The study is narrow (one dataset, representation, ansatz, simulator, and CPU environment) and is a reproducible feasibility measurement, not a general verdict on QNLP.

1 Introduction

Quantum natural language processing (QNLP) asks whether quantum computational structure can supply useful inductive biases for language. It inherits two broad strategies from quantum machine learning (Biamonte et al., 2017; Havlíček et al., 2019). Compositional approaches build a sentence's grammatical structure into a quantum circuit, following the categorical compositional distributional (DisCoCat) program (Coecke et al., 2010) and its software realization in lambeq (Kartsaklis et al., 2021); such models have been executed on quantum hardware for small sentence-classification tasks (Lorenz et al., 2023). Embedding-style approaches instead encode a fixed-dimensional classical feature vector into a parameterized circuit and train it variationally, as in circuit-centric quantum classifiers (Schuld et al., 2020); they are closely related to quantum kernel methods (Havlíček et al., 2019; Schuld, 2021). Current processors are noisy, small, and of restricted access (Preskill, 2018), so much QNLP experimentation is carried out on classical simulators, with PennyLane one widely used framework (Bergholm et al., 2018).

Simulation is itself a computational workload. A state-vector simulator stores 2n2^{n} amplitudes for n qubits, so memory and arithmetic grow steeply with circuit width, and variational training multiplies the cost of one circuit evaluation by the number of optimizer steps. A result obtained “on 6 qubits” therefore hides the classical compute, and ultimately the electricity, that produced it. Strubell et al. (2019) estimated the energy and carbon cost of training NLP models. Later work proposed standardized reporting practices (Schwartz et al., 2020; Henderson et al., 2020) and argued for reporting efficiency as an evaluation criterion. More recent is similar energy and carbon accounting for quantum-circuit simulation (Li et al., 2023; Tripathi et al., 2025). This is relevant in the interpretation of results since quantum machine learning benchmarks can vary significantly based on the experimental setup (Bowles et al., 2024).

This paper brings these threads together in one deliberately simple, fully logged experiment. For a VQC on binary SST-2 sentiment classification we (i) measure simulator cost under one timing definition applied to both quantum and classical arms,

(ii) compare against a classical baseline matched on input dimensionality rather than given a different representation, and (iii) check whether apparent accuracy wins survive reruns at other seeds and paired statistical tests. We vary the training-set size N∈{200,500,1000}N \in \{200, 500, 1000\}, the qubit count (4, 6, 8), and the circuit depth (1–3 layers), giving 27 configurations, and ask:

• RQ1 (cost). How much measured wall-clock time, and how much software-estimated energy, does simulating VQC training consume relative to a classical classifier on the same compressed representation, and how does the cost scale with qubit count, depth, and training-set size?

• RQ2 (accuracy). Does the VQC beat its dimensionality-matched classical baseline under a fixed optimization protocol?

• RQ3 (robustness). Do single-seed accuracy comparisons survive targeted multi-seed reruns and paired tests on the fixed validation set?

Wall-clock time is the primary cost metric. Code-Carbon (Courty et al., 2024) supplies secondary energy and CO2CO_{2} estimates, which we do not treat as precise electricity measurements. In brief: matched VQC/classical time ratios are 886–21,127× (median 3,158×); the VQC leads in 6 of 27 single-seed comparisons, one of which keeps a positive mean advantage larger than its seed-to-seed variability after two further seeds, and none is statistically established.

The contribution is methodological rather than algorithmic:

• a reproducible matched-dimensionality cost measurement for a simulator-based QNLP classifier, with every quoted number recomputed from the exported artifacts by a verification script;

• a decomposition of simulator time by qubit count, depth, and optimizer steps, showing that at this width the 4→84 \rightarrow 8 qubit growth is about 2×2 \times, and that within the tested range per-step cost is well approximated by a linear function of the parameter count rather than of the 2n2^n state dimension;

• a targeted multi-seed protocol for apparent accuracy advantages, with explicit regression-to-the-mean caveats; and

• diagnostics for near-degenerate predictions, and evidence that software energy estimates carry essentially the same information as wall-clock time in this environment.