The disclosure pertains to quantum circuit design.
With rapid maturation of quantum devices, efficient compilation of high-level quantum algorithms into lower-level fault-tolerant circuits is critical. A plurality of useful fault-tolerant quantum basis sets arises from augmenting the set of Clifford gates by one or more unitary gates in order to make the gate set universal. Examples comprise the Clifford+T basis, consisting of the two-qubit controlled-NOT gate (CNOT) and the single-qubit Hadamard gate (H) as generators for the Clifford gates, along with the T gate, implementing a relative phase of eiπ/4, the Clifford−π/12 basis, consisting of said CNOT and H gates, along with a single qubit unitary that implements a relative phase of eπ/12 and the Clifford+V basis, consisting of said CNOT and H gates, along with 6 gates that are defined over the cyclotomic integers Z[i].
Efficient algorithms for approximating a single-qubit gate into each of the universal gate sets Clifford+T and Clifford+V are available, and the resulting number of elementary gates that are outside the Clifford group has scaling that is close, but slightly larger than an information-theoretic lower bound. These algorithms are described in N. Ross and P. Selinger, “Optimal ancilla-free Clifford+T approximation of z-rotations,” published on the Internet at http://arxiv.org/abs/1403.2975 (2014), and Kliuchnikov et al., “Practical approximation of single-qubit unitaries by single-qubit quantum Clifford and T circuits,” published on the Internet at http://arxiv.org/abs/1212.6964 (2012), both of which are incorporated herein by reference. Clifford and V circuit decompositions are described in Bocharov et al., “Efficient Decomposition of Single-Qubit Gates into V Basis Circuits,” available on the Internet at arXiv:1303.1411, which is incorporated herein by reference.
For the Clifford+T gate set, so-called Repeat-Until-Success (RUS) circuits have been proposed that can further reduce the expected number of required elementary gates for both axial and non-axial rotations to make it come even closer to the information-theoretic lower bound. An RUS circuit allows a potentially unlimited sequence of trial and correction cycles with finite expected cost below the lower bound achieved by a purely unitary circuit design. However, alternative approaches are needed that can reduce the number of gates as well as guarantee success after a predetermined number of cycles. At the same time, alternative approaches are needed that can be applied for more general gate sets beyond Clifford+T, so that synthesis for more general sets of gate sets becomes tractable at increased efficiency.
Probabilistic quantum circuits with fallback (PQFs) include a series of multi-qubit stages that are configured to have a probability of producing a target rotation based on an input associated with an output of an unsuccessful previous stage in the series. Each stage may or may not be successful. A deterministic fallback quantum circuit is coupled to a final stage and produces the target rotation based on the output of the final stage. The stages are implemented in the Clifford+T, Clifford+π/12, or the Clifford+V bases.
In one example, a computer-implemented method of defining a quantum circuit comprises establishing a first approximation of a target single-qubit unitary to a requested precision. The first approximation is expanded into a first multi-qubit unitary that implements the target single-qubit unitary in a selected basis upon successful measurement. The fallback circuit deterministically implements the target unitary conditional upon unsuccessful measurements in all previous stages. A circuit definition is output that includes a definition of the sequence of multi-qubit unitaries for all intermediate stages and a definition of the fallback circuit. Each intermediate stage is followed by measurement of at least one ancillary qubit, and if the measurement indicates that the stage was unsuccessful, then the next stage is executed, and so on. If measurement of a particular stage indicates success, the additional stages and the fallback circuit are not needed. If measurements of all intermediate stages indicate that all intermediate stages are unsuccessful, the fallback circuit is applied.
As used in this application and in the claims, the singular forms “a,” “an,” and “the” include the plural forms unless the context clearly dictates otherwise. Additionally, the term “includes” means “comprises.” Further, the term “coupled” does not exclude the presence of intermediate elements between the coupled items.
The systems, apparatus, and methods described herein should not be construed as limiting in any way. Instead, the present disclosure is directed toward all novel and non-obvious features and aspects of the various disclosed embodiments, alone and in various combinations and sub-combinations with one another. The disclosed systems, methods, and apparatus are not limited to any specific aspect or feature or combinations thereof, nor do the disclosed systems, methods, and apparatus require that any one or more specific advantages be present or problems be solved. Any theories of operation are to facilitate explanation, but the disclosed systems, methods, and apparatus are not limited to such theories of operation.
Although the operations of some of the disclosed methods are described in a particular, sequential order for convenient presentation, it should be understood that this manner of description encompasses rearrangement, unless a particular ordering is required by specific language set forth below. For example, operations described sequentially may in some cases be rearranged or performed concurrently. Moreover, for the sake of simplicity, the attached figures may not show the various ways in which the disclosed systems, methods, and apparatus can be used in conjunction with other systems, methods, and apparatus. Additionally, the description sometimes uses terms like “produce” and “provide” to describe the disclosed methods. These terms are high-level abstractions of the actual operations that are performed. The actual operations that correspond to these terms will vary depending on the particular implementation and are readily discernible by one of ordinary skill in the art.
In some examples, values, procedures, or apparatus' are referred to as “lowest”, “best”, “minimum,” or the like. It will be appreciated that such descriptions are intended to indicate that a selection among many used functional alternatives can be made, and such selections need not be better, smaller, or otherwise preferable to other selections.
In some examples, the terms “unitary” or “unitary matrix” are used to refer to functions performed by quantum circuits that can be implemented in a variety of ways. In the following description, such matrices are also referred to as circuits for convenient description. Some commonly used unitary quantum gates corresponding to single-qubit operators S, X Y, and Z can be represented as:
Compilation of high-level quantum algorithms into lower-level fault-tolerant circuits is a critical component of quantum computation. One fault-tolerant universal quantum basis, referred to as the Clifford+T basis, consists of the two-qubit Controlled-NOT gate (CNOT), and two single-qubit gates, the Hadamard gate (H) and the T-gate T. The operation of these gates can be written as:
Other bases can be used as well, including the Clifford+π/12 and Clifford+V bases.
For the Clifford+π/12 basis we augment the set of Clifford gates by the gate
For the Clifford+V basis we augment the set of Clifford gates by the 6 gates V1, V2, V3, V1−1, V2−1, V3−1 that are defined as follows:
Basis circuits can be combined to implement an arbitrary unitary operation. A one-qubit unitary operator can be expressed as a unitary 2×2 matrix with complex elements:
wherein a and b are complex numbers and the notation “x*” indicates a complex conjugate of x. Such a unitary 2×2 matrix U has the following property:
wherein
The adjoint U554 of a unitary matrix U is the complex-conjugate transpose of the unitary U and is the inverse of U, denoted U−1.
In the following, multi-qubit circuits are disclosed that have one or more qubits that are used to obtain computed values associated with one or more unitaries and one or more qubits that are used to determine success or failure of a circuit or sub-circuit. These qubits are referred to as primary qubits and ancillary qubits (or ancilla), respectively. In most examples, ancillary qubits are initialized to the zero state for convenience, but other initial states can be used. PQF circuits typically include a series of stages, and the circuits for these stages are referred to in some examples as sub-circuits. A PQF circuit generally includes a number of sub-circuits and a fallback circuit that is associated with a final sub-circuit. As noted above, each intermediate stage in the series is followed by measurement of at least one ancillary qubit, and if the measurement indicates that the stage was unsuccessful, then the next stage is executed, and so on. If measurement of a particular stage indicates success, the additional stages and the fallback circuit are not needed. If measurements of all intermediate stages indicate that all intermediate stages are unsuccessful, the fallback circuit is applied.
For convenient illustration, the examples below pertain to PQF implementation of single-qubit gates. Multi-qubit gates can be implemented as PQF circuits in the same manner. In addition, while implementation examples are shown in particular bases, other bases can be used. Generally, any basis in which a deterministic fallback circuit can be defined is suitable for PQF circuit implementation. In addition to the PQF circuits and methods, the following describes generation of deterministic fallback circuits in the Clifford+π/12 basis.
A unitary operation is representable by a Clifford+T circuit if and only if the unitary operation is represented by a unitary matrix of the form 1/√{square root over (2)}kU wherein U is a matrix with elements from [ω] and k is a non-negative integer. [ω] is a ring of cyclotomic integers of order 8, and consists of all numbers of the form aω3+bω2+cω+d wherein a,b,c,d are arbitrary integers and ω=eiπ/4. One choice for a basis of [ω] is {ω3, ω2, ω,1}. To be unitary, UU†=2kId, where Id is an identity matrix. A matrix of such form can be represented as an asymptotically optimal Clifford+T circuit using at most two ancillary qubits. In other representations, no ancillary qubits are required for a single-qubit subject unitary or when Det(1/√{square root over (2)}kU)=1. Any single-qubit circuit in the {H,T} basis can be expressed as a sequence of syllables of the form T−kHTk,k∈ and at most one additional single-qubit Clifford gate. Any single-qubit unitary operation U can be decomposed into a sequence of axial rotations U=Rz(α) Rx(β) Rz(γ) in accordance with the Euler angle decomposition of U. Thus any single-qubit unitary operation can be decomposed into Clifford+T circuits using the techniques presented herein. Similar single-qubit circuit decompositions can be Clifford+V circuits or Clifford|π/12 circuits.
Disclosed herein are quantum circuits and methods based on probabilistic circuits with fallback (PQFs) that allow a finite (typically, small) number of trials and only one final correction step that is purely unitary and may have a considerable cost. The expected cost for a PQF circuit is lower than other decomposition techniques due to the probability boosting that decreases the probability of having to perform the costly fallback sub-circuit extremely low. The synthesis of a PQF circuit approximating a given target can be simpler than in the RUS case as in the synthesis of the RUS circuits, considerable effort is directed to maintaining essentially cost-free corrections, for example corrections that are composed of Pauli gates or Clifford gates.
In the following, it is assumed that a so-called “fallback” circuit synthesis method is available that, for a given unitary target gate G and a desired precision ε generates a deterministic ε-approximation circuit F (G,ε) with a known execution cost CF(G,ε). In addition, it is assumed that there is a “primary” circuit synthesis method that given G and ε generates a probabilistic circuit P (G, ε) with probability p>0 and performs some other unitary gate G1 with probability 1−p. A measurement of one or more ancilla qubits is used to determine whether the primary circuit is successful, i.e., provides an output corresponding to the target gate (e.g., G), or unsuccessful, i.e., provides an output corresponding to the other unitary gate (e.g., G1). A number of stages can be selected based on a cost estimate in view of costs associated with implementation of one or more gates from a basis set. In addition, the number of stages can be selected based on cost so as to avoid including stages that provide little cost benefit and so as to minimize the expected cost of the complete PQF circuit.
In addition to the Clifford+T basis, some examples are based on the Clifford+V basis and the Clifford+7π/12 basis. The Clifford+V basis provides for shortest known unitary circuits resulting from the classically efficient approximate synthesis. The Clifford+π/12 basis is useful for architectures based on metaplectic anyons. PQF syntheses are disclosed for these bases using the fact that all the exactly representable unitaries over a respective basis are representable as unitarizations of matrices over rings of cyclotomic integers of order 4m,m ∈1,2,3, wherein m=1 for the Clifford+V basis, m=2 for the Clifford+T basis, and m=3 for the Clifford+π/12 basis. As noted above, Clifford+T circuits are based on cyclotomic integers of order 8, i.e., 4m, wherein m=2.
For a multi-round PQF design with k rounds, sub-circuits are sequentially generated for each round. Each subsequent round of the design is conditional on the failure of all the previous rounds, and accounts for cumulative undesired outcomes of the previous rounds. In what follows a PQF circuit is designed for a target z-rotation such that the undesired outcomes are also z-rotations. With this, each round of the PQF design will have the same logic and only the target rotation angles between the rounds may be different.
A representative PQF circuit 100 is shown in
The second stage circuit 116 implements a unitary U(G k−1, ε) and is coupled to a measurement circuit 118 and a second stage classically controlled switch 120. As with the first stage circuit 106, the second stage classically controlled switch 120 allows the PQF circuit 100 to continue in additional stages if and only if a measurement result obtained by the measurement circuit 118 is unfavorable. If the result is favorable, the second stage classically controlled switch 120 couples the processed input qubits to provide the desired output V|ψ. Additional stages can be provided, but are not shown in
A fallback circuit 136 is coupled to the input qubits as processed by circuit stages 106, 116 (and other stages) and to ancilla qubits 134. The fallback circuit 136 implements the unitary U(G0, ε) and produces the output V|ψ.
Let Fj|input be an undesired result of a j-th round of processing as would be signaled by an unfavorable measurement result during execution. Then Gj−1=GjFj† and all Gj, j=0, . . . , k−1 are computed at compile time.
While additional circuits such as circuits 106, 116 can be provided, in most cases the number k of rounds that need to be applied until the target gate G is implemented is quite small, i.e., only a few such circuits are necessary to achieve nearly optimal performance, typically between 2 and 5 circuits. In both PQF and RUS circuit designs, a unitary operation(s) U is synthesized to act on n+m qubits, of which n are target qubits and in are ancillary qubits. A key difference is that in PQF designs, the unitary may vary from round to round, while it stays the same in RUS designs.
Referring to
Determination of a kth stage is described in detail below. In general, a phase factor eiθ is expressed as a unimodal cyclotomic rational (z/z*), wherein z∈ω] by finding an approximate solution of an integer relation problem. In a next step, several rounds of modification z(rz) wherein r †[92 ] so that a unitary can be expressed using a set of cyclotomic integers based on a basis in which the PQF circuit is to be implemented. In general, this modification is carried out so that (a) a norm equation |y|2=2L−|rz|2 is solvable for y∈[ω],L∈ and (b) the one-round success probability |rz|2/2L is sufficiently close to 1. In a next step, the two-qubit matrix corresponding to the unitary part of the PQF sub-circuit is assembled and during a final step, a two-qubit PQF sub-circuit is synthesized.
For any basis, the elements of a unitary U to be synthesized are selected from a suitable set of cyclotomic integers. Let ζ=e2πi/m be the m-th primitive root of unity and consider the corresponding ring of cyclotomic integers [ζ]. An arbitrary phase factor can be represented by a unimodal cyclotomic rational z*/z wherein z ∈[ζ] as discussed below.
Let θ be a real angle, so that |z*/z−eiθ|=2|Im(zeiθ/2)|/|z|. The phase factor eiθ is representable exactly as z*/z if and only if Im(zeiθ/2)=0. This factor is approximately so representable at absolute precision ε if and only if |2Im(zeiθ/2)|<ε|z|.
Consider the standard integer basis {1,ζ, . . . , ζd−1} in [ζ]. Represent z in this basis, as z=a0+a1ζ+. . . +aζd−1ζd−1 wherein {a0,a1, . . . , ad−1} are ordinary integers. By direct complex expansion, Im(zeiθ/2) is a linear form with real coefficients in {a0,a1, . . . , ad−1}. This form can be expanded as F(a, x(θ))=a0x0(θ)+a1x1(θ)+. . . +ad−1xd−1(θ), wherein xj(θ)=sin(θ/2+2πj/m), j=0, . . . , d−1 is the corresponding real vector. For θ in general, this vector does not have zero components. It is also helpful to observe that for |θ|<π/2 at least one of xj is well separated from zero (e.g. at least one xj(θ) is greater than sin(2π/m)).
Representing the phase factor eiθ exactly as cyclotomic rational is equivalent to solving an integer relation with real coefficients F (a, x(θ))=0 for a. Furthermore, when this relation is not solvable, an approximate integer relation is solved, i.e., {a0,a1, . . . , ad−1} is found such that F (a, x(θ))|<δ. Such approximate relations can be found for arbitrarily small positive δ.
In order to find these solutions, the PSLQ integer relation algorithm can be used. An initial approximation of eiθis obtained such that z*/z˜eiθ, wherein z is a cyclotomic integer. For a selected real θ and a cyclotomic integer z=aw3+bω2+cω+d,a,b,c,d ∈,|z*/z−eiθ|<ε if and only if: |a(cos(θ/2)−sin(θ/2))+b√{square root over (2)}cos(θ/2)+c(cos(θ/2)+sin(θ/2))+d√{square root over (2)}sin(θ/2) |<ε|z|.
Thus eiθ is representable exactly only if ε|z|=0 . If ε|z| is small, then |z*/z−eiθ is small as well. An integer relation algorithm can be used to find a relation between a set of real numbers x1, . . . , xn and a candidate vector defined by a set of integers a1, . . . , an, not all zero, such that:
a1x1+. . . +anxn=0.
Most commonly an integer relation algorithm makes iterative attempts to find an integer relation until the size of the candidate vector a1, . . . , an exceeds a certain pre-set bound or a1x1+. . . +anxn falls below a selected resolution level. Such an algorithm can be used to reduce the size of a1x1+. . . +anxn to an arbitrarily small value.
The PSLQ algorithm is described in, for example, Helaman R. P. Ferguson and David H. Bailey, “A Polynomial Time, Numerically Stable Integer Relation Algorithm,” RNR Technical Report RNR-91-032 (Jul. 14, 1992), which is incorporated herein by reference. As noted above, upon termination, the algorithm provides the integer relation candidate vector a1, . . . , an for the integer relation a.x=a1x1+. . . +adxd such that |a,x| can be made arbitrarily small after a large enough number of iterations. In the examples disclosed herein, iterations terminate when the equivalent of the |z*/z−eiθ|<εinequality is satisfied.
In the disclosed examples, the cases m=4,8,12 are considered, which correspond to the Clifford+V, Clifford+T, and Clifford+π/12 bases respectively.
Let ζ=e2πi/m and limit the analysis to m that is a multiple of 4 (so that the ring [ζ] contains i=√{square root over (−1)}). Define a unitarization base v:v=√{square root over (5)} for m>4 and v=√{square root over (5)} for m=4 (the latter for the Clifford+V basis). Let θ be the target angle of rotation and z*/z,z ∈[ζ] be an ε-approximation of the phase factor eiθ. The synthesis of both purely unitary and measurement-assisted circuits around z*/z hinges on the existence of a unitary matrix of the form
wherein y ∈[ζ], L∈.
The corresponding matrix
can be determined by solving the norm equation |y|2=V2L
As a result of the previous stages, a unitary matrix such as
is available, wherein Lr=j log5(r2|z|2)k≦log5(|z|2)+O(log(log5(|z|2))) and r2|z|2/5L
By direct computation, when U is applied to |ψ0 and the second qubit is measured, then:
(0) on measurement result 0, the Λ(z*/z)˜Λ(eiθ) rotation gate is effectively applied to the primary qubit wherein Λ(*) is a rotation about the z-axis by an angle *; and
(1) on measurement result 1, the Λ(−y/y*) rotation gate is applied to the primary qubit, wherein Λ(*) is a rotation about the z-axis by an angle *. Thus the level one fallback circuit must be a unitary ε-approximation of the rotation gate Λ(−y*/yeiθ). Fallback circuits at subsequent levels have similar structure.
Given a unitary matrix V that is determined as described above, a two-qubit unitary
is constructed. Denote the primary input state for the round as |ψ. The subcircuit for the round uses the first qubit as primary and the second qubit, which is initialized to |0> as ancillary. The unitary U is then applied to the initial state |ψ|0 and the (ancillary) second qubit is measured in the computational basis. When the measurement result is 0, then the primary output is reduced to
which is the desired ε-approximation of Rz(θ). When the measurement result is 1, then the primary output is reduced to
Unless −y/y* is ε-close to eiθ the tail end of the PQF protocol now has to implement the rotation Rz(θ′) so that θ′=θ−arg(−y/y*) is the target rotation for the next round of the PQF protocol. If more than one round is desired, this procedure is repeated for the angle θ′.
A representative compilation method 300 illustrating the above procedure is provided in
At 312, the modifier is used so that (rz)*/(rz)˜eiθ. At 312, a PQF circuit is obtained for the current round based on r, z and at 316, a two-qubit PQF matrix is found for the current round. At 318, the PQF is synthesized for the current round. At 320, an undesired angle is determined based on stage failure and at 322, steps 306-320 are repeated for additional rounds (i.e., until k=0). At step 324 a unitary to compensate for the failure in the previous step is computed so that in step 326 another attempt of implementing the overall target gate can be made. At run-time, in case the binary classical control BC in step 326 indicates success, the protocol is terminated at this point as the target unitary G has been correctly implemented. In case the binary classical control indicates failure, the protocol continues with the application of the compensation unitary Fk-1 which has been precomputed recursively at compile time.
In PQF circuit compilations, a number of stages k is selected so that a sequence of probabilistic sub-circuits is obtained, along with a deterministic fallback circuit. At PQF compile-time, the number of stages k can be determined as a function of the difficulty, or cost, of implementing the stages and the fallback circuit. The method or function used to determine k can be for example minimizing the expected non-Clifford gate count. Alternatively, the number of rounds can be set to the smallest k value for which qkCF<1, where CF is the cost of the fallback circuit and q is the probability of failure. When a PQF circuit is executed with a particular input value, the number of stages that is needed typically depends on the input value. Thus, PQF circuit run-time is a function of the input value and the measurement outcomes. If a given round succeeds, then the remainder of rounds and the fallback circuit will not be executed.
Referring to
With reference to
As shown in
The exemplary PC 500 further includes one or more storage devices 530 such as a hard disk drive for reading from and writing to a hard disk, a magnetic disk drive for reading from or writing to a removable magnetic disk, and an optical disk drive for reading from or writing to a removable optical disk (such as a CD-ROM or other optical media). Such storage devices can be connected to the system bus 506 by a hard disk drive interface, a magnetic disk drive interface, and an optical drive interface, respectively. The drives and their associated computer readable media provide nonvolatile storage of computer-readable instructions, data structures, program modules, and other data for the PC 500. Other types of computer-readable media which can store data that is accessible by a PC, such as magnetic cassettes, flash memory cards, digital video disks, CDs, DVDs, RAMs, ROMs, and the like, may also be used in the exemplary operating environment.
A number of program modules may be stored in the storage devices 530 including an operating system, one or more application programs, other program modules, and program data. Storage of quantum syntheses and instructions for obtaining such syntheses can be stored in the storage devices 530 as well as or in addition to the memory 504. A user may enter commands and information into the PC 500 through one or more input devices 540 such as a keyboard and a pointing device such as a mouse. Other input devices may include a digital camera, microphone, joystick, game pad, satellite dish, scanner, or the like. These and other input devices are often connected to the one or more processing units 502 through a serial port interface that is coupled to the system bus 506, but may be connected by other interfaces such as a parallel port, game port, or universal serial bus (USB). A monitor 546 or other type of display device is also connected to the system bus 506 via an interface, such as a video adapter. Other peripheral output devices, such as speakers and printers (not shown), may be included. In some cases, a user interface is display so that a user can input a circuit for synthesis, and verify successful synthesis.
The PC 500 may operate in a networked environment using logical connections to one or more remote computers, such as a remote computer 560. In some examples, one or more network or communication connections 550 are included. The remote computer 560 may be another PC, a server, a router, a network PC, or a peer device or other common network node, and typically includes many or all of the elements described above relative to the PC 500, although only a memory storage device 562 has been illustrated in
The personal computer 500 and/or the remote computer 560 can be connected to a logical a local area network (LAN) and a wide area network (WAN). Such networking environments are commonplace in offices, enterprise wide computer networks, intranets, and the Internet.
When used in a LAN networking environment, the PC 500 is connected to the LAN through a network interface. When used in a WAN networking environment, the PC 500 typically includes a modem or other means for establishing communications over the WAN, such as the Internet. In a networked environment, program modules depicted relative to the personal computer 500, or portions thereof, may be stored in the remote memory storage device or other locations on the LAN or WAN. The network connections shown are exemplary, and other means of establishing a communications link between the computers may be used.
With reference to
With reference to
Having described and illustrated the principles of our invention with reference to the illustrated embodiments, it will be recognized that the illustrated embodiments can be modified in arrangement and detail without departing from such principles. For instance, elements of the illustrated embodiment shown in software may be implemented in hardware and vice-versa. Also, the technologies from any example can be combined with the technologies described in any one or more of the other examples. Alternatives specifically addressed in these sections are merely exemplary and do not constitute all possible embodiments.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/US2015/049534 | 9/11/2015 | WO | 00 |
Number | Date | Country | |
---|---|---|---|
62049238 | Sep 2014 | US |