11 research outputs found

    Polynomial-time T-depth Optimization of Clifford+T circuits via Matroid Partitioning

    Full text link
    Most work in quantum circuit optimization has been performed in isolation from the results of quantum fault-tolerance. Here we present a polynomial-time algorithm for optimizing quantum circuits that takes the actual implementation of fault-tolerant logical gates into consideration. Our algorithm re-synthesizes quantum circuits composed of Clifford group and T gates, the latter being typically the most costly gate in fault-tolerant models, e.g., those based on the Steane or surface codes, with the purpose of minimizing both T-count and T-depth. A major feature of the algorithm is the ability to re-synthesize circuits with additional ancillae to reduce T-depth at effectively no cost. The tested benchmarks show up to 65.7% reduction in T-count and up to 87.6% reduction in T-depth without ancillae, or 99.7% reduction in T-depth using ancillae.Comment: Version 2 contains substantial improvements and extensions to the previous version. We describe a new, more robust algorithm and achieve significantly improved experimental result

    Causal flow preserving optimisation of quantum circuits in the ZX-calculus

    Full text link
    Optimising quantum circuits to minimise resource usage is crucial, especially with near-term hardware limited by quantum volume. This paper introduces an optimisation algorithm aiming to minimise non-Clifford gate count and two-qubit gate count by building on ZX-calculus-based strategies. By translating a circuit into a ZX-diagram it can be simplified before being extracted back into a circuit. We assert that simplifications preserve a graph-theoretic property called causal flow. This has the advantage that qubit lines are well defined throughout, permitting a trivial extraction procedure and in turn enabling the calculation of an individual transformation's impact on the resulting circuit. A general procedure for a decision strategy is introduced, inspired by an existing heuristic based method. Both phase teleportation and the neighbour unfusion rule are generalised. In particular, allowing unfusion of multiple neighbours is shown to lead to significant improvements in optimisation. When run on a set of benchmark circuits, the algorithm developed reduces the two-qubit gate count by an average of 19.8%, beating both the previous best ZX-based strategy (14.6%) and non-ZX strategy (18.5%) at the time of publication. This lays a foundation for multiple avenues of improvement. A particularly effective strategy for optimising QFT circuits is also noted, resulting in exactly one two-qubit gate per non-Clifford gate.Comment: 20 pages, 7 figure

    Graph-theoretic simplification of quantum circuits with the ZX-calculus

    Get PDF
    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 naïve `cut-and-resynthesise' methods

    t|ket> : A retargetable compiler for NISQ devices

    Get PDF
    We present t|ket>, a quantum software development platform produced by Cambridge Quantum Computing Ltd. The heart of t|ket> is a language-agnostic optimising compiler designed to generate code for a variety of NISQ devices, which has several features designed to minimise the influence of device error. The compiler has been extensively benchmarked and outperforms most competitors in terms of circuit optimisation and qubit routing

    HamLib: A library of Hamiltonians for benchmarking quantum algorithms and hardware

    Full text link
    In order to characterize and benchmark computational hardware, software, and algorithms, it is essential to have many problem instances on-hand. This is no less true for quantum computation, where a large collection of real-world problem instances would allow for benchmarking studies that in turn help to improve both algorithms and hardware designs. To this end, here we present a large dataset of qubit-based quantum Hamiltonians. The dataset, called HamLib (for Hamiltonian Library), is freely available online and contains problem sizes ranging from 2 to 1000 qubits. HamLib includes problem instances of the Heisenberg model, Fermi-Hubbard model, Bose-Hubbard model, molecular electronic structure, molecular vibrational structure, MaxCut, Max-k-SAT, Max-k-Cut, QMaxCut, and the traveling salesperson problem. The goals of this effort are (a) to save researchers time by eliminating the need to prepare problem instances and map them to qubit representations, (b) to allow for more thorough tests of new algorithms and hardware, and (c) to allow for reproducibility and standardization across research studies

    Exact and practical pattern matching for quantum circuit optimization

    Full text link
    Quantum computations are typically compiled into a circuit of basic quantum gates. Just like for classical circuits, a quantum compiler should optimize the quantum circuit, e.g. by minimizing the number of required gates. Optimizing quantum circuits is not only relevant for improving the runtime of quantum algorithms in the long term, but is also particularly important for near-term quantum devices that can only implement a small number of quantum gates before noise renders the computation useless. An important building block for many quantum circuit optimization techniques is pattern matching, where given a large and a small quantum circuit, we are interested in finding all maximal matches of the small circuit, called pattern, in the large circuit, considering pairwise commutation of quantum gates. In this work, we present a classical algorithm for pattern matching that provably finds all maximal matches in time polynomial in the circuit size (for a fixed pattern size). Our algorithm works for both quantum and reversible classical circuits. We demonstrate numerically that our algorithm, implemented in the open-source library Qiskit, scales considerably better than suggested by the theoretical worst-case complexity and is practical to use for circuit sizes typical for near-term quantum devices. Using our pattern matching algorithm as the basis for known circuit optimization techniques such as template matching and peephole optimization, we demonstrate a significant (~30%) reduction in gate count for random quantum circuits, and are able to further improve practically relevant quantum circuits that were already optimized with state-of-the-art techniques.Comment: Raban Iten and Romain Moyard contributed equally to this work. Major updates: Added numerical analysis of the pattern matching algorithm; fixed two special cases that were missed by our algorithm and updated the worst-case complexity analysis. 10 pages summary + 23 pages main text + 7 pages appendi

    Quantum Theory from Principles, Quantum Software from Diagrams

    Get PDF
    This thesis consists of two parts. The first part is about how quantum theory can be recovered from first principles, while the second part is about the application of diagrammatic reasoning, specifically the ZX-calculus, to practical problems in quantum computing. The main results of the first part include a reconstruction of quantum theory from principles related to properties of sequential measurement and a reconstruction based on properties of pure maps and the mathematics of effectus theory. It also includes a detailed study of JBW-algebras, a type of infinite-dimensional Jordan algebra motivated by von Neumann algebras. In the second part we find a new model for measurement-based quantum computing, study how measurement patterns in the one-way model can be simplified and find a new algorithm for extracting a unitary circuit from such patterns. We use these results to develop a circuit optimisation strategy that leads to a new normal form for Clifford circuits and reductions in the T-count of Clifford+T circuits.Comment: PhD Thesis. Part A is 135 pages. Part B is 95 page
    corecore