---
title: Gate-Based Variational Quantum Classifier
url: https://www.emergentmind.com/topics/gate-based-variational-quantum-classifier
type: topic
---

# Gate-Based Variational Quantum Classifier

Searching arXiv for recent and foundational papers on gate-based variational quantum classifiers.
{"query":"gate-based variational quantum classifier arXiv 2506.06662 2605.16067 2412.02955 2102.01759", "max_results": 10}
{"query":"Variational Quantum Classifier gate-based arXiv amplitude encoding angle encoding strongly entangling layer", "max_results": 10}
A gate-based variational quantum classifier (VQC) is a hybrid quantum–classical supervised learning model in which classical inputs are encoded into quantum states, transformed by a parameterized unitary circuit, and measured to produce classical predictions. In the gate-model formulation, the classifier is organized around an encoding map, a trainable ansatz, and a measurement or post-processing rule; the variational parameters are optimized by a classical routine against a task-specific loss. Across recent work, gate-based VQCs appear in superconducting, photonic, and hybrid deep-feature pipelines, and have been applied to accelerator physics, medical-image representation learning, astrophysical classification, high-energy physics analysis, and standard benchmark datasets [2506.06662], [2605.16067], [2412.02955], [2012.11560].

## 1. Core formalism and classifier definition

In a standard gate-based VQC, the encoded quantum state is written as
\[
\left| \psi(\vec{x}; \vec{\theta}) \right\rangle = U_{W}(\vec{\theta}) \, U_{\phi}(\vec{x}) \, \left| 0 \right\rangle,
\]
where \(U_{\phi}(\vec{x})\) is the data-encoding block, \(U_{W}(\vec{\theta})\) is the trainable variational circuit, and \(\vec{\theta}\) denotes adjustable parameters learned during training. This decomposition is stated explicitly in the accelerator-physics application and is representative of the gate-based formulation more generally [2506.06662].

A broader formalization describes the pipeline as
\[
| \psi^\mathrm{in}(x_i) \rangle \coloneqq \hat{S}(x_i)\,| \mathrm{init} \rangle, \qquad | \psi^\mathrm{out}(x_i; \hat{U}) \rangle \coloneqq \hat{U}\,| \psi^\mathrm{in}(x_i) \rangle,
\]
followed by observable expectations and a classical prediction function,
\[
f_\mathrm{pred}(x_i; \hat{U}, \theta_b) \coloneqq \sum_{j=1}^Q \xi_j \langle \hat{O}_j \rangle_{x_i,\hat{U}} + \theta_b.
\]
Training is then posed as constrained optimization over a unitary operator,
\[
\{\hat{U}_*, \theta_{b,*}\} = \argmin_{\hat{U}, \theta_b} \mathcal{J}_\mathrm{cost}(\hat{U}, \theta_b), \qquad \text{subject to } \hat{U}^\dagger \hat{U} = \hat{1}_{2^n}.
\]
This formulation is used to argue that ansatz-based quantum circuit learning is a restricted instance of a wider VQC design space [2102.01759].

The same architectural logic persists in application-specific variants. In one hybrid medical-imaging model, a pretrained ResNet-18 produces a 512-dimensional representation \(z=f_\theta(I)\), a classical pre-encoding layer reshapes it, amplitude encoding maps it into a 9-qubit state, a Strongly Entangling Layer acts on the state, Pauli-\(Z\) expectations are measured, and a classical linear head produces logits \(y=W_c q+b_c\) [2605.16067]. In a tensor-network hybrid, a matrix product state compresses image inputs before a VQC back end performs the classification, with both parts trained simultaneously [2102.02416].

This body of work establishes gate-based VQCs as a family rather than a single architecture. A plausible implication is that the defining property is not a fixed circuit template, but the use of programmable unitary gates within a hybrid optimization loop.

## 2. Encoding strategies and feature representations

Data encoding is the first major design axis. Two encodings are explicitly compared in the accelerator-physics study: amplitude encoding and angle encoding. In amplitude encoding,
\[
| \psi_{\vec{x}} \rangle = \sum_{i=1}^{N} x_i | i \rangle,
\]
while in angle encoding each feature is mapped to a rotation gate; the implemented circuit uses \(R_x\) gates,
\[
R_x(\theta) = \begin{pmatrix} \cos\left(\frac{\theta}{2}\right) & -i\sin\left(\frac{\theta}{2}\right) \\ -i\sin\left(\frac{\theta}{2}\right) & \cos\left(\frac{\theta}{2}\right) \end{pmatrix},
\]
with encoded state
\[
\left| \psi_{\vec{x}} \right\rangle = \bigotimes_{i=1}^{N} \left( \cos(x_i) \left| 0 \right\rangle + \sin(x_i) \left| 1 \right\rangle \right).
\]
Angle encoding requires at least \(N\) qubits for \(N\) features, whereas amplitude encoding needs only \(\log_2 N\) qubits in principle [2506.06662].

The same compression motive underlies several other constructions. The SAFE-oriented medical model amplitude-encodes standardized 512-dimensional ResNet-18 features into 9 qubits, after a learnable linear transformation followed by GELU. The paper argues that this pre-layer is necessary because amplitude encoding can distort geometry, and reports worse performance and unstable training when it is removed [2605.16067]. In the HTRU-2 pulsar study, by contrast, the feature maps are angle-embedding circuits; the eight numerical features are normalized with `MinMaxScaler` to \([0,\pi]\), and the number of qubits equals the number of selected features [2505.15600].

Discrete-feature encoding is treated separately in work on trainable embeddings based on Quantum Random Access Coding (QRAC). There, fixed QRAC compression is replaced by a trainable embedding, such as a single-qubit gate
\[
u3(\theta,\varphi,0)\ket{0} = \cos(\theta/2)\ket{0}+e^{\varphi}\sin(\theta/2)\ket{1},
\]
with Bloch vector
\[
r_i=(\sin\theta_i\cos\varphi_i, \sin\theta_i\sin\varphi_i,\cos\theta_i).
\]
The purpose is to preserve QRAC-style qubit efficiency while overcoming fixed-geometry limitations on hard Boolean functions [2106.09415].

Feature extraction can also be delegated to a classical front end. The end-to-end tensor-network classifier uses a matrix product state as a trainable compressor for flattened \(28\times 28\) images before quantum classification [2102.02416]. The medical-imaging pipeline uses a pretrained ResNet-18 whose last fully connected layer is replaced by an identity map, thereby exposing the full 512-dimensional feature vector to the hybrid quantum stage [2605.16067]. In accelerator physics, the feature set is task-specific: the simple dataset uses \([x,x',y,y']\) at the end point of the last cell, while the complex dataset uses the same quantities at the end points of the first, fifth, and last cells, yielding 12 features [2506.06662].

A recurrent misconception is that gate-based VQCs necessarily consume raw low-dimensional inputs. The reported implementations show instead that they often operate on engineered, compressed, or pretrained representations.

## 3. Variational ansätze, circuit realizations, and readout rules

The trainable circuit is typically a layered unitary ansatz. In the accelerator-physics study, the variational block is
\[
U_{W(\vec{\theta})} = U_{W_k (\vec{\theta_k})} \cdots U_{W_2 (\vec{\theta_2})} U_{W_1 (\vec{\theta_1})},
\]
with repeated strongly entangled layers. Each layer contains generic single-qubit rotations with three angles and a circular chain of CNOT gates. The one-qubit rotation is
\[
U(\alpha, \beta, \gamma) = \begin{pmatrix} \cos\left(\frac{\alpha}{2}\right) & e^{-i\gamma} \sin\left(\frac{\alpha}{2}\right) \\ e^{i\beta} \sin\left(\frac{\alpha}{2}\right) & e^{i(\beta + \gamma)} \cos\left(\frac{\alpha}{2}\right) \end{pmatrix}.
\]
The authors select three strongly entangled layers for later experiments because increasing the number of layers from 1 to 7 improves accuracy but the gain slows significantly after 2 layers [2506.06662].

Photonic implementations realize the same variational principle in hardware-native form. One silicon photonic VQC uses a four-mode interferometer network with six Mach–Zehnder interferometers, and the ansatz is
\[
\hat U(\boldsymbol{\theta},\boldsymbol{\phi}) = \hat U(\theta_1,\phi_1)\hat U(\theta_2,\phi_2)\cdots \hat U(\theta_6,\phi_6).
\]
Each MZI acts as a programmable two-mode gate controlled by phase-shifter voltages [2412.02955]. A separate gate-based photonic quantum neural network implements two-parameter and six-parameter two-qubit circuits using dual-rail qubits, single-qubit rotations, and one CNOT gate [2605.10801].

Readout varies with the architecture:

| Implementation | Variational block | Readout |
|---|---|---|
| WHPS dynamic-aperture VQC | Strongly entangled layers with single-qubit rotations and circular CNOT chain | First qubit; threshold \(P(|0\rangle)\) at \(0.5\) |
| SAFE hybrid VQC | Single Strongly Entangling Layer on 9 qubits | Pauli-\(Z\) expectation on each qubit, then linear head |
| Photonic microprocessor VQC | Six programmable MZIs in a 4-mode network | Highest photon measurement outcome / output intensity |
| Single-qudit classifier | General \(SU(N)\) unitary | Most probable outcome under \(S_3\) measurement |

In the WHPS classifier, the decision rule is
\[
\hat{y} =
\begin{cases}
0, & P(|0\rangle) \geq 0.5 \\
1, & P(|0\rangle) < 0.5
\end{cases}
\]
[2506.06662]. In the SAFE model, the measured quantum features satisfy
\[
q_i = \langle \psi_{\text{out}}| Z |\psi_{\text{out}} \rangle,\qquad q_i \in [-1,1],
\]
after which the classical head computes logits \(y=W_c q+b_c\) and softmax determines the predicted class [2605.16067]. In the photonic microprocessor, “the highest photon measurement outcome is used to determine the label of each sample” [2412.02955]. In the single-qudit classifier, the predicted label is the class whose measurement outcome is most probable [1908.08385].

This diversity of readout rules shows that gate-based VQCs are not restricted to a single binary-threshold mechanism; the common element is measurement-based inference after unitary evolution.

## 4. Loss functions, optimizers, and hybrid training regimes

The most common objective is cross-entropy. For dynamic-aperture classification, the loss is binary cross-entropy,
\[
\mathcal{L} = \frac{1}{N} \sum_{i=1}^{N} \left( - Y_i \log p_i - (1 - Y_i) \log (1 - p_i) \right),
\]
optimized with COBYLA because it is gradient-free and requires only one loss evaluation per iteration [2506.06662]. The SAFE hybrid model uses categorical cross-entropy,
\[
\ell = -\sum_{k=1}^{C} y_k^{(\text{true})}\log p_k,
\]
trained end-to-end with Adam, learning rate \(3\times 10^{-3}\), batch size \(32\), and 20 epochs; gradients are computed through automatic differentiation in the classical computation graph rather than parameter-shift rules [2605.16067].

Other training loops are explicitly hardware-oriented. The LHC analysis uses SPSA, chosen because it is practical for noisy quantum hardware and requires relatively few function evaluations per iteration [2012.11560]. The Qiskit pulsar study employs `qiskit_machine_learning.algorithms.VQC` with the default cross-entropy loss and the SLSQP optimizer [2505.15600]. The photonic microprocessor closes the loop with a gradient-free genetic algorithm minimizing
\[
C(B_j,W_i)=\left\lVert\, |o_f\rangle - V_i \,\right\rVert_2,
\]
over candidate parameter vectors \(P=\{\theta_k,\phi_k\}\), with training terminated after 100 generations [2412.02955].

End-to-end differentiation appears in hybrid classical–quantum architectures. In the tensor-network/VQC model, matrix-product-state parameters \(\theta_1\) and quantum parameters \(\theta_2\) are optimized jointly; the quantum gradients are computed with the parameter-shift rule,
\[
\nabla_{\theta_i} f(x;\theta_i) = \frac{1}{2}\left[ f\left(x;\theta_i + \frac{\pi}{2}\right) - f\left(x;\theta_i - \frac{\pi}{2}\right)\right]
\]
[2102.02416].

Reported training procedures also emphasize resource constraints. In the WHPS simulator, VQC runs used 1024 measurement shots; for the depth study the maximum iteration count was 1000, and for the final comparison on the complex dataset it was 3000 [2506.06662]. In the LHC hardware study, 500 training iterations on 100 events took about 200 hours [2012.11560]. This supports a recurring practical point: optimization method selection in gate-based VQCs is closely tied to simulator cost, shot noise, and backend access.

## 5. Empirical domains and reported results

Gate-based VQCs have been evaluated on both benchmark and domain-specific tasks.

| Domain | Configuration | Reported outcome |
|---|---|---|
| Accelerator physics | WHPS DA boundary classification | \(95.3\%\) VQC vs \(94.9\%\) ANN at 2000 training samples |
| Pulsar classification | HTRU-2, 3 features, ZZ feature map, EfficientSU2, circular entanglement | Accuracy \(0.950\) |
| Photonic nonlinear tasks | Square / circular / sine boundaries | Experimental accuracies \(87.5\%\), \(92.5\%\), \(85.0\%\) |
| LHC analyses | \(t\bar t H\) and \(H\to\mu\mu\) with 10 qubits | AUC \(0.81\pm0.04\) and \(0.83\pm0.05\) on simulator |
| Photonic QNN | XOR with two-parameter QNN | Loss \(0.04\), accuracy \(100\%\) |

In accelerator physics, the gate-based VQC is used as a surrogate for expensive long-term accelerator tracking. The classifier learns whether short-term trajectories imply long-term survival or loss, and the dynamic aperture boundary is reconstructed from the separation between predicted surviving and lost particles. On the complex dataset, accuracy improves with training-sample count for both VQC and ANN, but the VQC converges faster; for fewer than 500 training samples, angle-encoding VQC outperforms ANN, and at 2000 training samples the reported accuracies are \(95.3\%\) for VQC versus \(94.9\%\) for ANN [2506.06662].

In the HTRU-2 pulsar problem, performance depends strongly on feature selection, qubit count, and circuit configuration. The best reported accuracy is \(0.950\), obtained with 3 features, 180 training samples, FS1, the ZZ feature map, the EfficientSU2 ansatz, and circular entanglement. The strongest MCC is \(0.670\), achieved with 3 features, 300 training samples, FS2, the ZZ feature map, EfficientSU2, and full entanglement; this configuration has accuracy \(0.945\), precision \(0.476\), recall \(1.000\), and F1-score \(0.645\) [2505.15600].

On a programmable silicon photonic microprocessor, simulation accuracies on three synthetic binary tasks are \(95.8\%\), \(95.5\%\), and \(94.4\%\) for square, circular, and sine decision boundaries, respectively, while experimental accuracies are \(87.5\%\), \(92.5\%\), and \(85.0\%\). On the real-world Iris dataset, the paper reports \(98.8\%\) in the abstract and a hardware testing accuracy of \(93.3\%\) on 30 testing samples in the detailed description [2412.02955]. In a separate photonic QNN study, the two-parameter QNN solves XOR with \(100\%\) accuracy while the matched-parameter ANN saturates near random guessing; on a two-class Iris subset, the smaller QNN achieves mean converged loss around \(0.02\) [2605.10801].

High-energy-physics applications use realistic signal–background discrimination tasks. With 10 qubits and 100 training events per dataset, the VQC reaches AUC \(0.81\pm0.04\) on \(t\bar{t}H\) and \(0.83\pm0.05\) on \(H\to\mu\mu\), comparable to SVM and BDT baselines. Hardware AUCs of \(0.82\) on ibmq_boeblingen and \(0.81\) on ibmq_paris are reported for representative datasets [2012.11560].

Hybrid front ends also show competitive benchmark performance. The end-to-end MPS-VQC reaches around \(96\%\) test accuracy on Fashion-MNIST class 5 vs 7 with \(\chi=1\), and with \(\chi=2\) exceeds \(98\%\) on MNIST ternary classification and reaches about \(92\%\) on Fashion-MNIST ternary classification [2102.02416]. Trainable discrete embeddings further improve compact discrete-data classification; for example, on 6-bit parity TE achieves \(0.884\) using only 2 qubits, and Conv \((4,1)\)-TE reaches \(0.917\) test accuracy on MNIST with only 9 qubits [2106.09415].

Taken together, these studies support the narrower claim that gate-based VQCs are already viable as small-data or resource-constrained classifiers in several application domains. They do not, by themselves, establish a universal advantage over classical methods.

## 6. Expressivity, robustness, and recurrent points of debate

Three recurrent themes structure the present literature: expressivity, stability under noise, and the role of architectural constraints.

First, more parameters or more depth do not automatically imply better performance. In the WHPS study, increasing the number of strongly entangled layers improves accuracy, but gains slow significantly after 2 layers [2506.06662]. In the photonic QNN study, the normalized effective dimensions are \(0.95\) for the 2-parameter QNN and \(0.68\) for the matched 2-parameter ANN, while the 6-parameter QNN has only about \(0.01\) advantage over the 6-parameter ANN; the authors explicitly argue that expressivity, not parameter count alone, determines performance [2605.10801]. A related ansatz critique is made in the ansatz-independent VQC paper, which shows that quantum circuit learning is a restricted instance of a kernel-like framework and claims that QCL performance is bounded above by the unitary kernel method [2102.01759].

Second, robustness claims are increasingly tied to structure. The SAFE hybrid model argues that normalized amplitude embedding, unitary evolution, and bounded Pauli-\(Z\) readout induce a structured and smooth hypothesis class. The paper states norm preservation,
\[
\|\,U|\psi\rangle - U|\phi\rangle\,\| = \||\psi\rangle - |\phi\rangle\|,
\]
bounded observable outputs \(q_i\in[-1,1]\), and gradient norm control \(\|U^\dagger g\|=\|g\|\), and evaluates reliability with SAFE-AI metrics derived from Cramér–von Mises divergence, including RGA, RGR, RGE and their areas under curves [2605.16067]. This suggests a stability-oriented reading of some VQC architectures, although the evidence is task-specific.

Third, noise studies generally report degradation rather than collapse. In the accelerator-physics application, realistic NISQ noise is emulated with Qiskit-Aer using IBM noise models ibmq_lima, ibmq_belem, and ibm_lagos. With angle encoding, 3 strongly entangled layers, 1000 training samples, COBYLA, and 1000 iterations, the accuracies are \(0.717 \pm 0.223\) with no noise, \(0.688 \pm 0.022\) for ibmq_lima, \(0.686 \pm 0.028\) for ibmq_belem, and \(0.692 \pm 0.018\) for ibm_lagos; the conclusion is that noise causes only slight degradation because moderate probability shifts often do not change the thresholded decision label [2506.06662]. The photonic QNN likewise studies photon loss, phase-shifter imprecision, and finite-shot effects, reporting that beyond roughly 100 shots loss drops and accuracy improves substantially, and using \(10^5\) shots per iteration in later runs [2605.10801].

Several controversies or common confusions are addressed directly in the literature. Reusing the same circuit family as both feature map and ansatz can harm overall effectiveness: on HTRU-2, using ZZ or Pauli feature maps as both feature map and ansatz gives poor overall performance, even when precision can be higher than average [2505.15600]. “Gate-based” also does not imply qubit-only digital circuits in the narrow superconducting sense: photonic mode architectures built from MZIs or dual-rail qubits are described as gate-based when they emulate the standard circuit model [2412.02955], [2605.10801]. Conversely, pulse-level variational quantum pulse learning is explicitly characterized as distinct from gate-based VQC, even though it is inspired by it and can outperform a baseline VQC in the reported binary-classification experiments [2203.17267].

The current record therefore presents gate-based VQCs as a technically heterogeneous class of hybrid classifiers with demonstrable utility, nontrivial expressivity, and moderate reported robustness, but also with clear dependence on encoding choice, ansatz design, optimizer behavior, qubit or mode budget, and hardware noise.

Source: https://www.emergentmind.com/topics/gate-based-variational-quantum-classifier