Abstract 1 Introduction 2 Background 3 A Syntax and Semantics for Parameterized Circuits 4 A Motivating Example: Circuit Compilation 5 Equivalence Checking Techniques 6 Extending to Rational Coefficients and Global Phase 7 Related Work 8 Conclusion and Future Work References

Cutoff Theorems for the Equivalence of Parameterized Quantum Circuits

Neil J. Ross ORCID Dalhousie University, Halifax, Canada Scott Wesley ORCID Dalhousie University, Halifax, Canada
Abstract

Many promising quantum algorithms in economics, medical science, and material science rely on circuits that are parameterized by a large number of angles. To ensure that these algorithms are efficient, these parameterized circuits must be heavily optimized. However, most quantum circuit optimizers are not verified, so this procedure is known to be error-prone. For this reason, there is growing interest in the design of equivalence checking algorithms for parameterized quantum circuits. In this paper, we define a generalized class of parameterized circuits with arbitrary rotations and show that this problem is decidable for cyclotomic gate sets. We propose a cutoff-based procedure which reduces the problem of verifying the equivalence of parameterized quantum circuits to the problem of verifying the equivalence of finitely many parameter-free quantum circuits. Because the number of parameter-free circuits grows exponentially with the number of parameters, we also propose a probabilistic variant of the algorithm for cases when the number of parameters is intractably large. We show that our techniques extend to equivalence modulo global phase, and describe an efficient angle sampling procedure for cyclotomic gate sets.

Keywords and phrases:
Quantum Circuits, Parameterized Equivalence Checking
Copyright and License:
[Uncaptioned image] © Neil J. Ross and Scott Wesley; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Hardware Quantum computation
; Hardware Equivalence checking
Related Version:
Full Version: https://arxiv.org/abs/2506.20985 [39]
Acknowledgements:
We thank Mingkuan Xu for his feedback on the paper and our initial experiments, Linh Dinh for sharing their insights on the number-theoretic aspects of this paper, and Mingsheng Ying for his feedback on an early draft of the paper.
Editors:
Paweł Gawrychowski, Filip Mazowiecki, and Michał Skrzypczak

1 Introduction

In quantum mechanics, unitary operators describe how the probability distributions of quantum systems evolve over time. In quantum computing, primitive operators (known as quantum gates) are composed in sequence and parallel, to create quantum circuits which prepare quantum systems with desirable probability distributions. By sampling from these distributions, answers can be obtained to many high-value problems, such as those from economics [19], medical science [40, 14], and material science [29]. In these algorithms, an initial guess is made for the correct probability distribution, and then each sample is used to further refine the distribution. To make this search tractable, the probability distributions are sampled from a family of parameterized quantum circuits, known as ansatz circuits.

In practice, the structure of the ansatz circuit is static, so that the parameters only vary the operators which appear within the circuits. The parameterized operators within ansatz circuits can be understood geometrically as rotations by arbitrary angles. As a result, the gate sets used to construct ansatz circuits are necessarily infinite. In contrast, the gate sets implemented by real quantum computers are finite, due to limitations related to error-correction [15]. This means that for each parameter refinement, the ansatz circuit must be recompiled and optimized again. However, the compilation and optimization of quantum circuits are known to be highly error-prone [50, 20], so it is desirable to verify both the equivalence of the optimized circuit to the original circuit, and more generally, the correctness of each optimization. In both cases, it is necessary to reason equationally about parameterized relations between quantum circuits.

The problem of parameterized equivalence-checking has been well-studied in the context of distributed system. Given a set of parameters P and two programs parameterized by P, say C1 and C2, the parameterized-equivalence checking problem asks whether C1(θ)=C2(θ),θP. When P is finite, this problem can be solved by simply testing the elements of P. When P is infinite, one approach to this problem is to find a cutoff n for which checking the equivalence of C1 and C2 for n distinct elements of P implies the equivalence of C1 and C2 for all elements of P [16]. Formally, one tries to find an n such that for all DP, if |D|n, then θDC1(θ)=C2(θ) implies θPC1(θ)=C2(θ). Typically, the choice of n (and sometimes even D) will depend on both C1 and C2, and therefore this technique requires domain-specific insights (see, e.g., [22, 25, 27, 2, 34, 45]). When n becomes intractably large, probabilistic techniques have also been employed [13].

Cutoff-based techniques have yet to see wide application in the domain of parameterized quantum circuit equivalence-checking. In 2020, Miller-Bakewell developed a framework which adapts cutoff-based techniques to quantum circuits [32], though these techniques have yet to be applied in practice. The key insight of this work was to note that parameterized quantum circuits are analytic for realistic gate sets, and (up to a change of variable) can often be expressed as matrices over complex Laurent polynomials. The positive and negative degrees of these Laurent polynomials can be over-approximated in an inductive manner, and correspond to a cutoff for parameterized verification. The main challenge in applying the Miller-Bakewell framework is to identify an appropriate change-of-variables such that all parameterized matrices become matrices over complex Laurent polynomials. Once this change-of-variable has been identified, further steps may be taken, such as deriving a closed-form equation for the cutoff. In Miller-Bakewell’s paper, the framework was applied to ZX-, ZW-, and ZH-diagrams, though closed-form bounds were not derived.

In this paper, we propose a cutoff-based technique for quantum circuits with arbitrary rotations with linear arguments. This technique can be understood as an instantiation of the Miller-Bakewell framework, insofar as each parameterized circuit is realized as a matrix over complex Laurent polynomials. However, the circuits considered in this paper correspond to ZXW-diagrams (i.e., with matrix exponentiation) [42], which are not addressed in Miller-Bakewell’s original work. We derive closed-form equations for these cutoffs, which depend only on the coefficients of the parameters in the circuits. Furthermore, we provide an alternative proof for the correctness of the Miller-Bakewell framework, which depends on the distribution of zeros of Laurent polynomials as opposed to polynomial interpolation. This change in perspective motivates a probabilistic variant of the Miller-Bakewell framework, which is applicable for circuits with intractably large cutoffs.

In Sec. 3, we provide the syntax and semantics for our circuit language. In Sec. 4, we illustrate our technique on a simple real-world example. In Sec. 5, we prove a cutoff theorem, and propose a probabilistic variant. In Sec. 6, we identify and solve several challenges faced when implementing this technique. All appendices can be found in the full paper [39].

2 Background

We write for the set of natural numbers (including zero), for the set of integers, for the set of rational numbers, for the set of real numbers, and for the set of complex numbers. If z, then z¯ denotes the complex conjugate of z. If n, then [n] denotes the set {j:1jn} so that [0]=. If a, then a+=max(0,a) and a=min(0,a).

2.1 Linear Algebra

We assume familiarity with the basics of linear algebra. Otherwise, we refer the reader to an introductory text, such as [7]. Let M be a complex matrix. We let Mj,k denote the entry of M in the j-th row and the k-th column. We recall the following definitions. The conjugate of M is the matrix M¯ such that M¯j,k=Mj,k¯. The transpose of M is the matrix MT such that (MT)j,k=Mk,j. The adjoint of M is the matrix M¯T, and is denoted M. A matrix H is called Hermitian if H=H. A matrix U is called unitary if U is invertible and U1=U.

2.2 Algebraic Numbers and Computation

We assume the reader is familiar with field theory, as found in standard abstract algebra textbooks, such as [17]. Let 𝔽 be a subfield of 𝕂. An element α𝕂 is algebraic over 𝔽 if there exists a polynomial p𝔽[x] such that p(α)=0. We write 𝔽(α) to denote the smallest subfield of 𝕂 containing both 𝔽 and α. If deg(p)=n, then it can be shown that the elements of 𝔽(α) form a finite-dimensional 𝔽-vector space with basis vectors {1,α,α2,,αn1}. Furthermore, this vector space forms an 𝔽-algebra under the multiplication of 𝔽(α). In the case where 𝔽= and 𝕂=, we say that α is an algebraic number. The field of all algebraic numbers is denoted Alg. Algebraic numbers are ideal from a computational perspective, since elements from n-dimensional -vector spaces can be represented exactly using only 2n integers (i.e., the numerators and denominators). This is in contrast to floating-point arithemtic, which is inherently inexact.

A special class of algebraic numbers are the cyclotomic numbers. These are solutions to polynomial equations of the form xn1=0. In other words, each cyclotomic number is a root of unity. We let ζn denote the primitive n-th root of unity, which can be defined analytically as ζn=ei2π/n. For example, ζ2=1 and ζ4=i. The smallest subfield of containing and all cyclotomic numbers is referred to as the universal cyclotomic field. Many algorithms exist to work efficiently with elements of the universal cyclotomic field, such as [10] and [11]. It is well-known that many quantum gate sets can be defined exactly using only finite-dimensional sub-fields of the universal cyclotomic field, such as the Clifford+T gate set [18] and its generalizations [4]. For this reason, recent work in the verification of quantum programs has advocated for the use of cyclotomic numbers as an exact representation [6].

(a) The roots of unity in (ζ8).
(b) (ζ6)=(ζ3) since ζ6=(ζ3)2.
Figure 1: Geometry of the cyclotomic numbers. The basis vectors of [ζn] form the vertices of a regular n-gon on the complex unit circle, with one vertex at (1,0).

In this paper, we also utilize analytic properties of cyclotomic numbers. It follows from Euler’s formula that eiθ=cos(θ)+isin(θ). We can then think of each cyclotomic number as a point of the complex unit circle (see Figure 1(a)). It follows geometrically that (ζn)=(ζ2n) whenever n is odd (see Figure 1(b)). Moreover, it can be shown by simple algebraic manipulations that the following equations hold.

cos(θ) =eiθ+eiθ2 sin(θ) =eiθeiθ2i

If θ is a rational multiple of π, say (q/r)2π, this means that both cos(θ) and sin(θ) are elements of (i,ζr). However, identifying roots of unity can be challenging, since not all elements of norm 1 in the universal cyclotomic field are roots of unity. A well-known example is (3+4i)/5, which has norm 1 but is not a root of unity.

2.3 Multivariate Laurent Polynomials

Let R be a ring. Then R[x1,,xk] denotes the ring of multivariate polynomials with coefficients in R and indeterminates x1 through xk. An arbitrary element fR[x1,,xk] is of the form f(x1,,xk)=tT(atj=1kxjtj) for some finite Tk{0}k with a non-zero sequence {at}tT over R. We write degxj(f) for the degree of f in variable xj and deg(f) for the total degree of f, where degxj(f)=max{tj:tT} and deg(f)=max{j=1ktj:tT}. When R is an integral domain, the following hold for all f,gR[x1,,xk] and j[k].

degxj(fg) =degxj(f)+degxj(g) deg(fg) =deg(f)+deg(g)
degxj(f+g) max{degxj(f),degxj(g)} deg(f+g) max{deg(f),deg(g)}

It is well known that when k=1 and R is an integral domain, either f=0 or f has at most deg(f) zeros. A consequence is that for any SR, if f0 and |S|>degx1(f), then there exists an sS such f(s)0. Moreover, if s is sampled uniformly from S, then Pr(f(x)=0)deg(f)/|S|. The latter two remarks generalize to multivariate polynomials. Further generalization to Laurent polynomials are possible, by clearing the denominators.

Theorem 2.1 (Combinatorial Nullstellensatz [3]).

Let 𝔽 be a field and f a polynomial in 𝔽[x1,x2,,xk] with total degree d1+d2++dk such that the coefficient of j=1kxjdj is nonzero in f. If S1,S2,,Sk are subsets of 𝔽 with |Sj|>dj for each j, then there exists xS1×S2××Sk such that f(x)0.

Theorem 2.2 (DeMillo–Lipton–Schwartz–Zippel Lemma [13, 51, 41]).

Let R be an integral domain and fR[x1,x2,,xk] a polynomial with total degree d. For each finite subset S of R, if s1,s2,,sk are sampled at random, both independently and uniformly from S, then Pr(f(s1,s2,,sk)=0)d/|S|.

We can further generalize multivariate polynomials to multivariate Laurent polynomials, denoted R[x1,x11,,xk,xk1]. In this setting, Tk, so that powers may be positive or negative. For example, f(x1,x2)=x1x2x13+5 is a Laurent polynomial from [x1,x11,x2,x21]. Since the exponents in a Laurent polynomial may be both positive and negative, each Laurent polynomial has both positive and negative degrees. We write degxj+(f) for the positive degree of f in variable xj and degxj for the negative degree of f in variable xj, where degxj+(f)=max{tj+:tT} and degxj(f)=max{tj:tT}. Similarly, the total positive degree of f is deg+(f)=max{j=1ktj+:tT}.

3 A Syntax and Semantics for Parameterized Circuits

This section begins by reviewing quantum states, quantum operators, and their composition, as in [35, Ch. 4]. This background material is then used to give syntax and parameterized semantics for quantum circuits with arbitrary gates, and rotations around arbitrary axes.

3.1 Quantum States

The primitive unit of information in quantum computing is the qubit. As in classical computing, a qubit can be in the states zero and one, denoted |0 and |1. However, a qubit may also be in a superposition of the states |0 and |1. Formally, this means that the state of a qubit |ψ can be described as α|0+β|1 for any α and β satisfying |α|2+|β|2=1. To simplify calculations, we think of |0 and |1 as the standard basis vectors for 2 to obtain the following vector equation: |ψ=α|0+β|1=α[10]+β[01]=[αβ].

Of course, the quantum algorithms described in the introduction of this paper require more than a single qubit of information. Given an n-qubit quantum system, there are clearly 2n possible basis states. For example, when n=2, these are |00, |01, |10, and |11. As before, an n-qubit quantum system may also be in an arbitrary superposition of these basis states with the modulus-squared of the coefficients summing to 1. For example, an arbitrary 2-qubit quantum system has state |ψ=α|00+β|01+γ|10+ρ|11 for any α,β,γ,ρ satisfying |α|2+|β|2+|γ|2+|ρ|2=1. This means that the states of an n-qubit quantum system correspond to the unit vectors in 2n.

3.2 Quantum Operations

A quantum program evolves the state of a quantum system, after which all qubits are measured. Given a quantum state |ψ=j=12nαj|j, the probability of observing state |j is |αj|2. Then the paradigm of quantum computing is to construct an n-qubit quantum system whose probability distribution assigns high probability to the correct output.

The evolution of a quantum system is described by a linear transformation of its state space. Since the laws of physics are reversible, then this transformation must be invertible. Moreover, the inverse of this transformation should be its conjugate transpose. This means that operations on n-qubit systems correspond to unitary matrices. Given an n-qubit state |ψ and an (2n)×(2n) dimensional matrix M, the state obtained by applying M to |ψ is M|ψ. For example, the following four matrices are unitary operations on a qubit.

I =[1001] X =[0110] Z =[1001] Y =[0ii0]

The matrix I corresponds to a no-op and the matrix X corresponds to a not gate. The matrix Z can be understood as adjusting the coefficient of |1 by a factor of (1). This has no classical analogue. The gate Y is equal to (iZ)X, and therefore, corresponds to a not gate followed by some non-classical operation.

An important construct in classical computing is the if-then statement. This can be generalized to quantum computing as follows. Let M be a unitary transformation on an n-qubit quantum system. Then there exists a unitary transformation I2nM on an (n+1)-qubit quantum system, such that I2nM applies M to the last n qubits of a basis state if and only if the first qubit of the basis is in state |1. Formally, I2n is the (2n)×(2n) identity matrix, and I2nM is the direct sum of I2n with M. In terms of matrices, I2nM is simply the block diagonal matrix with blocks I2n and M, as shown below.

I2nM =[I2n00M] I2X =[I200X]=[1000010000010010]

The matrix for I2X, known as a cnot gate, is given above. This generalizes the classical conditional statement: if the first bit is in state |1, then apply a not gate to the second bit.

So far, all of the operations discussed are parameter-free. However, quantum algorithms also make use of rotation gates, which are parameterized by an angle of rotation. As the name suggests, a rotation gate is defined by its axis-of-rotation. Formally, each axis M is a Hermitian unitary matrix. Then one can define, as a generalization of Euler’s formula, the rotation RM(θ) as follows.

RM(θ)=eiMθ/2=n=0(iMθ/2)nn!=cos(θ/2)I+isin(θ/2)M

This definition can be extended to k parameters by taking any transformation f:k. For example, given f(θ1,θ2)=θ1+θ2, we can define a two parameter rotation RM(f) where RM(f)(θ1,θ2)=RM(f(θ1,θ2))=RM(θ1+θ2). In this work, we consider the family of k-variable rational-linear functions with affine translations by rational multiples of π. That is, the set is defined to be {f(θ)=a1θ1+a2θ2++akθk+qπa1,a2,,ak,q}.

The most common rotations in quantum circuits are the I-, X-, Y-, and Z-rotations. However, there are many single qubit rotations not of this form. For example, given any coefficients α,β,γ, if α2+β2+γ2=1, the matrix αX+βY+γZ is also a Hermitian unitary matrix. Note that the matrix RI(2θ) is typically referred to as a global phase gate, rather than an I-rotation.

Example 3.1 (Real Amplitude Ansatz Circuit).

In quantum machine learning, convolutional layers are often implemented using the real amplitude ansatz circuit [1, 5, 31, 26, 48]. This circuit is composed from one or more layers of Z-rotations, each followed by a layer of controlled-not gates. Since Z-rotations do not commute with the targets of controlled-not gates, then these layers can interact in non-trivial ways. The choice of parameter to each Z-rotation is treated as a weight in the quantum machine learning model.

3.3 Composing Quantum Operations

Just like classical operations, quantum operations can also be composed in sequence and in parallel. Of the two, sequential composition is the simplest to describe. Assume that both M and N are operations on an n-qubit quantum system. If N is applied to an n-qubit system |ψ, then the state N|ψ is obtained. If M is then applied to this intermediate state, then the state M(N|ψ) is obtained. This is equivalent to applying MN to |ψ. In other words, the sequential composition of quantum operations corresponds to matrix multiplication.

Now let M denote a quantum operation on an m-qubit quantum system and N denote a quantum operation on an n-qubit quantum system. Intuitively, the parallel composition of M and N should act on the first m-qubits by M, and the last n-qubits by N. However, this composition must also respect superposition, through a property known an bilinearity. To compute this new operation, the Kronecker tensor product is required, which is denoted and defined as follows for matrices of any dimension.

[c1,1c1,2c1,nc2,1c2,2c2,ncm,1cm,2cm,n]M=[c1,1Mc1,2Mc1,nMc2,1Mc2,2Mc2,nMcm,1Mcm,2Mcm,nM]

It follows that (MN)(|ψ|φ)=(M|ϕ)(N|φ) as desired.

3.4 Quantum Circuits

Quantum circuits are constructed from primitive gates, under sequential and parallel composition. In this section, we first define what we take to be primitive gates, and then define what it means to be a circuit over this gate set. The distinction between syntax and semantics is emphasized. In both cases, we introduce inductive principles which will be used later in this paper. Formally, these circuits correspond to diagrams in a certain PROP category [8], with semantics given functorially [28], though this is only used to prove the inductive principles used throughout the paper, and to establish that our semantics and circuit transformations are well-defined (see the full paper for more details).

In what follows, C() is a function symbol used to denote conditional control. A gate set is a collection of basic gates, closed under conditional control. A basic gate is a complex matrix (e.g. unitary operations, state preparation, post-selection) or parameterized rotation. Formally, we take some set 𝒢 of complex matrices and some set of Hermitian unitary matrices. The associated gate set, denoted Σ(𝒢,) is defined inductively as follows.

  • If G𝒢, then GΣ(𝒢,).

  • If M, then RM(f)Σ(𝒢,) for each parameterization f.

  • If GΣ(𝒢,) and G is unitary, then C(G)Σ(𝒢,).

We let in() and out() denote the input and output arities of these gates, which are defined as follows.

  • If G𝒢 is (2n)×(2m), then in(G)=n and out(G)=m.

  • If M is (2n)×(2n) and f, then in(RM(f))=out(RM(f))=n.

  • If GΣ(𝒢,), then in(C(G))=in(G)+1 and out(C(G))=out(G)+1.

We let [[]] denote the parameterized semantics of each gate, which are defined as expected.

  • If G𝒢, then [[G]](θ)=G.

  • If M and f, then [[RM(f)]](θ)=cos(f(θ)/2)I+isin(f(θ)/2)M.

  • If GΣ(𝒢,) with G an (2n)×(2n) unitary, then [[C(G)]](θ)=I2n[[G]](θ).

Since this gate set is defined inductively, then to prove that every gate satisfies a predicate P, it suffices to use well-founded induction (see the full paper).

Proposition 3.2.

Assume that a predicate P on Σ(𝒢,) satisfies the following.

  • Base Case (1). G𝒢,P(G).

  • Base Case (2). M,f,P(RM(f)).

  • Control Induction. GΣ(𝒢,), G unitary and P(G) implies P(C(G)).

Then P(G) holds for each GΣ(𝒢,).

(a) G𝒢.
(b) C(G).
(c) RH(f).
(d) C1//C2.
(e) C2C1.
Figure 2: The graphical language for circuits in Circ(𝒢,).

Circuits are then constructed from the elements of Σ(𝒢,) through sequential and parallel composition. We let () denote sequential composition and (//) denote parallel composition, to distinguish between syntactic compositions and their semantic counterparts. Of course, sequential composition requires that the outputs of the first sub-circuit matches the inputs of the second sub-circuit. To handle this, we extend in() and out() as follows.

  • in(C1//C2)=in(C1)+in(C2) and out(C1//C2)=out(C1)+out(C2).

  • in(C2C1)=in(C1) and out(C2C1)=out(C2).

Then Circ(𝒢,), the family of circuits over the gate set Σ(𝒢,), is defined inductively as follows where ϵ denotes the empty wire with in(ϵ)=out(ϵ)=1.

  • If CΣ(𝒢,), then CCirc(𝒢,).

  • If C1,C2Circ(𝒢,), then C1//C2Circ(𝒢,).

  • If C1,C2Circ(𝒢,) and in(C2)=out(C1), then C2C1Circ(𝒢,).

A graphical language for Circ(𝒢,) is given in Figure 2. The semantic map [[]] extends to these circuits as expected: [[C2//C1]](θ)=[[C2]](θ)[[C1]](θ), [[C2C1]](θ)=([[C2]](θ))([[C1]](θ)), and [[ϵ]]=I2. As with quantum gates, an inductive principle also holds for quantum circuits.

Proposition 3.3.

Assume that a predicate P on Circ(𝒢,) satisfies the following.

  • Base Case (1). P(ϵ).

  • Base Case (2). GΣ(𝒢,),P(G).

  • Parallel Induction. If C1,C2Circ(𝒢,) such that P(C1) and P(C2), then P(C1//C2).

  • Sequential Induction. If C1,C2Circ(𝒢,) such that in(C2)=out(C1) with P(C1) and P(C2), then P(C2C1).

Then P(C) holds for each CCirc(𝒢,).

4 A Motivating Example: Circuit Compilation

=
Figure 3: A parameterized equality used to compile controlled rotations.

We now discuss the verification of a concrete circuit equation. The example is simple but illustrative of the techniques we will develop in the next section. Consider the equation in Figure 3. A naive approach to establishing this equation is to evaluate the right-hand side to obtain the following operator.

(IX)(IRZ(θ))(IX)(IRZ(θ))=[RZ(θ)RZ(θ)00XRZ(θ)XRZ(θ)]

Then, by further simplification, we obtain the following equations.
RZ(θ)RZ(θ) =[eiθ/2eiθ/200eiθ/2eiθ/2] XRZ(θ)XRZ(θ) =[eiθ/2eiθ/200eiθ/2eiθ/2]
Using the identities eaeb=ea+b and e0=1, it then follows that XRZ(θ)XRZ(θ)=RZ(2θ) and RZ(θ)RZ(θ)=I. Consequently,

(IX)(IRZ(θ))(IX)(IRZ(θ))=[I00RZ(2θ)]=(IRZ(2θ)).

This establishes the equation in Figure 3 for all choices of θ. However, this proof depends on the parameterized equations ea+b=eaeb and e0=1. In general, it is challenging to find a complete set of parameterized relations for a parameterized gate set [33]. Moreover, given an arbitrary set of complete relations, the problem of deciding if two expressions are equivalent is known to be undecidable [36]. For these reasons, we adopt a different approach.

A perhaps surprising result is that all parameterized circuit equalities can be established by checking only a finite number of rotation angles. In other words, if the equality in Figure 3 did not hold, then a counterexample could be found by checking only a fixed number of instances. To do this, we first convert the equality into a family of polynomials, such that the equality holds if and only if all of the polynomials are identically zero. We then find an integer n such that each of the polynomials has degree at most n. Since non-zero polynomials of degree n have at most n roots, then either the polynomial is zero and will evaluate to zero on n+1 angles, or the polynomial is non-zero and at least one of the n+1 angles yields a non-zero result.

To obtain the desired polynomials, we apply the change-of-variable eiθ/2z. Under this change of variable, the following equalities hold.

RZ(θ)RZ(θ) =[z1z00zz1]=[1001]=z2[z200z2]
XRZ(θ)XRZ(θ) =[z1z100zz]=[z200z2]=z2[100z4]

Continuing in this fashion, we can find that each matrix entry on the left-hand side or the right-hand side of Figure 3 has degree at most four. Then the difference between the left-hand side and the right-hand side also has degree at most four. Note that the z2 terms correspond to a removable singularity at z=0, which does not fall on the complex unit circle, and can be safely ignored. Since degree four polynomials have at most four roots, then it suffices to check the equality in Figure 3 using only 5 angles from [0,4π). For example, consider the five angles θj=jπ/2 for 0j4. It is easily verified that (IRZ(2θj))=(IX)(IRZ(θj))(IX)(IRZ(θj)) for all 0j4. Then f(θ)=(IRZ(2θ))(IX)(IRZ(θ))(IX)(IRZ(θ)) has at least five roots. Since each entry of f(θ) has degree at most four, then f is identically zero and Figure 3 must hold. Note that the angles were sampled from [0,4π) since eiθj/2 has period 4π.

While this example was admittedly simplistic, we will see in the next section, that the technique generalizes to all parameterized circuits. In particular, just as in this example, we will see that computing the polynomials is inconsequential. Instead, it will suffice to find an efficient procedure which provides a reason bound on each degree.

5 Equivalence Checking Techniques

In this section, we consider parameterized quantum circuits where all coefficients are from , rather than . We denote these circuits Circ(𝒢,). It is first shown that up to a change of variable, these circuits admit semantics as matrices over the ring of Laurent polynomials [z1,z11,,zk,zk1]. This is then combined with Thm. 2.1 to establish a cutoff-based equivalence checking theorem for these circuits. Using Thm. 2.2, a probabilistic variant is also obtained. In Sec. 6, we show how these results generalize back to parameterized circuits with rational coefficients.

5.1 Polynomial Semantics

This section shows that, up to a change of variable, each circuit Circ(𝒢,) has semantics given by a matrix with entries corresponding to complex Laurent polynomials. Moreover, these polynomials are shown to have degrees bounded by certain sums of the coefficients which appear in the circuit. It follows that the techniques used in Sec. 4 can be generalized to all integral circuits in Circ(𝒢,).

As a first step, a new semantic interpretation [[]]Poly is provided for Circ(𝒢,), which interprets each circuit in Circ(𝒢,) as a polynomial over [z1,z11,,zk,zk1]. Since parameters only appear in trigonometric terms, then a first step is to give Laurent polynomials which abstract the trigonometric terms. Let αk, q, and f(θ)=α1θ1+αkθk+q.
cos(f(θ)2) =ei(f(θ)/2)+ei(f(θ)/2)2=eiq/22j=1k(eiθj/2)aj+eiq/22j=1k(eiθj/2)aj sin(f(θ)2) =ei(f(θ)/2)ei(f(θ)/2)2i=eiq/22ij=1k(eiθj/2)ajeiq/22ij=1k(eiθj/2)aj
By substituting zj=eiθj/2 for each j[k] and letting c=eiq/2, the following Laurent polynomials are obtained.

CPoly(f) =c2j=1kzjαj+12cj=1kzjαj SPoly(f) =ic2j=1kzjαj+i2cj=1kzjαj

Then the following equations hold by construction.
CPoly(f)(eiθ1/2,,eiθk/2) =eiq/22j=1k(eiθj/2)aj+eiq/22j=1k(eiθj/2)aj=cos(f(θ)2) SPoly(f)(eiθ1/2,,eiθk/2) =eiq/22ij=1k(eiθj/2)ajeiq/22ij=1k(eiθj/2)aj=sin(f(θ)2)
Given these polynomials, [[]]Poly is defined inductively on the gates as follows.

  • If G𝒢, then [[G]]Poly=G.

  • If M and f, then [[RM(f)]]Poly=CPoly(f)I+iSPoly(f)M.

  • If GΣ(𝒢,) with G an (2n)×(2n) unitary, then [[C(G)]]Poly=I2n[[G]]Poly.

The semantics extend as expected to sequential and parallel composition. This makes precise the change of variable used in Sec. 4.

Definition 5.1 (Polynomial Abstraction).

A polynomial abstraction is a function [[]] from Circ(𝒢,) to collection of matrices over [z1,z11,,zk,zk1] such that [[C]](θ1,,θk)=[[C]](eiθ1/2,,eiθk/2) for all CCirc(𝒢,).

Theorem 5.2.

[[]]Poly is a polynomial abstraction.

Example 5.3 (Polynomial Semantics).

The calculations from Sec. 4 can be revisited from the perspective of polynomial semantics. Of course, the circuit in Figure 3 is somewhat uninteresting, since the circuit has only one parameter. Instead, we will consider a new circuit with two parameters ρ1 and ρ2 obtained through the substitution θ=f(ρ1,ρ2) where f(ρ1,ρ2)=ρ12ρ2. The sine and cosine polynomials for f are as follows.

CPoly(f) =12z1z22+12z11z22 SPoly(f) =i2z1z22+i2z11z22

Then CPoly(f)+iSPoly(f)=z1z22 and CPoly(f)iSPoly(f)=z11z22. Let C1 denote the right-hand side of the equation in Figure 3. To compute [[C1]]Poly, we start by evaluating each gate. Clearly [[C(X)]]Poly=I2X. Moreover,

[[ϵ//RZ(f)]]Poly=I2[[RZ(f)]]Poly =I2[z1z2200z11z22],
[[ϵ//RZ(f)]]Poly=I2[[RZ(f)]]Poly =I2[z11z2200z1z22].

It follows by calculations similar to those in Sec. 4 that,

[[C1]]Poly=[[C(X)]]Poly[[ϵ//RZ(f)]]Poly[[C(X)]]Poly[[ϵ//RZ(f)]]Poly=I2[z12z2400z12z24].

Then [[C1]]Poly(eiρ1/2,eiρ2/2)=IRZ(2f(ρ1,ρ2))=[[C1]](ρ1,ρ2) as expected.  

To check that [[C1]]=[[C2]], it suffices to check symbolically that [[C1]]Poly=[[C2]]Poly. However, it is often too computationally expensive to compute the polynomials explicitly. Instead, one could first upper-bound the degree of each polynomial, and then combine these degree bounds with the theorems of Sec. 2.3. It is not hard to see that for each component of [[RH(f)]]Poly, its degrees are all bounded by the coefficients of f. This property extends to all circuits in Circ(𝒢,) by studying their coefficient sequences. Intuitively, the coefficient sequence of a circuit C is a sequence A(C) over k such that A(C)j is the list of coefficients for the j-th rotation in C. More formally, let (k) denote the set of all finite sequences over k and () denote sequence concatenation. Then A() is defined inductively as follows.

  • If G𝒢, then A(G)=ϵ.

  • If M and f(θ)=a1θ1++akθk+q, then A(RM(f))=((a1,,ak)).

  • If GΣ(𝒢,), then A(C(G))=A(G).

  • If C1,C2Circ(𝒢,), then A(C1//C2)=A(C1)A(C2).

  • If C1,C2Circ(𝒢,) and in(C2)=out(C1), then A(C2C1)=A(C2)A(C1).

Then Circ(𝒢,) is precisely the set of circuits in Circ(𝒢,) such that A(C)(k). We define Σ(𝒢,) analogously. The following definition generalizes the coefficient bound of the degree of a gate to a coefficient bound on the degree of all circuits.

Definition 5.4 (Coefficient Bounded Semantics).

Let [[]] be a polynomial abstraction. A circuit CCirc(𝒢,) with in(C)=n and out(C)=m is coefficient bounded with respect to [[]], denoted Bnd(C), if for each s[2n] and t[2m] with f=([[C]])s,t,

  • (B1). degzj+(f)aA(C)|aj| for each j[k],

  • (B2). degzj(f)aA(C)|aj| for each j[k],

  • (B3). deg+(f)aA(C)κ(a) where κ(a)=max{j=1kaj+,j=1kaj}.

Example 5.5 (Coefficient Bounded Semantics).

Recall C1 from Ex. 5.3. It will be shown that BndPoly(C1) holds. First, the coefficient sequence of C1 must be computed. As illustrated in the previous example, C1 contains only the rotations: R1=C(RZ(ρ1+2ρ2)) and R2=C(RZ(ρ12ρ2)). The coefficient sequences of these rotations are β=(1,2) and γ=(1,2) respectively. Then A(C2)=A(R1)A(R2)=(β)(γ)=(β,γ). Moreover, κ(β)=max{0+2,1+0}=2 and κ(γ)=max{1+0,0+2}=2. By inspecting the matrices in Ex. 5.3, it is clear that the following bounds hold for all j[2] and s,t[4].

degzj+(([[R1]]Poly)s,t) |βj| degzj(([[R1]]Poly)s,t) |βj| deg+(([[R1]]Poly)s,t) κ(β)
degzj+(([[R2]]Poly)s,t) |γj| degzj(([[R2]]Poly)s,t) |γj| deg+(([[R2]]Poly)s,t) κ(γ)

The κ terms can be thought of as adding together the maximum positive degrees of the two terms in each sine or cosine polynomial It turns out that these bounds compose additively under the composition of matrices, motivating properties (B1) through to (B3). In this example αA(C1)|α1|=|1|+|1|=2, αA(C1)|α2|=|2|+|2|=4, and αA(C1)κ(α)=2+2=4 By inspecting the final matrix in Ex. 5.3, it is clear that the following bounds hold for all s,t[4] where f=([[C1]]Poly)s,t.

degz1+(f) 2 degz1(f) 2 degz2+(f) 4 degz2(f) 4 deg+(f) 4

Then C1 satisfies (B1) through to (B3). Therefore, BndPoly(C1) holds  

This rationale given in Ex. 5.5 extends to all circuits in Circ(𝒢,). Since primitive gates map to constant matrices, then they trivially satisfy BndPoly(). By construction of CPoly(f) and SPoly(f), then rotation matrices also satisfy BndPoly(). It is then easy to show, using Prop. 3.2, that every gate in Σ(𝒢,) satisfies BndPoly(). With a slightly more careful analysis, it can then be shown that this invariant is closed under sequential and parallel composition. Intuitively, both matrix multiplication and the Kronecker tensor product yields sums of products of polynomials, in which each term can be shown to satisfy the degree bounds. Then by Prop. 3.3, every circuit in Circ(𝒢,) also satisfies BndPoly(). Given these coefficient bounded semantics, the singularity factoring techniques of Sec. 4 can then be applied to obtain Cor. 5.7. All proof details can be found in the full paper.

Theorem 5.6.

If CCirc(𝒢,), then BndPoly(C).

Corollary 5.7.

If C1Circ(𝒢,) and C2Circ(𝒢,) with in(C1)=in(C2)=n and out(C1)=out(C2)=m, then for each pair of indices s[2n] and t[2m], there exists a polynomial f[x1,,xk] such that,

  • (D1). degxj(f)2λj for each j[k],

  • (D2). deg(f)max{aA(C)κ(a):C{C1,C2}}+j=1kλj,

  • (D3). ([[C1]][[C2]])s,t(θ)=0 if and only if f(eiθ1/2,,eiθk/2)=0,

where λj=max{aA(C)|aj|:C{C1,C2}} for each j[k].

An interesting observation is that the bounds obtained through Thm. 5.6 were tight in Ex. 5.5. A natural question is whether these bounds are always tight, with respect to the granularity of the abstraction. We answer this question in the positive, by showing that for each coefficient sequence α, there exists a circuit C with A(C)=α such that the corresponding bound is tight. Of course, it is not possible to reconstruct a circuit from its coefficient sequence, so some information must be lost. To this end, we exhibit a family of circuits in Ex. 5.9, each of degree zero, for which arbitrarily large bounds can be obtained. In this example, relations exist between the rotations that depend on the axes-of-rotation and the parameter-free gates in the circuit, both of which are not captured by the coefficient sequence. In particular, both examples rely on the relations (RX(β))(RX(γ))=RX(β+γ) and Z(RX(β))=(RX(β))Z.

(a) The circuit for α=((1,2),(0,1)).
(b) (RX(nθ))Z(RX(nθ)).
Figure 4: Circuits used in Ex. 5.8 and Ex. 5.9 to illustrate the precision of Bnd().
Example 5.8 (Necessary Bounds).

Let α be any sequence over k with |α|=n. For each j[n], define a linear function fj(θ)=(αj)1θ1++(αj)kθk and a rotation gate Gj=RX(fj). Now consider the circuit C=G1////Gn (see Figure 4(a)). It follows that A(C)=α. Moreover, ([[C]](θ))0,0=j=1ncos(fj(θ)/2). With regard to the polynomial semantics, [[C]]Poly=2naα(j=1kzkajj=1kzkaj). Clearly degxj+(([[C]]Poly)0,0)=aα|aj| and degxj(g)=aα|aj| for each j[k]. Then BndPoly(C) is tight. Since α was arbitrary, then every coefficient sequence is realizable with tight bounds.  

Example 5.9 (Impact of Circuit Relations).

Fix k=1 as the number of parameters and let n. Consider the circuit C=RX(nθ)ZRX(nθ), as illustrated in Figure 4(b). It follows that [[C]](θ)=(RX(nθ))Z(RX(nθ))=(RX(nθ))(RX(nθ))Z=RX(0)Z=Z. Since [[C]](θ) is constant, its associated polynomials have degree zero. However, BndPoly(C) yields an upper bound of aA(C)|a1|=|n|+|n|=2n, which exceeds the true degree by 2n. Since n was arbitrary, this error can be made arbitrarily large.  

5.2 A Cutoff Theorem for Parameterized Equivalence

This section shows that parameterized equivalence checking reduces to parameter-free equivalence checking for quantum circuits (Thm. 5.10). The proof proceeds as follows. First, Cor. 5.7 is used to characterize a family of polynomials which are identically zero if and only if the two circuits are equal. Using Thm. 2.1, a finite set of points Sk can be constructed to determine if these polynomials are identically zero. The points in S are in bijection with a set of points on the complex unit circle under the transformation xeix/2. It follows that each polynomial is identically zero if and only if [[C1]](s)=[[C2]](s) for all points sS. Note that the polynomials are never explicitly constructed. All proof details are in the full paper.

Theorem 5.10.

Let C1Circ(𝒢,) and C2Circ(𝒢,) with in(C1)=in(C2) and out(C1)=out(C2). If S1,S2,,Sk[0,4π) such that |Sj|>2λj for each j[k], then [[C1]](θ)=[[C2]](θ) for all θk if and only if [[C1]](v)=[[C2]](v) for all vS1×S2××Sk.

Corollary 5.11.

If 𝒢 and consist of matrices over the universal cyclotomic field, then the parameterized equivalence checking problem is decidable for Circ(𝒢,).

As k grows large, the utility of Thm. 5.10 decreases. For example, if each λj is b, then |S1××Sk|=(2b+1)k. That is, the number of instances grows exponentially with k. However, this exponential growth can be overcome by a probabilistic algorithm. Fix a finite subset S of [0,4π)k and assume that s is chosen at random from S. If [[C1]](s)=[[C2]](s), then conclude that [[C1]]=[[C2]], otherwise conclude that [[C2]][[C2]]. Clearly, this algorithm has no false negatives, since [[C1]](s)[[C2]](s) implies [[C2]][[C2]]. A more interesting question is the false positive rate. Note that a false positive occurs when [[C1]](s)=[[C2]](s) but [[C1]][[C2]]. It is shown in the following theorem that the probability of a false positive decreases with order O(1/|S|), as an application of Thm. 2.2.

Theorem 5.12.

Let C1Circ(𝒢,) and C2Circ(𝒢,) with in(C1)=in(C2), out(C1)=out(C2), and [[C1]][[C2]]. For each finite subset S[0,4π), if s1,,sk are sampled at random both independently and uniformly from S, then

Pr([[C1]](s1,,sk)=[[C2]](s1,,sk))d/|S|

where d=max{αA(C)κ(α):C{C1,C2}}+j=1kλj.

6 Extending to Rational Coefficients and Global Phase

The methods presented in Sec. 5 face several limitations. In particular, both Thm. 5.10 and Thm. 5.12 assume that the circuits are integral, and do not allow for equivalence up to global phase. In this section, we show how to extend the techniques of Sec. 5 to handle rational circuits and global phase. We also expand Thm. 5.12 into an algorithm, and consider the problem of angle sampling given a gate set over the universal cyclotomic field.

6.1 Verifying Circuits with Rational Coefficients

Most parameterized quantum circuits have fractional coefficients. For example, the equality in Figure 3 is typically stated with a parameter θ on the left-hand side and the parameters ±θ/2 on the right-hand side. The circuits in Figure 3 are related to these fractional circuits by the substitution f(θ)=θ/2. Conceptually, f:kk reparameterizes the circuit, by inducing a bijection between the parameter space of the rational circuits and the parameter space of the integral circuits. This generalizes to all examples (see the full paper for proofs).

Lemma 6.1.

Let C1,C2Circ(𝒢,). If f:kk is a bijective function, then [[C1]]=[[C2]] if and only if [[C1]]f=[[C2]]f.

The goal of this section is to construct a syntactic transformation which eliminates all rational coefficients, which preserving the semantic interpretation via a bijective reparameterization. A syntactic reparameterization is a map F:Circ(𝒢,)Circ(𝒢,) with a bijective function f:kk such that [[F(C)]]=[[C]]f. The simplest syntactic reparameterization is a linear rescaling of the parameters in the circuit by a non-zero rational vector. For each vector v({0})k, define the map Fv:Circ(𝒢,)Circ(𝒢,) as follows.

  • If G𝒢, then Fv(G)=G.

  • If M and f(θ)=a1θ1+a2θ2++akθk+q, then Fv(RM(f))=RM(g) where g(θ)=(v1a1)θ1+(v2a2)θ2++(vkak)θk+q.

  • If GΣ(𝒢,), then Fv(C(G))=C(Fv(G)).

  • If C1,C2Circ(𝒢,), then Fv(C1//C2)=Fv(C1)//Fv(C2).

  • If C1,C2Circ(𝒢,), then Fv(C2C1)=Fv(C2)Fv(C1).

Theorem 6.2.

For each v({0})k, f:kk defined by f(θ)=(v1θ1,v2θ2,,vkθk) is bijective and Fv is syntactic reparameterization with respect to f.

Now assume that C1 and C2 are circuits in Circ(𝒢,). For the correct choice of v, both Fv(C1) and Fv(C2) are elements of Circ(𝒢,). Intuitively, each vj must be chosen such that it clears the denominators of all coefficients tied to θk in both C1 and C2. Formally, let denom(q) denote the denominator of q and lcm{x1,x2,,xn} denote the least common multiple of x1,x2,,xn. Then for each j[k], Xj={denom(αj):αA(C1)A(C2)} is the set of all denominators of coefficients tied to θk in both C1 and C2. Then vj=lcm(Xj) for each j[k]. Let circLcm(C1,C2) denote this vector.

Theorem 6.3.

If C1,C2Circ(𝒢,) and v=circLcm(C1,C2), then Fv(C1)Circ(𝒢,) and Fv(C2)Circ(𝒢,). Moreover, [[C1]]=[[C2]] if and only if [[Fv(C1)]]=[[Fv(C2)]].

Corollary 6.4.

If 𝒢 and consist of matrices over the universal cyclotomic field, then the parameterized equivalence checking problem is decidable for Circ(𝒢,).

6.2 Verifying Circuits Modulo Global Phase

In Sec. 5 the circuits C1 and C2 where defined to be equivalence when [[C1]](θ)=[[C2]](θ) for all θk. For many applications, this notion of equivalence is far too strict. This is because C1 and C2 will prepare the same probability distribution provided there exists some function p:k such that [[C1]](θ)=eip(θ)[[C2]](θ) for all θk. When such a function exists, we say that C1 and C2 are equivalent modulo global phase. Of course, verifying the existence of an arbitrary p is infeasible. Prior work has assumed p to be affine linear [21, 38, 47]. That is, p(θ)=α1θ1+αkθk+β. We further assume that α1 through to αk are rational. In this section we show how to verify the equivalence of C1 and C2 modulo affine rational linear global phase, under the following assumptions.

  1. 1.

    All matrices in are defined over the universal cyclotomic field.

  2. 2.

    All matrices in 𝒢 are injective and defined over the universal cyclotomic field.

In practice, the second assumption restricts 𝒢 to unitary operations and state preparation.

Since the universal cyclotomic field is closed under addition and multiplication, then every global phase will be cyclotomic when evaluated at rational multiples of π. In general, α need not be rational, since there exists cyclotomic numbers of norm 1 which are not roots of unity. However, the periodicity of [[C1]] an [[C2]] ensure that αk. Using properties of cyclotomic numbers, such as the fact that (ζ2n)=(ζn) for odd n, it is then possible to solve for α (if it exists). In the full paper, an algorithm FindPhase(C1,C2) is described to compute these coefficients. The injectivity of 𝒢 ensures that all coefficients can be isolated (this condition is sufficient but not necessary). In the case where C1 and C2 are not equivalent up to global phase, then arbitrary coefficients are returned. Otherwise, the function FindPhase(C1,C2) returns a tuple (z,f) such that z=eiβ and f(θ)=(2α1)θ1++(2αk)θk. Then the global phase can be offset by introducing a unitary gate zI and a global phase gate RI(f). Then equivalence modulo global phase reduces to exact equivalence as follows.

Theorem 6.5.

Assume 𝒢 and consist of matrices over the universal cyclotomic field, with all gates in 𝒢 injective. If C1,C2Circ(𝒢,) and (z,f)=FindPhase(C1,C2), then C1 is equivalent to C2 modulo affine rational linear global phase if and only if the equation [[C1]]=[[zIRI(f)C2]] holds.

Corollary 6.6.

If 𝒢 and satisfy assumptions (1–2), then the parameterized equivalence checking problem is decidable modulo affine rational linear global phase for Circ(𝒢,).

6.3 A Probabilistic Equivalence Checking Procedure

Imagine applying Thm. 5.12 to a pair of quantum circuits C1 and C2. In practice, an end-user would have some desired upper bound p(0,1] on the false positive rate. A simply way to bound the false positive rate is to require that d/|S|p, meaning that d/p|S|. Since d/p is positive and |S| is a natural number, then the minimum value of |S| which satisfies this inequality is N=d/p. Using this optimal solution, the following algorithm is obtained.

  1. 1.

    Compute d=max{αA(C)κ(α):C{C1,C2}}+j=1kλj.

  2. 2.

    Select a set S[0,4π) such that |S|=d/p.

  3. 3.

    Sample s1,,sk at random both independently and uniformly from S.

  4. 4.

    Determine if [[C1]](s1,,sk)=[[C2]](s1,,sk).

The most crucial step of this algorithm is the second step. First, the choice of S must ensure that the values of sin() and cos() are exact. As outlined in Sec. 2.2, the simplest way to do this is to sample S from [0,4π)π for with for which sin() and cos() must evaluate to cyclotomic numbers. This method is particularly effective when 𝒢 and consists purely of matrices over the universal cyclotomic field, in which case all computation can be carried out over the universal cyclotomic field.

Now, consider the elements of sin(S) and cos(S). For each (j/n)π in S, the elements sin(j/n) and cos(j/n) will be elements of [ζn]. Likewise, if is the least common denominator of all fractions in S, then S[ζ]. In the worst case, [ζ] will be an -dimensional vector space. This means that the cost of addition will grow at least linearly with , and the cost of multiplication will grow at least quadratically with .

Theorem 6.7.

If k, S[0,k) and b=|S|, then lcm{denom(s):sS}b/k.

Let M be the smallest multiple of 4 which is greater than or equal to N. It follows from Thm. 6.7 that S={0,(1/M)4π,(2/M)4π,,((M1)/M)4π} minimizes . This set is also easy to compute, and is therefore taken to be the definition of S.

7 Related Work

In the introduction, we discussed the cutoff-based techniques [32], which subsumes prior work such as [23]. In this section, we compare to other approaches.

Circuit Rewriting.

It was highlighted in Ex. 5.9 that circuit rewriting intersects with parameterized equivalence checking. In [38], an incomplete equational theory is given for a family of parameterized circuits, which is shown to be effective for equivalence checking. In [44], a complete set of relations are derived, under the assumption that each parameter appears exactly once in the circuit. Relations which hold for abstract gate sets, such as Σ(𝒢,), have yet to be explored.

Symbolic Techniques.

In [47], symbolic techniques are used to determine parameterized equivalence. Particularly, trigonometric relations, together with the Pythagorean relation cos(θ)2+sin(θ)2=1, are used to reduce equivalence checking to a family of equations over the theory of non-linear real arithmetic. This is then solved using the Z3 [12] solver as a black box. However, the decision problem for non-linear real arithmetic is known to be double-exponential in the number of variables [24, 9], whereas our approach is exponential in the number of variables.

Probabilistic Techniques.

In [46]Thm. 2.2 was used to determine the equivalence of parameterized quantum circuits. However, our technique yields Laurent polynomials rather than ordinary polynomials, which we do not compute explicitly. In [38], Peham et al. show that if v is sampled uniformly at random from [0,4π)k, then Pr([[C1]](v)=[[C2]](v))=0 given [[C1]][[C2]]. However, sampling v from a uniform continuous distribution is impossible on a digital computer, which can only represent a countable and non-enumerable subset of real numbers [43]. In Peham et al., floating-point is used, and presumably, the error is assumed to be uniform as well. In our work, all computation is exact, and therefore, such assumptions do not apply. Since there does not exist a uniform distribution for countable sets, we instead sample uniformly from a finite subset of [0,4π), in which case Thm. 2.2 applies, rather than the analytic results of Peham et al.

8 Conclusion and Future Work

In this paper, we considered the problem of parameterized equivalence checking for quantum circuits. We show that the parameterized problem can be reduced to finitely many instances of the parameter-free problem, regardless of the gate set or axes of rotation. Consequently, the problem is decidable in the case of gate sets defined over the universal cyclotomic field. Moreover, we show that when the number of instances becomes intractable large, there exists a probabilistic variation of the algorithm where the probability of being incorrect can be made arbitrarily small. We have outlined how the techniques can be implemented in practice, taking into account rational coefficients, global phase, and angle sampling.

In future work, we would like to explore how these decision procedures can be implemented efficiently using circuit rewriting and sparse matrix representations. In particular, we would like to explore angle sampling and circuit evaluation using ZX-diagrams [37], tensor decision-diagrams [49], and model-counting [30], which have all proven effective in parameter-free equivalence checking. We would also like to explore how rewriting-based techniques and symmetry reductions might help to tighten the cutoffs obtained from Bnd(). For example, the bound obtained in Ex. 5.9 could be reduced to zero by viewing each relation as a rewriting rule, and then searching for a derivation which reduces the bound.

References

  • [1] Amira Abbas, David Sutter, Christa Zoufal, Aurelien Lucchi, Alessio Figalli, and Stefan Woerner. The power of quantum neural networks. Nature Computational Science, 1(6):403–409, 2021. doi:10.1038/s43588-021-00084-1.
  • [2] Parosh Aziz Abdulla, Frédéric Haziza, and Lukás Holík. All for the price of few. In VMCAI, volume 7737 of LNCS, pages 476–495. Springer, 2013. doi:10.1007/978-3-642-35873-9_28.
  • [3] Noga Alon. Combinatorial Nullstellensatz. Combinatorics, Probability and Computing, 8(1–2):7–29, 1999. doi:10.1017/S0963548398003411.
  • [4] Matthew Amy, Andrew N. Glaudell, Shaun Kelso, William Maxwell, Samuel S. Mendelson, and Neil J. Ross. Exact synthesis of multiqubit Clifford-cyclotomic circuits. In RC, volume 14680 of LNCS, pages 238–245. Springer, 2024. doi:10.1007/978-3-031-62076-8_15.
  • [5] Davis Arthur and Prasanna Date. A hybrid quantum-classical neural network architecture for binary classification, 2022. arXiv:2201.01820.
  • [6] Martin Avanzini, Georg Moser, Romain Péchoux, and Simon Perdrix. On the hardness of analyzing quantum programs quantitatively. In Programming Languages and Systems, volume 14577 of LNCS, pages 31–58. Springer, 2024. doi:10.1007/978-3-031-57267-8_2.
  • [7] Sheldon Axler. Linear Algebra Done Right. Springer, 3rd edition, 2014. doi:10.1007/978-3-031-41026-0.
  • [8] John C. Baez, Brandon Coya, and Franciscus Rebro. Props in network theory. Theory and Applications of Categories, 33(25):727–783, 2010.
  • [9] Nikolaj Bjørne, Leonardo de Moura, Lev Nachmanson, and Christoph M. Wintersteiger. Programming Z3, volume 11430 of LNPSE, pages 148–201. Springer, 2019. doi:10.1007/978-3-030-17601-3_4.
  • [10] Wieb Bosma. Canonical bases for cyclotomic fields. Applicable Algebra in Engineering, Communication and Computing, 1:125–134, 1990. doi:10.1007/BF01810296.
  • [11] Thomas Breuer. Integral bases for subfields of cyclotomic fields. Applicable Algebra in Engineering, Communication and Computing, 8:279–289, 1997. doi:10.1007/s002000050065.
  • [12] Leonardo de Moura and Nikolaj Bjørner. Z3: An efficient SMT solver. In TACAS, volume 4963 of LNCS, pages 337–340. Springer, 2008. doi:10.1007/978-3-540-78800-3_24.
  • [13] Richard A. Demillo and Richard J. Lipton. A probabilistic remark on algebraic program testing. Info. Proc. Letters, 7(4):193–195, 1978. doi:10.1016/0020-0190(78)90067-4.
  • [14] Qi-Ming Ding, Yi-Ming Huang, and Xiao Yuan. Molecular docking via quantum approximate optimization algorithm. Phys. Rev. Appl., 21:034036, 2024. doi:10.1103/PhysRevApplied.21.034036.
  • [15] Bryan Eastin and Emanuel Knill. Restrictions on transversal encoded quantum gate sets. Phys. Rev. Let., 102(11):110502, 2009. doi:10.1103/physrevlett.102.110502.
  • [16] E. Allen Emerson and Kedar S. Namjoshi. On reasoning about rings. Int. J. Found. Comput. Sci., 14(4):527–550, 2003. doi:10.1142/S0129054103001881.
  • [17] Richard M. Foote and David S. Dummit. Abstract Algebra. Wiley, 3rd edition, 2003.
  • [18] Brett Giles and Peter Selinger. Exact synthesis of multiqubit Clifford+T circuits. Phys. Rev. A, 87:032332, 2013. doi:10.1103/PhysRevA.87.032332.
  • [19] Dylan Herman, Cody Googin, Xiaoyuan Liu, Yue Sun, Alexey Galda, Ilya Safro, Marco Pistoia, and Yuri Alexeev. Quantum computing for finance. Nature Rev. Phys., 5(8):450–465, 2023. doi:10.1038/s42254-023-00603-1.
  • [20] Kesha Hietala, Robert Rand, Liyi Li, Shih-Han Hung, Xiaodi Wu, and Michael Hicks. A verified optimizer for quantum circuits. ACM Trans. Program. Lang. Syst., 45(3), 2023. doi:10.1145/3604630.
  • [21] Xin Hong, Wei-Jia Huang, Wei-Chen Chien, Yuan Feng, Min-Hsiu Hsieh, Sanjiang Li, and Mingsheng Ying. Equivalence checking of parameterised quantum circuits, 2024. arXiv:2404.18456.
  • [22] C. Norris Ip and David L. Dill. Better verification through symmetry. In CHDL, volume A-32 of IFIP Transactions, pages 97–111. North-Holland, 1993. doi:10.5555/648251.752211.
  • [23] Emmanuel Jeandel, Simon Perdrix, and Renaud Vilmart. Diagrammatic reasoning beyond clifford+t quantum mechanics. In LICS. ACM, 2018. doi:10.1145/3209108.3209139.
  • [24] Dejan Jovanović and Leonardo de Moura. Solving non-linear arithmetic. In AR, volume 7364 of LNAI, pages 339–354. Springer, 2012. doi:10.1007/978-3-642-31365-3_27.
  • [25] Alexander Kaiser, Daniel Kroening, and Thomas Wahl. Dynamic cutoff detection in parameterized concurrent programs. In CAV, volume 6174 of LNCS, pages 645–659. Springer, 2010. doi:10.1007/978-3-642-14295-6_55.
  • [26] Shu Kanno, Hajime Nakamura, Takao Kobayashi, Shigeki Gocho, Miho Hatanaka, Naoki Yamamoto, and Qi Gao. Quantum computing quantum Monte Carlo with hybrid tensor network for electronic structure calculations. npj Quantum Information, 10(1), 2024. doi:10.1038/s41534-024-00851-8.
  • [27] Ayrat Khalimov, Swen Jacobs, and Roderick Bloem. Towards efficient parameterized synthesis. In VMCAI, volume 7737 of LNCS, pages 108–127. Springer, 2013. doi:10.1007/978-3-642-35873-9_9.
  • [28] F. William Lawvere. Functorial semantics of algebraic theories. Proc. Natl. Acad. Sci. U.S.A., 50(5):869–872, 1963. doi:10.1073/pnas.50.5.869.
  • [29] He Ma, Govoni Marco, and Giulia Galli. Quantum simulations of materials on near-term quantum computers. npj Computational Materials, 6:85, 2020. doi:10.1038/s41524-020-00353-z.
  • [30] Jingyi Mei, Marcello Bonsangue, and Alfons Laarman. Simulating quantum circuits by model counting. In CAV, volume 14683 of LNCS, pages 555–578. Springer, 2024. doi:10.1007/978-3-031-65633-0_25.
  • [31] Dekel Meirom and Steven H. Frankel. PANSATZ: pulse-based ansatz for variational quantum algorithms. Frontiers in Quantum Science and Technology, 2, 2023. doi:10.3389/frqst.2023.1273581.
  • [32] Hector Miller-Bakewell. Finite verification of infinite families of diagram equations. EPTCS, 318:27–52, 2020. doi:10.4204/eptcs.318.3.
  • [33] Hector Miller-Bakewell. Graphical Calculi and their Conjecture Synthesis. PhD thesis, University of Oxford, 2020.
  • [34] Kedar S. Namjoshi and Richard J. Trefler. Parameterized compositional model checking. In TACAS, volume 9636 of LNCS, pages 589–606. Springer, 2016. doi:10.1007/978-3-662-49674-9_39.
  • [35] Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press, 2011.
  • [36] Pyotr Novikov. On the algorithmic unsolvability of the word problem in group theory. Trudy Matematicheskogo Instituta imeni V.A. Steklova, 44:3–143, 1955.
  • [37] Tom Peham, Lukas Burgholzer, and Robert Wille. Equivalence checking of quantum circuits with the ZX-calculus. IEEE Journal on Emerging and Selected Topics in Circuits and Systems, 12(3):662–675, 2022. doi:10.1109/jetcas.2022.3202204.
  • [38] Tom Peham, Lukas Burgholzer, and Robert Wille. Equivalence checking of parameterized quantum circuits: Verifying the compilation of variational quantum algorithms. In ASPDAC, pages 702–708. ACM, 2023. doi:10.1145/3566097.3567932.
  • [39] Neil J. Ross and Scott Wesley. Cutoff theorems for the equivalence of parameterized quantum circuits (extended), 2025. arXiv:2506.20985.
  • [40] Raffaele Santagati, Alan Aspuru-Guzik, Ryan Babbush, Matthias Degroote, Leticia González, Elica Kyoseva, Nikolaj Moll, Markus Oppel, Robert M. Parrish, Nicholas C. Rubin, Michael Streif, Christofer S. Tautermann, Horst Weiss, Nathan Wiebe, and Clemens Utschig-Utschig. Drug design on quantum computers. Nature Phys., 20:549–557, 2024. doi:10.1038/s41567-024-02411-5.
  • [41] J. T. Schwartz. Fast probabilistic algorithms for verification of polynomial identities. J. ACM, 27(4):701–717, October 1980. doi:10.1145/322217.322225.
  • [42] Razin A. Shaikh, Quanlong Wang, and Richie Yeung. How to sum and exponentiate Hamiltonians in ZXW calculus. EPTCS, 394:236–261, 2023. doi:10.4204/eptcs.394.14.
  • [43] A. M. Turing. On computable numbers, with an application to the entscheidungsproblem. Proc. of the London Math. Soc., s2-42(1):230–265, 1937. doi:10.1112/plms/s2-42.1.230.
  • [44] John van de Wetering, Richie Yeung, Tuomas Laakkonen, and Aleks Kissinger. Optimal compilation of parametrised quantum circuits, 2024. doi:10.48550/arXiv.2401.12877.
  • [45] Scott Wesley, Maria Christakis, Jorge A. Navas, Richard Trefler, Valentin Wüstholz, and Arie Gurfinkel. Verifying Solidity smart contracts via communication abstraction in SmartACE. In VMCAI, pages 425–449. Springer, 2022. doi:10.1007/978-3-030-94583-1_21.
  • [46] Amanda Xu, Abtin Molavi, Lauren Pick, Swamit Tannu, and Aws Albarghouthi. Synthesizing quantum-circuit optimizers. Proc. ACM Program. Lang., 7(PLDI), 2023. doi:10.1145/3591254.
  • [47] Mingkuan Xu, Zikun Li, Oded Padon, Sina Lin, Jessica Pointing, Auguste Hirth, Henry Ma, Jens Palsberg, Alex Aiken, Umut A. Acar, and Zhihao Jia. Quartz: superoptimization of quantum circuits. In PLDI, pages 625–640. ACM, 2022. doi:10.1145/3519939.3523433.
  • [48] Daniel Yoffe, Noga Entin, Amir Natan, and Adi Makmal. A qubit-efficient variational selected configuration-interaction method. Quantum Science and Technology, 10(1):015020, 2024. doi:10.1088/2058-9565/ad7d32.
  • [49] Qirui Zhang, Mehdi Saligane, Hun-Seok Kim, David Blaauw, Georgios Tzimpragos, and Dennis Sylvester. Quantum circuit simulation with fast tensor decision diagram. In ISQED, pages 1–8. IEEE, 2024. doi:10.1109/isqed60706.2024.10528748.
  • [50] Pengzhan Zhao, Zhongtao Miao, Shuhan Lan, and Jianjun Zhao. Bugs4Q: A benchmark of existing bugs to enable controlled testing and debugging studies for quantum programs. J. of Systems and Software, 205:111805, 2023. doi:10.1016/j.jss.2023.111805.
  • [51] Richard Zippel. Probabilistic algorithms for sparse polynomials. In EUROSAM, volume 72 of LNCS, pages 216–226. Springer, 1979. doi:10.1007/3-540-09519-5_73.