betaFeedback

WorksPhysics and Astronomy

Circuit Design Problems in Binary Polynomial Quantum Optimization

Abstract

Solving combinatorial optimization problems on near-term quantum computers mainly relies on their quadratic unconstrained binary formulation. Lately, binary polynomial formulations start to take the center stage, having a better scaling with respect to the number of used qubits. However, while quadratic forms are straightforward to implement on quantum circuits, polynomial forms of degree dd incur in circuit depth overheads, due to the lack of dd-qubit gates, for d≥3d\geq 3, on current hardware. In this paper, we study the problem of designing the shallowest quantum circuit for a given polynomial form. We formulate it as a classical binary linear problem and we prove the \textsf{NP}-completeness of a variant of it. On the algorithmic side, we offer a scalable and performant heuristic method to tackle it, Tempura, as well as faster binary linear problem formulations, which offer computational feasibility while sacrificing optimality. Our performance evaluation shows that the algorithms yield far shorter circuits than the state-of-the-art approaches, and Tempura is mostly comparable with them in terms of runtime.

Introduction

The current state of the art in solving combinatorial optimization problems on near-term quantum computers favors their reformulation as quadratic unconstrained binary optimization (QUBO) problems. This is mainly due to a popular quantum variational algorithm, QAOA (Farhi et al. [9]; Zhou et al. [44]), which was initially thought for these problems, and for the ease in which quadratic forms map into a quantum circuit. Such quantum circuits can then be encoded into current hardware. The use of QUBO formulations is not very restrictive from a mathematical standpoint. We know that MAXCUT is NP-Hard and a QUBO. As such, we could polynomially reduce many interesting problems (i.e., all known NP-Hard problems) to it (Arora and Barak [3]). However, this way of doing hides critical complexities in how many additional variables we may need to consider, which maps directly into the number of used qubits. Quadratization has also been considered, with similar overheads (Mandal et al. [20]; Herrmann et al. (2021)). Qubits, the quantum equivalent to classical logical bits, as well as the number of operations we perform on them, i.e., the number of gates, represent the current bottleneck in implementing quantum optimization algorithms at scale. As such, compact formulations of optimization problems are to be preferred to loose ones, with many variables and redundancies.

In an effort to reduce the number of variables and qubits, binary polynomial problems have started to take a more central role. We often call these problems HUBOs, for higher-order unconstrained binary optimization. Several works have demonstrated how their formulation is more compact in terms of number of variables (Glos et al. [11]), and sometimes it even needs less gates when applied to multi-layer QAOA (Koch et al. [16]). See also interesting recent applications in (Utotila et al. (2025); Romero et al. [30]). In addition, while QUBOs have been solved classically up to thousands of variables (Rehfeldt et al. [29]) and a quantum advantage seems unlikely in the medium term, HUBOs are expected to offer a quicker path to quantum utility (Shaydulin et al. [33]).

The key disadvantage of using HUBO formulations is their quantum circuit depth. If QAOA can be used also for HUBOs, when applied to a polynomial of maximum degree dd, it generates quantum gates featuring dd-qubits, which cannot be easily encoded in current quantum hardware if d≥3d \ge3. Typically, one would need to decompose such gates into one and two-qubit gates, yielding a circuit depth overhead [34]. As such, QUBOs and HUBOs typically stand at the opposite side of the trade-off: short circuits for many qubits, or long circuits for few qubits1.

Said so, HUBOs are still very interesting from their quantum utility potential. In this paper, we start from the HUBO polynomial form (with nn variables, max dd degree, and mm monomials) and we study how to use classical combinatorial optimization to map the resulting dd-qubit gates into parametrized rotation-Z and cnot gates. Specifically, we focus on how to minimize the depth of the resulting quantum circuit at most as possible. We start from our preliminary work [39] which formulated the HUBO circuit design problem as a binary linear optimization problem and proposed an heuristic method to tackle it. Here, we offer the following main contributions: (i) we shed light on the complexity of this problem, by proving a NP-completeness result of a variant of it; (ii) we formulate several binary linear problems that encode the problem with a various degree of optimality vs computational feasibility, which are computationally better than our preliminary work; (iii) we propose an efficient, scalable, and performant heuristic algorithm Tempura, which allows us to compile large circuits featuring thousands of monomials and has O(mn)O(mn) worst-case, but in practice better than O(md)O(md), depth, going beyond the naive O(m2)O(m^2) obtained in our preliminary work; (iv) we demonstrate practical performance with respect to two common state-of-the-art solvers (Qiskit and tket), showing far shorter circuits and similar runtimes (for Tempura).

Related work

The general problem of transferring a quantum algorithm into a quantum circuit goes under the name of compilation. In the most wholistic sense, we can think of a quantum algorithm featuring nn-qubits as a unitary matrix U∈C2n×2nU \in\mathbb{C}^{2^n \times2^n} mapping input to output. Compilation is then the task of decomposing and transferring such matrix into operations (gates) that we can implement on a specific hardware. Typical constraints that we have are the gate set, how the qubits can be arranged (topology or connectivity), and the total number of operations (circuit length) limitations.

Since the celebrated Solovay-Kitaev theorem [28], quantum compiling has been a rich research area. Works have investigated how to efficiently map different gates into canonical (universal) gate sets up to an arbitrary accuracy, or how to “place” the target circuit onto the real connectivity-limited hardware. See for instance [19, 27] and the many references therein. More recently, machine learning techniques have also been used for this task [24, 42] (Theibinger et al. 2026). In fact, quantum compilation off-the-shelf softwares, such as tket [35], qiskit [43], and the full software stack Qiskit [14] encode most of the current research in proving a scalable, fast, general-purposes compilation procedure, often based on fast routines and sacrificing circuit depth.

The goal of compiling a circuit given a gate set and connectivity constraints can be thought in the lens of operations research. Mixed-integer linear formulations have then appeared to tackle specific instances of the compilation and mapping problem, e.g., [25, 27, 39, 26, 15], all featuring optimal solutions but unmanageable classical overheads after n>10n > 10 qubits. In particular, Nannicini et al. [27] present an integer linear program how to optimally place and route the gates on a quantum computer via limited connectivity, given a certain full-connectivity quantum circuit. The works of [25, 26, 15], they focus instead on decomposing and compiling a given unitary matrix in a given gate set with the goal of minimizing depth.

In this paper, we focus on a specific instance of the compilation problem: how to map diagonal multi-qubit ZZ gates (which are the dd-qubit gates stemming from the HUBO polynomial form) into parametrized rotation-ZZ and CNOT gates. Universal baselines for the length of the circuits are the O(2n)O(2^n) lower bound in exact compilation and the O(1/ϵ)O(1/\epsilon) in a ϵ\epsilon-approximate one Zylberman et al. [45]. However, here we do not have a general unitary and we can compile shorter circuits if the degree dd of the polynomial is less than nn, as we will see.

Given the combinatorial nature of the compilation task, it seems natural to ask whether some instances of the compilation problem are NP-Complete. In general, the NP-completeness of quantum compilation is an open problem. Botea et al. [5] provides probably one of the first proofs in this direction for a particular instance. Close in spirit to our task is the work of Amy et al. [2] and the very recent Acuaviva et al. [1]. In this paper, we provide a NP-Complete result for a topologically-constrained version of compilation, close to our formulation.

Organization

The next section introduces the problem formulation, some useful notation, and definitions. In § 3, we prove the NP-completeness of an instance of our compilation problem under some conditions about the connectivity of the qubits. § 4 describes our efficient template and pruning algorithm to the compilation task, while § 5 presents the optimal binary linear formulation. Then, in § 7, we discuss performance evaluations of the different approaches, and we finish the paper with some concluding remarks.

Problem description

We are interested in binary combinatorial optimization problems of the form

min⁡z∈{−1,1}nP(z),(1)\min_{z \in\{-1,1\}^n} P(z), \tag*{(1)}

where P(z)P(z) is a polynomial in the {−1,1}\{-1,1\} variables zz. To make the dependence explicit, we introduce the binary selection variables μj∈{0,1}\mu_j \in\{0,1\} for variable zjz_j, we stack them into the selection vector μ∈{0,1}n\mu\in\{0,1\}^n and consider the set of all possible μ\mu’s, M={μ∣μ∈{0,1}n}M = \{\mu\mid\mu\in\{0,1\}^n\} of cardinality 2n2^n. In this way, we can write the polynomial P(z)P(z) as,

P(z)=∑μ∈Mαμ∏j=1nzjμj,(2)P(z) = \sum_{\mu\in M} \alpha_\mu\prod_{j=1}^{n} z_j^{\mu_j}, \tag*{(2)}

where αμ\alpha_\mu is a real number for every μ∈M\mu\in M. We denote with dd the maximum degree among all the monomials, d=max⁡μ∈M{1αμ≠0∑jμj}d = \max_{\mu\in M}\{1_{\alpha_\mu\ne0}\sum_j \mu_j\}, and by mm the number of monomials, i.e., m=∑μ∈M1αμm = \sum_{\mu\in M} 1_{\alpha_\mu}, where 1αμ1_{\alpha_\mu} is 1 if and only if αμ≠0\alpha_\mu\ne0. Typically m≪2nm \ll2^n. If d=2d = 2, then the polynomial is quadratic.

To find an approximate zz minimizing PP over {−1,1}n\{-1,1\}^n, one can resort to the quantum variational heuristic QAOA. To do so, we associate to each variable ziz_i a qubit, we introduce the Pauli-Z gate, or ZZ operator, as,

Z=(100−1),Z = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix},

and the problem Hamiltonian,

HP(Z)=∑μ∈Mαμ⨂j=1nZjμj.H_P(Z) = \sum_{\mu\in M} \alpha_\mu\bigotimes_{j=1}^{n} Z_j^{\mu_j}.

Here, we have defined ZjZ_j the operator ZZ acting on the jj-th qubit. We have now to build the quantum circuit implementing the exponential of the matrix UP(γ)=exp⁡(−iγHP(Z))U_P(\gamma) = \exp(-\mathrm{i}\gamma H_P(Z)), where γ\gamma is a free rotation parameter that will be optimized over classically, and j=−1j = \sqrt{-1}. In the following, we let γ=1\gamma= 1 without loss of generality, we define UP=UP(1)U_P = U_P(1) and load into the α\alpha coefficient the angle γ\gamma information. The matrix exp⁡(−iHP(Z))\exp(-\mathrm{i}H_P(Z)) is a diagonal matrix of dimension 2n×2n2^n \times2^n. Up to a global phase, we can implement this unitary with CNOT and rotation-Z gates Nielsen and Chuang [28], which are the typical ones available in hardware. We will indicate the 2-qubit CNOT gate as cxij\mathrm{cx}_{ij} if it is controlled by qubit ii, targeting the qubit jj. We adopt the notation that a CNOT is downward if j>ij>i, and upward otherwise. The 1-qubit rotation-Z gates, will be indicated as rz\mathrm{rz} (leaving the angle dependency hidden). Whenever the dependencies of the qubit is important, we will say rzi\mathrm{rz}_i. Often we will also say rzi,j,k,…\mathrm{rz}_{i,j,k,\ldots} to stress that the rotation-Z gate is implementing the coefficient αi,j,k,…\alpha_{i,j,k,\ldots}. In the quantum circuit, we will simply indicate αi,j,k,…\alpha_{i,j,k,\ldots}. This notation is useful, since it allows us to present parametric circuits (that are valid for all the choices of non-zero coefficients), rather than fixing them to specified values.

Our aim is to design such circuits while minimizing their depth. We define here depth as the count of time steps needed to execute all the gates in the quantum circuit, when one time step is the time it takes to execute any gate. If NN gates can be executed in parallel, then only one time step is needed. Formally, we introduce the following problem.

Problem 1 (Poly-Z min-depth circuit synthesis problem (PZDCS)). Given a Pauli-Z polynomial

HP(Z)=∑μ∈Mαμ⨂j=1nZjμj,H_{\mathrm{P}}(Z)=\sum_{\mu\in M}\alpha_{\mu}\bigotimes_{j=1}^{n}Z_j^{\mu_j},

design a quantum circuit implementing UP=exp⁡(−jHP(Z))U_{\mathrm{P}}=\exp(-\mathord{\mathrm{j}}H_{\mathrm{P}}(Z)) of minimum depth, using only CNOT and rotation-Z gates.

The unitary UPU_{\mathrm{P}} can be compiled into a circuit featuring CNOT gates and rotation-Z gates in O(2n)O(2^n) layers using standard rewriting rules. However, this is far from optimal for low degree polynomials.

Example 1. To fix the ideas, let us consider a simple Hamiltonian, HP(Z)=α123Z1⊗Z2⊗Z3H_{\mathrm{P}}(Z)=\alpha_{123}Z_1\otimes Z_2\otimes Z_3. The corresponding operator is UP=exp⁡(−jα123Z1⊗Z2⊗Z3)U_{\mathrm{P}}=\exp(-\mathord{\mathrm{j}}\alpha_{123}Z_1\otimes Z_2\otimes Z_3). A known decomposition (Glos et al. [11]; Seeley et al. [32]) of this operator using the allowed gates is depicted in Figure 1a.

Example 2. Next, we consider a slightly more complicated Hamiltonian of the following form:

HP(Z)=∑I⊆{1,2,3}αI⨂i∈IZi.H_{\mathrm{P}}(Z)=\sum_{I\subseteq\{1,2,3\}}\alpha_I\bigotimes_{i\in I}Z_i.

Inspired by Gray code, in Glos et al. [11], the authors propose the circuit shown in Figure 1b. This circuit lets us encode a polynomial of degree three. However, it is not clear how one would do for more complex polynomials, for instance the sum of HP(Z)H_{\mathrm{P}}(Z) above with a second polynomial H2(Z)=∑I⊆{2,3,4}βI⨂i∈IZiH_2(Z)=\sum_{I\subseteq\{2,3,4\}}\beta_I\bigotimes_{i\in I}Z_i.

Compiling the first and then the second and subsequently putting them together one after the other would include twice all the monomials that are common to the two Ising Hamiltonians, in this case {2}\{2\}, {3}\{3\}, and {2,3}\{2,3\}.

From the discussion of the above examples, it seems reasonable that a better strategy to encode the Hamiltonian should be achievable. In this paper, we take the point of view of routing. In fact, from a more high-level abstraction, the circuit in Figure 1a can be seen as a form of routing of the singletons ZiZ_i, in order to form the product Z1⊗Z2⊗Z3Z_1\otimes Z_2\otimes Z_3 on the third qubit, at which moment, the appropriate phase rotation gate is applied.

(a) Circuit for Example 1.

(b) Circuit for Example 2.

Figure 1. Quantum circuits for a few simple Ising Hamiltonians.

Following this point of view, at the start of the circuit, each qubit represents its corresponding singleton: Z1Z_1 is on qubit 1, Z2Z_2 on qubit 2, Z3Z_3 on qubit 3, and so forth. The first CNOT gate from qubit 1 to qubit 2 replaces the current monomial on qubit 2 by the product of the monomials on qubit 1 and 2, that is to say Z2Z_2 is replaced by Z1⊗Z2Z_1 \otimes Z_2. In this context, we say that qubit 1 is routed or sent to qubit 2 to form the product Z1⊗Z2Z_1 \otimes Z_2.

This interpretation is also valid for the circuits in Figure 1b, where we simply have to consider that the ancilla qubit starts by representing the constant 1.

This view leads the search for the shallowest circuit for a given Hamiltonian as a combinatorial optimization problem, where variables and constraints describe which gates are put on which qubits, and this routing process of the monomials through the circuit through the use of the CNOT gates.

An NP-complete result for topologically-constrained problems

We are now ready to provide an NP-completeness result. First of all, one may think that the circuit design problem is easier when the degree of the polynomial is lower or when we require a small circuit depth. In this section, we show that the complexity of PZDCS depends mainly on the number of qubits and monomials and not on the degree or the depth of the circuit. To do so, we give a proof of the NP-Completeness of a variant of PZDCS under a topology constraint of the qubit connectivity - that is we are not allowed to connect every pair of qubits. In the proof, the degree of the polynomial and the bound on the depth are constant values fixed respectively to 2 and 9.

To our knowledge, determining the complexity class of (the unconstrained version of) PZDCS is open. One variant was previously considered and shown NP-Complete in [2] where the cx gates must all target the same ancilla qubit. The connectivity is described by a directed topology graph TT associating each qubit with a vertex and defining the right to place a cxij\mathrm{cx}_{ij} gate with the arc (i,j)(i,j). For example in [2], the topology graph is a star where the arcs are directed toward the center.

The usual topology graph of PZDCS is the complete bidirectional graph, referred to as “all-to-all topology”. Here, we define the following decision variant of PZDCS where d,T∈Nd,T \in\mathbb{N}.

Problem 2 ((d,Td,T)-PZDCS-Top). Given a Pauli-Z polynomial HP(Z)=∑μαμ⨂j=1nZjμjH_P(Z)=\sum_{\mu} \alpha_\mu\bigotimes_{j=1}^{n} Z_j^{\mu_j} with degree dd, a 3-regular acyclic directed graph DD on nn vertices, is there a quantum circuit implementing UP=exp⁡(−iHP(Z))U_P=\exp(-\mathrm{i}H_P(Z)) of depth at most TT, using only CNOT and rotation-Z gates and satisfying the topology constraint defined by DD?

Theorem 1. (2,9)(2,9)-PZDCS-Top is NP-Complete.

Proof. We offer the proof in Appendix § 9.

In the following sections, we focus on the unconstrained version of PZDCS, with no topology constraint. In the light of the proof for (d,T)(d,T)-PZDCS-Top (which is different from PZDCS), we conjecture that PZDCS is NP-Complete. The main obstacle for the proof consists mainly in constraining the CNOT gates without any topology constraint2, using only the bound on the depth, the limited number of qubits and the high number of rotation gates. On the other side, any polynomial algorithm for PZDCS, if such an algorithm exists, must be based on the fact that no topology is given: any generic algorithm that can be adapted to any given topology cannot be polynomial unless P = NP.

A template-pruning model

We present now an efficient approach to the compilation of PZDCSPZDCS. The method provides a template circuit for a polynomial of a given degree. The template is generated recursively (that is, the template of degree dd is based on the one of degree d−1d-1) and it is then combined and simplified (or pruned) to obtain a circuit for a given polynomial.

Template generation

The original form of the template can be found in our preliminary work [39]. We present here a different implementation, to which we add a pruning technique to adapt to the polynomial under consideration. While the aforementioned authors apply the template on each monomial of a polynomial in {0,1}\{0,1\} variables, and then concatenate all the circuits thus obtained, we apply it to the whole polynomial in {−1,1}\{-1,1\} at once, avoiding duplicates.

The goal of this template is to be generated quickly, in a recursive manner. It generates a circuit for any binary polynomial instance of nn variables, degree dd containing mm monomials in O(2n)O(2^n) layers, which is later reduced to O(mn)O(mn), in the worst-case, but practically less than O(md)O(md).

Since the template is recursive, we start with a polynomial of maximum degree n=d=2n=d=2. Let PP be a generic bivariate binary polynomial, written as P(z)=α1z1+α2z2+α12z1z2P(z)=\alpha_1z_1+\alpha_2z_2+\alpha_{12}z_1z_2. It is the base case for the template, corresponding to the Hamiltonian HP(Z)=α1Z1+α2Z2+α12Z1⊗Z2H_P(Z)=\alpha_1Z_1+\alpha_2Z_2+\alpha_{12}Z_1\otimes Z_2. The corresponding time-evolution unitary UP=exp⁡(−ȷHP(Z))U_P=\exp(-\jmath H_P(Z)) can be written as

UP=(exp⁡(−ȷα1Z1))(exp⁡(−ȷα2Z2))(exp⁡(−ȷα12Z1⊗Z2)),U_P=\left(\exp(-\jmath\alpha_1Z_1)\right)\left(\exp(-\jmath\alpha_2Z_2)\right)\left(\exp(-\jmath\alpha_{12}Z_1\otimes Z_2)\right),

thanks to the commutativity of the ZZ gates, and can be further simplified as

UP=(exp⁡(−ȷα1Z1))(exp⁡(−ȷα1Z2))cx12(exp⁡(−ȷα12Z2))cx12.U_P=\left(\exp(-\jmath\alpha_1Z_1)\right)\left(\exp(-\jmath\alpha_1Z_2)\right)\mathrm{cx}_{12}\left(\exp(-\jmath\alpha_{12}Z_2)\right)\mathrm{cx}_{12}.

The circuit implementing this polynomial, denoted by T2T_2 for template of n=d=2n=d=2, is depicted in Figure 2a. The construction of the circuit Tn+1T_{n+1} from the circuit TnT_n resembles the recursivity of the Gray code, a total ordering of binary words of the same size such that two consecutive words only differs by a bit flip. Because the Hamming distance between each word is minimal and all words belong to the sequence, the Gray code is an optimal way to sequentially visit all words while minimizing the total number of bit flips.

Template circuits for binary polynomials with 2 or 3 variables

Figure 2. Template circuits for binary polynomials with 2 or 3 variables. We use the non-standard notation of superposing the rotation-Z gates and the CNOT gate to stress that they can be simultaneously performed.

In our context, the binary words represent the monomials, where a letter takes the value 1 when the corresponding variable is contained in the monomial. Hence, a bit flip is implemented by a CNOT gate. This is precisely what our simplification heuristic focus on, to rewrite the parts of the circuit in which only CNOT gate appears.

The Gray code on n+1n+1 bits can be constructed from the Gray code on nn bits as follows. We take twice the Gray code on nn bits, and we reverse the order of the second copy of it. Then, we add the letter 0 in front of all words of the first copy (the one that is not reversed), and we add the letter 1 in front of all words of the second copy. Finally, we concatenate the two copies.

Example 3. The Gray code on two bits is {00,01,11,10}\{00, 01, 11, 10\}. We take two copies, we flip the second one, and we get {00,01,11,10∣10,11,01,00}\{00, 01, 11, 10 \mid10, 11, 01, 00\}. Then, we add a 0 in front of the first four words, and a 1 to the last four, and concatenate: {000,001,011,010,110,111,101,100}\{000, 001, 011, 010, 110, 111, 101, 100\}, which is indeed the Gray code on three bits.

Notice that, by construction, the leftmost bit of the Gray code is always 1 on the second half, and always 0 in the first half. Hence, when we add a new variable to the polynomial znz_n, we only have to deal with it in the second half of the Gray code, which is equivalent to the Gray code with one variable less. This corresponds to the partial factorization of our polynomial. More formally,

P(z)=∑μ∈Mαμ∏j=1nzjμj(3)P(z) = \sum_{\mu\in M} \alpha_\mu\prod_{j=1}^{n} z_j^{\mu_j} \tag*{(3)}
=∑μ∈Mαμ(∏j=1μn=1nzjμj+∏j=1μn=0nzjμj)=zn∑μ∈Mμn=1αμ∏j=1n−1zjμj+∑μ∈Mμn=0αμ∏j=1n−1zjμj(4)= \sum_{\mu\in M} \alpha_\mu\left(\prod_{\substack{j=1\\ \mu_n=1}}^{n} z_j^{\mu_j} + \prod_{\substack{j=1\\ \mu_n=0}}^{n} z_j^{\mu_j}\right) = z_n \sum_{\substack{\mu\in M\\ \mu_n=1}} \alpha_\mu\prod_{j=1}^{n-1} z_j^{\mu_j} + \sum_{\substack{\mu\in M\\ \mu_n=0}} \alpha_\mu\prod_{j=1}^{n-1} z_j^{\mu_j} \tag*{(4)}
=:znQ(z)+R(z),(5)=: z_n Q(z) + R(z), \tag*{(5)}

where QQ and RR are two generic polynomials on n−1n-1 variables.

If we implement the monomials of PP in the order given by the Gray code, all monomials of RR will come first. Furthermore, constraining the cx gates to point only downwards, every monomial of znQz_nQ needs to be implemented on the last qubit. The template focuses then on implementing the time-evolution operators for monomials of znQz_nQ on the last qubit using the Gray code, and then implements RR elsewhere in the circuit. Because this template is recursive, the configuration of the monomials of RR is already determined.

Formally, we have the algorithm presented in Algorithm 1, where we have indicated with ⟦n+1⟧:={1,…,n+1}\llbracket n+1\rrbracket:= \{1,\ldots,n+1\}. To illustrate this template, we also depicted the circuit T4T_4 in Figure 3.

Algorithm 1Template generator
Input:A template for TnT_n in nn qubit and 2n2^n layers.
Output:A template for Tn+1T_{n+1} in n+1n+1 qubit and 2n+12^{n+1} layers.
1:Initialize Tn+1T_{n+1} as an empty circuit
2:Add all the rotation-Z gates αk\alpha_k, k∈⟦n+1⟧k \in\llbracket n+1\rrbracket on the first layer (layer 1)
3:Build Tn∗T_n^* from TnT_n by removing its first and last layers
4:Add Tn∗T_n^* to Tn+1T_{n+1}, on qubits ⟦n−1⟧∪{n+1}\llbracket n-1\rrbracket\cup\{n+1\} (layers 2→2n−12 \to2^n-1)
5:Build Tn∗T_n^* from Tn+1T_{n+1} by removing the gates not involving qubit n+1n+1
6:Add a cx gate to Tn+1T_{n+1} controlled by qubit nn acting on qubit n+1n+1 (layer 2n2^n)
7:Build Tn∘T_n^\circ from Tn∗T_n^* by removing the gates not involving the last qubit
8:Add Tn∘T_n^\circ to Tn+1T_{n+1} on the qubits ⟦n⟧\llbracket n\rrbracket (layers 2n+1→2n+1−12^n+1 \to2^{n+1}-1)
9:Add Tn∗T_n^* to Tn+1T_{n+1} on ⟦n−1⟧∪{n+1}\llbracket n-1\rrbracket\cup\{n+1\} in reverse order (layers 2n+1→2n+1−12^n+1 \to2^{n+1}-1)
10:Add a cx gate to Tn+1T_{n+1} controlled by qubit nn acting on qubit q+1q+1 (layer 2n+12^{n+1})

Table 1.

The circuit T4T_4 is built from three T3T_3 circuits, corresponding to the following decomposition:

P(z)=znQ(z)+R(z)=zn(zn−1∑μ∈Mμn=1,μn−1=1αμ∏j=1n−2zjμj+∑μ∈Mμn=1,μn−1=0αμ∏j=1n−2zjμj)+R(z)(6)P(z) = z_n Q(z) + R(z) = z_n\left(z_{n-1}\sum_{\substack{\mu\in M\\ \mu_n=1,\mu_{n-1}=1}} \alpha_\mu\prod_{j=1}^{n-2} z_j^{\mu_j} + \sum_{\substack{\mu\in M\\ \mu_n=1,\mu_{n-1}=0}} \alpha_\mu\prod_{j=1}^{n-2} z_j^{\mu_j}\right) + R(z) \tag*{(6)}
=znzn−1Q1(z)+znQ2(z)+R(z),(7)= z_nz_{n-1}Q_1(z) + z_nQ_2(z) + R(z), \tag*{(7)}

where Q1Q_1 and Q2Q_2 are two generic polynomials on n−2n-2 variables. The template starts by implementing the polynomial Q2Q_2, formed of all non-singleton monomials containing znz_n but not zn−1z_{n-1}. Once this is done, we apply a cx gate which bonds znz_n together with zn−1z_{n-1}, because Q1Q_1 is the polynomial of all monomials containing znzn−1z_nz_{n-1}. Because we no longer acts on the (n−1)(n-1)-th qubit, the template has the space for implementing RR at the same time as Q1Q_1. Notice that the template, due to its similarity with the Gray code, alternate between cx gate and rz gate. So we can implement RR and Q1Q_1 at the same time, by simply delaying the implementation of RR by one layer.

Template circuit $T_4$

Figure 3. Template circuit T4T_4. Is useful to interpret Algorithm 1 as Gray code applied as considering the ii-th qubit as ancilla for the Gray code of the polynomial up to ziz_i. The last qubit represent z4Q(z)z_4Q(z), while the first three qubits are R(z)R(z), see Equation (5).

Once we have generated the circuit on the adequate number of qubits using this template, we feed into each rotation gate the coefficient of the corresponding monomial. If a monomial does not appear in the polynomial, we set the angle to zero and remove the rz gate. In general, doing so generate inefficient cx circuits between consecutive non-trivial rotation gates, and these cx circuits can be simplified using some rewriting rules, as we explain in the Section 4.2.

For Algorithm 1, we have the following theoretical result.

Proposition 1. For polynomial P(z)P(z) in nn variables, the Template generator in Algorithm 1 outputs a circuit TnT_n given the preceding circuit Tn−1T_{n-1} that has all the rotation gates we need to represent a polynomial in zz of degree nn and contains all the products of ZZ’s. It has exactly 2n2^n layers and 2n2^n unique rotation-Z gates.

Proof. We offer the proof in Appendix § 10.

Remark 1 (A walk on the hypercube and other techniques). It is useful to interpret Algorithm 1 as Gray code applied as considering the ii-th qubit as ancilla for the Gray code of the polynomial up to ziz_i. The Gray code represents an Hamiltonian path on the hypercube formed by all the possible 2n2^n monomials. A way to reduce the depth of the circuit (in the case of less non-zero monomials) would then be to consider optimal paths on sparser graphs, e.g., Steiner trees/paths. This has been investigated in the quantum computing literature for other compilation tasks ([38, 10] (Meijer-van de Griend and Li 2022)), but has the disadvantage to be computationally costly. Since the optimal reduction seems out of reach in general ([1]), in the following, we give a heuristic yet effective and scalable pruning technique based on transvection operations.

The pruning method

In general, the binary polynomial to encode does not contain every monomial of its variables. Then, when using the template described above, around the rotation gates with a null angle, the layout of CNOT gates is not efficient. So, between each pair of consecutive non-trivial rotation gates, we want to rewrite the circuits made of CNOT gates. Given our template, we focus on circuits solely made of downward CNOT gates. We will use group theoretic concepts to facilitate our task.

Each circuit corresponds to an element of the group generated by the CNOT gates, represented by a given word of CNOTs determined by the template. One unique group element can be written using many different words, of different lengths. The point of the following discussion is to present a method that takes as an input a specific word of CNOT gates, for which the index of the control qubit is always smaller than the index of the target qubit, and that return another word of CNOT, corresponding to the same group element, in a canonical form, and with at most linear depth.

The methods presented in this part of the paper resemble standard methods used in the literature, in particular by [22], [21], as well as [10], even though the goals and the implementation differ3. In particular, we make express use of the downward nature of the CNOTs, yielding lower-triangular matrices.

The method contains two phases. Let CC be a given circuit only composed of CNOT gates, for instance, a subcircuit comprised between two consecutive rotation-Z gates. The first step is to translate CC into a matrix MCM_C. This matrix encodes the action on the quantum states implemented by the circuit, hence, all the circuits of CNOT implementing the same unitary correspond to the same matrix (note, however, that the matrix MCM_C has nothing to do with the unitary matrix that acts on quantum states, it is a much more compact representation of the CNOT gates). The second step is to transform back the matrix MCM_C into a circuit C⋆C_\star, with several properties: (i)(i) C⋆C_\star is canonical, i.e., two different initial circuits being translated into the same matrix are transformed back as the exact same circuit; (ii)(ii) C⋆C_\star is of at most quadratic size and linear depth in the number of qubits, independently of the number of gates in the initial circuit; (iii)(iii) in general, the circuit C⋆C_\star is much shorter than the original circuit CC.

From the circuit to the matrix. We start by presenting the isomorphism4 allowing us to manipulate CNOT circuits using much more common objects. Denote by F2\mathbb{F}_2 the field with two elements, by GL⁡n(F2)\operatorname{GL}_n(\mathbb{F}_2) the group of n×nn \times n invertible matrices whose entries belongs to F2\mathbb{F}_2, equipped with the usual matrix product. Denote by T(ij)\mathbf{T}^{(ij)} the transvection matrix associated with the pair (i,j)(i,j) satisfying i≠ji \ne j, defined by

Tkl(ij)={1,if k=l or (k,l)=(i,j),0,otherwise.(8)\mathbf{T}^{(ij)}_{kl} = \begin{cases} 1, & \text{if } k=l \text{ or } (k,l)=(i,j),\\ 0, & \text{otherwise.} \end{cases} \tag*{(8)}

A transvection matrix is the sum of the identity matrix and a matrix composed of zeros everywhere except at the entry (i,j)(i,j). Transvections generate GL⁡n(F2)\operatorname{GL}_n(\mathbb{F}_2) as a group [31 Theorem 8.8].

Theorem 2 (Bataille [4]). The group generated by CNOT gates acting on nn qubits is isomorphic to GL⁡n(F2)\operatorname{GL}_n(\mathbb{F}_2). The group homomorphism5 sending the CNOT gate cxji\mathrm{cx}_{ji} to the transvection T(ij)\mathbf{T}^{(ij)} is a group isomorphism.

So, the action of a CNOT circuit is represented as an invertible n×nn \times n matrix over F2\mathbb{F}_2. From a given CNOT circuit, it is easy to construct this matrix: we simply take the product of all transvections of the CNOT gate of the circuit, in the reverse order.

Example 4. Consider the following circuit and its corresponding element of GL⁡3(F2)\operatorname{GL}_3(\mathbb{F}_2). We consider the CNOT gates from left to right, and we take the product of the corresponding transvection from right to left:

CNOT circuit

Figure 13.

A=T(32)T(13)T(23)=(100010011)(100010001)(100011001)=(101011010).A = \mathbf{T}^{(32)}\mathbf{T}^{(13)}\mathbf{T}^{(23)} = \begin{pmatrix}1&0&0\\0&1&0\\0&1&1\end{pmatrix} \begin{pmatrix}1&0&0\\0&1&0\\0&0&1\end{pmatrix} \begin{pmatrix}1&0&0\\0&1&1\\0&0&1\end{pmatrix} = \begin{pmatrix}1&0&1\\0&1&1\\0&1&0\end{pmatrix}.

The isomorphism described in Theorem 2 specializes conveniently when we consider circuits containing only downward CNOT gates. Indeed, the image of the group of circuits with downward CNOT gates is the group of lower-triangular invertible matrices over F2\mathbb{F}_2, a subgroup of GL⁡n(F2)\operatorname{GL}_n(\mathbb{F}_2). This subgroup is an example of a Borel subgroup of GL⁡n(F2)\operatorname{GL}_n(\mathbb{F}_2), that are well-studied and well-structured, and it is precisely this structure that we leverage in the following.

From the matrix to the circuit. The task now is to be able to read out a CNOT circuit from an element of GLn(F2)\mathrm{GL}_n(\mathbb{F}_2). In general, this task is much more complicated than in the opposite direction. However, this can be done easily for triangular matrices (Laplace Mermoud et al. [17], Theorem 4). Let (Q,≺)(Q,\prec) be the ordered set with Q={(i,j)∣1≤j<i≤n}Q=\{(i,j)\mid1\leq j<i\leq n\}, equipped with the anti-lexicographic order ≺\prec given by (i1,j1)≺(i2,j2)(i_1,j_1)\prec(i_2,j_2) if and only if [i1>i2][i_1>i_2] or [i1=i2 and j1>j2][i_1=i_2\text{ and }j_1>j_2]. This is a total order on QQ. Denote by w⋆w_\star the word obtained by multiplying, on the left, the transvections indexed by QQ in the order of ≺\prec:

w⋆=T(21)T(31)T(32)T(41)⋯T(n−1 n−2)T(n1)⋯T(n n−2)T(n n−1).w_\star=\mathrm{T}^{(21)}\mathrm{T}^{(31)}\mathrm{T}^{(32)}\mathrm{T}^{(41)}\cdots\mathrm{T}^{(n-1\,n-2)}\mathrm{T}^{(n1)}\cdots\mathrm{T}^{(n\,n-2)}\mathrm{T}^{(n\,n-1)}.

Theorem 3 (Laplace Mermoud et al. [17], Theorem 4). Any lower-triangular matrix in GLn(F2)\mathrm{GL}_n(\mathbb{F}_2) can be written as a subword of w⋆w_\star.

Let MM be an lower-triangular element of GLn(F2)\mathrm{GL}_n(\mathbb{F}_2). Using the theorem above, we have that there exists a word wM≤w⋆w_M\leq w_\star that represents this element MM. Thanks to the specific ordering in QQ, this subword is exactly the ordered product of the elements of the following set:

QM={T(ij)∣Mij=1, for all i>j}.(9)Q_M=\left\{\mathrm{T}^{(ij)}\mid M_{ij}=1,\ \text{for all }i>j\right\}. \tag*{(9)}

To get the corresponding circuit, we read the word from right to left, and for each transvection, we add the corresponding CNOT gate. The whole pruning procedure is described in Algorithm 2.

Algorithm 2  Pruning procedure

Input: A circuit C only containing cx and rz gates
Output: Another circuit C′ only containing cx and rz gates

1: function Simplify(C)
2:   c ← empty circuit
3:   for 0 ≤ ℓ ≤ depth of C do
4:     if layer ℓ only contains cx gates then
5:       add layer ℓ to c
6:     else
7:       add layer ℓ to c without the rz gate(s)
8:       M ← the identity matrix
9:       for 0 ≤ k ≤ depth of c do
10:        for each cxij in layer k of c do
11:          M ← T(ji)M
12:       c′ ← empty circuit
13:       for (i, j) in QM read in the order given by ≺ do ▷ see Equation (9)
14:         add gate cxji to c′
15:       concatenate c′ to the right of C′
16:       add to C′ the rz gates of layer ℓ of C
17:       c ← empty circuit
18: return C′

To summarize, we have seen for now that the group of cx circuits is isomorphic to GLn(F2)\mathrm{GL}_n(\mathbb{F}_2), and the cx circuits extracted from the template circuits described previously form the subgroup of lower-triangular matrices. Then, each lower-triangular element of GLn(F2)\mathrm{GL}_n(\mathbb{F}_2) can be written as a linear depth, quadratic size circuit of CNOT gates (see Laplace Mermoud et al. [17]).

Putting things together: Tempura

The algorithm Tempura (the name comes from a letter shuffling based on the lengthy template-pruning algorithm), reported in Algorithm 3 describes the full template-pruning algorithm. in Appendix C, we offer some examples of how Tempura behaves in simple cases. For Tempura, we have the following depth worst-case result.

Proposition 2. For polynomial P(z)P(z) in nn variables, mm non-zero monomials, of degree dd, the algorithm defined as Tempura outputs a circuit that has all the rotation gates we need to represent P(z)P(z). It has at most O(mn)O(mn) layers.

Algorithm 3 Tempura

Input: An instance PP of HUBO with nn variables, degree dd, with mm monomials. Output: A circuit C′C' of worst-case depth O(mn)O(mn)

  1. Build the template TnT_n using Algorithm 1 and remove from it the rotation gates corresponding to monomials not in PP. Obtain a circuit CC

  2. C′=Simplify⁡(C)C' = \operatorname{Simplify}(C) ▷ defined in Algorithm 2

Proof. We offer the proof in Appendix D.

Proposition 2 offers a worst-case depth bound for Tempura. The bound is really a worst-case in nn, but rather tight in mm, due to the Gray code construction. In fact, a naive implementation of a Gray code, we can achieve ∑μ∈M2∣μ∣−1≤2md=O(md)\sum_{\mu\in M} 2|\mu| - 1 \le2md = O(md) easily by arbitrarily ordering the monomials, and, for each monomial μ\mu, add ∣μ∣−1|\mu| - 1 CNOT gates to it, put μ\mu on the qbits having max degree and resetting the qbits with ∣μ∣−1|\mu| - 1 CNOT gates in the reversed order. We see that in practice, Tempura is better than the naive O(md)O(md). These bounds are to be compared with the m2dm2^d of Verchère et al. [39], which is rather tight in both mm and dd, giving us an important improvement. To further leverage parallelism and reduce the mm dependency, we turn now to binary linear programs.

An efficient diagonal ansatz and more

Tempura is an efficient template-pruning method to compile binary polynomials for the use in QAOA. But this is not all. The fact that the circuit is parametric in the α\alpha’s leaves us the opportunity to do a bit more. In particular, we highlight three complementary results.

First, Tempura offers an efficient ansatz for diagonal operators in the context of approximate compilation ([19, 45]). This means that α\alpha’s in the circuit can be optimized to match a given target diagonal unitary matrix. One can decide to use the full template (matching the depth bound of 2n2^n) to obtain an exact compilation. Or decide to use monomials up to degree dd, obtaining an approximate compilation in the spirit of [41, 45].

Second, Tempura can be readily used in multi-angle QAOA ([12]), where all the angles are optimized, and not only a γ\gamma per layer.

Third, a Tempura truncated at depth d=2d = 2 (or higher) can be readily used in approximate quadratization QAOA ([8]), where the ansatz is fully optimized and it has a mismatch with the cost.

Binary Linear Programming models

We now formulate PZDCSPZ DCS as a binary linear program. Let nn be the number of variables in the problem and MM be the set of monomials (m=∣M∣m = |M|). The maximum circuit depth considered is denoted by TT. This parameter is set as the minimum between the depth given by the template Tempura described above, and twice the sum of the degrees of the monomials minus 11, i.e., ∑μ∈M2∣μ∣−1=O(md)\sum_{\mu\in M} 2|\mu| - 1 = O(md), which represents the naive implementation of all monomials sequentially. Crucially, in the worst-case, this depth is linear in both mm and dd. For handy notation we set [ℓ,m]:={ℓ,…,m}[\ell,m] := \{\ell,\ldots,m\} and [m]:=[1,m][m] := [1,m] for any integers 1≤ℓ≤m1 \le\ell\le m.

Then, we can formulate PZDCSPZ DCS as the following binary linear program.

min⁡ J(a)≔∑r∈[T]ar(10)\min\ J(a) \coloneqq\sum_{r \in[T]} a^r \tag*{(10)}
ar−1≥ar,∀r∈[T]∖1.(11)a^{r-1} \ge a^r,\qquad\forall r \in[T] \setminus1. \tag*{(11)}
bk,k0=1, bk,kT=1,∀k∈[n].(12)b^0_{k,k}=1,\ b^T_{k,k}=1,\qquad\forall k \in[n]. \tag*{(12)}
bk,p0=0, bk,pT=0,∀k,p∈[n] with k≠p.(13)b^0_{k,p}=0,\ b^T_{k,p}=0,\qquad\forall k,p \in[n]\ \text{with } k \ne p. \tag*{(13)}
∑ℓ∈[n](ck,ℓr+cℓ,kr)+∑μ∈Mgk,μr≤ar,∀r∈[T] ∀k∈[n].(14)\sum_{\ell\in[n]} \left(c^r_{k,\ell}+c^r_{\ell,k}\right)+\sum_{\mu\in M}g^r_{k,\mu}\le a^r,\qquad\forall r \in[T]\ \forall k \in[n]. \tag*{(14)}
ck,kr=0,∀r∈[T] and ∀k∈[n].(15)c^r_{k,k}=0,\qquad\forall r \in[T]\ \text{and }\forall k \in[n]. \tag*{(15)}
∑r∈[T]∑k∈[n]gk,μr=1,∀μ∈M.(16)\sum_{r \in[T]}\sum_{k \in[n]}g^r_{k,\mu}=1,\qquad\forall\mu\in M. \tag*{(16)}
gk,μr≤bk,pr−1,∀p∈μ, ∀r∈[T], ∀k∈[n] and ∀μ∈M.(17)g^r_{k,\mu}\le b^{r-1}_{k,p},\qquad\forall p\in\mu,\ \forall r\in[T],\ \forall k\in[n]\ \text{and }\forall\mu\in M. \tag*{(17)}
gk,μr≤1−bk,pr−1,∀p∈[n]∖μ, ∀r∈[T], ∀k∈[n] and ∀μ∈M.(18)g^r_{k,\mu}\le1-b^{r-1}_{k,p},\qquad\forall p\in[n]\setminus\mu,\ \forall r\in[T],\ \forall k\in[n]\ \text{and }\forall\mu\in M. \tag*{(18)}
bk,pr≥bk,pr−1−Γk,pr,∀r∈[T], ∀k,p∈[n].(19)b^r_{k,p}\ge b^{r-1}_{k,p}-\Gamma^r_{k,p},\qquad\forall r\in[T],\ \forall k,p\in[n]. \tag*{(19)}
bk,pr≥Γk,pr−bk,pr−1,∀r∈[T], ∀k,p∈[n].(20)b^r_{k,p}\ge\Gamma^r_{k,p}-b^{r-1}_{k,p},\qquad\forall r\in[T],\ \forall k,p\in[n]. \tag*{(20)}
bk,pr≤bk,pr−1+Γk,pr,∀r∈[T], ∀k,p∈[n].(21)b^r_{k,p}\le b^{r-1}_{k,p}+\Gamma^r_{k,p},\qquad\forall r\in[T],\ \forall k,p\in[n]. \tag*{(21)}
bk,pr≤2−bk,pr−1−Γk,pr,∀r∈[T], ∀k,p∈[n].(22)b^r_{k,p}\le2-b^{r-1}_{k,p}-\Gamma^r_{k,p},\qquad\forall r\in[T],\ \forall k,p\in[n]. \tag*{(22)}
Γk,pr=∑ℓ∈[n]γℓ,k,pr,∀r∈[T], ∀k,p∈[n].(23)\Gamma^r_{k,p}=\sum_{\ell\in[n]}\gamma^r_{\ell,k,p},\qquad\forall r\in[T],\ \forall k,p\in[n]. \tag*{(23)}
γℓ,k,pr≤cℓ,kr,∀r∈[T], ∀k,p,ℓ∈[n].(24)\gamma^r_{\ell,k,p}\le c^r_{\ell,k},\qquad\forall r\in[T],\ \forall k,p,\ell\in[n]. \tag*{(24)}
γℓ,k,pr≤bℓ,pr−1,∀r∈[T], ∀k,p,ℓ∈[n].(25)\gamma^r_{\ell,k,p}\le b^{r-1}_{\ell,p},\qquad\forall r\in[T],\ \forall k,p,\ell\in[n]. \tag*{(25)}
γℓ,k,pr≥cℓ,kr+bℓ,pr−1−1,∀r∈[T], ∀k,p,ℓ∈[n].(26)\gamma^r_{\ell,k,p}\ge c^r_{\ell,k}+b^{r-1}_{\ell,p}-1,\qquad\forall r\in[T],\ \forall k,p,\ell\in[n]. \tag*{(26)}

aa, cc, bb, gg, γ\gamma, Γ\Gamma \hfill binary variables

We have introduced the following supporting binary variables taking values in {0,1}\{0,1\}:

  • ara^r: 1 if and only if something happens in the circuit at layer rr,

  • ck,ℓrc^r_{k,\ell}: 1 if and only if there is a cx gate from qubit kk to qubit ℓ\ell on layer rr,

  • gk,μrg^r_{k,\mu}: 1 if and only if there is a gate corresponding to monomial μ\mu on qubit kk on layer rr,

  • bk,prb^r_{k,p}: 1 if and only if the pp-th variable is taken into account on qubit kk (via sequences of cx gates) between layer rr and r+1r+1, after applying the gates on layer rr. For notation convenience bk,p0b^0_{k,p} represents the rz applied at the beginning of the circuit.

The objective function (10a) aims to minimize the sum of active layers. Constraints (10b) are symmetry-breaking inequalities that will avoid empty layers unless all the monomials have been taken into account. Constraints (10c) and (10d) state the initial and final conditions of the circuit. On the first layer, each qubit carries only monomials of degree one, corresponding to the variable of the same index. On the last layer, uncomputing is required, as this circuit will be part of a larger circuit. Constraints (10e) model the fact that a layer is active if there is a cx or a rotation gate on that layer, and a qubit cannot be acted on by more than one gate per layer. The fact that a qubit cannot control itself through the use of a cx gate is enforced by Constraints (10f). With Constraints (10g) all the monomials are implemented exactly once. Constraints (10h) and (10i) enforce rotation validity. A rotation corresponding to a given monomial can only be implemented if that monomial is properly represented on a given qubit.

The following constraints (10j)-(10q) implement the propagation rule. This rule can be written as the nonlinear (27) in the initial variables. The behavior of CNOT gates, and the overall propagation of terms throughout the circuit, can be explained as a binary sum ⊕2\oplus_2:

bk,pr=bk,pr−1⊕2∑ℓ∈⟦n⟧cℓ,krbℓ,pr−1,for all layers r∈⟦T⟧, and qubits and variables k,p∈⟦n⟧.(27)b^r_{k,p}=b^{r-1}_{k,p}\oplus_2\sum_{\ell\in\llbracket n\rrbracket}c^r_{\ell,k}b^{r-1}_{\ell,p},\quad\text{for all layers }r\in\llbracket T\rrbracket,\text{ and qubits and variables }k,p\in\llbracket n\rrbracket. \tag*{(27)}

which has been translated in Verchère et al. [39] as the following equation:

bk,pr=bk,pr−1+∑ℓ∈⟦n⟧cℓ,krbℓ,pr−1−2bk,pr−1∑ℓ∈⟦n⟧cℓ,krbℓ,pr−1.(28)b^r_{k,p}=b^{r-1}_{k,p}+\sum_{\ell\in\llbracket n\rrbracket}c^r_{\ell,k}b^{r-1}_{\ell,p}-2b^{r-1}_{k,p}\sum_{\ell\in\llbracket n\rrbracket}c^r_{\ell,k}b^{r-1}_{\ell,p}. \tag*{(28)}

In this paper, we adopt a different writing that will lead to a better computational behavior

bk,pr=(bk,pr−1−∑ℓ∈⟦n⟧cℓ,krbℓ,pr−1)2.(29)b^r_{k,p}=\left(b^{r-1}_{k,p}-\sum_{\ell\in\llbracket n\rrbracket}c^r_{\ell,k}b^{r-1}_{\ell,p}\right)^2. \tag*{(29)}

Equation (29) is a quartic polynomial expression. In order to linearize it, we introduce the binary variables:

  • γ\gamma that will satisfy γℓ,k,pr=cℓ,krbℓ,pr−1\gamma^r_{\ell,k,p}=c^r_{\ell,k}b^{r-1}_{\ell,p} and this last equality is enforced through Constraints (10o)–(10q)

  • Γ\Gamma that will satisfy (23). Observe that, from Constraints (10e), at most one of the γ\gamma variables in this summation is equal to one so Γk,pr\Gamma^r_{k,p} is also a binary variable.

Finally, Equation (29) is enforced by the linear equations (10j)–(10l).

Proposition 3. HUBO_BLP features O(Tn3+Tnm)O(Tn^3+Tnm) binary variables and O(Tn3+Tn2m)O(Tn^3+Tn^2m) constraints. Since TT is at worst O(md)O(md), both counts are polynomial in the input.

Proof. By direct computation.

As one can expect, the problem HUBO_BLP (depicted in the model (10)) is difficult to solve to optimality in reasonable amounts of time. To tackle this problem, we add some additional constraints to restrict the set of solutions to explore.

Downward cnot gates (HUBO_BLP_TB_H)

To simplify the routing of the variables throughout the circuit, we can ask for only having CNOT gates such that the index of the control qubit is smaller than the index of the target qubits:

cℓ,kr=0,for all layers r∈⟦T⟧ and for all pairs of qubits ℓ,k∈⟦n⟧ such that k>ℓ.(30)c^r_{\ell,k}=0,\quad\text{for all layers }r\in\llbracket T\rrbracket\text{ and for all pairs of qubits }\ell,k\in\llbracket n\rrbracket\text{ such that }k>\ell. \tag*{(30)}

Downward cnot gates with fixed rotation gates (HUBO_BLP_TBFM_H)

To further simplify, we set the rotation gates placement to be the same as in the template described at the previous section, while keeping the new constraints on downward CNOT gates (Equation (30)). The upper bound TT is set to be the depth of the circuit constructed by the template, and the constraint about empty layers (Equation (10b)) is dropped. We define a map τ\tau as follows:

τ:⟦T⟧×⟦n⟧×M⟶{0,1}\tau:\llbracket T\rrbracket\times\llbracket n\rrbracket\times M\longrightarrow\{0,1\}
(r,k,μ)⟼τ(r,k,μ)={1,if the template puts a rotation gate at layer ron qubit k corresponding to the monomial μ,0,otherwise.(r,k,\mu)\longmapsto\tau(r,k,\mu)= \begin{cases} 1,&\text{if the template puts a rotation gate at layer }r\\ &\text{on qubit }k\text{ corresponding to the monomial }\mu,\\ 0,&\text{otherwise.} \end{cases}

We have the additional new constraint:

gk,μr=τ(r,k,μ),for all layers r∈⟦T⟧, all qubits k∈⟦n⟧ and all monomials μ∈M.(31)g^r_{k,\mu}=\tau(r,k,\mu),\quad\text{for all layers }r\in\llbracket T\rrbracket,\text{ all qubits }k\in\llbracket n\rrbracket\text{ and all monomials }\mu\in M. \tag*{(31)}

Note that the objective is not affected by this change, since only active layers are considered there.

Performance evaluation

We evaluate the different compiling methods over random and low autocorrelation binary sequences (LABS) instances. In both cases, we compare the following algorithms: Qiskit transpilation algorithm (version 2.3.0), tket transpilation algorithm (version 2.18.1), Tempura, a version of Tempura to which we add a Qiskit pass after the algorithm and we call Q-Tempura, as well as the binary linear programs HUBO_BLP, HUBO_BLP_TB_H, HUBO_BLP_TBFM_H. We give a 10 minute time-out constraint, and if reached Gurobi was asked to yield the best solution found or nothing if it had not found one.

We use Gurobi 13.0.1 for solving the binary linear program. We report runtime when the code is run on a MacBook Pro 2020, 2GHz quad-core Intel Core i5 with 32GB RAM. The depth of our methods is computed by importing the resulting circuit in Qiskit.

Instance description

Random instances. We generated 130 random polynomials with nn variables, degree dd, and sparsity δ∈[0,1]\delta\in[0,1], for the expected number of monomials ∣M∣|M| is δ⋅∑k=1n(nk)\delta\cdot\sum_{k=1}^{n} \binom{n}{k} (that is a fraction δ\delta of the set of all possible monomials). To do so, for each possible monomial, that monomial is added with probability δ\delta to the polynomial. In order to ensure the degree dd, at least one random monomial with dd variables is added to the polynomial if none was added during the process. The coefficients of the monomials are random integers uniformly selected from −100-100 to 100100.

LABS instances. We also generated a second set of 28 LABS polynomials6 with fixed degree 4 and monomials of degree 2 and 4.

Experimental results

All the numerical results are given as tables in Appendix § 13. Here we report summarizing figures.

Random instances. We start with the fraction of instances solved below a given depth as well as the runtime in seconds with the respect to the number of monomials (Figure 4). We also report the obtained depth with respect to the number of monomials (Figure 5).

Figure 4. Performance of each method (Random instances). [Left] The plots represent the fraction of instances (yy-axis) for which a specific algorithm synthesizes a circuit under a given depth (xx-axis). [Right] The plots represent the runtime in seconds for each algorithm versus the number of monomials in the polynomial (xx-axis).

Circuit depth versus number of monomials for random instances

Figure 5. Performance of each method (Random instances). The plots represent the depth (yy-axis) which a specific algorithm yield versus the number of monomials in the polynomial (xx-axis). The regression lines are only for display purpose.

As we notice from the figures and the accompanying tables, if we consider the returned depth, the binary linear programs offer the best solutions when they are solved at optimality. Tempura and Q-Tempura are in par with Qiskit and tket on small instances, but then they become very competitive in medium-to-large instances. In particular, Qiskit and then tket are deliver the longest circuits. As for runtime, Qiskit is globally the fastest, but Tempura and Q-Tempura become the methods of choice in large instances. Notice, in the tables, that the depth of Tempura is consistently lower than the naive 2md2md, as discussed.

LABS instances. We report similar results for LABS (Figure 6–Figure 7), yielding globally the same conclusions.

Figure 6. Performance of each method (LABS instances). [Left] The plots represent the fraction of instances (yy-axis) for which a specific algorithm synthesizes a circuit under a given depth (xx-axis). [Right] The plots represent the runtime in seconds for each algorithm versus the number of monomials in the polynomial (xx-axis).

Figure 7. Performance of each method (LABS instances). The plots represent the depth (yy-axis) which a specific algorithm yield versus the number of monomials in the polynomial (xx-axis). The regression lines are only for display purpose.

min⁡s∈{−1,1}nEn,r(s)=min⁡s∈{−1,1}n∑p=1r−1∑i=1n−r+1(∑j=ii+r−1−psjsj+p)2\min_{s \in\{-1,1\}^{n}} E_{n,r}(s) = \min_{s \in\{-1,1\}^{n}} \sum_{p=1}^{r-1} \sum_{i=1}^{n-r+1} \left(\sum_{j=i}^{i+r-1-p} s_j s_{j+p}\right)^2

with r≤nr \le n, where ss is the sequence and sis_i is its ithi^{\text{th}} component. Here we consider the limited reach version where the reach rr limits the distance between components that interact. The objective function is named the energy function of the sequence ss. This optimization problem is by nature a quadratic polynomial in {−1,1}\{-1,1\} variables and is very well studied, see e.g. Clausen et al. [6].

Conclusions

We have formulated the circuit design problem for binary polynomial optimization as a binary linear program. We have proposed a fast and scalable heuristic solution to it, as well as some variants of the binary programs. We have argue the difficulty of solving such problem, by showing the NP-completeness of a variant of it. We have supported our algorithms by numerical evaluations with respect the state of the art, yielding far shorter circuits in comparable runtimes (for the heuristic). Given the obtained results, while our heuristic delivers shorter circuits with respect to the state of the art, there is still a considerable gap with the optimal solution, leaving plenty of room for future improvements.

Appendices

Proof of Theorem 1

We need a few intermediary results before tackling the main proof.

The core of the proof is a reduction from the 3-edge-coloring problem which consists, given a graph G=(V,E)\mathcal{G}=(V,E) in determining whether it is possible to color the edges of G\mathcal{G} with three colors in such a way that no two incident edges share the same color. This problem is NP-Complete even if G\mathcal{G} is 3-regular [18]. The reduction will, given an instance G\mathcal{G} of 3-edge-coloring builds an instance (PG,DG)(P_{\mathcal{G}},D_{\mathcal{G}}) of (2, 9)-PZDCS-Top. We recall that we indicate with PG(z)P_{\mathcal{G}}(z) the polynomial in zz for a given graph G\mathcal{G}, and with HP,G(Z)H_{P,\mathcal{G}}(Z) its representation with Pauli-Z operators.

We first do an intermediate reduction to transform G\mathcal{G} into a 3-regular graph G′\mathcal{G}' that will be close to our topology. In order to do so, we expand each edge e=(u,v)∈Ee=(u,v)\in E into a bipartite graph with 8 vertices (u,e1,e2,…,e6,v)(u,e_1,e_2,\ldots,e_6,v) as represented in Figure 8. Note that any feasible coloring of that bipartite graph impose that the color of (u,e1)(u,e_1) is the same as the color of (v,e6)(v,e_6), thus a feasible coloring of G\mathcal{G} can be deduced from a 3-edge-coloring of G′\mathcal{G}' where the color of (u,e1)(u,e_1) is assigned to ee, and conversely. Consequently, G\mathcal{G} is 3-edge-colorable if and only if G′\mathcal{G}' is.

Figure 8. Reduction from G\mathcal{G} to G′\mathcal{G}'. That graph is then directed to obtain the topology DGD_{\mathcal{G}}.

Given G′\mathcal{G}', we now build the polynomial PGP_{\mathcal{G}} and the topology DGD_{\mathcal{G}}. Note that the order of G′\mathcal{G}' is ∣V∣+6∣E∣=10∣V∣|V|+6|E|=10|V| as G\mathcal{G} is 3-regular, we then set the number of variables of the polynomials PG(z)P_{\mathcal{G}}(z) to n=10∣V∣n=10|V|. We define three sets V1V_1, V2V_2, and V3V_3, respectively, hereinafter called source, intermediate, and sink vertices of DGD_{\mathcal{G}}. The source vertices V1V_1 contain each vertex originally in G\mathcal{G} with the nodes e4e_4 and e5e_5 for each edge e∈Ee\in E. The intermediate vertices V2V_2 are the set {e1∣e∈E}\{e_1\mid e\in E\} and the sink vertices V3V_3 contain e2e_2, e3e_3 and e6e_6 for each e∈Ee\in E. We now get the topology DGD_{\mathcal{G}} by directing every edge of G′\mathcal{G}' from V1V_1 to V2V_2, from V2V_2 to V3V_3 and from V1V_1 to V3V_3. Observe first that the vertices in G′\mathcal{G}' and DGD_{\mathcal{G}} are the same, secondly that V1V_1, V2V_2 and V3V_3 are independent sets, thus DGD_{\mathcal{G}} is a 3-regular acyclic digraph.

Finally, we associate to each vertex an index from 1 to nn by numbering arbitrarily the source vertices with {1,…,∣V1∣}\{1,\ldots,|V_1|\}, then the intermediate vertices with {∣V1∣+1,…,∣V1∣+∣V2∣}\{|V_1|+1,\ldots,|V_1|+|V_2|\} and finally the sink vertices with {∣V1∣+∣V2∣+1,…,∣V1∣+∣V2∣+∣V3∣=n}\{|V_1|+|V_2|+1,\ldots,|V_1|+|V_2|+|V_3|=n\}. We get an ordered list W=(w1,w2,…,wn)W=(w_1,w_2,\ldots,w_n) of vertices of DGD_{\mathcal{G}}. Note that this is a topological ordering of the vertices of DGD_{\mathcal{G}}. Given A\mathcal{A} the arcs of DGD_{\mathcal{G}} and (wi,wj)∈A(w_i,w_j)\in\mathcal{A}, we have that i<ji<j. The polynomial PG(z)P_{\mathcal{G}}(z) is set to PG(z)=∑(wi,wj)∈AzizjP_{\mathcal{G}}(z)=\sum_{(w_i,w_j)\in\mathcal{A}}z_i z_j. The degree of PG(z)P_{\mathcal{G}}(z) is, as expected, 2.

The performed procedure is achieved in polynomial time. We now prove that there exists a feasible circuit for that instance (PG,DG)(P_{\mathcal{G}},D_{\mathcal{G}}) if and only if G′\mathcal{G}' is 3-colorable.

Lemma 1. If G′\mathcal{G}' is 3-edge colorable, there exists a circuit of depth 9 encoding PGP_{\mathcal{G}} following the topology DGD_{\mathcal{G}}.

Proof. Let F1,F2,F3F_1,F_2,F_3 be the partition of the sets of edges of G′\mathcal{G}' colored with each of the three colors. By definition, each such set is a matching of G′\mathcal{G}'. The circuit contains, for each k∈{1,2,3}k\in\{1,2,3\} three successive layers:

  • (first layer) a CNOT gate cXij\mathrm{cX}_{ij} for each (wi,wj)∈Fk(w_i,w_j)\in F_k

  • (second layer) an rotation-Z gate rZj\mathrm{rZ}_j for each (wi,wj)∈Fk(w_i,w_j)\in F_k

  • (third layer) a CNOT gate cxij\mathrm{cx}_{ij} for each (wi,wj)∈Fk(w_i,w_j)\in F_k

Note that, first, after the third layer, every qubit represents only itself. Secondly, each monomial zizjz_i z_j is represented at the second, fifth or eighth layer depending if (wi,wj)(w_i,w_j) belongs to F1,F2F_1,F_2 or F3F_3. The circuit contains 9 layers and satisfies the topology constraint, therefore it is feasible.

The rest of the proof is dedicated to show that, given a feasible circuit encoding PGP_{\mathcal{G}}, we can deduce a 3-edge-coloring of G′\mathcal{G}'. Due to the acyclic topology DG\mathcal{D}_{\mathcal{G}}, a feasible circuit for that instance must satisfy the following constraint: the circuit contains only downward cx gates. An immediate consequence is that, if i<ji<j, then the former qubit cannot represent the latter. Therefore, the circuit cannot contain any SWAP circuit and any monomial zizjz_i z_j must be represented on the qubit jj: there are three rotation-Z gates on each qubit associated with a sink vertex and one for the intermediate vertices. In the following lemmas we demonstrate that every rotation-Z gate is either at layer 2, 5 or 8. This partition of the rz gates allows us to build a 3-edge-coloring of G′\mathcal{G}'. For convenience, hereinafter we call rzi,j\mathrm{rz}_{i,j} the rz gate that represents the phase associated to the monomial zizjz_i z_j. We also say that a CNOT gate sends a variable if a monomial ziz_i is routed through it to form another monomial zizjz_i z_j. In the same way a CNOT gate can send multiple variables, if zizj⋯z_i z_j\cdots is routed through it.

Lemma 2. Assuming that there exists a feasible 9-depth circuit for (PG,DG)(P_{\mathcal{G}},\mathcal{D}_{\mathcal{G}}), if the circuit contains a CNOT gate sending two variables or more, there is another feasible 9-depth circuit containing only CNOT gates sending one variable.

Proof. Let cxij\mathrm{cx}_{ij} be a CNOT gate sending a variable zkz_k (k≠ik\ne i), then there exists a directed path in DG\mathcal{D}_{\mathcal{G}} connecting wkw_k to wjw_j through the vertex wiw_i. By construction, the only possible cases are the paths of size 3: (u,e1,e2)(u,e_1,e_2) and (u,e1,e3)(u,e_1,e_3). In the two cases, the gate cxij\mathrm{cx}_{ij} is the only way to send zkz_k to jj. As jj does not represent zkz_k after layer 9, there are an even number of such gates. Also, PGP_{\mathcal{G}} does not contain the monomial zkzjz_k z_j, so while the variable zkz_k is represented on the qubit jj, no rotation-Z gate may be placed on that qubit. Thus the circuit where those gates are removed is still feasible.

:::

Lemma 3. Let wjw_j be a sink vertex. Assuming that there exists a feasible 9-depth circuit for (PG,DG)(P_{\mathcal{G}},\mathcal{D}_{\mathcal{G}}) where every cx gate sends only one variable, there are three rotation-Z gates rzi1,j\mathrm{rz}_{i_1,j}, rzi2,j\mathrm{rz}_{i_2,j} and rzi3,j\mathrm{rz}_{i_3,j} respectively placed at layers 2, 5 and 8 on qubit jj where wi1w_{i_1}, wi2w_{i_2}, wi3w_{i_3} are the three neighbors of wjw_j in G′\mathcal{G}'. In addition, two gates cxi1j\mathrm{cx}_{i_1j} are placed at layers 1 and either 3 or 4, two gates cxi2j\mathrm{cx}_{i_2j} are placed at layers either 3 or 4 and either 6 or 7, and two gates cxi3j\mathrm{cx}_{i_3j} are placed at layers either 6 or 7 and 9.

Proof. By construction, the three neighbors of wjw_j are in V1∪V2V_1\cup V_2. Thus i1,i2,i3≤ji_1,i_2,i_3\leq j and the three gates rzi1,j\mathrm{rz}_{i_1,j}, rzi2,j\mathrm{rz}_{i_2,j} and rzi3,j\mathrm{rz}_{i_3,j} are placed on the qubit jj. As jj represents only zjz_j before the first layer, at least one cx gate sending i1i_1 on jj is placed before rzi1,j\mathrm{rz}_{i_1,j}. As the circuit contains no SWAP gate, this CNOT gate is cxi1j\mathrm{cx}_{i_1j}. Then one or more CNOT gates cxi1j\mathrm{cx}_{i_1j} and cxi2j\mathrm{cx}_{i_2j} are placed between rzi1,j\mathrm{rz}_{i_1,j} and rzi2,j\mathrm{rz}_{i_2,j}. Symmetrically, there are at least two CNOT gates cxi2j\mathrm{cx}_{i_2j} and cxi3j\mathrm{cx}_{i_3j} between rzi2,j\mathrm{rz}_{i_2,j} and rzi3,j\mathrm{rz}_{i_3,j} and one after rzi3,j\mathrm{rz}_{i_3,j}. As the depth of the circuit is 9, we deduce that no additional CNOT gate may be placed: the layers 2, 5 and 8 contain the three rotation-Z gates and the six other layers contain a CNOT gate.

:::

Lemma 4. Let wjw_j be an intermediate vertex. Assuming that there exists a feasible 9-depth circuit for (PG,DG)(P_{\mathcal{G}},\mathcal{D}_{\mathcal{G}}) where every CNOT gate sends only one variable, there is one rotation-Z gate rzi1,j\mathrm{rz}_{i_1,j} placed at layers 2, 5 or 8 on qubit jj where wi1w_{i_1} is the neighbors of wjw_j in V1V_1. In addition, two gates cxi1j\mathrm{cx}_{i_1j} are placed at layers 1 and 3 or 4 if rzi1,j\mathrm{rz}_{i_1,j} is at layer 2, at layers 3 or 4 and 6 or 7 if rzi1,j\mathrm{rz}_{i_1,j} is at layer 5, and at layers 6 or 7 and 9 if rzi1,j\mathrm{rz}_{i_1,j} is at layer 8.

Proof. Let wi2∈V3w_{i_2}\in V_3, wi3∈V3w_{i_3}\in V_3 be the two neighbors of wjw_j in V3V_3. The gate rzi1,j\mathrm{rz}_{i_1,j} is placed on the qubit jj as i1<ji_1<j. That gate is surrounded by two CNOT gates cxi1j\mathrm{cx}_{i_1j} and is then not at layers 1 and 9. Let assume rzi1,j\mathrm{rz}_{i_1,j} is placed at layer 3. According to Lemma 3, as wi2w_{i_2} is a sink vertex, there are two CNOT gates cxji2\mathrm{cx}_{ji_2} in the circuit sending only the variable zjz_j on i2i_2. As i1i_1 is represented by jj between the two gates cxi1j\mathrm{cx}_{i_1j}, the gates cxji2\mathrm{cx}_{ji_2} cannot be placed between them, thus not at layer 2, 3 or 4. However, by Lemma 3, if the gate rzj,i2\mathrm{rz}_{j,i_2} is placed at layer 2 or 5 of the qubit i2i_2, there is one gate cxji2\mathrm{cx}_{ji_2} at layer 3 or 4, which is a contradiction. Thus, rzj2,i2rz_{j_2,i_2} is at layer 8 and there is a gate cxji2cx_{j i_2} at layer 9. The same demonstration can be made for i3i_3. Hence there are two CNOT gates at layer 9 on qubit jj and this is a contradiction. Therefore, rzi1,jrz_{i_1,j} is not at layer 3. Symmetrically, it is not at layer 4, 6 or 7. Thus, it is either at layer 2, 5 or 8. A similar argument can be used to prove that the two gates cxi1jcx_{i_1j} are placed at the layer preceding and following the gate rzi1,jrz_{i_1,j}, otherwise there is no room for the two gates cxji2cx_{j i_2} and the two gates cxji3cx_{j i_3}.

Lemma 5. Assuming that there exists a feasible 9-depth circuit for (PG,DG)(P_{\mathcal{G}},D_{\mathcal{G}}) where every CNOT gate sends only one variable, then G′G' is 3-edge-colorable.

Proof. As no source vertex has an entering arc, every rotation-Z gate is on a qubit associated with an intermediate vertex or a sink vertex. By Lemmas 3 and 4 all those gates are placed on layers 2, 5 or 8. We may now define a partition F1,F2F_1,F_2 and F3F_3 of the edges of G′G' with those sets being respectively all the edges (wi,wj)(w_i,w_j) such that rzi,jrz_{i,j} is at layer 2, 5 or 8. We finally prove that this partition defines a 3-edge-coloring of G′G' by showing that each set is a matching. By definition, two arcs (wi1,wj1)(w_{i_1},w_{j_1}) and (wi2,wj2)(w_{i_2},w_{j_2}) in FkF_k, for any k∈{1,2,3}k \in\{1,2,3\} satisfy j1≠j2j_1 \ne j_2 as the two gates rzi1,j1rz_{i_1,j_1} and rzi2,j2rz_{i_2,j_2} cannot be on the same qubit and at the same layer. If the first set F1F_1 is not a matching then it contains two arcs (i,j1)(i,j_1) and (i,j2)(i,j_2). The two gates rzi,j1rz_{i,j_1} and rzi,j2rz_{i,j_2} are placed at layer 2. However, by Lemmas 3 and 4, this implies that there are two CNOT gates cxij1cx_{ij_1} and cxij2cx_{ij_2} at layer 1 which is a contradiction. Consequently F1F_1 is a matching. For the same reason, F3F_3 also a matching. Assuming that F2F_2 is not a matching, there are two gates rzi,j1rz_{i,j_1} and rzi,j2rz_{i,j_2} placed at layer 5. Hence, by Lemmas 3 and 4, there are four CNOT gates, cxij1cx_{ij_1} and cxij2cx_{ij_2}, each placed twice, at layers 3, 4, 6 and 7. However, let wj3w_{j_3} be the third neighbor of wiw_i. Again, by Lemmas 3 and 4, if j3<ij_3 < i, there must be a gate cxj3icx_{j_3i} at layer 3 or 4 or 6 or 7, depending if the gate rzj3,irz_{j_3,i} is at layer 2, 5 or 8. Similarly if i<j3i < j_3. There is then a contradiction with the four first CNOT gates: F2F_2 is a matching. Consequently, G′G' is 3-edge colorable.

We are now ready to prove Theorem 1

Proof. By Lemmas 1, 2 and 5, the described procedure is a polynomial reduction from the 3-edge-coloring problem to (2, 9)-PZDCS-Top, thus this problem is NP-Complete.

Proof of Proposition 1

To represent a polynomial of degree nn, we need all the unique combinations of indices up to degree nn, of which there are 2n−12^n - 1. With our construction, TnT_n has 2n−1−12^{n-1} - 1 rotations coming from Tn−1T_{n-1} plus one considering αn\alpha_n. To this, we add all the rotations on the second 2n−12^{n-1} layers, i.e., all the rotations on qubit n−1n - 1, as 2n−2−12^{n-2} - 1 and all the ones on qubit nn, as 2n−22^{n-2}. Adding up we obtain a total of unique rotation gates of 2n−12^n - 1, as required.

As for the layers: TnT_n has firstly 2n−12^{n-1} layers by construction, at which we add all the CNOTs plus rotation-Z gates of these first 2n−12^{n-1} layers a second time, adding another 2n−12^{n-1} layers, totalling at 2n2^n. Note that the circuit acting on qubit n−1n - 1 on the second half can happen in parallel with the one acting on qubit nn, so it is not counted here.

Simple examples of the application of Tempura

Example 5. Let us use our algorithm on the following polynomial:

P(z)=z1z2+z1z2z3+z1z2z3z4+z2z4.P(z) = z_1z_2 + z_1z_2z_3 + z_1z_2z_3z_4 + z_2z_4.

First, we apply the template to it, by putting the coefficients of the missing monomials to 0. We obtain the following circuit, depicted in Figure 9.

Template circuit for $P$, with three CNOT-only subcircuits $C_1$, $C_2$, and $C_3$

Figure 9. Template circuit for PP. The subcircuits C1C_1, C2C_2 and C3C_3 only contain CNOT gates.

In this circuit, because some rotation gates are missing, we observe that there are some sequences of CNOT that may contain some redundancy, meaning that we could rewrite this part of the circuit with possibly less gates. For the subcircuit C1C_1, the corresponding matrix is

A1=(1000010000101001)(1000010000100001)(1000010000100101)(1000010000101001)=(1000010000100101).A_1 = \begin{pmatrix} 1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0\\ 0 & 0 & 1 & 0\\ 1 & 0 & 0 & 1 \end{pmatrix} \begin{pmatrix} 1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0\\ 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 1 \end{pmatrix} \begin{pmatrix} 1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0\\ 0 & 0 & 1 & 0\\ 0 & 1 & 0 & 1 \end{pmatrix} \begin{pmatrix} 1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0\\ 0 & 0 & 1 & 0\\ 1 & 0 & 0 & 1 \end{pmatrix} = \begin{pmatrix} 1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0\\ 0 & 0 & 1 & 0\\ 0 & 1 & 0 & 1 \end{pmatrix}.

By looking at the numbers of non-zero off-diagonal term of A1A_1, we know that we can rewrite the subcircuit C1C_1, that originally contained 4 CNOT gates, with only 2 CNOT gates, namely cx24\mathrm{cx}_{24} followed by cx12\mathrm{cx}_{12}. The newly obtained circuit is depicted in Figure 10.

Final circuit

Figure 10. Final circuit.

To conclude the presentation of the template-pruning method, we describe two examples that exhibits some non-trivial behavior.

Example 6. Consider the following circuit, depicted in Figure 11 (left).

Figure 11. Initial (left) and final (right) circuits.

To translate this circuit into a matrix, we read it from right to left. The rightmost CNOT gate is controlled by the first qubit, targeting the third one. The matrix representing it is

T(31)=(100010101).\mathrm{T}^{(31)} = \begin{pmatrix} 1 & 0 & 0\\ 0 & 1 & 0\\ 1 & 0 & 1 \end{pmatrix}.

The second rightmost CNOT gate is controlled by the second qubit, targeting the third one. So far, the matrix representing the part of the circuit we read is

A=T(31)T(32)=(100010101)(100010011)=(100010111).A = \mathbf{T}^{(31)}\mathbf{T}^{(32)} = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 1 & 0 & 1 \end{pmatrix} \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 1 & 1 \end{pmatrix} = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 1 & 1 & 1 \end{pmatrix}.

The next and last CNOT gate is controlled by the first qubit, targeting the second one, so the whole circuit is represented by

AT(21)=(100010111)(100110001)=(100110011).A\mathbf{T}^{(21)} = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 1 & 1 & 1 \end{pmatrix} \begin{pmatrix} 1 & 0 & 0 \\ 1 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix} = \begin{pmatrix} 1 & 0 & 0 \\ 1 & 1 & 0 \\ 0 & 1 & 1 \end{pmatrix}.

We can already read from the matrix that the returned circuit will be of size 2, because there are two non-zero entries below the diagonal. The circuit will be composed of the CNOT gates cx12\mathrm{cx}_{12} and cx23\mathrm{cx}_{23}. We now determined in which order they should be added to the circuit. We start reading the matrix from the bottom right, we read the whole row from right to left, and we do the same on the row above, etc. So here the first non-zero entry we read this way is the one on the third row and second column, so cx23\mathrm{cx}_{23} comes first. Then, the final circuit is represented in Figure 11 (right).

This example is interesting because it shows how a circuit can be rewritten by dropping a CNOT gate, but it also swapped the two other CNOT gates. So the pruning does not simply detect redundant gates one by one, it takes the whole block into account.

Example 7. Consider the following circuit, depicted in Figure 12 (left).

Figure 12. Initial (left) and final (right) circuits.

Its matrix representation is given by

T(32)T(21)=(100010011)(100110001)=(100110111).\mathbf{T}^{(32)}\mathbf{T}^{(21)} = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 1 & 1 \end{pmatrix} \begin{pmatrix} 1 & 0 & 0 \\ 1 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix} = \begin{pmatrix} 1 & 0 & 0 \\ 1 & 1 & 0 \\ 1 & 1 & 1 \end{pmatrix}.

By applying our algorithm, we obtain a circuit of size 3, because of the three non-zero entries below the diagonal. The final circuit is depicted in Figure 12 (right).

This example shows that the transformation of a CNOT-only circuit into its canonical form can make it longer. However, we show in the results that in general the returned circuits are much shorter than the original ones.

Proof of Proposition 2

There are mm non-zero monomials, so Tempura outputs a circuit with mm rotation-Z gates. Note that, given the nature of the template (and owing to the Gray code), besides the first layer, each of these rotation-Z gates are not in parallel. Between each consecutive rotation-Z gates, we need at most 2n2n layers of CNOT gates, due to the transvection construction and [17 Theorem 4]. So we need 2mn+m2mn+m layers (the mm due to the rotation-Z gates).

It is interesting to now that even though the degree of the polynomial is dd, there may be multiple CNOT gates that belong to different qubits between consecutive rotation-Z gates. So we cannot reduce them in 2d2d layers.

Tables of experimental results

All the depth below are reported considering also an initial Hadamard tower and a final rx tower for QAOA implementation. Note that we have also tried a different simplification (instead of our pruning), called greedy Gaussian elimination (GGE, adapted from the more general De Brugiére et al. [7]), with worse depth results than our pruning, and we have chosen not to include it in the tables.

Random instances

InstancesBaselinesAnsatzBinary linear programs
nndd∣M∣|M|Qiskit DepthQiskit CPU [s]Tket DepthTket CPU [s]Tempura DepthTempura CPU [s]Q-Tempura DepthQ-Tempura CPU [s]HUBO_BLP DepthHUBO_BLP CPU [s]HUBO_BLP_TB_H DepthHUBO_BLP_TB_H CPU [s]HUBO_BLP_TBFM_H DepthHUBO_BLP_TBFM_H CPU [s]
32280.0180.07110.0090.0160.0760.0360.03
323110.02110.09100.00100.0180.1580.0680.04
52250.0150.03100.01100.0150.2650.1450.12
525140.01140.11190.01190.02935.5690.55100.30
526140.02140.22190.01190.01931.01101.66130.38
528200.01200.24220.01200.0211600.00111.33150.47
5210230.01230.31250.01230.0213600.00126.41170.50
544150.01130.16130.01130.0183.2790.3890.19
547210.01170.21170.01160.02970.01101.16120.29
5415460.02410.63280.01270.0221600.00164.83180.58
5420530.02470.70310.01310.0327600.002027.80220.77
553210.01130.21150.01150.02––––100.22
5512300.02290.43240.01220.02––––180.52
5516530.02500.83250.01250.02––––210.64
5523670.02641.06330.01310.02––––290.91
5526720.02671.16330.01330.02––––320.93
82280.0180.08100.01100.0262.1260.3460.56
829200.02200.32290.01220.0312600.001126.88181.99
8215260.02260.51430.02350.03–600.0013112.91265.78
8222380.02380.72540.03420.04–600.0018600.00355.28
8228410.02410.96650.04520.05–600.0020600.00437.84
849460.02340.73390.02320.03–600.001545.22173.24
84482340.031673.581160.061060.07–600.00111600.006921.39
84542270.031684.031200.081050.07–600.00123600.0071600.00
84853990.032435.761530.091480.09–600.00172600.0010243.02
841064720.042696.881760.171760.16–600.00–600.0012349.83
85301560.021222.84880.04830.05––––4765.00
85623220.032114.381360.061310.08––––9248.44
85884130.033026.281640.081540.12––––12048.04
851255860.043918.242010.111950.13––––15858.30
851487120.054489.562120.122100.14––––17266.71
86452270.021764.251090.05970.08––––6634.52
86793330.032746.121500.071320.10––––10536.57
861115750.044029.291950.091840.12––––15255.54
861547960.0650711.452350.152300.21––––19172.55
861909510.0658913.302520.142520.20––––21486.65
87522500.042014.811210.061100.11––––76600.00
87834560.053047.151700.081550.13––––11841.69
871316900.0846911.222130.112040.19––––170102.25
871748960.1658913.402540.132510.20––––21279.66
8722612160.1072816.392650.172650.17––––244258.19
88432350.041714.441030.05960.07––––6422.38
881005660.063999.551760.081580.13––––13846.89
881508950.0757713.232330.112240.16––––19193.68
8820311530.0972116.442630.122620.21––––22792.61
8824714120.0983519.372630.122630.17––––256113.55
1028200.02200.26300.03260.0416600.001021.00153.70
10217320.02320.62530.04430.05–600.0013600.002711.71
10228410.02410.95720.04510.09–600.0021600.0043600.00
10235440.03441.23830.06660.12–600.0033600.005339.88
10245530.03531.531060.07790.14–600.0065600.007040.20
Table 1 (PDF p. 24).

Table 2.

Tables of experimental results

InstancesBaselinesAnsatzBinary linear programs
nndd∣M∣|M|Qiskit DepthQiskit CPU [s]Tket DepthTket CPU [s]Tempura DepthTempura CPU [s]Q-Tempura DepthQ-Tempura CPU [s]HUBO_BLP DepthHUBO_BLP CPU [s]HUBO_BLP_TB_H DepthHUBO_BLP_TB_H CPU [s]HUBO_BLP_TBFM_H DepthHUBO_BLP_TBFM_H CPU [s]
104461880.031433.721290.071120.14–600.00110600.0069227.05
1041175670.063549.222910.162630.23–600.00–600.00175295.89
1041577990.0646012.053550.253370.32–600.00–600.00220600.00
10421310660.0854914.504340.254290.42–600.00–600.00293446.20
10426513430.1064516.614920.314920.46–600.00–600.00332592.32
105834980.043437.982260.122070.19––––127600.00
1051619520.0758513.463940.203490.36––––245600.00
10527016180.1088820.955500.305110.41––––374600.00
10534820870.13109625.496530.366230.52––––487600.00
10542725660.17130029.257210.416990.65––––590600.00
1061338530.0657714.853190.212750.23––––187600.00
10623315060.0988922.995020.264650.41––––328600.00
10637224250.15134234.166690.416490.61––––498600.00
10646830710.201612116.777800.527590.70––––580600.00
10659539110.27191559.238720.528720.77––––682600.00
10715110380.0667918.283490.213130.25––––219600.00
10730220540.12123230.635940.335710.58––––418600.00
10747332390.20174844.427980.467650.59––––610600.00
10758841130.27210550.929190.529000.78––––725600.00
10775752490.38255762.119870.599850.81––––838600.00
10816812960.0879020.734090.223690.28––––243600.00
10838227500.17154844.237120.366790.59––––527600.00
10852437970.32199653.698460.648280.65––––668600.00
10870751180.49248865.279920.639750.99––––837600.00
10889265300.76305079.0910390.7710391.14––––952600.00
10920915730.1299129.594750.264340.41––––311600.00
10939429160.20164245.387000.406570.62––––502600.00
10957043690.30228158.599030.518700.75––––721600.00
10977158560.55297775.6310350.5810290.87––––885600.00
10997774800.82353786.1110440.5910441.00––––1008600.00
101018713830.1087124.824390.263950.34––––267600.00
101038729740.21167544.436960.416680.47––––522600.00
101058946150.39237962.018930.488620.68––––735600.00
101080761850.58305479.4610350.5910290.91––––911600.00
1010101379310.85372391.7710330.5810330.99––––1024600.00
1329170.02170.26340.09240.15–600.0010106.591614.55
13232470.03471.06940.12590.17–600.0025600.005554.28
13246620.03621.561140.19920.16–600.0056600.0069600.00
13261650.03652.151440.161020.28–600.0075600.0091600.00
13278710.04713.481780.181330.22–600.0079600.00124176.19
1341668470.0752814.644980.414480.48–600.00–600.00299600.00
13431216340.1291524.098540.647850.79–600.00–600.00512600.00
13448026590.21125237.1611980.8611451.08–600.00–600.00809600.00
13463635400.27150644.2514341.0614091.51–600.00–600.00–600.00
13480645370.33176949.0816861.2716861.75–600.00–600.00–600.00
13533721480.18129134.859420.708530.87––––599600.00
13566546340.37227757.2916651.2415461.94–––––600.00
13598067880.54309276.6222881.7121552.76––––––
135133693850.82398999.7328552.0427433.42––––––
1351664118021.124689121.5733852.5232034.09––––––
13655644040.25245973.4315271.1913771.33––––––
136116093320.714385120.3126942.5825212.94––––––
1361690137281.285917158.3135392.9233514.46––––––
1362228181781.967371201.9842474.4041516.04––––––
1362808231413.168715252.5247734.4647738.19––––––
13781971210.473823110.5021371.7118792.21––––––
1371643145601.336798194.6736092.9233014.54––––––
1372506226132.639874285.0048334.1845628.85––––––
1373251292874.2512180380.1956254.43543810.42––––––
1374095370385.6914580418.8763845.71625814.13––––––
138107298380.814835144.5826281.9223593.09––––––
1382151198803.038785239.2143473.2240295.76––––––
1383227305395.3912339362.7857704.2155209.97––––––
1384360417079.3715605486.8267725.21665213.80––––––
13853825167513.8318288523.4873056.41730517.53––––––
1391298126131.166372185.7831142.2527803.38––––––
1392579253543.5911409338.7649653.7446267.47––––––
1393925391005.8616087555.6265035.25625511.49––––––
13952055205014.1020235600.0075325.77738115.44––––––
13965266562427.1124201600.0079926.63797618.89––––––
13101537153101.827586227.8735022.4831464.54––––––
13102943300505.1213219409.4854783.9950858.28––––––
131044654630010.5318668600.0070605.30683513.55––––––
131059646200624.8523575600.0080806.64798517.70––––––
131073847721338.7128044600.0082537.16825319.30––––––

Table 3.

Low Autocorrelation Binary Sequences (LABS) instances

InstancesBaselinesAnsatzBinary linear programs
nndd∣M∣|M|Qiskit DepthQiskit CPU [s]Tket DepthTket CPU [s]Tempura DepthTempura CPU [s]Q-Tempura DepthQ-Tempura CPU [s]HUBO_BLP DepthHUBO_BLP CPU [s]HUBO_BLP_TB DepthHUBO_BLP_TB CPU [s]HUBO_BLP_TBFM DepthHUBO_BLP_TBFM CPU [s]
545250.07210.41160.04150.07929.53100.89130.42
547350.02290.39200.01200.0211600.00110.90140.44
647350.02290.44230.01220.0210600.00114.91151.05
6411500.02420.71290.01290.02–600.001418.16191.37
6413650.02520.96330.01310.0229600.00157.43211.78
749450.02370.59290.01280.02–600.001233.40181.90
7415650.02550.97410.02370.03–600.0016600.00263.00
7419940.02811.52550.02480.04–600.0018600.00327.77
74221090.02891.60610.02530.03–600.0021187.70328.19
8411550.02450.70340.02320.03–600.001288.33226.14
8419800.02681.26510.03480.04–600.0018600.00315.51
84251210.021042.02710.03630.04–600.0026600.0042142.24
84311430.021172.23810.04760.05–600.0064600.0049115.41
84341700.021312.60830.04780.05–600.0072600.004814.60
10415750.02610.95440.03410.06–600.0014600.00289.42
104271100.02941.83750.05660.07–600.0052600.004517.44
104371670.021482.901170.10960.14–600.00100600.006148.74
104492030.031713.601400.071280.11–600.00129600.0079148.14
104582710.032264.601620.091480.14–600.00153600.0092211.14
104663000.032395.331800.091660.12–600.00165600.00100600.00
104703260.032485.851850.101730.19–600.00178600.0099600.00
134211050.02851.38590.10560.15–600.0049600.003640.82
134391550.021332.641050.12960.17–600.0078600.006061.19
134552300.032054.441750.231610.23–600.00129600.0091235.33
134762930.032495.632320.192080.26–600.00189600.00123542.26
134944250.043607.382920.262590.34–600.00–600.00159600.00
1341144750.043908.503400.273170.34–600.00–600.00193600.00
1341305380.0444010.884140.343800.36–600.00–600.00245600.00

Table 1 (PDF p. 26).

References

  1. [1]Acuaviva A, Acuaviva A, Acuaviva P (2026) CNOT-Distance is NP-complete under all-to-all connectivity. URL https://arxiv.org/abs/2608.03825.
  2. [2]Amy M, Azimzadeh P, Mosca M (2018) On the controlled-not complexity of controlled-not–phase circuits. Quantum Science and Technology 4(1):015002, URL http://dx.doi.org/10.1088/2058-9565/aad8ca.
  3. [3]Arora S, Barak B (2009) Computational complexity: a modern approach (Cambridge University Press).
  4. [4]Bataille M (2022) Quantum circuits of cnot gates: optimization and entanglement. Quantum Information Processing 21(7):269.DOI
  5. [5]Botea A, Kishimoto A, Marinescu R (2018) On the complexity of quantum circuit compilation. Proceedings of the International Symposium on Combinatorial Search, volume 9, 138–142.
  6. [6]Clausen JV, Crama Y, Lusby R, Rodríguez-Heck E, Ropke S (2024) Solving unconstrained binary polynomial programs with limited reach: Application to low autocorrelation binary sequences. Computers & Operations Research 165:106586.
  7. [7]De Brugière TG, Baboulin M, Valiron B, Martiel S, Allouche C (2021) Gaussian elimination versus greedy methods for the synthesis of linear reversible circuits. ACM Transactions on Quantum Computing 2(3):1–26.DOI
  8. [8]Drăgoi S, Baiardi A, Egger DJ (2026) Approximate quadratization of high-order hamiltonians for combinatorial quantum optimization. Physical Review Research 8(2):023159.DOI
  9. [9]Farhi E, Goldstone J, Gutmann S (2014) A quantum approximate optimization algorithm. arXiv preprint arXiv:1411.4028 .arxiv.org/abs/1411.4028
  10. [10]Gavrielov N, Gutman S, Garion S (2024) Linear circuit synthesis using weighted steiner trees. Quantum Information and Computation 24(9&10):721–733.arxiv.org/abs/2408.04060
  11. [11]Glos A, Krawiec A, Zimborás Z (2022) Space-efficient binary optimization for variational quantum computing. npj Quantum Information 8(1):1–8.DOI
  12. [12]Herrman R, Lotshaw PC, Ostrowski J, Humble TS, Siopsis G (2022) Multi-angle quantum approximate optimization algorithm. Scientific Reports 12(1):6781.DOI
  13. [14]IBM Quantum (2019) Qiskit: An Open-source Framework for Quantum Computing.
  14. [15]Jung J, Choi IC (2025) A new multicommodity network flow model and branch and cut for optimal quantum boolean circuit synthesis. INFORMS Journal on Computing 37(1):42–62.DOI
  15. [16]Koch F, Panahiyan S, Mukherjee R, Doetsch J, Jaksch D (2026) Resource-efficient quantum optimization via higher-order encoding. EPJ Quantum Technology .DOI
  16. [17]Laplace Mermoud D, Simonetto A, Elloumi S (2026) Variational quantum algorithms for permutation-based combinatorial problems: Optimal ansatz generation with applications to quadratic assignment problems and beyond. Quantum 10:1998, ISSN 2521-327X, URL http://dx.doi.org/10.22331/q-2026-02-09-1998.
  17. [18]Leven D, Galil Z (1983) Np completeness of finding the chromatic index of regular graphs. Journal of Algorithms 4(1):35–44.DOI
  18. [19]Madden L, Simonetto A (2022) Best approximate quantum compiling problems. ACM Transactions on Quantum Computing 3(2):1–29.arxiv.org/abs/2106.05649
  19. [20]Mandal A, Roy A, Upadhyay S, Ushijima-Mwesigwa H (2020) Compressed quadratization of higher order binary optimization problems. Proceedings of the 17th ACM International Conference on Computing Frontiers, 126–131.arxiv.org/abs/2001.00658
  20. [21]Markov K, Patel I, Hayes J (2008) Optimal synthesis of linear reversible circuits. Quantum Information and Computation 8(3&4):0282–0294.
  21. [22]Maslov D (2007) Linear depth stabilizer and quantum fourier transformation circuits with no auxiliary qubits in finite-neighbor quantum architectures. Physical Review A – Atomic, Molecular, and Optical Physics 76(5):052310.DOI
  22. [24]Moro L, Paris MG, Restelli M, Prati E (2021) Quantum compiling by deep reinforcement learning. Communications Physics 4(1):178.DOI
  23. [25]Nagarajan H, Lockwood O, Coffrin C (2021) Quantumcircuitopt: An open-source framework for provably optimal quantum circuit design. 2021 IEEE/ACM Second International Workshop on Quantum Computing Software (QCS), 55–63 (IEEE).arxiv.org/abs/2111.11674
  24. [26]Nagarajan H, Szabo Z (2025) Provably optimal quantum circuits with mixed-integer programming. arXiv preprint arXiv:2510.00649 .arxiv.org/abs/2510.00649
  25. [27]Nannicini G, Bishop LS, Günlük O, Jurcevic P (2022) Optimal qubit assignment and routing via integer programming. ACM Transactions on Quantum Computing 4(1):1–31.arxiv.org/abs/2106.06446
  26. [28]Nielsen MA, Chuang I (2002) Quantum computation and quantum information (American Association of Physics Teachers).DOI
  27. [29]Rehfeldt D, Koch T, Shinano Y (2023) Faster exact solution of sparse MaxCut and QUBO problems. Mathematical Programming Computation 15(3):445–470, ISSN 1867-2957, URL http://dx.doi.org/10.1007/s12532-023-00236-6.
  28. [30]Romero SV, Visuri AM, Cadavid AG, Simen A, Solano E, Hegade NN (2025) Bias-field digitized counterdiabatic quantum algorithm for higher-order binary optimization. Communications Physics 8(1):348.DOI
  29. [31]Rotman JJ (1999) An Introduction to the Theory of Groups, volume 148 (Springer Science & Business Media).
  30. [32]Seeley JT, Richard MJ, Love PJ (2012) The Bravyi-Kitaev transformation for quantum computation of electronic structure. The Journal of chemical physics 137(22):224109.DOI
  31. [33]Shaydulin R, Li C, Chakrabarti S, DeCross M, Herman D, Kumar N, Larson J, Lykov D, Minssen P, Sun Y, Alexeev Y, Dreiling JM, Gaebler JP, Gatterman TM, Gerber JA, Gilmore K, Gresh D, Hewitt N, Horst CV, Hu S, Johansen J, Matheny M, Mengle T, Mills M, Moses SA, Neyenhuis B, Siegfried P, Yalovetzky R, Pistoia M (2024) Evidence of scaling advantage for the quantum approximate optimization algorithm on a classically intractable problem. Science Advances 10(22), ISSN 2375-2548, URL http://dx.doi.org/10.1126/sciadv.adm6761.
  32. [34]Shende VV, Markov IL, Bullock SS (2004) Minimal universal two-qubit controlled-NOT-based circuits. Phys. Rev. A 69:062321, URL http://dx.doi.org/10.1103/PhysRevA.69.062321.
  33. [35]Sivarajah S, Dilkes S, Cowtan A, Simmons W, Edgington A, Duncan R (2020) t|ket⟩: a retargetable compiler for NISQ devices. Quantum Science and Technology 6(1):014003.DOI
  34. [38]Vandaele V, Martiel S, Goubault de Brugière T (2022) Phase polynomials synthesis algorithms for nisq architectures and beyond. Quantum Science & Technology 7(4):045027.DOI
  35. [39]Verchère Z, Elloumi S, Simonetto A (2023) Optimizing Variational Circuits for Higher-Order Binary Optimization. IEEE International Conference on Quantum Computing and Engineering (QCE) (Seattle (WA), United States), URL https://hal.science/hal-04174561, 6 pages plus references. Conference: IEEE QCE 2023.arxiv.org/abs/2307.16756
  36. [40]Webster M, Koutsoumpas S, Browne DE (2026) Heuristic and Optimal Synthesis of CNOT and Clifford Circuits. Quantum 10.DOI
  37. [41]Welch J, Greenbaum D, Mostame S, Aspuru-Guzik A (2014) Efficient quantum circuits for diagonal unitaries without ancillas. New Journal of Physics 16(3):033040.
  38. [42]Yan G, Wu W, Chen Y, Pan K, Lu X, Zhou Z, Wang Y, Wang R, Yan J (2024) Quantum circuit synthesis and compilation optimization: Overview and prospects. arXiv preprint arXiv:2407.00736.arxiv.org/abs/2407.00736
  39. [43]Younis E, Iancu CC, Lavrijsen W, Davis M, Smith E (2021) Berkeley quantum synthesis toolkit (bqskit) v1. [Computer Software] https://doi.org/10.11578/dc.20210603.2, URL http://dx.doi.org/10.11578/dc.20210603.2.
  40. [44]Zhou L, Wang ST, Choi S, Pichler H, Lukin MD (2020) Quantum approximate optimization algorithm: Performance, mechanism, and implementation on near-term devices. Physical Review X 10(2):021067.
  41. [45]Zylberman J, Nzongani U, Simonetto A, Debbasch F (2025) Efficient quantum circuits for non-unitary and unitary diagonal operators with space-time-accuracy trade-offs. ACM Transactions on Quantum Computing 6(2):1–43.arxiv.org/abs/2404.02819

Paper details

vlnc:W_yd5s8q88
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Physics and Astronomy

Not recorded for this paper

View statement
Looking for related papers…
Contents