-
Quantum Circuit Optimization with AlphaTensor
Authors:
Francisco J. R. Ruiz,
Tuomas Laakkonen,
Johannes Bausch,
Matej Balog,
Mohammadamin Barekatain,
Francisco J. H. Heras,
Alexander Novikov,
Nathan Fitzpatrick,
Bernardino Romera-Paredes,
John van de Wetering,
Alhussein Fawzi,
Konstantinos Meichanetzidis,
Pushmeet Kohli
Abstract:
A key challenge in realizing fault-tolerant quantum computers is circuit optimization. Focusing on the most expensive gates in fault-tolerant quantum computation (namely, the T gates), we address the problem of T-count optimization, i.e., minimizing the number of T gates that are needed to implement a given circuit. To achieve this, we develop AlphaTensor-Quantum, a method based on deep reinforcem…
▽ More
A key challenge in realizing fault-tolerant quantum computers is circuit optimization. Focusing on the most expensive gates in fault-tolerant quantum computation (namely, the T gates), we address the problem of T-count optimization, i.e., minimizing the number of T gates that are needed to implement a given circuit. To achieve this, we develop AlphaTensor-Quantum, a method based on deep reinforcement learning that exploits the relationship between optimizing T-count and tensor decomposition. Unlike existing methods for T-count optimization, AlphaTensor-Quantum can incorporate domain-specific knowledge about quantum computation and leverage gadgets, which significantly reduces the T-count of the optimized circuits. AlphaTensor-Quantum outperforms the existing methods for T-count optimization on a set of arithmetic benchmarks (even when compared without making use of gadgets). Remarkably, it discovers an efficient algorithm akin to Karatsuba's method for multiplication in finite fields. AlphaTensor-Quantum also finds the best human-designed solutions for relevant arithmetic computations used in Shor's algorithm and for quantum chemistry simulation, thus demonstrating it can save hundreds of hours of research by optimizing relevant quantum circuits in a fully automated way.
△ Less
Submitted 5 March, 2024; v1 submitted 22 February, 2024;
originally announced February 2024.
-
Optimising quantum circuits is generally hard
Authors:
John van de Wetering,
Matt Amy
Abstract:
In order for quantum computations to be done as efficiently as possible it is important to optimise the number of gates used in the underlying quantum circuits. In this paper we find that many gate optimisation problems for approximately universal quantum circuits are NP-hard. In particular, we show that optimising the T-count or T-depth in Clifford+T circuits, which are important metrics for the…
▽ More
In order for quantum computations to be done as efficiently as possible it is important to optimise the number of gates used in the underlying quantum circuits. In this paper we find that many gate optimisation problems for approximately universal quantum circuits are NP-hard. In particular, we show that optimising the T-count or T-depth in Clifford+T circuits, which are important metrics for the computational cost of executing fault-tolerant quantum computations, is NP-hard by reducing the problem to Boolean satisfiability. With a similar argument we show that optimising the number of CNOT gates or Hadamard gates in a Clifford+T circuit is also NP-hard. Again varying the same argument we also establish the hardness of optimising the number of Toffoli gates in a reversible classical circuit. We find an upper bound to the problems of T-count and Toffoli-count of $\text{NP}^{\text{NQP}}$. Finally, we also show that for any non-Clifford gate $G$ it is NP-hard to optimise the $G$-count over the Clifford+$G$ gate set, where we only have to match the target unitary within some small distance in the operator norm.
△ Less
Submitted 12 August, 2024; v1 submitted 12 September, 2023;
originally announced October 2023.
-
The Qudit ZH-Calculus: Generalised Toffoli+Hadamard and Universality
Authors:
Patrick Roy,
John van de Wetering,
Lia Yeh
Abstract:
We introduce the qudit ZH-calculus and show how to generalise all the phase-free qubit rules to qudits. We prove that for prime dimensions d, the phase-free qudit ZH-calculus is universal for matrices over the ring Z[e^2(pi)i/d]. For qubits, there is a strong connection between phase-free ZH-diagrams and Toffoli+Hadamard circuits, a computationally universal fragment of quantum circuits. We genera…
▽ More
We introduce the qudit ZH-calculus and show how to generalise all the phase-free qubit rules to qudits. We prove that for prime dimensions d, the phase-free qudit ZH-calculus is universal for matrices over the ring Z[e^2(pi)i/d]. For qubits, there is a strong connection between phase-free ZH-diagrams and Toffoli+Hadamard circuits, a computationally universal fragment of quantum circuits. We generalise this connection to qudits, by finding that the two-qudit |0>-controlled X gate can be used to construct all classical reversible qudit logic circuits in any odd qudit dimension, which for qubits requires the three-qubit Toffoli gate. We prove that our construction is asymptotically optimal up to a logarithmic term. Twenty years after the celebrated result by Shi proving universality of Toffoli+Hadamard for qubits, we prove that circuits of |0>-controlled X and Hadamard gates are approximately universal for qudit quantum computing for any odd prime d, and moreover that phase-free ZH-diagrams correspond precisely to such circuits allowing post-selections.
△ Less
Submitted 1 September, 2023; v1 submitted 19 July, 2023;
originally announced July 2023.
-
Picturing Counting Reductions with the ZH-Calculus
Authors:
Tuomas Laakkonen,
Konstantinos Meichanetzidis,
John van de Wetering
Abstract:
Counting the solutions to Boolean formulae defines the problem #SAT, which is complete for the complexity class #P. We use the ZH-calculus, a universal and complete graphical language for linear maps which naturally encodes counting problems in terms of diagrams, to give graphical reductions from #SAT to several related counting problems. Some of these graphical reductions, like to #2SAT, are subs…
▽ More
Counting the solutions to Boolean formulae defines the problem #SAT, which is complete for the complexity class #P. We use the ZH-calculus, a universal and complete graphical language for linear maps which naturally encodes counting problems in terms of diagrams, to give graphical reductions from #SAT to several related counting problems. Some of these graphical reductions, like to #2SAT, are substantially simpler than known reductions via the matrix permanent. Additionally, our approach allows us to consider the case of counting solutions modulo an integer on equal footing. Finally, since the ZH-calculus was originally introduced to reason about quantum computing, we show that the problem of evaluating ZH-diagrams in the fragment corresponding to the Clifford+T gateset, is in FP^#P. Our results show that graphical calculi represent an intuitive and useful framework for reasoning about counting problems.
△ Less
Submitted 31 August, 2023; v1 submitted 5 April, 2023;
originally announced April 2023.
-
A Graphical #SAT Algorithm for Formulae with Small Clause Density
Authors:
Tuomas Laakkonen,
Konstantinos Meichanetzidis,
John van de Wetering
Abstract:
We study the counting version of the Boolean satisfiability problem #SAT using the ZH-calculus, a graphical language originally introduced to reason about quantum circuits. Using this, we generalize #SAT to a weighted variant we call #SAT+-, which is complete for the class GapP. We show there is an efficient linear-time reduction from #SAT to #2SAT+-, unlike previous reductions from #SAT to #2SAT…
▽ More
We study the counting version of the Boolean satisfiability problem #SAT using the ZH-calculus, a graphical language originally introduced to reason about quantum circuits. Using this, we generalize #SAT to a weighted variant we call #SAT+-, which is complete for the class GapP. We show there is an efficient linear-time reduction from #SAT to #2SAT+-, unlike previous reductions from #SAT to #2SAT which blow up the size of the formula by a polynomial factor. Our main conceptual contribution is that introducing weights to #SAT allows for more efficient translations, and we use this to remove the dependence on clause width k in this case. We observe that DPLL-style algorithms for #2SAT can be adapted to #2SAT+- directly and hence the best-known upper bounds for #2SAT apply. Applying an upper bound for #2SAT in terms of variables gives us upper bounds for #SAT in terms of clauses and variables that are better than O*(2^n) for small clause densities of m/n < 2.25, and improve on previous average-case and worst-case bounds for k >= 6 and k >= 4, respectively. Applying a similar bound in terms of clauses produces a bound of O*(1.1740^L) in terms of the length of the formula. These are, to our knowledge, the first non-trivial upper bounds for #SAT that is independent of clause size, and in terms of formula length, respectively. Based on a result of Kutzkov, we find an improved bound on #3SAT for 1.2577 < m/n <= 7/3. Finally, we use this technique to find an upper bound on the complexity of calculating amplitudes of quantum circuits in terms of the total number of gates. Our results demonstrate that graphical reasoning can lead to new algorithmic insights, even outside the domain of quantum computing that the calculus was intended for.
△ Less
Submitted 12 August, 2024; v1 submitted 15 December, 2022;
originally announced December 2022.
-
Circuit Extraction for ZX-diagrams can be #P-hard
Authors:
Niel de Beaudrap,
Aleks Kissinger,
John van de Wetering
Abstract:
The ZX-calculus is a graphical language for reasoning about quantum computation using ZX-diagrams, a certain flexible generalisation of quantum circuits that can be used to represent linear maps from $m$ to $n$ qubits for any $m,n \geq 0$. Some applications for the ZX-calculus, such as quantum circuit optimisation and synthesis, rely on being able to efficiently translate a ZX-diagram back into a…
▽ More
The ZX-calculus is a graphical language for reasoning about quantum computation using ZX-diagrams, a certain flexible generalisation of quantum circuits that can be used to represent linear maps from $m$ to $n$ qubits for any $m,n \geq 0$. Some applications for the ZX-calculus, such as quantum circuit optimisation and synthesis, rely on being able to efficiently translate a ZX-diagram back into a quantum circuit of comparable size. While several sufficient conditions are known for describing families of ZX-diagrams that can be efficiently transformed back into circuits, it has previously been conjectured that the general problem of circuit extraction is hard. That is, that it should not be possible to efficiently convert an arbitrary ZX-diagram describing a unitary linear map into an equivalent quantum circuit. In this paper we prove this conjecture by showing that the circuit extraction problem is #P-hard, and so is itself at least as hard as strong simulation of quantum circuits. In addition to our main hardness result, which relies specifically on the circuit representation, we give a representation-agnostic hardness result. Namely, we show that any oracle that takes as input a ZX-diagram description of a unitary and produces samples of the output of the associated quantum computation enables efficient probabilistic solutions to NP-complete problems.
△ Less
Submitted 18 February, 2022;
originally announced February 2022.
-
Dichotomy between Deterministic and Probabilistic Models in Countably Additive Effectus Theory
Authors:
Kenta Cho,
Bas Westerbaan,
John van de Wetering
Abstract:
Effectus theory is a relatively new approach to categorical logic that can be seen as an abstract form of generalized probabilistic theories (GPTs). While the scalars of a GPT are always the real unit interval [0,1], in an effectus they can form any effect monoid. Hence, there are quite exotic effectuses resulting from more pathological effect monoids.
In this paper we introduce sigma-effectus…
▽ More
Effectus theory is a relatively new approach to categorical logic that can be seen as an abstract form of generalized probabilistic theories (GPTs). While the scalars of a GPT are always the real unit interval [0,1], in an effectus they can form any effect monoid. Hence, there are quite exotic effectuses resulting from more pathological effect monoids.
In this paper we introduce sigma-effectuses, where certain countable sums of morphisms are defined. We study in particular sigma-effectuses where unnormalized states can be normalized. We show that a non-trivial sigma-effectus with normalization has as scalars either the two-element effect monoid 0,1 or the real unit interval [0,1]. When states and/or predicates separate the morphisms we find that in the 0,1 case the category must embed into the category of sets and partial functions (and hence the category of Boolean algebras), showing that it implements a deterministic model, while in the [0,1] case we find it embeds into the category of Banach order-unit spaces and of Banach pre-base-norm spaces (satisfying additional properties), recovering the structure present in GPTs.
Hence, from abstract categorical and operational considerations we find a dichotomy between deterministic and convex probabilistic models of physical theories.
△ Less
Submitted 5 September, 2021; v1 submitted 23 March, 2020;
originally announced March 2020.
-
A characterisation of ordered abstract probabilities
Authors:
Abraham Westerbaan,
Bas Westerbaan,
John van de Wetering
Abstract:
In computer science, especially when dealing with quantum computing or other non-standard models of computation, basic notions in probability theory like "a predicate" vary wildly. There seems to be one constant: the only useful example of an algebra of probabilities is the real unit interval. In this paper we try to explain this phenomenon. We will show that the structure of the real unit interva…
▽ More
In computer science, especially when dealing with quantum computing or other non-standard models of computation, basic notions in probability theory like "a predicate" vary wildly. There seems to be one constant: the only useful example of an algebra of probabilities is the real unit interval. In this paper we try to explain this phenomenon. We will show that the structure of the real unit interval naturally arises from a few reasonable assumptions. We do this by studying effect monoids, an abstraction of the algebraic structure of the real unit interval: it has an addition $x+y$ which is only defined when $x+y\leq 1$ and an involution $x\mapsto 1-x$ which make it an effect algebra, in combination with an associative (possibly non-commutative) multiplication. Examples include the unit intervals of ordered rings and Boolean algebras.
We present a structure theory for effect monoids that are $ω$-complete, i.e. where every increasing sequence has a supremum. We show that any $ω$-complete effect monoid embeds into the direct sum of a Boolean algebra and the unit interval of a commutative unital C$^*$-algebra. This gives us from first principles a dichotomy between sharp logic, represented by the Boolean algebra part of the effect monoid, and probabilistic logic, represented by the commutative C$^*$-algebra. Some consequences of this characterisation are that the multiplication must always be commutative, and that the unique $ω$-complete effect monoid without zero divisors and more than 2 elements must be the real unit interval. Our results give an algebraic characterisation and motivation for why any physical or logical theory would represent probabilities by real numbers.
△ Less
Submitted 9 January, 2020; v1 submitted 20 December, 2019;
originally announced December 2019.
-
Graph-theoretic Simplification of Quantum Circuits with the ZX-calculus
Authors:
Ross Duncan,
Aleks Kissinger,
Simon Perdrix,
John van de Wetering
Abstract:
We present a completely new approach to quantum circuit optimisation, based on the ZX-calculus. We first interpret quantum circuits as ZX-diagrams, which provide a flexible, lower-level language for describing quantum computations graphically. Then, using the rules of the ZX-calculus, we give a simplification strategy for ZX-diagrams based on the two graph transformations of local complementation…
▽ More
We present a completely new approach to quantum circuit optimisation, based on the ZX-calculus. We first interpret quantum circuits as ZX-diagrams, which provide a flexible, lower-level language for describing quantum computations graphically. Then, using the rules of the ZX-calculus, we give a simplification strategy for ZX-diagrams based on the two graph transformations of local complementation and pivoting and show that the resulting reduced diagram can be transformed back into a quantum circuit. While little is known about extracting circuits from arbitrary ZX-diagrams, we show that the underlying graph of our simplified ZX-diagram always has a graph-theoretic property called generalised flow, which in turn yields a deterministic circuit extraction procedure. For Clifford circuits, this extraction procedure yields a new normal form that is both asymptotically optimal in size and gives a new, smaller upper bound on gate depth for nearest-neighbour architectures. For Clifford+T and more general circuits, our technique enables us to to `see around' gates that obstruct the Clifford structure and produce smaller circuits than naive 'cut-and-resynthesise' methods.
△ Less
Submitted 26 May, 2020; v1 submitted 8 February, 2019;
originally announced February 2019.
-
Ordering information on distributions
Authors:
John van de Wetering
Abstract:
This thesis details a class of partial orders on the space of probability distributions and the space of density operators which capture the idea of information content. Some links to domain theory and computational linguistics are also discussed. Chapter 1 details some useful theorems from order theory. In Chapter 2 we define a notion of an information ordering on the space of probability distrib…
▽ More
This thesis details a class of partial orders on the space of probability distributions and the space of density operators which capture the idea of information content. Some links to domain theory and computational linguistics are also discussed. Chapter 1 details some useful theorems from order theory. In Chapter 2 we define a notion of an information ordering on the space of probability distributions and see that this gives rise to a large class of orderings. In Chapter 3 we extend the idea of an information ordering to the space of density operators and in particular look at the maximum eigenvalue order. We will discuss whether this order might be unique given certain restrictions. In Chapter 4 we discuss a possible application in distributional language models, namely in the study of entailment and disambiguation.
△ Less
Submitted 23 January, 2017;
originally announced January 2017.
-
Entailment Relations on Distributions
Authors:
John van de Wetering
Abstract:
In this paper we give an overview of partial orders on the space of probability distributions that carry a notion of information content and serve as a generalisation of the Bayesian order given in (Coecke and Martin, 2011). We investigate what constraints are necessary in order to get a unique notion of information content. These partial orders can be used to give an ordering on words in vector s…
▽ More
In this paper we give an overview of partial orders on the space of probability distributions that carry a notion of information content and serve as a generalisation of the Bayesian order given in (Coecke and Martin, 2011). We investigate what constraints are necessary in order to get a unique notion of information content. These partial orders can be used to give an ordering on words in vector space models of natural language meaning relating to the contexts in which words are used, which is useful for a notion of entailment and word disambiguation. The construction used also points towards a way to create orderings on the space of density operators which allow a more fine-grained study of entailment. The partial orders in this paper are directed complete and form domains in the sense of domain theory.
△ Less
Submitted 3 August, 2016;
originally announced August 2016.