Table of Contents
Fetching ...

Quantum circuit synthesis with diffusion models

Florian Fürrutter, Gorka Muñoz-Gil, Hans J. Briegel

TL;DR

Generative machine learning models, specifically denoising diffusion models (DMs), are envisioned as pivotal in quantum circuit synthesis, both enhancing practical applications and providing insights into theoretical quantum computation.

Abstract

Quantum computing has recently emerged as a transformative technology. Yet, its promised advantages rely on efficiently translating quantum operations into viable physical realizations. In this work, we use generative machine learning models, specifically denoising diffusion models (DMs), to facilitate this transformation. Leveraging text-conditioning, we steer the model to produce desired quantum operations within gate-based quantum circuits. Notably, DMs allow to sidestep during training the exponential overhead inherent in the classical simulation of quantum dynamics -- a consistent bottleneck in preceding ML techniques. We demonstrate the model's capabilities across two tasks: entanglement generation and unitary compilation. The model excels at generating new circuits and supports typical DM extensions such as masking and editing to, for instance, align the circuit generation to the constraints of the targeted quantum device. Given their flexibility and generalization abilities, we envision DMs as pivotal in quantum circuit synthesis, enhancing both practical applications but also insights into theoretical quantum computation.

Quantum circuit synthesis with diffusion models

TL;DR

Generative machine learning models, specifically denoising diffusion models (DMs), are envisioned as pivotal in quantum circuit synthesis, both enhancing practical applications and providing insights into theoretical quantum computation.

Abstract

Quantum computing has recently emerged as a transformative technology. Yet, its promised advantages rely on efficiently translating quantum operations into viable physical realizations. In this work, we use generative machine learning models, specifically denoising diffusion models (DMs), to facilitate this transformation. Leveraging text-conditioning, we steer the model to produce desired quantum operations within gate-based quantum circuits. Notably, DMs allow to sidestep during training the exponential overhead inherent in the classical simulation of quantum dynamics -- a consistent bottleneck in preceding ML techniques. We demonstrate the model's capabilities across two tasks: entanglement generation and unitary compilation. The model excels at generating new circuits and supports typical DM extensions such as masking and editing to, for instance, align the circuit generation to the constraints of the targeted quantum device. Given their flexibility and generalization abilities, we envision DMs as pivotal in quantum circuit synthesis, enhancing both practical applications but also insights into theoretical quantum computation.
Paper Structure (7 sections, 3 equations, 8 figures, 3 tables)

This paper contains 7 sections, 3 equations, 8 figures, 3 tables.

Figures (8)

  • Figure 1: Quantum circuit generation pipeline summary.(a) Quantum circuits are encoded in a three dimensional tensor, where each gate is encoded as a continuous vector of certain length (vertical direction), schematically represented here as a color (upper plane). (b) Creation of the diffusion model's conditioning. Text is transformed into a continuous representation by means of a pre-trained CLIP encoder. In other cases, as for unitary compilation, an encoder is trained together with the DM to create the encoding of an input unitary. (c-d) Schematic representation of the training of the diffusion model and the posterior inference from the trained model. See text for details.
  • Figure 1: Quantum circuit tensor encoding.(a) Schematic representation of the gate embeddings for a single and multi qubit gate. (b) Quantum circuit encoding and decoding pipeline. For encoding (green arrows), an input quantum circuit (top left) is first tokenized based on the proposed vocabulary. Then, the token matrix is transformed into a continuous tensor based on the chosen embeddings $\vb{v}_i$ (bottom right). In order to decode a continuous tensor into a circuit (blue arrows), we first use the cosine similarity between input embeddings and the ones assigned to existing tokens to generate a tokenized matrix, which is then transformed back into a circuit by means of the vocabulary. The transformation between circuits and tokens depends on such vocabulary, and can be changed at will to cope with the desired computing framework or platform. Further details are given in text.
  • Figure 2: Entanglement generation.(a) Model accuracy vs. the number of entangled qubits, for circuits of different qubits number. (b) Confusion matrix comparing, in each row and column, the input and generated SRVs for circuits of 5-qubits. For clarity, SRVs are grouped by their respective number of entangled qubits. (c) Mean accuracy over all SRVs vs. the number of samples used for fine-tuning the model in (a), for 9 and 10-qubit circuits. "base" denotes the model's predictions before fine-tuning. Inset: minimum accuracy for the base (squares / rhombus) and fine-tuned model (triangles) on 50 circuits per SRV. Solid line and shaded area represent the mean and standard deviation over 10 fine-tune runs for both plots, respectively. (d-e) Percentage of new (not in training set) and distinct (not repeated in the generated sample) generated circuits. (f) Model accuracy vs. the input tensor size (which determines the maximum gate count), for 5-qubit circuits and different numbers of entangled qubits. Details on the data used in this figure given in Methods
  • Figure 2: Entanglement generation dataset distribution. Characteristics of the training dataset used for the entanglement generation task, sampled according to Extended Data Table 1 and balanced as described in Methods, Training section. Depending on the training step (max or bucket padding, see aforementioned section), we sample batches either from the whole dataset or buckets containing circuits of fixed number of qubits. (a) Number of distinct circuits as a function of the number of qubits. For lower qubit counts, less distinct circuits exist, resulting in an inevitable lower number in the training dataset. (b) Distribution of circuit lengths, which are in this case multiples of the U-Net scaling factor 4, due to the length padding explained in Methods, Pipeline and Architectures section.
  • Figure 3: Masking and editing circuits.(a) Masking: the layout of a quantum processor can be embedded as a mask that prevents the model from placing gates at specific parts of the input tensor (white area). (b) Editing: parts of the circuit can be fixed to given gates prior to generation, for example to account for an initial input quantum state on which a desired quantum computation is to be performed. (c) Accuracy when editing circuits from an input SRV to a target SRV. Numbers highlight the fraction of initial circuits (256) where at least one solution was found within a sample of 1024 generated circuits.
  • ...and 3 more figures