Source-linked AI summary
Variational Quantum Boltzmann Machines
Christa Zoufal, Aurélien Lucchi, Stefan Woerner
TL;DR
Existing QBM approaches have difficulty supporting analytic loss gradients with hidden qubits, or rely on upper-bound gradients that restrict compatible models. VarQBM uses variational imaginary-time evolution to approximate Gibbs states and compute actual-loss gradients; the paper demonstrates state preparation in simulation and on quantum hardware.
Problem
Earlier QBM methods either avoid hidden qubits or use upper-bound gradients that restrict compatible Hamiltonians.
Source: §I · p. 1Method
VarQBM uses VarQITE to prepare approximate Gibbs states and automatic differentiation to train generic Hamiltonians with analytic gradients of the actual loss.
Source: §I · p. 2, B. Variational Quantum Imaginary Time… · p. 3, §V · p. 9Results
Real quantum hardware achieved fidelity values over 0.99 and 0.96, respectively, in the reported Gibbs-state preparation evaluations.
Source: B. Gibbs State Preparation with VarQITE · p. 7Takeaways & Limitations
The authors demonstrate VarQBM for Gibbs-state preparation and illustrate generative learning and classification with numerical results.
Source: §V · p. 9The approximate state-preparation scheme relies on the representation capabilities of the variational trial state.
Source: A. Gibbs State Preparation with VarQITE · p. 5
Abstract
from arXiv · showhide
This work presents a novel realization approach to Quantum Boltzmann Machines (QBMs). The preparation of the required Gibbs states, as well as the evaluation of the loss function's analytic gradient is based on Variational Quantum Imaginary Time Evolution, a technique that is typically used for ground state computation. In contrast to existing methods, this implementation facilitates near-term compatible QBM training with gradients of the actual loss function for arbitrary parameterized Hamiltonians which do not necessarily have to be fully-visible but may also include hidden units. The variational Gibbs state approximation is demonstrated with numerical simulations and experiments run on real quantum hardware provided by IBM Quantum. Furthermore, we illustrate the application of this variational QBM approach to generative and discriminative learning tasks using numerical simulation.
I. INTRODUCTION
Boltzmann machines model probability distributions through weighted networks and Gibbs states, but training can be difficult because gradients require a hard-to-compute partition function. VarQBM uses variational imaginary-time evolution to train quantum Gibbs states with analytic gradients of the actual loss, including for models with hidden qubits.
I. INTRODUCTION
- Classical BM gradients require a partition function that is generally difficult to compute, while common approximations can be slow or inaccurate.The partition function normalizes the model distribution; Markov Chain Monte Carlo may take long to converge, while contrastive divergence and pseudo-likelihood can introduce inaccuracies.Source: §I · p. 1
A. Boltzmann Machines
- BMs encode probability distributions in node biases and connection weights, with visible and hidden nodes, and train weights to match a target distribution.Their training can be framed as generative or discriminative learning.Source: §I · p. 1, A. Boltzmann Machines · p. 2
I. INTRODUCTION
- A QBM replaces the classical energy function with a parameterized Hermitian Hamiltonian whose Gibbs state defines probabilities for visible-qubit outcomes.QBMs can use quantum structures potentially inaccessible classically and support generative as well as discriminative learning.Source: §I · p. 1
- Earlier QBM approaches either avoided hidden qubits or used upper-bound gradients that make transverse Hamiltonian terms difficult and restrict compatible models.The upper bound is based on the Golden–Thompson inequality.Source: §I · p. 1
- VarQBM uses VarQITE to approximate Gibbs states and automatic differentiation to compute actual-loss gradients for parameter updates, without explicitly evaluating the partition function.The approach is described for generic Hamiltonians with real coefficients and arbitrary Pauli terms, and is compatible with near-term gate-based quantum computers.Source: §I · p. 2
- VarQBM targets classical sampling probabilities rather than fitting every feature of the target density matrix, since full-matrix fitting may impede training.The scheme could be adapted to approximate quantum-state preparation using a quantum-relative-entropy loss, but the authors note that this may not suit learning classical distributions.Source: §I · p. 2
B. Variational Quantum Imaginary Time Evolution
Imaginary-time evolution can drive a state toward a Hamiltonian’s ground state and, at finite time, prepare a Gibbs state. VarQITE approximates this evolution on gate-based quantum computers by projecting it onto a parameterized trial state.
B. Variational Quantum Imaginary Time Evolution
- At finite evolution time τ = 1/2(kBT), imaginary-time evolution prepares Gibbs states, while the long-time limit approaches the ground state given overlap with it.The evolution suppresses contributions from higher-energy eigenvalues faster than those from lower-energy ones.Source: B. Variational Quantum Imaginary Time… · p. 3
- VarQITE uses McLachlan’s variational principle to project the evolution of a quantum state onto parameters of a trial state for gate-based implementation.The trial state is generated by a parameterized circuit.Source: B. Variational Quantum Imaginary Time… · p. 3
- McLachlan’s principle yields linear equations for the parameter velocities by minimizing the difference between the target evolution and the trial state's change.The resulting quantities are evaluated using quantum-circuit expectation values; A is proportional to the classical Fisher information matrix and C describes the energy derivative.Source: B. Variational Quantum Imaginary Time… · p. 3
- The evaluation applies to arbitrary parameterized unitaries by expressing them as exponentials of Hermitian matrices and decomposing those matrices into weighted Pauli terms.The decomposition enables computation of A and C using the cited techniques.Source: B. Variational Quantum Imaginary Time… · p. 3
- An explicit Euler method can evolve the variational parameters over time.The passage identifies this as one possible method for updating the parameters.Source: B. Variational Quantum Imaginary Time… · p. 3
III. QUANTUM BOLTZMANN MACHINE ALGORITHM
VarQBM trains Hamiltonian parameters so that visible-qubit sampling probabilities match a classical data distribution. It approximates a Gibbs state with VarQITE, then uses automatic differentiation of the loss to update the parameters.
III. QUANTUM BOLTZMANN MACHINE ALGORITHM
- A visible configuration’s probability is defined by a projective measurement on the quantum Gibbs state, without requiring evaluation of hidden-qubit configurations.Visible outcomes are assumed to be measured in the computational basis.Source: §III · p. 4
- VarQBM optimizes Hamiltonian parameters so that visible-qubit sampling probabilities reflect the distribution underlying classical training data.The model uses the same loss function described for classical BMs.Source: §III · p. 4
- The target probability of each configuration is its occurrence probability in the training data set.The paper presents Gibbs-state preparation and QBM training as separate stages of the algorithm.Source: §III · p. 4
- The algorithm first approximates the Gibbs state with VarQITE, then computes the loss gradient by automatic differentiation and updates Hamiltonian parameters.Each training step consists of state preparation using current parameters followed by a parameter update.Source: §III · p. 4
A. Gibbs State Preparation with VarQITE
VarQITE approximates Gibbs states by evolving a variational trial state, which is then used in VarQBM. This preparation is approximate and depends on the trial state's representation capabilities.
A. Gibbs State Preparation with VarQITE
- The method is not limited to finite correlations and does not require choosing an ancillary system whose suitability is ambiguous.Other discussed Gibbs-state approaches may require error-corrected computers, finite correlations, or careful selection of ancillary registers.Source: A. Gibbs State Preparation with VarQITE · p. 4
- The preparation uses Bell-pair subsystems a and b, whose initial state yields a maximally mixed state on a when b is traced out.The effective Hamiltonian acts on the two subsystems.Source: A. Gibbs State Preparation with VarQITE · p. 5
- VarQITE prepares an approximation to the Gibbs state by propagating a trial state with respect to an effective Hamiltonian for τ = 1/2 (kBT).Tracing out subsystem b yields the state used to approximate the Gibbs state of interest.Source: A. Gibbs State Preparation with VarQITE · p. 5
- The state preparation is approximate and relies on the representation capabilities of the variational trial state.Perfect state preparation is not required for the machine-learning application described.Source: A. Gibbs State Preparation with VarQITE · p. 5
- McLachlan’s variational principle also supports training with gradients of the actual loss for generic Pauli terms, including when some qubits are hidden.Source: A. Gibbs State Preparation with VarQITE · p. 5
B. Variational QBM
VarQBM fits the Gibbs-state sampling distribution to the training distribution by minimizing a loss over Hamiltonian parameters. It uses VarQITE for state preparation and automatic differentiation to obtain loss gradients for parameter updates.
B. Variational QBM
- VarQBM trains Hamiltonian parameters θ by minimizing a loss so the Gibbs state's sampling distribution approximates pdata.The training data take at most 2n distinct values and follow a discrete probability distribution.Source: B. Variational QBM · p. 5
- Automatic differentiation computes the gradient of the actual loss function, which is used to update the Hamiltonian parameters.The gradient is evaluated through the chain rule using the quantum state and its derivatives.Source: B. Variational QBM · p. 5
- Automatic differentiation uses fewer evaluation circuits when the trial state has fewer parameters than the Hamiltonian; finite differences can use fewer when the Hamiltonian has fewer.Source: B. Variational QBM · pp. 5–6
- VarQITE propagates the trial-state parameters and their Hamiltonian-parameter derivatives through time steps to return ω(τ) and ∂ω(τ)/∂θ.The procedure evaluates and solves systems involving A and C at each step.Source: B. Variational QBM · p. 6
- After the gradient is computed, a classical optimizer such as Truncated Newton or Adam updates θ.The training outline places Gibbs-state preparation before gradient evaluation and parameter updating.Source: B. Variational QBM · p. 6
IV. RESULTS
The results section reports Gibbs-state preparation demonstrations and simulated generative and discriminative QBM training. The demonstrations include quantum hardware experiments, while both learning tasks are presented as numerical simulations.
IV. RESULTS
- VarQITE Gibbs-state preparation is demonstrated with numerical simulation and experiments on IBM Quantum hardware.Source: §IV · p. 6
- Numerical simulation illustrates generative QBM training to produce sampling behavior of a Bell state.Source: §IV · p. 6
- Numerical simulation also illustrates discriminative QBM training to classify fraudulent credit card transactions.Source: §IV · p. 6
A. Methods
The methods use variational trial states chosen to represent the target and avoid ill-conditioned evolution systems. The experiments also specify regularization, gate gradients, phase-mismatch handling, and temperature settings.
A. Methods
- The initial state must not be an eigenstate of the variational circuit, and the trial state must represent the target accurately enough.For a non-symmetric Hamiltonian, the trial state must be able to generate non-symmetric states.Source: A. Methods · p. 6
- Excessive circuit symmetry can make A singular or ill-conditioned; tested regularization methods performed similarly well.The tested methods include Tikhonov, Lasso, and diagonal perturbation.Source: A. Methods · p. 6
- The results use Tikhonov regularization, and Pauli-rotation trial-state gradients are computed with a π/2-shift method.Source: A. Methods · p. 6
- An added qubit and parameter address potential phase mismatch; experiments set the effective temperature to (kBT) = 1.The added parameter increases the dimensions of A and C by one.Source: A. Methods · p. 6
B. Gibbs State Preparation with VarQITE
VarQITE approximates Gibbs states for one- and two-qubit Hamiltonians on both an ideal simulator and real quantum hardware. A fully visible QBM also learns a Bell-state sampling distribution, with loss and distribution distance converging across random initializations.
B. Gibbs State Preparation with VarQITE
- VarQITE Gibbs-state preparation was tested on one- and two-qubit Hamiltonians using the parameterized circuits shown in Fig. 2.The circuits depict initial trial states for preparing ρGibbs 1 and ρGibbs 2.Source: B. Gibbs State Preparation with VarQITE · pp. 6–7, Figure 2 · p. 7
C. Generative Learning
- The fully visible QBM was trained to mimic the sampling statistics of a Bell state with non-local correlations.The model used a Hamiltonian specified for the generative-learning example.Source: C. Generative Learning · p. 7
- The generative-learning optimization used AMSGrad, 10-step state preparations, and 10 runs with different randomly drawn initial parameters.Each run allowed up to 200 iterations.Source: C. Generative Learning · p. 7
B. Gibbs State Preparation with VarQITE
- Hardware fidelity exceeded 0.99 and 0.96 for the two trained Gibbs states after 10 time steps.The comparison used an ideal simulator and the ibmq_johannesburg 20-qubit backend; hardware results used readout error-mitigation and state tomography.Source: Figure 3 · p. 7, B. Gibbs State Preparation with VarQITE · p. 7
C. Generative Learning
- Across random initializations, the loss and ℓ1 distance converged toward the same values, and the trained parameters converged to similar values.The trained distribution fit the target pdata = [0.5, 0., 0., 0.5] well.Source: C. Generative Learning · p. 7
D. Discriminative Learning
The section applies QBMs to transaction-fraud classification, encoding input data in Hamiltonian weights and predicting labels from Gibbs-state measurements. The QBM performs similarly to standard classifiers in accuracy, is competitive in precision, and leads in recall and F1 score.
D. Discriminative Learning
- Input data points serve as biases for Hamiltonian weights, with a function mapping the parameters and each input to scalar weights.The model encodes class labels in measurements of the visible qubits.Source: D. Discriminative Learning · pp. 7–8
- The fraud dataset contains 500 artificially created transactions, with about 15% fraudulent instances, and uses discretized transaction features.ZIP code, time, and amount are independently clustered into three bins; MCCs below 10000 are grouped into ten categories.Source: D. Discriminative Learning · p. 8, Table I · p. 8
- Because variational Gibbs-state simulation across unique data items was computationally expensive, parameters were trained using exact Gibbs-state representations.The trained parameters were then used for Gibbs-state preparation with VarQITE.Source: D. Discriminative Learning · p. 9
- For classification, VarQITE approximates Gibbs states for test instances, and the label with the highest sampling probability is selected.The test set contains 250 instances, with about 10% fraudulent transactions; accuracy, precision, recall, and F1 are evaluated.Source: D. Discriminative Learning · p. 9
- The QBM performs similarly to standard classifiers in accuracy, is competitive in precision, outperforms them in recall, and achieves the best F1 score.The comparison uses the standard classifiers described in the table.Source: D. Discriminative Learning · p. 9, Table II · p. 9
V. CONCLUSION AND OUTLOOK
The conclusion presents VarQBM as compatible with generic Hamiltonians and analytic gradients of the actual loss, including when qubits are hidden. It reports demonstrations of Gibbs-state preparation and learning applications, while identifying representation assessment and additional applications as future directions.
V. CONCLUSION AND OUTLOOK
- VarQBM uses McLachlan’s variational principle and supports generic Hamiltonians and actual-loss analytic gradients even with hidden qubits.With a sufficiently powerful trial state, it is compatible with local and long-range correlations and arbitrary system temperatures.Source: §V · p. 9
- The paper demonstrates reasonably close target-state approximations using simulation and real quantum hardware, and presents generative-learning and classification applications.The conclusion describes the framework as facilitating representation of complex structures with quantum circuits.Source: §V · pp. 9–10
- Future work includes developing performance measures for representation capabilities and exploring quantum-system data and combinatorial optimization applications.The conclusion notes that many possible applications remain unexplored.Source: §V · p. 10
Appendix A: Evaluation of A, C and their gradients
Appendix A describes circuit-based evaluation of A, C, and their parameter derivatives, including the phase choices used for each. Appendix B compares gradient-evaluation circuit costs and states when automatic differentiation is more efficient than finite differences.
Appendix A: Evaluation of A, C and their gradients
- A and C terms are evaluated by sampling an observable expectation value with the circuit in Fig. 8.The evaluated terms include the real part of an expression involving the input state ρin.Source: Appendix A · p. 10, Figure 8 · p. 10
- For A and C, the first-qubit phase is set to 0 and π/2, respectively, using H for A and H followed by S for C.These phase choices account for phases from gate derivatives of the Pauli-rotation trial states.Source: Appendix A · p. 10
- The same circuit method evaluates ∂A/∂θ and ∂C/∂θ, with the phase settings reversed relative to A and C.The first-qubit phase is π/2 for ∂A/∂θ and 0 for ∂C/∂θ.Source: Appendix A · p. 10
Appendix B: Complexity Analysis
- Forward finite differences require Θ(tpq(q + p)) circuits for 0 < ϵ ≪ 1.Here q is the number of trial-state parameters, p the number of Hamiltonian parameters, and t the number of VarQITE steps.Source: Appendix B · pp. 10–11
- Automatic differentiation is more efficient than finite differences when trial-state parameter count exceeds Hamiltonian parameter count.The comparison is in terms of the number of evaluation circuits.Source: Appendix B · pp. 10–11