Source-linked AI summary

Experimental Quantum Generative Adversarial Networks for Image Generation

He-Liang Huang, Yuxuan Du, Ming Gong, Youwei Zhao, Yulin Wu, Chaoyue Wang, Shaowei Li, Futian Liang, Jin Lin, Yu Xu, Rui Yang, Tongliang Liu, Min-Hsiu Hsieh, Hui Deng, Hao Rong, Cheng-Zhi Peng, Chao-Yang Lu, Yu-Ao Chen, Dacheng Tao, Xiaobo Zhu, Jian-Wei Pan

arXiv:2010.06201v3quant-phcs.CVcs.LG

TL;DR

The paper addresses whether quantum GANs on near-term devices can perform real-world generative learning. It develops a resource-efficient quantum GAN scheme using ancillary systems, patching, and quantum batch processing, and demonstrates image-generation experiments with supporting simulations and benchmarks.

  • Problem

    Whether quantum GANs implemented on near-term quantum devices can perform real-world generative learning remains unresolved.

  • Method

    The paper develops a resource-efficient quantum GAN using ancillary systems for nonlinear generation, patching for large feature dimensions, and quantum superposition for batch processing.

  • Results

    The scheme experimentally generates hand-written digit images on a superconducting processor, while simulations show K = 3000 measurements are sufficient for the studied optimization setting.

  • Takeaways & Limitations

    Quantum patch GAN can converge to Nash equilibrium in the optimal case, and quantum batch GAN has the potential to process many inputs efficiently with few measurements.

Abstract

from arXiv · show

Quantum machine learning is expected to be one of the first practical applications of near-term quantum devices. Pioneer theoretical works suggest that quantum generative adversarial networks (GANs) may exhibit a potential exponential advantage over classical GANs, thus attracting widespread attention. However, it remains elusive whether quantum GANs implemented on near-term quantum devices can actually solve real-world learning tasks. Here, we devise a flexible quantum GAN scheme to narrow this knowledge gap, which could accomplish image generation with arbitrarily high-dimensional features, and could also take advantage of quantum superposition to train multiple examples in parallel. For the first time, we experimentally achieve the learning and generation of real-world hand-written digit images on a superconducting quantum processor. Moreover, we utilize a gray-scale bar dataset to exhibit the competitive performance between quantum GANs and the classical GANs based on multilayer perceptron and convolutional neural network architectures, respectively, benchmarked by the Fréchet Distance score. Our work provides guidance for developing advanced quantum generative models on near-term quantum devices and opens up an avenue for exploring quantum advantages in various GAN-related learning tasks.

Supplemental Material for “Experimental Quantum Generative Adversarial Networks for Image Generation”

The supplement introduces background concepts and notation used throughout the paper, including quantum states, mixed states, function composition, sampling, and floor and ceiling functions.

  • The supplement provides essential background for both physics and computer science audiences.It introduces notation, fully-connected neural networks, classical GANs, box-plots, and parameterized quantum circuits.
  • A. Notations: Vectors, unit basis vectors, Dirac notation, pure states, and mixed states establish the paper’s quantum notation.A pure state is represented by a unit vector, while a mixed state is denoted by a density operator with unit trace.
  • A. Notations: The notation also defines function composition, distributional sampling, set difference, and floor and ceiling operations.These conventions are used to express transformations, random variables, set relations, and integer bounds.

B. Fully-connected neural network

This section describes fully-connected neural networks as layered models whose trainable weights are optimized by gradient-based methods, and distinguishes stochastic, batch, and mini-batch updates.

  • Network architecture: An FCNN contains an input layer, at least one hidden layer, and an output layer connected through successive layers.Each layer is represented by a vector, with neurons corresponding to vector entries.
  • Network architecture: Each FCNN layer applies a parameterized mapping, and its weights are optimized to minimize a loss comparing output with the expected result.The layer parameters are collected in trainable matrices and optimized through a predefined loss function.
  • Optimization: Gradient descent methods differ by how many training examples contribute to each parameter update.The section distinguishes stochastic, batch, and mini-batch gradient descent.
  • Optimization: Batch gradient descent uses the whole dataset, whereas stochastic gradient descent uses one randomly sampled example per update.Mini-batch gradient descent uses a smaller randomly sampled subset of the dataset.
  • Optimization: Adam updates parameters using exponentially averaged first and second moments, with default β1 = 0.9, β2 = 0.999, and ϵ = 10^-8.Adam is presented as an improved optimization method addressing limitations of vanilla mini-batch gradient descent.

C. Generative adversarial network

GANs learn a data distribution through a two-player game: the generator produces samples to fool the discriminator, while the discriminator separates real from generated data.

  • GAN mechanism: A generative model estimates the distribution underlying a limited training dataset, and GANs implement this goal with a generator and discriminator.The generator creates data resembling the training distribution, while the discriminator distinguishes generated samples from real samples.
  • GAN mechanism: GAN training jointly optimizes discriminator parameters for classification accuracy and generator parameters for confusing the discriminator.The two models are updated iteratively using gradient-based optimization while holding the other model’s parameters fixed during each update.
  • GAN objective: The original GAN objective combines expected log discrimination scores on real data with expected log rejection scores on generated data.The objective depends on the data distribution Pdata(x) and latent-variable distribution P(z).
  • Training challenges: GAN training can be difficult because optimized parameters may converge to saddle points.Improved GANs address this through stronger network architectures, loss functions, and optimization techniques such as normalization.
  • Box-plot background: A box-plot summarizes a dataset using the median, hinges, extremes, and interquartile range.The upper and lower extremes are defined as Q3 + 1.5IQR and Q1 − 1.5IQR, respectively.

E. Parameterized quantum circuit

Parameterized quantum circuits implement trainable unitary transformations with single-qubit rotation gates and fixed two-qubit entangling gates, arranged in repeated layers.

  • PQC basics: A PQC is a quantum-circuit model designed for efficient implementation on near-term quantum devices.Its trainable parameters are updated by a classical optimizer to reduce a loss comparing circuit outputs with target results.
  • MPQC structure: An MPQC composes L repeated layers, each combining a trainable unitary with an entanglement layer.The circuit depth scales as L ∼ O(poly(N)).
  • Box-plot background: A box-plot displays distribution summaries through the median, hinges, extremes, and outliers.The whisker distance from each hinge to its corresponding extreme equals 1.5IQR.
  • MPQC gates: Trainable layers apply single-qubit unitaries, including RX, RY, and RZ rotations, while entanglement layers use fixed two-qubit gates such as CNOT and CZ.The trainable rotation angles are controlled by the parameter array θ.

II. SM (B): AN OVERVIEW OF OUR QUANTUM GAN

The quantum GAN overview presents patch and batch architectures built from parameterized quantum circuits, with quantum oracles, generators, discriminators, and POVM-based outputs. Patch GAN combines measured sub-generator distributions into images, while batch GAN processes superposed inputs.

  • Quantum patch GAN: Quantum patch GAN uses a classical fully connected discriminator and iteratively optimizes generator and discriminator parameters with a GAN loss.The generator minimizes and discriminator maximizes the loss through alternating parameter updates.
  • Quantum patch GAN: Quantum patch GAN uses T PQC sub-generators, each assigned to a specific portion of the feature vector.The same construction rule is applied to every sub-generator, which receives a latent state and produces a generated quantum state.
  • Quantum patch GAN: The patch generator prepares latent states, applies trainable unitaries and entanglement layers, then measures each sub-generator state to obtain classical features.The generated image combines T measured distributions into a vector in R^M.
  • Quantum batch GAN: Quantum batch GAN uses a pre-trained oracle, a quantum generator, and a quantum discriminator acting on a superposition-encoded input state.The feature register is divided into qubits for feature generation and nonlinear operations, and POVM measurements produce discriminator outputs.

III. SM (C): THE IMPLEMENTATION OF QUANTUM PATCH GAN

Quantum patch GAN consists of a quantum generator, a classical discriminator, and a classical optimization rule.

  • Quantum patch GAN combines a quantum generator with a classical discriminator and classical optimizer.The section identifies these as its three core components.

A. Quantum generator

The quantum generator maps latent quantum states to image features through parameterized circuits, ancillary-system nonlinear transformations, and measurement. Its patch construction retains the classical GAN convergence conditions and guarantee.

  • Quantum generator: Each quantum sub-generator receives a latent state and outputs a generated result representing one portion of a high-dimensional feature vector.The same latent state is used across sub-generators during training.
  • Quantum generator: Ancillary qubits and partial measurement introduce the nonlinear map required because trainable quantum unitaries otherwise transform input states linearly.The post-measurement state is obtained by tracing out the ancillary subsystem.
  • Quantum generator: Measurement probabilities in computational bases become pixel values for each sub-generator and are concatenated into the generator output.For a sub-generator, the measured probability vector contains the generated pixel entries.
  • Quantum generator: The discriminator is a fully connected classical neural network that classifies real and generated data with outputs between 0 and 1.Its parameters are optimized alongside the quantum generator using the modified GAN loss.
  • Convergence guarantee: The quantum patch GAN has the classical GAN convergence property: with sufficient capacity and optimal discriminator updates, Pg converges to Pdata.The global minimum is achieved if and only if Pg = Pdata.

V. SM (E): THE IMPLEMENTATION OF QUANTUM BATCH GAN

Quantum batch GAN encodes multiple examples in index and feature registers, applies quantum generator and discriminator circuits, and extracts classification results with POVM measurements. The scheme supports parallel gradient processing but faces data-encoding hardware constraints.

  • Architecture: Quantum batch GAN divides the quantum system into index and feature registers, with feature qubits allocated to fake-data generation and nonlinear operations.The generator and discriminator both participate in the minimax game.
  • Input encoding: Quantum oracles encode latent vectors and classical examples into superposition states for mini-batch processing.For a dataset of 2^NI inputs with M features, amplitude encoding uses O(2^NIM/(NIlog(M))) runtime and NIlog(M) qubits.
  • Hardware boundary: Accurately constructing the latent-data encoding oracles requires numerous multi-controlled gates that are inhospitable to near-term quantum devices.The proposed mitigation is to use pre-trained approximate oracles.
  • Quantum processing: The quantum generator and discriminator act sequentially on encoded states, and POVM measurements produce per-example and averaged classification accuracies.The same measurement construction is applied to real and generated examples.
  • Parallel training: 2^NI inputs can provide batch gradient descent information in one training process through index-register superposition.The authors identify this as a potential route to efficient big-data processing.
  • Measurement cost: One qubit theoretically suffices to distinguish real from fake images, so the required measurements need not increase with system size.The authors give a statistical error of about 0.01 for 10,000 measurements on a qubit.

VI. SM (F): EXPERIMENT DETAILS

This section presents the experiment details in three stages: processor settings, handwritten-digit generation, and gray-scale bar generation.

  • The experiments first specify the superconducting processor’s parameter settings.
  • They then describe the handwritten-digit image-generation experiment.
  • Finally, they detail the gray-scale bar image-generation experiment.

A. Superconducting quantum processor

The experiments use six adjacent qubits from a 12-qubit superconducting processor, with dedicated control and readout hardware for each qubit.

  • Six qubits are selected from a 12-qubit processor arranged in a one-dimensional chain.The selected qubits are adjacent and coupled to nearest neighbors.
  • Each qubit has microwave-drive, fast flux-bias, and readout-resonator hardware.XY lines implement single-qubit rotations, while Z lines implement controlled-Z operations.
  • The processor provides approximately 0.9994 average single-qubit gate fidelity.
  • The setup uses individual XY and Z lines to enable full control of qubit operations.

1. Some discussion about the setting about the number of measurements

The study uses a five-qubit quantum generator to approximate a discrete Gaussian and evaluates whether finite measurements provide sufficient optimization information.

  • The discrete Gaussian is defined over x ∈ [0, 31] and can be represented by a five-qubit quantum state.
  • The quantum generator is trained to approximate the target discrete Gaussian distribution.Its generated state induces a measurement probability distribution qθ.
  • Training updates the generator parameters by minimizing maximum mean discrepancy between generated and target distributions.
  • K = 3000 measurements are identified as sufficient for the quantum patch GAN’s optimization information.The simulation reports that the approximated Gaussian can well match the target distribution and that training loss decreases with iterations.
  • The simulation uses T = 800 iterations, lr = 0.01, and circuit depth L = 5.

1. The gray-scale bar image dataset

The gray-scale bar dataset is designed to support efficient quantum-state preparation and continuous-distribution evaluation for quantum GANs.

  • The dataset is constructed to evaluate quantum patch GAN and quantum batch GAN performance.
  • Efficient input-state preparation requires shallow or constant circuit depth.This requirement addresses practical limitations from noise growth with circuit depth.
  • The dataset is sampled from a continuous distribution, D ∼ Pdata(x).
  • Valid images satisfy xi0 ∼ unif(0.4, 0.6), xi1 = 1 − xi0, with all remaining pixels equal to zero.
  • The experiment collects Ne = 1000 examples for 2 × 2 gray-scale bar images.
  • The dataset enables effective encoding using one circuit depth composed of RY gates.Its continuous distribution also supports evaluation of whether the quantum GAN learns from finite training examples.

2. Experimental details

The experiments evaluate quantum patch and batch GANs on gray-scale bar images alongside MLP- and CNN-based classical GAN references, using specified architectures and hyperparameter searches.

  • Quantum GAN configurations: Quantum patch GAN generates 2 × 2 gray-scale bar images with N = 3, NS = N, L = 3, and 9 trainable generator parameters.All US are RY, ηG = 0.05, ηD = 0.001, and 3000 measurements are used.
  • Quantum GAN configurations: Quantum batch GAN uses the same hyperparameters as quantum patch GAN but employs an amplitude-encoding quantum discriminator with 12 trainable parameters.The classical discriminator and quantum patch GAN discriminator each use 96 parameters for comparison.
  • Quantum GAN configurations: The quantum batch GAN achieves reasonable gray-scale bar-image generation despite using a discriminator with far fewer parameters than the comparison configurations.Its discriminator has 12 parameters, versus 96 for the classical GAN-MLP, GAN-CNN, and quantum patch GAN discriminators.
  • Classical GAN baselines: The classical reference models use either a one-hidden-layer MLP generator or a convolutional generator that directly outputs a 2 × 2 gray-scale bar image.The MLP uses Gaussian noise inputs and ReLU activations, while the CNN uses (1×2) and (2×1) convolutional kernels with nonlinear activations.
  • Classical GAN baselines: Grid search tunes each classical GAN's learning rate from 10^-4 to 5 × 10^-3 and optimizer coefficients from 0.5 to 1.The learning-rate step is 10^-4, the optimizer-coefficient step is 0.1, and each parameter combination is trained.
Loading 2010.06201v3…