We present a new algorithm for reducing an arbitrary unitary matrix into a sequence of elementary operations (operations such as controlled-nots and qubit rotations). Such a sequence of operations can be used to manipulate an array of quantum bits (i.e., a quantum computer). We report on a C++ program called "Qubiter" that implements our algorithm. Qubiter source code is publicly available.
We present a new algorithm for reducing an arbitrary unitary matrix U into a sequence of elementary operations (operations such as controlled-nots and qubit rotations). Such a sequence of operations can be used to manipulate an array of quantum bits (i.e., a quantum computer). Our algorithm applies recursively a mathematical technique called the CS Decomposition to build a binary tree of matrices whose product, in some order, equals the original matrix U. We show that the Fast Fourier Transform (FFT) algorithm is a special case of our algorithm. We report on a C++ program called "Qubiter" that…
Over the last decade, Quantum Computing hardware has rapidly developed and become a very intriguing, promising, and active research field among scientists worldwide. To achieve the desired quantum functionalities, quantum algorithms require translation from a high-level description to a machine-specific physical operation sequence. In contrast to classical compilers, state-of-the-art quantum compilers are in their infancy. We believe there is a research need for a quantum compiler that can deal with generic unitary operators and generate basic unitary operations according to quantum machines' …
We present a multi-level quantum-classical intermediate representation (IR) that enables an optimizing, retargetable, ahead-of-time compiler for available quantum programming languages. To demonstrate our architecture, we leverage our proposed IR to enable a compiler for version 3 of the OpenQASM quantum language specification. We support the entire gate-based OpenQASM 3 language and provide custom extensions for common quantum programming patterns and improved syntax. Our work builds upon the Multi-level Intermediate Representation (MLIR) framework and leverages its unique progressive lowerin…
When scheduling quantum operations, a shorter overall execution time of the resulting schedule yields a better throughput and higher fidelity output. In this paper, we demonstrate that quantum operation scheduling can be interpreted as a special type of job-shop problem. On this basis, we provide its formulation as Constraint Programming while taking into account commutation between quantum operations. We show that this formulation improves the overall execution time of the resulting schedules in practice through experiments with a real quantum compiler and quantum circuits from two common ben…
When working with algorithms on quantum devices, quantum memory becomes a crucial bottleneck due to low qubit count in NISQ-era devices. In this context, the concept of `divide and compute', wherein a quantum circuit is broken into several subcircuits and executed separately, while stitching the results of the circuits via classical post-processing, becomes a viable option, especially in NISQ-era devices. This paper introduces \textbf{Qurzon}, a proposed novel quantum compiler that incorporates the marriage of techniques of divide and compute with the state-of-the-art algorithms of optimal qub…
This paper introduces QuanFou v1.1, QuanGlue v1.1, QuanOracle v1.1, QuanShi v1.1, four Java applications available for free. (Source code included in the distribution.) Each application compiles a different kind of input quantum evolution operator. The applications output a quantum circuit that equals the input evolution operator.
The quantum simulation kernel is an important subroutine appearing as a very long gate sequence in many quantum programs. In this paper, we propose Paulihedral, a block-wise compiler framework that can deeply optimize this subroutine by exploiting high-level program structure and optimization opportunities. Paulihedral first employs a new Pauli intermediate representation that can maintain the high-level semantics and constraints in quantum simulation kernels. This naturally enables new large-scale optimizations that are hard to implement at the low gate-level. In particular, we propose two te…
A promising architecture for scaling up quantum computers based on trapped ions are so called Quantum Charged-Coupled Devices (QCCD). These consist of multiple ion traps, each designed for solving specific tasks, that are connected by transport links. In this paper we present the backend compiler phases needed for running quantum circuits on a QCCD architecture, while providing strategies to solve the optimization problems that occur when generating assembly instructions. We implement and test these strategies for the QVLS-Q1 chip architecture.
"Qubit routing" refers to the task of modifying quantum circuits so that they satisfy the connectivity constraints of a target quantum computer. This involves inserting SWAP gates into the circuit so that the logical gates only ever occur between adjacent physical qubits. The goal is to minimise the circuit depth added by the SWAP gates. In this paper, we propose a qubit routing procedure that uses a modified version of the deep Q-learning paradigm. The system is able to outperform the qubit routing procedures from two of the most advanced quantum compilers currently available, on both random …
We present t$|$ket$\rangle$, a quantum software development platform produced by Cambridge Quantum Computing Ltd. The heart of t$|$ket$\rangle$ 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.
Before executing a quantum algorithm, one must first decompose the algorithm into machine-level instructions compatible with the architecture of the quantum computer, a process known as quantum compiling. There are many different quantum circuit decompositions for the same algorithm but it is desirable to compile leaner circuits. A fundamentally important cost metric is the $T$ count -- the number of $T$ gates in a circuit. For the single qubit case, optimal compiling is essentially a solved problem. However, multi-qubit compiling is a harder problem with optimal algorithms requiring classical…
Prevailing proposals for the first generation of quantum computers make use of 2-level systems, or qubits, as the fundamental unit of quantum information. However, recent innovations in quantum error correction and magic state distillation protocols demonstrate that there are advantages of using d-level quantum systems, known as \emph{qudits}, over the qubit analogues. When designing a quantum architecture, it is crucial to consider protocols for compilation, the optimal conversion of high-level instructions used by programmers into low-level instructions interpreted by the machine. In this wo…
A quantum computer consists of a set of quantum bits upon which operations called gates are applied to perform computations. In order to perform quantum algorithms, physicists would like to design arbitrary gates to apply to quantum bits. However, the physical limitations of the quantum computing device restrict the set of gates that physicists are able to apply. Thus, they must compose a sequence of gates from the permitted gate set, which approximates the gate they wish to apply - a process called quantum compiling. Austin Fowler proposes a method that finds optimal gate sequences in exponen…
The software package \emph{Qcompiler} (CPC, 184 (2013) 853) provides a general quantum compilation framework, which maps any given unitary operation into a quantum circuit consisting of a sequential set of elementary quantum gates. In this paper, we present an extended software \emph{OptQC}, which finds permutation matrices $P$ and $Q$ for a given unitary matrix $U$ such that the number of gates in the quantum circuit of $U = Q^TP^TU'PQ$ is significantly reduced, where $U'$ is equivalent to $U$ up to a permutation and the quantum circuit implementation of each matrix component is considered se…
We introduce parity quantum optimization with the aim of solving optimization problems consisting of arbitrary $k$-body interactions and side conditions using planar quantum chip architectures. The method introduces a decomposition of the problem graph with arbitrary $k$-body terms using generalized closed cycles of a hypergraph. Side conditions of the optimization problem in form of hard constraints can be included as open cycles containing the terms involved in the side conditions. The generalized parity mapping thus circumvents the need to translate optimization problems to a quadratic unco…
This paper introduces QuanTree v1.1 and QuanLin v1.1, two Java applications available for free. (Source code included in the distribution.) Each application compiles a different type of input quantum evolution operator. The applications output a quantum circuit that is approximately equal to the input evolution operator. QuanTree compiles an input evolution operator whose Hamiltonian is proportional to the incidence matrix of a balanced, binary tree graph. QuanLin compiles an input evolution operator whose Hamiltonian is proportional to the incidence matrix of a line (open string) graph. Both …
Quantum error correction is vital for implementing universal quantum computing. A key component is the encoding circuit that maps a product state of physical qubits into the encoded multipartite entangled logical state. Known methods are typically not 'optimal' either in terms of the circuit depth (and therefore the error burden) or the specifics of the target platform, i.e. the native gates and topology of a system. This work introduces a variational compiler for efficiently finding the encoding circuit of general quantum error correcting codes with given quantum hardware. Focusing on the noi…
Quantum Compiler Design for Fault-Tolerant Quantum Computing
QudeLeap Research;The Hong Kong University of Science and Technology (Guangzhou)(香港科技大学(广州));The Hong Kong University of Science and Technology(香港科技大学);Shanghai Jiao Tong University(上海交通大学);Hangzhou MatriQ Computing Co., Ltd(杭州矩阵量子计算有限公司);Atomqubic Quantum Technology Co., Ltd(上海原子立方量子科技有限公司);State Key Laboratory of Quantum Optics Technologies and Devices, and Institute of Opto-Electronics, Shanxi University(山西大学光电研究所及量子光学技术与器件国家重点实验室);CAS Cold Atom Technology (Wuhan) Co., Ltd.(中科院冷原子技术(武汉)有限公司);Quantum Science Center of Guangdong-Hong Kong-Macao Greater Bay Area(粤港澳大湾区量子科学中心)
The quantum volume test is a full-system benchmark for quantum computers that is sensitive to qubit number, fidelity, connectivity, and other quantities believed to be important in building useful devices. The test was designed to produce a single-number measure of a quantum computer's general capability, but a complete understanding of its limitations and operational meaning is still missing. We explore the quantum volume test to better understand its design aspects, sensitivity to errors, passing criteria, and what passing implies about a quantum computer. We elucidate some transient behavio…
It is imperative to compile quantum circuits for Noisy Intermediate-Scale Quantum (NISQ) devices because of the limited connectivity of physical qubits and the high error rates of gate operations. One of the most critical steps in quantum circuit compilation is qubit routing, an NP-Hard problem that involves placing and moving logical qubits to minimize compilation overhead. In this study, we propose ISing mAchine Assisted Quantum compiler (ISAAQ) to perform qubit routing with Ising machines, which can efficiently solve Quadratic Unconstrained Binary Optimization (QUBO) problems. ISAAQ accurat…
This paper presents Giallar, a fully-automated verification toolkit for quantum compilers. Giallar requires no manual specifications, invariants, or proofs, and can automatically verify that a compiler pass preserves the semantics of quantum circuits. To deal with unbounded loops in quantum compilers, Giallar abstracts three loop templates, whose loop invariants can be automatically inferred. To efficiently check the equivalence of arbitrary input and output circuits that have complicated matrix semantics representation, Giallar introduces a symbolic representation for quantum circuits and a s…
The dynamics of a quantum system can be simulated using a quantum computer by breaking down the unitary into a quantum circuit of one and two qubit gates. The most established methods are the Trotter-Suzuki decompositions, for which rigorous bounds on the circuit size depend on the number of terms $L$ in the system Hamiltonian and the size of the largest term in the Hamiltonian $Λ$. Consequently, Trotter-Suzuki is only practical for sparse Hamiltonians. Trotter-Suzuki is a deterministic compiler but it was recently shown that randomised compiling offers lower overheads. Here we present and ana…
We present an approach for a deep-learning compiler of quantum circuits, designed to reduce the output noise of circuits run on a specific device. We train a convolutional neural network on experimental data from a quantum device to learn a hardware-specific noise model. A compiler then uses the trained network as a noise predictor and inserts sequences of gates in circuits so as to minimize expected noise. We tested this approach on the IBM 5-qubit devices and observed a reduction in output noise of 12.3% (95% CI [11.5%, 13.0%]) compared to the circuits obtained by the Qiskit compiler. Moreov…
Simulation of the dynamics of quantum materials is emerging as a promising scientific application for noisy intermediate-scale quantum (NISQ) computers. Due to their high gate-error rates and short decoherence times, however, NISQ computers can only produce high-fidelity results for those quantum circuits smaller than some given circuit size. Dynamic simulations, therefore, pose a challenge as current algorithms produce circuits that grow in size with each subsequent time-step of the simulation. This underscores the crucial role of quantum circuit compilers to produce executable quantum circui…
Quilc is an open-source, optimizing compiler for gate-based quantum programs written in Quil or QASM, two popular quantum programming languages. The compiler was designed with attention toward NISQ-era quantum computers, specifically recognizing that each quantum gate has a non-negligible and often irrecoverable cost toward a program's successful execution. Quilc's primary goal is to make authoring quantum software a simpler exercise by making architectural details less burdensome to the author. Using Quilc allows one to write programs faster while usually not compromising---and indeed sometim…
Efficient compilation of quantum algorithms is vital in the era of Noisy Intermediate-Scale Quantum (NISQ) devices. While multiple open-source quantum compilation and circuit optimization frameworks are available, e.g. IBM Qiskit, CQC Tket, Google Cirq, Rigetti Quilc, PyZX, their relative performance is not always clear to a quantum programmer. The growth of complexity and diversity of quantum circuit compilation algorithms creates a demand for a dedicated tool for cross-benchmarking and profiling of inner workflow of the quantum compilation stack. We present an open-source software package, A…
Time-dependent Hamiltonian simulation (TDHS) is a critical task in quantum computing. Existing algorithms are generally biased with a small algorithmic error $\varepsilon$, and the gate complexity scales as $O(\text{poly}(1/\varepsilon))$ for product formula-based methods and could be improved to be polylogarithmic with complicated circuit constructions. Here, we develop an unbiased random compiler for TDHS by combining Dyson expansion, an unbiased continuous sampling method for quantum evolution, and leading order rotations, and it is free from algorithmic errors. Our method has the single- a…
Multilevel Circuit Optimization in Quantum Compilers: A Case Study
IBM Quantum Japan(IBM量子日本);Quantum Computing Center, Keio University(庆应义塾大学量子计算中心);Toyota Central R&D Labs., Inc.(丰田中央研发研究所);Department of Applied Physics and Physico-Informatics, Keio University(庆应义塾大学应用物理与物理信息学系)
Quantum computing promises remarkable approaches for processing information, but new tools are needed to compile program representations into the physical instructions required by a quantum computer. Here we present a novel adaptation of the multi-level intermediate representation (MLIR) integrated into a quantum compiler that may be used for checking program execution. We first present how MLIR enables quantum circuit transformations for efficient execution on quantum computing devices and then give an example of compiler transformations based on so-called mirror circuits. We demonstrate that…
A quantum compiler is a software program for decomposing ("compiling") an arbitrary unitary matrix into a sequence of elementary operations (SEO). The author of this paper is also the author of a quantum compiler called Qubiter. Qubiter uses a matrix decomposition called the Cosine-Sine Decomposition (CSD) that is well known in the field of Computational Linear Algebra. One way of measuring the efficiency of a quantum compiler is to measure the number of CNOTs it uses to express an unstructured unitary matrix (a unitary matrix with no special symmetries). We will henceforth refer to this numbe…
We present CertiQ, a verification framework for writing and verifying compiler passes of Qiskit, the most widely-used quantum compiler. To our knowledge, CertiQ is the first effort enabling the verification of real-world quantum compiler passes in a mostly-automated manner. Compiler passes written in the CertiQ interface with annotations can be used to generate verification conditions, as well as the executable code that can be integrated into Qiskit. CertiQ introduces the quantum circuit calculus to enable the efficient checking of equivalence of quantum circuits by encoding such a checking p…
QuTuner: Feature- and Learning-Guided Optimization Pass Tuning for Quantum Compilers
The Chinese University of Hong Kong(香港中文大学);Nebius;State Key Laboratory of Quantum Information Technologies and Materials (CUHK)(量子信息科技与材料国家重点实验室(香港中文大学))