Table of Contents
Fetching ...

Neural Guided Sampling for Quantum Circuit Optimization

Bodo Rosenhahn, Tobias J. Osborne, Christoph Hirche

TL;DR

Quantum circuit transpilation to hardware with restricted gate sets inflates circuit length and exacerbates decoherence. This work introduces 2D neural guided sampling on a 2D circuit representation, where a UNet-like encoder–decoder predicts an attention heatmap of reducible sub-blocks to steer sampling and reduction. The core contributions include a 2D sub-block selection mechanism, a neural model to generate reduction priors, and extensive experiments showing faster, more efficient circuit reduction compared with 1D random-search baselines and state-of-the-art transpilers across two gate sets. These results suggest practical gains in transpilation efficiency and speed, with future work to incorporate decoherence-aware costs and alternative optimization criteria such as MILP-based guarantees.

Abstract

Translating a general quantum circuit on a specific hardware topology with a reduced set of available gates, also known as transpilation, comes with a substantial increase in the length of the equivalent circuit. Due to decoherence, the quality of the computational outcome can degrade seriously with increasing circuit length. Thus, there is major interest to reduce a quantum circuit to an equivalent circuit which is in its gate count as short as possible. One method to address efficient transpilation is based on approaches known from stochastic optimization, e.g. by using random sampling and token replacement strategies. Here, a core challenge is that these methods can suffer from sampling efficiency, causing long and energy consuming optimization time. As a remedy, we propose in this work 2D neural guided sampling. Thus, given a 2D representation of a quantum circuit, a neural network predicts groups of gates in the quantum circuit, which are likely reducible. Thus, it leads to a sampling prior which can heavily reduce the compute time for quantum circuit reduction. In several experiments, we demonstrate that our method is superior to results obtained from different qiskit or BQSKit optimization levels.

Neural Guided Sampling for Quantum Circuit Optimization

TL;DR

Quantum circuit transpilation to hardware with restricted gate sets inflates circuit length and exacerbates decoherence. This work introduces 2D neural guided sampling on a 2D circuit representation, where a UNet-like encoder–decoder predicts an attention heatmap of reducible sub-blocks to steer sampling and reduction. The core contributions include a 2D sub-block selection mechanism, a neural model to generate reduction priors, and extensive experiments showing faster, more efficient circuit reduction compared with 1D random-search baselines and state-of-the-art transpilers across two gate sets. These results suggest practical gains in transpilation efficiency and speed, with future work to incorporate decoherence-aware costs and alternative optimization criteria such as MILP-based guarantees.

Abstract

Translating a general quantum circuit on a specific hardware topology with a reduced set of available gates, also known as transpilation, comes with a substantial increase in the length of the equivalent circuit. Due to decoherence, the quality of the computational outcome can degrade seriously with increasing circuit length. Thus, there is major interest to reduce a quantum circuit to an equivalent circuit which is in its gate count as short as possible. One method to address efficient transpilation is based on approaches known from stochastic optimization, e.g. by using random sampling and token replacement strategies. Here, a core challenge is that these methods can suffer from sampling efficiency, causing long and energy consuming optimization time. As a remedy, we propose in this work 2D neural guided sampling. Thus, given a 2D representation of a quantum circuit, a neural network predicts groups of gates in the quantum circuit, which are likely reducible. Thus, it leads to a sampling prior which can heavily reduce the compute time for quantum circuit reduction. In several experiments, we demonstrate that our method is superior to results obtained from different qiskit or BQSKit optimization levels.
Paper Structure (9 sections, 3 equations, 9 figures, 5 tables)

This paper contains 9 sections, 3 equations, 9 figures, 5 tables.

Figures (9)

  • Figure 1: A quantum circuit can be represented as a 2D token model. A neural network predicts an attention map with areas, which contain sub circuits which are likely reducible.
  • Figure 2: Left: The example quantum circuit consisting of 4 consecutive gates. To reduce this sequential gate set, 3 operations are required, two operations to shuffle the CZ-gates one after another. Afterwards follows the reduction of the two CZ-gates which form an identity matrix. Right: The 2D representation of the quantum circuit leads to a structure which allows to immediately identify that the rotations have no impact on the CZ gates and the block can be directly removed.
  • Figure 3: After selection a reducible quantum circuit fragment, the quantum circuit is separated into three segments, such that the middle circuit block can be replaced with a more efficient one.
  • Figure 4: General structure of the Encoder-Decoder architecture for generating the attention map for neural guided sampling.
  • Figure 5: Overlay of a random generated quantum circuit with an underlined attention map for quantum circuit reduction opportunities.
  • ...and 4 more figures