Classical training of conditional instantaneous quantum polynomial-time Born machines
Authors: Oriol Balló-Gimbernat, Emiliano Tolotti, Laia Domingo, Fernando Vilariño, Adan Garriga
Organizations: Eurecat, Centre Tecnològic de Catalunya, Barcelona, Spain · Centre de Visió per Computador (CVC), Barcelona, Spain · Universitat Autònoma de Barcelona (UAB), Barcelona, Spain · Department of Information Engineering and Computer Science, University of Trento, Via Sommarive 9, 38123 Trento, Italy
Instantaneous quantum polynomial-time (IQP) Born machines are attractive quantum generative models, as certain IQP circuit families are conjectured to be hard to sample, yet they can be trained classically. Previously proposed conditional IQP Born machines make the parameters of the diagonal layer condition dependent. We introduce conditional IQP Born machines, in which the condition is encoded in the input state and a single IQP unitary is shared across conditions. Efficient sampling and amplitude-ratio evaluation for the reference state entering the diagonal layer suffice to obtain unbiased classical estimates of a conditional maximum mean discrepancy objective and its gradients. We show that input conditioning can represent conditional families that no diagonally conditioned IQP model with the same number of qubits can reproduce. For the sixteen-qubit Curie-Weiss spin model, a single conditional model captures the magnetization transition at held-out temperatures. Its mean total variation distance is six times lower than that of diagonal conditioning under the same protocol and comparable to that of classical generative models with up to seven times as many parameters. We also train conditional models classically with up to 2048 qubits, which reproduce the mean squared magnetization of the target away from the crossover. These results extend classically trained IQP Born machines to conditional generation.
Figures & tables
Figure 1: Proposed framework for classical training and quantum inference of conditional instantaneous quantum polynomial-time (IQP) Born machines. An encoder V(ci) maps each condition ci to an input state ∣ϕ(ci)⟩ . (a) Classical training. Reference samples and amplitude ratios from H⊗n∣ϕ(ci)⟩ are combined with phase differences and derivatives from the diagonal layer D(θ) to estimate conditional Pauli- Z expectation values and their gradients. These estimates update the parameters θ by minimizing the squared maximum mean discrepancy ( MMD2 ) averaged over the training conditions. (b) Quantum deployment. After training, the parameters θ⋆ define the quantum circuit. Applying the trained IQP unitary, shared across all conditions, to ∣ϕ(ci)⟩ and measuring in the computational basis yields samples from the learned conditional distribution qθ⋆(⋅∣ci) .
Figure 2: Target families. (a) Hamming-weight profiles ρu,v(k) of the two-dimensional family: the reference (u,v)=(0,0) , a shift of the mean, a change of the width, and both combined. (b) Magnetization profiles of the sixteen-spin Curie–Weiss model across the crossover.
Figure 3: Encoder circuits, drawn for four qubits with the angles of the sixteen-qubit models, where RZ(φ)=e−iφZ/2 and connected dots denote RZZ(φ)=e−iφZ⊗Z/2 with the angle shown above each group. (a) Hamming-weight encoder of Eq. ( 25 ). (b) Twisted parity encoder of Eq. ( 27 ); without the dashed block, which contains the twist and the rotation, it reduces to the parity encoder of Eq. ( 26 ) with angle tβ .
Figure 4: Joint conditional generation of the Hamming-weight family, (a) with input conditioning and (b) with diagonal conditioning of the same lattice circuit acting on ∣0⟩⊗16 . Colors show the mean full-distribution TVD across ten seeds on a 41×41 grid of conditions, on a shared logarithmic scale. Diamonds mark the nine training conditions, which lie on the two axes, and the dashed line marks their convex hull. At the origin, the target and the input-conditioned model are uniform by construction.
Model
Input and conditioning
Parameters
Difference from C-IQP (TP)
C-IQP (TP)
twisted parity, Eq. ( 28 )
136
(proposed model)
C-IQP (P)
parity, t=λβ
136
no twist, and a linear angle t=λβ instead of the schedule of Eq. ( 28 )
C-IQP (TP), κ=0
parity, Eq. ( 28 )
136
twist removed (ablation, Appendix B.3.6 )
D-IQP
parity at t=π/2 , cubic phases
544
fixed input, with the condition in the diagonal-layer phases
Per- β IQP (TP)
twisted parity at each β
3×136
same encoder, with one circuit trained at each evaluation β
Per- β IQP
∣0⟩⊗16
3×136
one circuit per evaluation β , on the standard input without the spin-flip symmetry
Table 1: Sixteen-qubit Curie–Weiss models. All circuits use the same 136 one- and two-body generators. The shared models use one circuit for all β , and the per- β models one circuit per evaluation β . Parameters count all phases or weights updated by the optimizer.
Figure 5: Magnetization profiles of the sixteen-qubit Curie–Weiss models at the evaluation β , for the conditional models with the twisted parity encoder, C-IQP (TP), and with the parity encoder, C-IQP (P), and for diagonal conditioning, D-IQP. Magnetization per spin is m=(2k−16)/16 , where k is Hamming weight. Colored curves show exact probability masses averaged across ten independent fits, and shading shows one standard deviation above and below the mean. Dashed black curves show the targets. The D-IQP band is drawn lighter for readability. It is wide because most D-IQP fits alternate between high and low probability on neighboring Hamming weights, each with a different pattern, which the mean smooths out. The displayed values of β are excluded from training and model selection. Panels use separate vertical scales.
Figure 6: Sixteen-qubit Curie–Weiss models across temperature: (a) exact full-distribution TVD and (b) per-spin energy fluctuations cfluc on the 101 -point evaluation grid. Curves show the models of Fig. 5 , C-IQP (TP) (solid), C-IQP (P) (dashed), and D-IQP (dotted), with the target dashed black in (b); curves and bands show means and one standard deviation over ten fits. Markers show the per- β IQP (TP) (circles) and per- β IQP (squares) circuits, trained at the evaluation β . The inset in (b) zooms into the range of the target fluctuations.
Figure 7: Exact full-distribution TVD of C-IQP (TP) and C-IQP (P), each with 136 learned parameters, and of classical conditional models on the 101 -point Curie–Weiss evaluation grid: (a) small models with 134 to 140 and (b) large models with 950 to 986 learned parameters. Curves and bands show means and one standard deviation over ten fits.
Figure 8: Classical training of conditional IQP Born machines with 64 to 2048 qubits. All models use the parity encoder with the saturating angle of Eq. ( 39 ) and an open rectangular lattice of trainable one- and two-body phases. (a) Classically estimated test MMD 2 during training, averaged over the test temperatures β∈{0.4,0.95,1.0,1.05,1.6} and two kernel bandwidths whose average bodyness, two and four, is kept fixed as the size varies; logarithmic vertical axis. (b) Error in the classically estimated mean squared magnetization, the model estimate at the selected checkpoint of each fit minus the exact target, at 41 equally spaced temperatures in [0,2] . Gray vertical lines mark the training temperatures. Lines and bands show the mean and one standard deviation across three fits per size.
Appendix figures & tables8 assets
Supplementary material from the paper’s appendix.
Appendix
Hamming-weight family
Curie–Weiss, n=16
Large-scale training
Updates (checkpoint interval)
2000 ( 100 )
2000 ( 100 )
5000 ( 250 )
Training conditions
nine, on the two axes
β∈{0.1,0.7,1.3,1.95}
β∈{0.6,0.8,1.2,1.4}
Target pool; minibatch
1024 ; 256
1024 ; 256
10000 ; 450
Masks; reference samples
1024 ; 1024
2048 ; 1024
searched
Average bodyness ℓˉ
2 , ℓˉ2 , ℓˉ3
2 , ℓˉ2 , ℓˉ3
2 , 4
Search
60 random +60 TPE trials
60 random +60 TPE trials
60 random trials per schedule
Appendix
Table 2: Training settings and hyperparameter search spaces. Searched hyperparameters list their range; “log” marks a log-uniform prior. Cosine schedules decay to 0.1 times the initial learning rate unless the final ratio is searched.
Model
Learning rate
Schedule
Init. width
β1
1−β2
ℓˉ2 , ℓˉ3
Other
Hamming-weight, input conditioning
0.0012
cosine
0.011
0.83
0.0011
5 , 7
θˉ=1.2
Hamming-weight, diagonal conditioning
0.00070
cosine
0.019
0.89
0.014
4.5 , 7.99
θˉ=0.83
C-IQP (TP)
0.0055
cosine
0.076
0.94
0.0013
5 , 7
η=0.47
C-IQP (P)
0.0034
cosine
0.022
0.80
0.0080
4 , 7.5
λ=0.68
D-IQP
0.0091
constant
0.10
0.85
0.0027
4 , 5
—
Per- β IQP (TP)
0.0051
constant
0.073
0.82
0.028
5 , 7
η=0.45
Appendix
Table 3: Selected hyperparameters, rounded to two significant figures; the protocol files in the repository give the exact values. The large-scale configuration is used at every size and for the hardware models. For the classical models, the initialization width is the multiplier of the Xavier initialization.
Table 4: Two-coordinate errors after axis training, evaluated on the sixteen mixed conditions. Input conditioning is the conditional IQP Born machine; diagonal conditioning makes the phases of the same lattice circuit, acting on ∣0⟩⊗16 , an affine function of the condition, and its variants use a quadratic condition map, an all-to-all diagonal layer, or both. Values are means and standard deviations of the per-seed mean full-distribution TVD across ten seeds; the deterministic encoder-only row has no spread. Lower is better.
Model
em
ec
C-IQP (TP)
0.007
0.010
C-IQP (P)
0.028
0.058
D-IQP
0.056
0.32
Per- β IQP (TP)
0.005
0.018
Large Transformer
0.006
0.014
Appendix
Table 5: Observable errors of the sixteen-qubit Curie–Weiss models, averaged over β∈{0.4,1,2} and over ten fits: em is the absolute error in ⟨∣m∣⟩ and ec the absolute error in cfluc divided by the maximum target value, Eq. ( 37 ).
Model
Parameters
ETVD
Mean TVD
Ephys
C-IQP (TP)
136
0.060±0.004
0.046±0.004
0.0237±0.0011
C-IQP (P)
136
0.128±0.003
0.103±0.004
0.086±0.009
Small RBM
140
0.16±0.06
0.13±0.05
0.10±0.07
Small Transformer
137
0.10±0.02
0.068±0.015
0.050±0.016
Small VAE
134 (92)
0.20±0.02
0.138±0.012
0.169±0.018
Large RBM
986
0.076±0.009
0.061±0.007
0.030±0.011
Appendix
Table 6: Comparison of C-IQP models with classical conditional models on the 101 -point Curie–Weiss evaluation grid. All models share the training temperatures, target samples, update budget, hyperparameter search, and selection rule. C-IQP models train on the sampled MMD objective, whereas the classical models train on their native likelihood or evidence lower bound. Parameters count all learned parameters used in training; for the VAEs, parentheses give the generator parameters alone. Mean TVD is the temperature-averaged full-distribution TVD, and Appendix B.3.3 defines the scores ETVD and Ephys . Values are means ± standard deviations over ten independent fits. Lower is better, and bold marks the lowest mean in each column.
Quantity
8×8 lattice
All-to-all
Trainable parameters
176
2080
Test MMD 2
0.00143
0.00097
Δ⟨m2⟩ at β=0.8
+0.056
−0.027
Δ⟨m2⟩ at β=1.0
+0.097
−0.013
Δ⟨m2⟩ at β=1.2
+0.045
+0.004
Mean ∣Δ⟨m2⟩∣ , 0.8≤β≤1.3
0.065
0.012
Appendix
Table 7: Lattice and all-to-all models at 64 qubits, each with its own selected configuration. Test MMD 2 is the held-out value at the selected checkpoint, and Δ⟨m2⟩ is the classically estimated model value minus the exact target. Values are means over three fits. Lower absolute values are better.
Figure 9: Magnetization profiles sampled from classically trained conditional IQP Born machines on IQM Emerald, without error mitigation. Bars show the distribution of m=(2∣x∣−n)/n over 3000 shots at each inverse temperature, dashed lines the exact target, and solid lines the exact profile of the noiseless model. Each panel reports the total variation distance between the hardware and target profiles.
n
β
Hardware ⟨m2⟩
Model ⟨m2⟩
Target
Profile TVD
16
0.6
0.105±0.002
0.116±0.001
0.131
0.139
16
1
0.217±0.004
0.306±0.003
0.278
0.139
16
1.4
0.406±0.005
0.615±0.001
0.574
0.269
16
2
0.533±0.005
0.834±0.002
0.888
0.551
30
0.6
0.058±0.001
0.0712±0.0003
0.075
0.139
30
1
0.135±0.002
0.247±0.001
0.205
0.195
Appendix
Table 8: Mean squared magnetization on IQM Emerald. Hardware values are sample means over 3000 shots, with one standard error from shot noise. Model values are classical estimates for the noiseless model (Sec. V.4 ), with one standard error over the five estimation banks of correlator pairs. The last column gives the TVD between the hardware and target magnetization profiles.
Instantaneous Quantum Polynomial Circuit Born Machines (IQP-QCBMs) have been proposed as quantum generative models that combine a classically tractable training objective - based on the maximum mean discrepancy (MMD) - with a potential quantum advantage motivated by sampling-complexity arguments. While recent works have explored this model across various application domains, fundamental questions remain: does the model suffer from exponentially vanishing loss gradients, known as the barren plateau problem - a pervasive obstacle in quantum machine learning - and how do regimes of trainability relate to regimes of possible quantum advantage? Here, we address both questions analytically. To study trainability, we derive closed-form expressions for the variances of the partial derivatives of the MMD loss function and establish general upper and lower bounds. We explicitly characterize how trainability depends on the generator set and the spectrum of the chosen kernel, identifying regimes in which low Hamming-weight kernels avoid exponential gradient suppression under structured topologies. Regarding potential quantum advantage, we reformulate the anti-concentration property in terms of the same generator-set quantities that govern trainability, enabling a unified analysis. We show that sparse IQP architectures can produce classically intractable output distributions while simultaneously remaining trainable, at least at lower-weight frequencies. Our analytical results corroborate the numerical observations of prior work and provide principled guidelines for designing scalable IQP-QCBM architectures.
Kevin Shen, Susanne Pielawa, Vedran Dunjko +1
⟨aQaL⟩Applied Quantum Algorithms, Leiden University, The Netherlands · LIACS, Leiden University, Niels Bohrweg 1, 2333 CA, Leiden, The Netherlands · BMW Group, 80788 München, Germany
Quantum circuit Born machines based on instantaneous quantum polynomial-time (IQP) circuits are natural candidates for quantum generative modeling, both because of their probabilistic structure and because IQP sampling is provably classically hard in certain regimes. Recent proposals focus on training IQP-QCBMs using Maximum Mean Discrepancy (MMD) losses built from low-body Pauli-Z correlators, but the effect of initialization on the resulting optimization landscape remains poorly understood. In this work, we address this by first proving that the MMD loss landscape suffers from barren plateaus for random full-angle-range initializations of IQP circuits. We then establish lower bounds on the loss variance for identity and an unbiased data-agnostic initialization. We then additionally consider a data-dependent initialization that is better aligned with the target distribution and, under suitable assumptions, yields provable gradients and generally converges quicker to a good minimum (as indicated by our training of circuits with 150 qubits on genomic data). Finally, as a by-product, the developed variance lower bound framework is applicable to a general class of non-linear losses, offering a broader toolset for analyzing warm-starts in quantum machine learning.
Sacha Lerch, Joseph Bowles, Ricard Puig +3
Institute of Physics, Ecole Polytechnique Fédérale de Lausanne (EPFL), CH-1015 Lausanne, Switzerland · Centre for Quantum Science and Engineering, École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland · Xanadu, Toronto, ON, M5G 2C8, Canada +3
Quantum Circuit Born Machines (QCBMs) offer a natural approach to generative machine learning by leveraging the Born rule. Recent work has provided a method to classically train QCBMs with Instantaneous Quantum Polynomial (IQP) circuits via the Maximum Mean Discrepancy (MMD) loss. Despite the assumed intractability of sampling from IQP circuits classically, their expectation values can be computed classically, enabling training of these IQP QCBMs. However, quantum machine learning (QML) models have various other challenges, including trainability issues caused by exponential concentration or barren plateaus. While these issues have been explored for parameters sampled from a uniform distribution, little work has been done to rigorously treat the use of arbitrary Gaussian initialization schemes. This work leverages Stein's lemma and Lipschitz concentration bounds for Gaussian random variables to provide an analytical lower bound of the variance of the gradient and a probabilistic concentration bound of the deviation of the gradient from its mean. It discusses strategies to either avoid or encourage exponential concentration, as well as the conditions under which barren plateaus are more likely to occur.
Gennaro De Luca, Vinayak Sharma, Aviral Shrivastava