Source-linked AI summary

Quantum generative adversarial networks

Pierre-Luc Dallaire-Demers, Nathan Killoran

arXiv:1804.08641v2quant-phcs.LG

TL;DR

The paper addresses how generative adversarial training can be extended to quantum machine learning, including the gradient calculations needed for training. It introduces QuGANs, quantum-circuit ansätze, and gradient evaluation, then demonstrates successful practical training numerically.

  • Problem

    Classical adversarial-training optima assume infinite model capacity, while quantum machine learning may address problems beyond efficient classical reach.

  • Method

    The paper formulates QuGANs with parametrized quantum generators and discriminators, computes gradients with quantum circuits, and combines them with classical optimization.

  • Results

    The authors show that QuGANs can be trained in practice using a simple universal qubit ansatz and a proof-of-principle numerical experiment.

  • Takeaways & Limitations

    QuGANs provide a quantum formulation of generative adversarial training with quantum evaluation of the cost-function gradients.

Abstract

from arXiv · show

Quantum machine learning is expected to be one of the first potential general-purpose applications of near-term quantum devices. A major recent breakthrough in classical machine learning is the notion of generative adversarial training, where the gradients of a discriminator model are used to train a separate generative model. In this work and a companion paper, we extend adversarial training to the quantum domain and show how to construct generative adversarial networks using quantum circuits. Furthermore, we also show how to compute gradients -- a key element in generative adversarial network training -- using another quantum circuit. We give an example of a simple practical circuit ansatz to parametrize quantum machine learning models and perform a simple numerical experiment to demonstrate that quantum generative adversarial networks can be trained successfully.

I. INTRODUCTION

GANs train a generator and discriminator adversarially, but idealized analyses assume infinite model capacity. The paper introduces QuGANs, quantum circuits for adversarial generation, gradient evaluation, and proof-of-principle training.

  • GANs jointly train a generator to produce plausible domain-specific samples and a discriminator to distinguish generated from real data.
  • The adversarial game has a Nash equilibrium where generated samples become indistinguishable from real samples.
  • Infinite-capacity assumptions underlie theoretical optimality results, while classical computers may not efficiently reach those optima for hard problems.
  • Near-term quantum devices may support difficult optimization and sampling, motivating quantum machine learning as a potential application.
  • The paper introduces QuGANs and develops quantum-circuit models, exact gradient evaluation, classical optimization, practical ansätze, and a numerical training demonstration.

1. Classical GANs

Classical GANs learn a generator distribution from noise while a discriminator distinguishes generated samples from real data. The paper frames QuGANs as a quantum generalization of conditional GANs, which generate label-conditioned samples.

  • A classical GAN generator transforms random noise z into samples x and thereby defines a generator distribution pG(x).
  • Conditional GANs model p(x|λ), reducing to vanilla GANs when labels provide no information about the data.
  • The discriminator distinguishes samples produced by the generator from samples originating from the real source.

2. Quantum GANs

QuGANs generalize conditional GANs by using parametrized quantum circuits to generate label-conditioned quantum states and discriminate real from generated sources. Controlled noise supports entropy and variation within each label.

  • QuGANs use a variational quantum circuit G(⃗θG) that takes a label |λ⟩ and noise state |z⟩ to produce quantum data resembling the real source.
  • The noise input |z⟩ supplies entropy and can be controlled to vary generated properties not captured by labels.
  • The discriminator D(⃗θD) receives the source output and label, then outputs |real⟩ or |fake⟩ in its output register.
  • Training seeks a generator that mimics the real source through the adversarial objective min_⃗θG max_⃗θD V(⃗θD,⃗θG).
  • The six-register circuit separates labels, source outputs, source baths, discriminator output, discriminator workspace, and discriminator labels.
  • The discriminator is assumed not to access the source bath register, while the source is modeled as a purified unitary operation.

3. The quantum cost function

The quantum cost function is implemented through a source-selection circuit and discriminator expectation value. Gradient descent updates either discriminator or generator parameters while separating their respective dependencies.

  • The quantum computer is initialized in registers containing discriminator workspace, labels, source output, and generator noise.
  • A fair source-selection coin prevents the discriminator from identifying real versus generated data solely from source-choice statistics.
  • The selected real or generated source is applied before the discriminator circuit, producing the state used to evaluate the quantum cost function.
  • Gradient descent updates discriminator or generator parameters with learning rates that may vary by training step.

4. Limit cases of the training

The limit case is reached when the generator reproduces the data statistics, making the discriminator unable to improve and causing all gradients to vanish. The section also connects this endpoint to purity-based performance bounds and direct quantum gradient evaluation.

  • When G perfectly reproduces the statistics of R, D cannot distinguish generated states from real data.
  • The discriminator’s performance is bounded by the purity function C(⃗θG).
  • C(⃗θG) is bounded by the nature of R, with the upper bound corresponding to the purity of ρR.
  • Quantum circuits can evaluate the gradients directly, avoiding the many sampled evaluations required by numerical finite differences.

B. Quantum gradients

Quantum circuits can evaluate gradients of parametrized quantum models through ancillary-qubit expectation values, with analogous constructions for Hessians. These gradient circuits provide the quantities needed for quantum optimization and machine-learning training.

  • Circuit notation: A parametrized quantum circuit is represented as an ordered product of elementary gates U(⃗θ) = UN:1.The ordered notation decomposes the unitary into gates indexed by their positions in the circuit.
  • Gate derivatives: Each parametrized gate is generated by a Hermitian Hamiltonian hj.This gate structure enables derivatives with respect to individual circuit parameters.
  • Gradient extraction: The gradient of an expectation value is obtained by differentiating the parametrized circuit with respect to its gate parameters.The derivation uses the chain rule and commutator-based expressions for the circuit derivative.
  • Gradient extraction: Quantum gradients are measured from the ⟨Z⟩Grad expectation value of an ancillary qubit.The construction requires controlled gates for the Hamiltonians hj and measurement operator P.
  • Higher-order derivatives: Quantum Hessians can be measured by applying the gradient construction recursively.Figure 5 presents the corresponding Hessian circuit structure.

C. Using quantum gradients to train QuGANs

The discriminator and generator are decomposed into parametrized gates, and quantum circuits measure their training gradients. The measured values are converted into signed expectation values suitable for parameter updates.

  • Circuit decomposition: The discriminator D and generator G are decomposed into ND and NG parametrized gates, respectively.The observable P used for gradient evaluation corresponds to the Z operator in the cost function.
  • Discriminator gradients: Each discriminator gradient component is evaluated as 1/(4Λ) ⟨Z⟩Grad for each label and source.The Figure 6(a) circuit uses an appropriate X gate to account for the cost-function sign.
  • Training updates: Quantum circuits therefore provide the gradient signals required to update discriminator and generator parameters during QuGAN training.The construction also permits more advanced updates using quantum Hessians.
  • Generator gradients: The generator circuit evaluates −∂V/∂θGj as 1/(4Λ) ⟨Z⟩Grad for each label.The sign is chosen so generator updates improve its ability to fool the discriminator.

1. Improved training heuristics

The paper connects QuGAN training with several classical GAN heuristics and identifies possible quantum implementations. It also notes an assumption about how gradient expectations are estimated.

  • Improved training heuristics: Semi-supervised learning could be implemented by increasing the number of labels to Λ + 1 and supplying labeled generated examples.This is presented as a straightforward extension in the quantum context.
  • Improved training heuristics: Feature matching could be implemented by truncating the decomposition of D(⃗θD) when evaluating generator gradients.The proposed truncation applies to the circuit of Figure 6(b).
  • Improved training heuristics: The analysis assumes that each gradient expectation value is evaluated through ensemble averaging.Bayesian parameter updates after single-shot measurements are identified as a possible alternative.
  • Improved training heuristics: GAN training is equivalent to finding the Nash equilibrium of a two-player game and is classified as a PPAD problem.The passage states that PPAD is not expected to be contained in BQP.

D. A practical ansatz

A practical ansatz parametrizes the discriminator and generator with layers of elementary gates. Its conditional operations are implementable with standard two-qubit gates, and it becomes universal with infinitely many layers.

  • D. A practical ansatz: The proposed ansatz parametrizes D(⃗θD) and G(⃗θG) using layered elementary gates.Other ansatz choices may be used depending on the application context.
  • D. A practical ansatz: The ansatz is universal for quantum computing in the limit of an infinite number of layers τ.Universality is stated as an asymptotic property of the layer count.
  • D. A practical ansatz: Conditional hj operations can be implemented with CNOTs, CPHASEs, and nearest-neighbor CZZs.This follows because the gates’ generators are simple Pauli operators.

E. Numerics

A proof-of-principle numerical experiment trained a QuGAN on two labeled states using variational quantum circuits for the generator and discriminator. The cross-entropy converged to zero, while the discriminator approached its equilibrium behavior.

  • Experimental setup: Two ansatz layers, corresponding to 10 variational parameters, enabled the generator to implement the required label-conditioned CNOT operation.The target behavior was generation of the appropriate state conditioned on the label register.
  • Experimental setup: The discriminator operated on 3 qubits with 4 ansatz layers and 32 parameters, while the complete algorithm used 5 qubits including the gradient register.A discriminator bath register did not improve convergence in the numerical experiments.
  • Training procedure: The proof-of-principle training ran for 10,000 gradient steps without advanced GAN heuristics, updating the generator once for every 100 discriminator steps.The discriminator used a large learning rate initially, which decreased exponentially during the first 4,000 steps.
  • Training outcome: After a few tens of generator updates, the cross-entropy between real and generated data quickly converged to zero.This corresponds to a few thousand discriminator training cycles and indicates that the generator produced improving samples.

III. CONCLUSION

The paper introduces QuGANs, formulates adversarial learning with quantum circuits, and demonstrates practical training numerically. It also presents a universal qubit ansatz and discusses broader representation-power possibilities.

  • III. CONCLUSION: The proposed qubit ansatz is universal in the limit of infinitely many layers because it generates arbitrary single-qubit and entangling two-qubit gates.Its layers combine single-qubit rotations with nearest-neighbor ZZ rotations.
  • III. CONCLUSION: QuGANs reformulate generative adversarial networks in quantum formalism, using quantum circuits for both the generator and discriminator.The construction targets generative models trained on quantum computers.
  • III. CONCLUSION: The paper shows that the cost function can be optimized by directly evaluating circuit gradients with a quantum processor.The gradient procedure is presented as a quantum method for training the circuit parameters.
  • III. CONCLUSION: A numerical experiment showed that QuGANs can be trained in practice.The experiment is presented as a simple demonstration rather than a broad empirical evaluation.
  • III. CONCLUSION: The paper explores practical QuGAN issues, while a companion paper provides a more general theoretical analysis of quantum adversarial learning.The practical issues include explicit generator and discriminator circuits and quantum gradient methods.
Loading 1804.08641v2…