The task of learning a quantum circuit to prepare a given mixed state is a fundamental quantum subroutine. We present a variational quantum algorithm (VQA) to learn mixed states which is suitable for near-term hardware. Our algorithm represents a generalization of previous VQAs that aimed at learning preparation circuits for pure states. We consider two different ansätze for compiling the target state; the first is based on learning a purification of the state and the second on representing it as a convex combination of pure states. In both cases, the resources required to store and manipulate the compiled state grow with the rank of the approximation. Thus, by learning a lower rank approximation of the target state, our algorithm provides a means of compressing a state for more efficient processing. As a byproduct of our algorithm, one effectively learns the principal components of the target state, and hence our algorithm further provides a new method for principal component analysis. We investigate the efficacy of our algorithm through extensive numerical implementations, showing that typical random states and thermal states of many body systems may be learnt this way. Additionally, we demonstrate on quantum hardware how our algorithm can be used to study hardware noise-induced states.
We propose a method of compiling that permits to identify quantum circuits able to simulate arbitrary $n$-qubit unitary operations via the adjustment of angles in single-qubit gates therein. The method of compiling itself extends older quantum control techniques and stays computationally tractable for several qubits. As an application we identify compiling universal circuits for $3$, $4$ and $5$ qubits consisting of $16$, $64$ and $ 256$ CNOTs respectively.
Quantum compilation provides a method to translate quantum algorithms at a high level of abstraction into their implementations as quantum circuits on real hardware. One approach to quantum compiling is to design a parameterised circuit and to use techniques from optimisation to find the parameters that minimise the distance between the parameterised circuit and the target circuit of interest. While promising, such an approach typically runs into the obstacle of barren plateaus - i.e. large regions of parameter space in which the gradient vanishes. A number of recent works focusing on so-calle…
Quantum compiling, where a parameterized quantum circuit is trained to learn a target unitary, is an important primitive for quantum computing that can be used as a subroutine to obtain optimal circuits or as a tomographic tool to study the dynamics of an experimental system. While much attention has been paid to quantum compiling on discrete variable hardware, less has been paid to compiling in the continuous variable paradigm. Here we motivate several, closely related, short depth continuous variable algorithms for quantum compilation. We analyse the trainability of our proposed cost functio…
The architecture of circuital quantum computers requires computing layers devoted to compiling high-level quantum algorithms into lower-level circuits of quantum gates. The general problem of quantum compiling is to approximate any unitary transformation that describes the quantum computation, as a sequence of elements selected from a finite base of universal quantum gates. The existence of an approximating sequence of one qubit quantum gates is guaranteed by the Solovay-Kitaev theorem, which implies sub-optimal algorithms to establish it explicitly. Since a unitary transformation may require …
In the context of variational compiling of a continuous-variable (CV) unitary operation, the architecture and parameter space of the Xanadu X8 processor constrain both the set of feasible compiling problems and the allowed cost functions. In this paper, we motivate a faithful cost function for variational compiling of a two-mode, continuous-variable beamsplitter gate with real matrix elements (i.e., a "zero-phase" beamsplitter) that complies with the constraints of the X8 processor. This cost function is then computed on the X8. Despite the noise in the processor, we find that the cost functio…
Randomized compiling reduces the effects of errors on quantum computers by tailoring arbitrary Markovian errors into stochastic Pauli noise. Here we prove that randomized compiling also tailors non-Markovian errors into local stochastic Pauli noise and investigate the technique's limitations. We show through analysis and numerical results that randomized compiling alters errors in three distinct helpful ways. First, it prevents the coherent accumulation of errors (including hard to remove crosstalk effects) across gate cycles by destroying intercycle coherent correlations. Second, it converts …
Efficiently processing basic linear algebra subroutines is of great importance for a wide range of computational problems. In this paper, we consider techniques to implement matrix functions on a quantum computer, which are composed of basic matrix operations on a set of matrices. These matrix operations include addition, multiplication, Kronecker sum, tensor product, Hadamard product, and single-matrix functions. We discuss the composed matrix functions in terms of the estimation of scalar quantities such as inner products, trace, determinant and Schatten p-norms. We thus provide a framework …
Quantum algorithms require a universal set of gates that can be implemented in a physical system. For these, an optimal decomposition into a sequence of available operations is desired. Here, we present a method to find such sequences for a small-scale ion trap quantum information processor. We further adapt the method to state preparation and quantum algorithms with in-sequence measurements.
Variational hybrid quantum-classical algorithms (VHQCAs) are near-term algorithms that leverage classical optimization to minimize a cost function, which is efficiently evaluated on a quantum computer. Recently VHQCAs have been proposed for quantum compiling, where a target unitary $U$ is compiled into a short-depth gate sequence $V$. In this work, we report on a surprising form of noise resilience for these algorithms. Namely, we find one often learns the correct gate sequence $V$ (i.e., the correct variational parameters) despite various sources of incoherent noise acting during the cost-eva…
Here we describe a simple mechanical procedure for compiling a quantum gate network into the natural gates (pulses and delays) for an Ising quantum computer. The aim is not necessarily to generate the most efficient pulse sequence, but rather to develop an efficient compilation algorithm that can be easily implemented in large spin systems. The key observation is that it is not always necessary to refocus all the undesired couplings in a spin system. Instead the coupling evolution can simply be tracked and then corrected at some later time. Although described within the language of NMR the alg…
The design and optimization of quantum circuits is central to quantum computation. This paper presents new algorithms for compiling arbitrary 2^n x 2^n unitary matrices into efficient circuits of (n-1)-controlled single-qubit and (n-1)-controlled-NOT gates. We first present a general algebraic optimization technique, which we call the Palindrome Transform, that can be used to minimize the number of self-inverting gates in quantum circuits consisting of concatenations of palindromic subcircuits. For a fixed column ordering of two-level decomposition, we then give an numerative algorithm for min…
A quantum compiling algorithm is an algorithm for decomposing ("compiling") an arbitrary unitary matrix into a sequence of elementary operations (SEO). Suppose $U_{in}$ is an $\nb$-bit unstructured unitary matrix (a unitary matrix with no special symmetries) that we wish to compile. For $\nb>10$, expressing $U_{in}$ as a SEO requires more than a million CNOTs. This calls for a method for finding a unitary matrix that: (1)approximates $U_{in}$ well, and (2) is expressible with fewer CNOTs than $U_{in}$. The purpose of this paper is to propose one such approximation method. Various quantum compi…
The successful implementation of algorithms on quantum processors relies on the accurate control of quantum bits (qubits) to perform logic gate operations. In this era of noisy intermediate-scale quantum (NISQ) computing, systematic miscalibrations, drift, and crosstalk in the control of qubits can lead to a coherent form of error which has no classical analog. Coherent errors severely limit the performance of quantum algorithms in an unpredictable manner, and mitigating their impact is necessary for realizing reliable quantum computations. Moreover, the average error rates measured by randomi…
Quantum compiling fills the gap between the computing layer of high-level quantum algorithms and the layer of physical qubits with their specific properties and constraints. Quantum compiling is a hybrid between the general-purpose compilers of computers, transforming high-level language to assembly language and hardware synthesis by hardware description language, where functions are automatically synthesized into customized hardware. Here we review the quantum compiling stack of both gate model quantum computers and the adiabatic quantum computers, respectively. The former involves low level …
Compiling quantum algorithms for near-term quantum computers (accounting for connectivity and native gate alphabets) is a major challenge that has received significant attention both by industry and academia. Avoiding the exponential overhead of classical simulation of quantum dynamics will allow compilation of larger algorithms, and a strategy for this is to evaluate an algorithm's cost on a quantum computer. To this end, we propose a variational hybrid quantum-classical algorithm called quantum-assisted quantum compiling (QAQC). In QAQC, we use the overlap between a target unitary $U$ and a …
The Noisy Intermediate-Scale Quantum (NISQ) technology is currently investigated by major players in the field to build the first practically useful quantum computer. IBM QX architectures are the first ones which are already publicly available today. However, in order to use them, the respective quantum circuits have to be compiled for the respectively used target architecture. While first approaches have been proposed for this purpose, they are infeasible for a certain set of SU(4) quantum circuits which have recently been introduced to benchmark corresponding compilers. In this work, we anal…
We develop a non-cooperative game-theoretic model for the problem of graph minor-embedding to show that optimal compiling of adiabatic quantum programs in the sense of Nash equilibrium is possible.
Given a set of quantum gates and a target unitary operation, the most elementary task of quantum compiling is the identification of a sequence of the gates that approximates the target unitary to a determined precision $\varepsilon$. Solovay-Kitaev theorem provides an elegant solution which is based on the construction of successively tighter `nets' around the unity comprised by successively longer sequences of gates. The procedure for the construction of the nets, according to this theorem, requires accessibility to the inverse of the gates as well. In this work, we propose a method for const…
A method for compiling quantum algorithms into specific braiding patterns for non-Abelian quasiparticles described by the so-called Fibonacci anyon model is developed. The method is based on the observation that a universal set of quantum gates acting on qubits encoded using triplets of these quasiparticles can be built entirely out of three-stranded braids (three-braids). These three-braids can then be efficiently compiled and improved to any required accuracy using the Solovay-Kitaev algorithm.
Quantum computers promise to transform our notions of computation by offering a completely new paradigm. To achieve scalable quantum computation, optimizing compilers and a corresponding software design flow will be essential. We present a software architecture for compiling quantum programs from a high-level language program to hardware-specific instructions. We describe the necessary layers of abstraction and their differences and similarities to classical layers of a computer-aided design flow. For each layer of the stack, we discuss the underlying methods for compilation and optimization. …
The success of the current generation of Noisy Intermediate-Scale Quantum (NISQ) hardware shows that quantum hardware may be able to tackle complex problems even without error correction. One outstanding issue is that of coherent errors arising from the increased complexity of these devices. These errors can accumulate through a circuit, making their impact on algorithms hard to predict and mitigate. Iterative algorithms like Quantum Imaginary Time Evolution are susceptible to these errors. This article presents the combination of both noise tailoring using Randomized Compiling and error mitig…
Quantum computers are poised to radically outperform their classical counterparts by manipulating coherent quantum systems. A realistic quantum computer will experience errors due to the environment and imperfect control. When these errors are even partially coherent, they present a major obstacle to achieving robust computation. Here, we propose a method for introducing independent random single-qubit gates into the logical circuit in such a way that the effective logical circuit remains unchanged. We prove that this randomization tailors the noise into stochastic Pauli errors, leading to dra…
We develop a resource efficient method by which the ground-state of an arbitrary k-local, optimization Hamiltonian can be encoded as the ground-state of a (k-1)-local optimization Hamiltonian. This result is important because adiabatic quantum algorithms are often most easily formulated using many-body interactions but experimentally available interactions are generally 2-body. In this context, the efficiency of a reduction gadget is measured by the number of ancilla qubits required as well as the amount of control precision needed to implement the resulting Hamiltonian. First, we optimize met…
Current quantum processors are noisy, have limited coherence and imperfect gate implementations. On such hardware, only algorithms that are shorter than the overall coherence time can be implemented and executed successfully. A good quantum compiler must translate an input program into the most efficient equivalent of itself, getting the most out of the available hardware. In this work, we present novel deterministic algorithms for compiling recurrent quantum circuit patterns in polynomial time. In particular, such patterns appear in quantum circuits that are used to compute the ground state p…
College of Mathematics and Informatics, South China Agricultural University(华南农业大学数学与信息学院)
Quantum compiling aims to construct a quantum circuit V by quantum gates drawn from a native gate alphabet, which is functionally equivalent to the target unitary U. It is a crucial stage for the running of quantum algorithms on noisy intermediate-scale quantum (NISQ) devices. However, the space for structure exploration of quantum circuit is enormous, resulting in the requirement of human expertise, hundreds of experimentations or modifications from existing quantum circuits. In this paper, we propose a variational quantum compiling (VQC) algorithm based on reinforcement learning (RL), in ord…
In a topological quantum computer, universality is achieved by braiding and quantum information is natively protected from small local errors. We address the problem of compiling single-qubit quantum operations into braid representations for non-abelian quasiparticles described by the Fibonacci anyon model. We develop a probabilistically polynomial algorithm that outputs a braid pattern to approximate a given single-qubit unitary to a desired precision. We also classify the single-qubit unitaries that can be implemented exactly by a Fibonacci anyon braid pattern and present an efficient algori…
We study the problem of finding the best approximate circuit that is the closest (in some pertinent metric) to a target circuit, and which satisfies a number of hardware constraints, like gate alphabet and connectivity. We look at the problem in the CNOT+rotation gate set from a mathematical programming standpoint, offering contributions both in terms of understanding the mathematics of the problem and its efficient solution. Among the results that we present, we are able to derive a 14-CNOT 4-qubit Toffoli decomposition from scratch, and show that the Quantum Shannon Decomposition can be comp…
Department of Engineering and Architecture - University of Parma(帕尔马大学工程与建筑系);Quantum Information Science - University of Parma(帕尔马大学量子信息科学系);Department of Engineering and Architecture - University of Parma, Italy(意大利帕尔马大学工程与建筑系);Quantum Information Science - University of Parma, Italy(意大利帕尔马大学量子信息科学系)
Quantum compiling means fast, device-aware implementation of quantum algorithms (i.e., quantum circuits, in the quantum circuit model of computation). In this paper, we present a strategy for compiling IBM Q -aware, low-depth quantum circuits that generate Greenberger-Horne-Zeilinger (GHZ) entangled states. The resulting compiler can replace the QISKit compiler for the specific purpose of obtaining improved GHZ circuits. It is well known that GHZ states have several practical applications, including quantum machine learning. We illustrate our experience in implementing and querying a uniform q…
Tsinghua University(清华大学);University of California, San Diego(加利福尼亚大学圣地亚哥分校);Peking University(北京大学);Shanghai Qi Zhi Institute(上海期智研究院)
Quantum compiling, a process that decomposes the quantum algorithm into a series of hardware-compatible commands or elementary gates, is of fundamental importance for quantum computing. We introduce an efficient algorithm based on deep reinforcement learning that compiles an arbitrary single-qubit gate into a sequence of elementary gates from a finite universal set. It generates near-optimal gate sequences with given accuracy and is generally applicable to various scenarios, independent of the hardware-feasible universal set and free from using ancillary qubits. For concreteness, we apply this…
Compiling quantum circuits lends itself to an elegant formulation in the language of rewriting systems on non commutative polynomial algebras $\mathbb Q\langle X\rangle$. The alphabet $X$ is the set of the allowed hardware 2-qubit gates. The set of gates that we wish to implement from $X$ are elements of a free monoid $X^*$ (obtained by concatenating the letters of $X$). In this setting, compiling an idealized gate is equivalent to computing its unique normal form with respect to the rewriting system $\mathcal R\subset \mathbb Q\langle X\rangle$ that encodes the hardware constraints and capabi…
Topological quantum computation is an implementation of a quantum computer in a way that radically reduces decoherence. Topological qubits are encoded in the topological evolution of two-dimensional quasi-particles called anyons and universal set of quantum gates can be constructed by braiding these anyons yielding to a topologically protected circuit model. In the present study we remind the basics of this emerging quantum computation scheme and illustrate how a topological qubit built with three Fibonacci anyons might be adopted to achieve leakage free braiding gate by exchanging the anyons …
Wuhan University(武汉大学);JD Explore Academy(京东探索研究院);University of Maryland(马里兰大学)
Efficient quantum compiling tactics greatly enhance the capability of quantum computers to execute complicated quantum algorithms. Due to its fundamental importance, a plethora of quantum compilers has been designed in past years. However, there are several caveats to current protocols, which are low optimality, high inference time, limited scalability, and lack of universality. To compensate for these defects, here we devise an efficient and practical quantum compiler assisted by advanced deep reinforcement learning (RL) techniques, i.e., data generation, deep Q-learning, and AQ* search. In t…
We propose a general and systematic strategy to compile arbitrary quantum channels without using ancillary qubits, based on proximal policy optimization -- a powerful deep reinforcement learning algorithm. We rigorously prove that, in sharp contrast to the case of compiling unitary gates, it is impossible to compile an arbitrary channel to arbitrary precision with any given finite elementary channel set, regardless of the length of the decomposition sequence. However, for a fixed accuracy $ε$ one can construct a universal set with constant number of $ε$-dependent elementary channels, such that…
We present an algorithm for compiling arbitrary unitaries into a sequence of gates native to a quantum processor. As accurate CNOT gates are hard for the foreseeable Noisy- Intermediate-Scale Quantum devices era, our A* inspired algorithm attempts to minimize their count, while accounting for connectivity. We discuss the search strategy together with metrics to expand the solution frontier. For a workload of circuits with complexity appropriate for the NISQ era, we produce solutions well within the best upper bounds published in literature and match or exceed hand tuned implementations, as wel…
Quantum compiling addresses the problem of approximating an arbitrary quantum gate with a string of gates drawn from a particular finite set. It has been shown that this is possible for almost all choices of base sets and furthermore that the number of gates required for precision epsilon is only polynomial in log 1/epsilon. Here we prove that using certain sets of base gates quantum compiling requires a string length that is linear in log 1/epsilon, a result which matches the lower bound from counting volume up to constant factor.
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…
Compiling quantum circuits to realistic hardware architectures using temporal planners
NASA Ames Research Center, Quantum Artificial Intelligence Laboratory(美国国家航空航天局阿姆斯研究中心,量子人工智能实验室);USRA Research Institute for Advanced Computer Science (RIACS)(美国宇航局高级计算机科学研究所(RIACS));Stinger Ghaffarian Technologies (SGT Inc.)(Stinger Ghaffarian技术(SGT公司));NASA Ames Research Center, Planning and Scheduling Group(美国国家航空航天局阿姆斯研究中心,计划与调度组)