Matthew Amy’s research while affiliated with Simon Fraser University and other places

What is this page?


This page lists works of an author who doesn't have a ResearchGate profile or hasn't added the works to their profile yet. It is automatically generated from public (personal) data to further our legitimate goal of comprehensive and accurate scientific recordkeeping. If you are this author and want this page removed, please let us know.

Publications (39)


Linear and Non-linear Relational Analyses for Quantum Program Optimization
  • Article

January 2025

·

4 Reads

·

3 Citations

Proceedings of the ACM on Programming Languages

Matthew Amy

·

The phase folding optimization is a circuit optimization used in many quantum compilers as a fast and effective way of reducing the number of high-cost gates in a quantum circuit. However, existing formulations of the optimization rely on an exact, linear algebraic representation of the circuit, restricting the optimization to being performed on straightline quantum circuits or basic blocks in a larger quantum program. We show that the phase folding optimization can be re-cast as an affine relation analysis , which allows the direct application of classical techniques for affine relations to extend phase folding to quantum programs with arbitrarily complicated classical control flow including nested loops and procedure calls. Through the lens of relational analysis, we show that the optimization can be powered-up by substituting other classical relational domains, particularly ones for non-linear relations which are useful in analyzing circuits involving classical arithmetic. To increase the precision of our analysis and infer non-linear relations from gate sets involving only linear operations — such as Clifford+t — we show that the sum-over-paths technique can be used to extract precise symbolic transition relations for straightline circuits. Our experiments show that our methods are able to generate and use non-trivial loop invariants for quantum program optimization, as well as achieve some optimizations of common circuits which were previously attainable only by hand.


Fig. 1. The relational approach to phase folding. If every classical state | ì ′ in the support of | ì satisfies ′ = , a phase gate on | can be commuted through . More generally, a phase conditional on some function : F 2 → F 2 commutes with if and only if ( ì ) = ( ì ′ ) for all ì ′ in the support of | ì .
Fig. 11. A circuit with eliminable gates. The loop satisfies the invariant (1 ⊕ ′ 0 ) ′ 1 = (1 ⊕ 0 ) 1 .
Linear and non-linear relational analyses for Quantum Program Optimization
  • Preprint
  • File available

October 2024

·

15 Reads

The phase folding optimization is a circuit optimization used in many quantum compilers as a fast and effective way of reducing the number of high-cost gates in a quantum circuit. However, existing formulations of the optimization rely on an exact, linear algebraic representation of the circuit, restricting the optimization to being performed on straightline quantum circuits or basic blocks in a larger quantum program. We show that the phase folding optimization can be re-cast as an \emph{affine relation analysis}, which allows the direct application of classical techniques for affine relations to extend phase folding to quantum \emph{programs} with arbitrarily complicated classical control flow including nested loops and procedure calls. Through the lens of relational analysis, we show that the optimization can be powered-up by substituting other classical relational domains, particularly ones for \emph{non-linear} relations which are useful in analyzing circuits involving classical arithmetic. To increase the precision of our analysis and infer non-linear relations from gate sets involving only linear operations -- such as Clifford+T -- we show that the \emph{sum-over-paths} technique can be used to extract precise symbolic transition relations for straightline circuits. Our experiments show that our methods are able to generate and use non-trivial loop invariants for quantum program optimization, as well as achieve some optimizations of common circuits which were previously attainable only by hand.

Download


Polynomial-Time Classical Simulation of Hidden Shift Circuits via Confluent Rewriting of Symbolic Sums

August 2024

·

12 Reads

Implementations of Roetteler's shifted bent function algorithm have in recent years been used to test and benchmark both classical simulation algorithms and quantum hardware. These circuits have many favorable properties, including a tunable amount of non-Clifford resources and a deterministic output, and moreover do not belong to any class of quantum circuits which is known to be efficiently simulable. We show that this family of circuits can in fact be simulated in polynomial time via symbolic path integrals. We do so by endowing symbolic sums with a confluent rewriting system and show that this rewriting system suffices to reduce the circuit's path integral to the hidden shift in polynomial-time. We hence resolve an open conjecture about the efficient simulability of this class of circuits.


A Sound and Complete Equational Theory for 3-Qubit Toffoli-Hadamard Circuits

July 2024

·

15 Reads

We give a sound and complete equational theory for 3-qubit quantum circuits over the Toffoli-Hadamard gate set {X,CX,CCX,H}\{ X, CX, CCX, H \}. That is, we introduce a collection of true equations among Toffoli-Hadamard circuits on three qubits that is sufficient to derive any other true equation between such circuits. To obtain this equational theory, we first consider circuits over the Toffoli-K gate set {X,CX,CCX,K}\{ X, CX, CCX, K \}, where K=HHK=H\otimes H. The Toffoli-Hadamard and Toffoli-K gate sets appear similar, but they are crucially different on exactly three qubits. Indeed, in this case, the former generates an infinite group of operators, while the latter generates the finite group of automorphisms of the well-known E8E_8 lattice. We take advantage of this fact, and of the theory of automorphism groups of lattices, to obtain a sound and complete collection of equations for Toffoli-K circuits. We then extend this equational theory to one for Toffoli-Hadamard circuits by leveraging prior work of Li et al. on Toffoli-Hadamard operators.





Improved Synthesis of Toffoli-Hadamard Circuits

July 2023

·

5 Reads

·

8 Citations

Lecture Notes in Computer Science

The matrices that can be exactly represented by a circuit over the Toffoli-Hadamard gate set are the orthogonal matrices of the form M/2kM/\sqrt{2}{}^k, where M is an integer matrix and k is a nonnegative integer. The exact synthesis problem for this gate set is the problem of constructing a circuit for a given such matrix. Existing methods produce circuits consisting of O(2nlog(n)k)O(2^n\log (n)k) gates, where n is the dimension of the matrix. In this paper, we provide two improved synthesis methods. First, we show that a technique introduced by Kliuchnikov in 2013 for Clifford+T circuits can be straightforwardly adapted to Toffoli-Hadamard circuits, reducing the complexity of the synthesized circuit from O(2nlog(n)k)O(2^n\log (n)k) to O(n2log(n)k)O(n^2\log (n)k). Then, we present an alternative synthesis method of similarly improved cost, but whose application is restricted to circuits on no more than three qubits. Our results also apply to orthogonal matrices over the dyadic fractions, which correspond to circuits using the 2-qubit gate HHH\otimes H, rather than the usual single-qubit Hadamard gate H.KeywordsQuantum circuitsExact synthesisToffoli-Hadamard


Complete Equational Theories for the Sum-Over-Paths with Unbalanced Amplitudes

June 2023

·

4 Reads

Vilmart recently gave a complete equational theory for the balanced sum-over-paths over Toffoli-Hadamard circuits, and by extension Clifford+diag(1,ζ2k)\mathrm{diag}(1, \zeta_{2^k}) circuits. Their theory is based on the phase-free ZH-calculus which crucially omits the average rule of the full ZH-calculus, dis-allowing the local summation of amplitudes. Here we study the question of completeness in unbalanced path sums which naturally support local summation. We give a concrete syntax for the unbalanced sum-over-paths and show that, together with symbolic multilinear algebra and the interference rule, various formulations of the average and ortho rules of the ZH-calculus are sufficient to give complete equational theories over arbitrary rings and fields.


Citations (22)


... The main circuit optimization techniques used in this article are well-known methods from ZX-calculus: Pauli pushing, phase folding, and Hadamard pushing [2], [13]. The gatepushing techniques involve pushing gates through the quantum circuit following Clifford commutation rules. ...

Reference:

Optimizing State Preparation for Variational Quantum Regression on NISQ Hardware
Linear and Non-linear Relational Analyses for Quantum Program Optimization
  • Citing Article
  • January 2025

Proceedings of the ACM on Programming Languages

... Their work has been extended to further gatesets by [AGR20]. Most recently [AGK+24] have shown that an n-qubit unitary matrix U can be exactly represented with the gateset G 2 k iff U 's entries are in Z[1/2, ζ 2 k ] (see Theorem 3.1), where ζ 2 k = e 2πi/2 k is a primitive 2 k -th root of unity, G 2 = {X, CX, CCX, H ⊗ H} (X, CNOT, Toffoli, Hadamard), G 4 = {X, CX, CCX, S, ζ 8 H}, and for k ≥ 3, G 2 k = {H, CX, T 2 k } with T 2 k = 1 0 0 ζ 2 k (T ≡ T 8 , S ≡ T 4 ). Surprisingly, QMA 1 has recently appeared in computational topology: King and Kohler [KK24] have shown that the problem of determining wether the clique complex of a weighted graph has a hole, is QMA 1 -hard and contained in QMA, given a suitable promise. ...

Exact Synthesis of Multiqubit Clifford-Cyclotomic Circuits
  • Citing Chapter
  • May 2024

... Rewrite systems for path sums have been studied in [3][4][5]32,33]. In [3], a rewrite system which was complete for deciding equivalence of Clifford path sums was given, and later extended to a complete equational theory in [32]. ...

Symbolic Synthesis of Clifford Circuits and Beyond

Electronic Proceedings in Theoretical Computer Science

... Vilmart [70] proposes a set of rewrite rules for Toffoli-Hadamard circuits, and proves termination and completeness of the rules via a translation to the ZH calculus [7]. Amy [3] considers the path sum representations with unbalanced coefficients, and provides complete equational theories over rings and fields. ...

Complete Equational Theories for the Sum-Over-Paths with Unbalanced Amplitudes

Electronic Proceedings in Theoretical Computer Science

... Unlike existing approaches, AlphaTensor-Quantum leverages and exploits gadgets. These constructions are an active area of research 42,43,55,56 , and as fundamentally new gadgets are discovered, they can be readily incorporated into the RL environment, possibly allowing AlphaTensor-Quantum to discover even more efficient constructions the original construction. This kind of optimization happens often because CCZ gates can usually be moved freely along the circuit, as the corresponding unitary matrix will be diagonal after compilation. ...

Phase-state duality in reversible circuit design
  • Citing Article
  • November 2021

Physical Review A

... The recent advancements in quantum computing (QC) [Preskill, 2018] underscore the necessity for robust methodologies within Quantum Software Engineering (QSE) [Jiménez-Navajas et al., 2025]. Consequently, well-established topics in classical Software Engineering (SE)-such as code generation [Jin et al., 2025] [Asif et al., 2025] [ Dupuis et al., 2024], refactoring [Zhao, 2023] [Tsantalis et al., 2022], metric definition [Nation et al., 2025] [Quetschlich et al., 2023] [Zhao, 2021], algorithmic strategy design [Xu et al., 2018], development stacks [Guo et al., 2023], debugging and testing strategies [Ramalho et al., 2024] [Ali et al., 2021 [Li et al., 2020], and languages and compilers [Amy and Gheorghiu, 2020] [Sivarajah et al., 2021]-must now be re-examined within the QSE framework, demanding more sophisticated approaches. ...

staq - A full-stack quantum processing toolkit

... This has given rise to several extensions to quantum computing [Carette et al. 2024a,b]. Similarly, there is a line of research on classes of quantum circuits [Amy et al. 2020] in terms of generators and relations for several classes of unitary groups [Bian and Selinger 2021;Greylyn 2014;Li et al. 2021]. The current work pushes this development to its natural conclusion by making it uniform in three ways: completeness holds in all dimensions (rather than excepting single qubits); it focuses on controlled gates and the Hadamard gate (rather than ⊗ ); and its scalars range over a single free ring (rather than having to deal with √ 2 in an ad hoc way). ...

Number-Theoretic Characterizations of Some Restricted Clifford+T Circuits

Quantum

... As can be seen, gates U 2 and U 3 are susceptible to be fused, while the rotations in the Z axis do not modify the measurement in the computational basis, therefore they can be eliminated. Conversely, circuit verification ensures the correctness of these optimized quantum circuits, verifying that the transformations applied during optimization preserve the intended functionality, with techniques like [ 6] and ZX-Calculus [ 12] maintaining circuit integrity. In quantum compilation, while many compilers like Qiskit, Pro-jectQ, and ScafCC focus primarily on optimization, the integration of verifica- tion underscores the importance of ensuring circuit correctness throughout the compilation process. ...

Towards Large-scale Functional Verification of Universal Quantum Circuits

Electronic Proceedings in Theoretical Computer Science