METHOD AND SYSTEM FOR EFFICIENT QUANTUM TERNARY ARITHMETIC

Information

  • Patent Application
  • 20180365583
  • Publication Number
    20180365583
  • Date Filed
    November 18, 2016
    8 years ago
  • Date Published
    December 20, 2018
    6 years ago
Abstract
Ripple-carry and carry look-ahead adders for ternary addition and other operations include circuits that produce carry values or carry status indicators that can be stored on qutrit registers associated with input values to be processed. Inverse carry circuits are situated to reverse operations associated with the production of carry values or carry status indicators, and restored values are summed with corresponding carry values to produce ternary sums.
Description
TECHNICAL FIELD

The disclosure pertains to circuits, circuit synthesis, and methods for quantum ternary arithmetic.


BACKGROUND

Quantum circuits for performing arithmetic operations are an essential part of key quantum algorithms such as Shor's factorization, discrete logarithm, hidden subgroup algorithms and others. The importance of quantum ternary logic for applications such as quantum key distribution has been understood since late 1980s. Recently, ternary arithmetic has become important in quantum computing due to potential architectural platforms grounded in ternary representation, for example in the metaplectic any on architecture. Ternary quantum logic may also be relevant for other architectural platforms such as quantum dots, where higher energy levels can be used to store additional logic states. While ternary hardware architectures have been investigated, satisfactory circuits and procedures for ternary arithmetic and ternary quantum logic for algorithm and circuit compilation are generally unavailable.


SUMMARY

Ternary adders include a series of carry circuits that compute carry values associated with processing of two input values, followed by a series of inverse carry circuits that return qutrit register values to the input values. Sum values are then provided on qutrits associated with the input values. In some examples, carry status indicators are used to determine carry values so that ternary addition and other operations can be performed so that some stages can be executed in parallel. These ternary circuits and others can be synthesized in a supermetaplectic basis.


These and other features and aspects of the disclosed technology are set forth below with reference to the accompanying drawings.





BRIEF DESCRIPTION OF THE DRAWINGS


FIG. 1A is a schematic diagram illustrating a ternary soft control gate ∨(U):|i,jcustom-character↔|icustom-character⊗Ui|jcustom-character, wherein U is an arbitrary single qutrit gate.



FIG. 1B is a schematic diagram illustrating a ternary controlled-U gate.



FIG. 1C is a schematic diagram illustrating a ternary X-gate.



FIG. 1D is a schematic diagram illustrating a ternary sum gate.



FIG. 1E is a schematic diagram illustrating a ternary controlled-X gate.



FIG. 1F is a schematic diagram illustrating a ternary controlled-SUM gate.



FIG. 1G is a schematic diagram illustrating a carry status circuit that determines a carry status indicator C[0,1].



FIG. 1H is a schematic diagram illustrating a carry status circuit that determines a carry status indicator C[i,i+1].



FIG. 1I is a schematic diagram illustrating a merging circuit that determines carry status indicators C[i,j] based on carry stat indicators C[0,1] and C[i,i+1].



FIG. 1J is a schematic diagram illustrating an inverse of a carry status circuit that determines a carry status indicator C[0,1].



FIG. 1K is a schematic diagram illustrating an inverse of a carry status circuit that determines a carry status indicator C[i,i+1].



FIG. 1L is a schematic diagram illustrating an inverse of a merging circuit that determines carry status indicators C[i,j] based on carry status indicators C[0,1] and C[i,i+1] so as to permit restoration of trit values input to a carry look-ahead adder circuit.



FIG. 2 is a ternary arithmetic table illustrating carry trit values associated with various combinations of input trit values and an input carry trit value.



FIG. 3 illustrates operation of an S00,22 circuit.



FIG. 4 is a schematic diagram illustrating a quantum single trit carry circuit that produces a carry value based on input trit values stored in a quantum register and an input carry value received from a carry qutrit.



FIG. 5 is a schematic diagram illustrating a representative implementation of a quantum single trit carry circuit that produces a carry value based on input trit values stored in a quantum register.



FIG. 6 is a schematic diagram illustrating an inverse of the carry circuit of FIG. 5.



FIG. 7 is a schematic diagram illustrating a quantum ripple look-ahead adder for ternary addition of values obtained from two 3-qutrit quantum registers.



FIG. 8 is a schematic diagram illustrating an n-trit quantum ripple look-ahead adder for ternary addition.



FIG. 9 summarizes relationships between carry trit values ci and ci+1.



FIG. 10 is a schematic diagram illustrating a quantum circuit that produces carry status indicators C[i,i+1] associated with ith trits of two n-qutrit registers, wherein 0<i<n and n, i are positive integers.



FIG. 11 is a schematic diagram illustrating a quantum circuit that produces carry status indicators C[0,1] associated with two n-qutrit registers, wherein n is a positive integer.



FIG. 12 illustrates a merging operation for carry status indicators.



FIG. 13 is a schematic diagram illustrating a quantum merging circuit that determines carry status indicators C[i,j] based on carry status indicators C[i,k],C[k,j], wherein i, j, k are non-negative integers.



FIG. 14 is a schematic diagram of an “out of place” carry look-ahead quantum ternary addition circuit.



FIG. 15 is a schematic diagram of an “in-place” carry look-ahead quantum ternary addition circuit.



FIGS. 16A-16B are schematic diagrams of an “in-place” carry look-ahead quantum ternary addition circuit with comparison to a corresponding “out-of-place” circuit.



FIG. 17 is a schematic diagram of a quantum circuit that provides addition modulo 3n.



FIG. 18 is a schematic diagram illustrating a representative quantum method of ternary subtraction.



FIG. 19 is a schematic diagram illustrating a representative quantum ternary comparator.



FIG. 20 illustrates a method of quantum ternary comparison.



FIGS. 21-22 give constructions of the Horner gate and custom-character(X) from one another.



FIG. 23 shows a construction of C(SUM) from custom-character(X).



FIG. 24 shows a representative implementation of a circuit for S01,10.



FIG. 25 illustrates a representative circuit for ∨(∨(Z)) using the supermetaplectic basis.



FIG. 26 illustrates a representative circuit for C2(Z) using the supermetaplectic basis.



FIG. 27 illustrates a representative classical computer that is configured to synthesize circuits for quantum ternary arithmetic and a quantum computing environment in which such circuits are implemented.



FIG. 28 is a block diagram of a representative classical computing environment.





DETAILED DESCRIPTION

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.


Disclosed herein are methods, apparatus, and quantum circuits pertaining to the synthesis of reversible ternary arithmetic circuits and corresponding circuits and methods. In addition, circuit synthesis using a supermetaplectic basis and circuits defined in this basis are disclosed. In some examples, ternary adders are described that are referred to as ripple carry adders and carry look-ahead adders. In one representative example, a ripple carry adder that adds 2 n-trit numbers requires only one ancilla qutrit and has a circuit depth of custom-character(n); a corresponding carry save adder requires custom-character(n) ancilla qutrits and has a circuit depth of custom-character(log n).


Notation and Definitions


Quantum operations are described below with reference to one or more qutrits which represent three states. Qutrit operations can be described with reference to a qutrit computational basis |0custom-character,|1custom-character,|2custom-character. Qutrits can be implemented in variety of ways using quantum mechanical systems that can assume three values. For convenient illustration, evolution of the state of a particular qutrit and couplings to other qutrits are shown in the drawings along lines so that evolution progresses from left to right. Corresponding matrix representations are obtained as products from right to left. Numbers can be represented by a series of ternary digits so that an n-trit number a can be expressed as a=an-13n-1+an-23n-2+ . . . +a13+a0, wherein the ai are referred to as trit values and possible values for ai are 0, 1, and 2. A qutrit used in computation can be referred to as an ancilla or ancilla qutrit. A set of qutrits that are used to represent trit values associated with a multi-trit ternary number is referred to as a register or a quantum register.


Some gates used in the following description are defined below. Gates are typically described with reference to associated mathematical operations that are implemented by the gates. Circuit implementations of any particular operations are generally based on combinations of one or more basis gates selected from a set of basis gates. In qutrit arithmetic as used herein, arithmetic within a ket is modulo 3 arithmetic. In gate definitions, ζn=e2πi/n.








































































X
:



i








i

+
1



,

i
.
e
.

,

X
=

(



0


0


1




1


0


0




0


1


0



)









Z
:

|
i








ζ
3
i





i
+
1





,

H
:

|
i








1

3






j



ζ
3
ij




|
j










S

0
,
1


:

|
0







|
1



,


S

00
,
22


:

|
00







|
22











Soft





control






Λ


(
U
)



:

|
i


,
j






|
i





U
i


|
j











Hard





control






C


(
U
)



:

|
i


,
j






|
i





U

δ

i
,
c




|
j











SUM


Λ


(
X
)



:

|
i


,
j






|
i

,

i
+
j












C


(
X
)


=



C
c



(
X
)


:

|
i



,
j






|
i




U

|
i

,

j
+

δ

i
,
c














HORNER


Λ


(
SUM
)



:

|
i


,
j
,
k






|
i

,
j
,

ij
+
k












C


(
SUM
)


=



C
c



(
SUM
)


:

|
i



,
j
,
k






|
i

,
j
,

k
+

j






δ

i
,
c










The gate C(X) is referred to as the controlled-increment gate and can be represented as:








C


(
X
)


=

(



1


0


0


0


0


0


0


0


0




0


1


0


0


0


0


0


0


0




0


0


1


0


0


0


0


0


0




0


0


0


1


0


0


0


0


0




0


0


0


0


1


0


0


0


0




0


0


0


0


0


1


0


0


0




0


0


0


0


0


0


0


0


1




0


0


0


0


0


0


1


0


0




0


0


0


0


0


0


0


1


0



)


,




wherein 2-qutrit states a|00custom-character+b|01custom-character+c|02custom-character+d|10custom-character+e|11custom-character+f|12custom-character+g|20custom-character+h|21custom-character+i|22custom-character are represented as column vectors of the form:








(



a




b




c




d




e




f




g




h




i



)





The single qutrit gate S0,1 is only one example as gates S0,2 and S1,2 can be similarly defined. These gates can be referred to as one trit swap gates.


The qutrit Clifford group is generated by the SUM, X, H, Q gates, wherein:






H
=


(



1


1


1




1



ζ
3




ζ
3
2





1



ζ
3
2




ζ
3




)






and







Q
=


(



1


0


0




0


1


0




0


0



ζ
3




)

.





  • Some of these gates are illustrated in FIGS. 1A-1F. The Clifford gates X, Z, H, S0,1, and SUM can generally be implemented so as to be computationally efficient or “cheap”; the non-Clifford gates C(X), Horner, C(SUM), and S00,22 are generally relatively expensive, and for this reason, the effectiveness of circuits and methods can be based on the numbers and arrangements of these gates. C(SUM), S00,22, and C(X) can each be constructed from 5 C(X) gates; the number C(X) gates can be used as measure of complexity. Gates such as S0,1 and S00,22 are referred to herein as single trit swap gates and two trit swap gates, respectively.

  • Some additional gates used in carry look-ahead circuits are illustrated in FIGS. 1G-1I. Carry status gates AdjC0 and AdjC and a merge gate M are discussed below with reference to carry look-ahead adders. Graphical representations are shown in FIGS. 1G-1I; inverses are shown in FIGS. 1J-1L. Filled-in rectangles indicate that the associated qutrit values can be changed by application of the gate; blank boxes indicate qutrit values that are unchanged.

  • Any of the above gates can have various implementations depending on a basis gate set to be used.



Ternary Adders


Disclosed below are circuits and methods for adding n-trit numbers a, b using carry trits ci. The approaches described are referred as ripple carry adders and carry look-ahead adders which can be implemented using the gates C(X), C(SUM), C(S0,1), S00,22. The gates C(SUM), C(S0,1), S00,22 can be constructed from C(X) and Clifford operations. However, these gates can be otherwise implemented, as may be preferred.


Ripple Carry Adders


For ternary adders described herein, a carry trit ci can have a value of 0 or 1, but never 2. FIG. 2 shows combinations of trit values ai,bi and carry values that are associated with carry trit values ci+1. For a carry trit value ci=2 (which does not occur in trit addition), the carry trit value ci+1 is defined to be ci+1=2. With this definition, ci+1 is a balanced function, i.e., there are the same number of inputs corresponding to each output. As illustrated in FIG. 2, ci+1 is the same as ci for all but six inputs, the last three in the columns ci=0 and ci=1. For each of these inputs, ci+1=1−ci. Applying the gate S00,22 to qutrits associated with ai,bi carries out the transformation shown in FIG. 3. The transformed values correspond to the set {(a,b,c)∈({0,1,2}3:a+b=c,c≠2}. A reversible circuit, referred to as Carry or a Carry Circuit, is defined that receives values ai,bi and a carry ci and produces a carry ci+1 in the qutrit associated with bi. In other examples, the carry value can be stored in qutrits associated with either summand, or partially in qutrits associated with each summand.


With reference to FIG. 4, a representative carry circuit 400 (a single trit carry adder) based on the above is coupled to qutrits 402, 407 that are associated with trit values ai,bi to be added, and a qutrit 404 is used for an input carry value ci. The carry circuit 400 provides the qutrits 404, 402 with values associated with functions ƒ(ai,bi,ci),g(ai,bi,ci) of the input trit values and the input carry value, and the qutrit 407 (associated with the input trit values) provides an output carry value ci+1. As discussed below, an inverse carry circuit be coupled to a carry circuit such as the circuit 400 so that trit values ai,bi are available.


Referring to FIG. 5, a representative carry-adder circuit 500 is coupled to qutrits 502, 503 that are associated with values ai,bi and a qutrit 504 associated with a carry value ci. A two qutrit swap gate 506 is coupled to the qutrits 502, 503 and a SUM gate 508 produces a sum ai+bi at the qutrit 503 followed by a SUM gate 510 that produces a sum ai+bi+ci at the qutrit 503. A one trit swap gate S0,1 510 is coupled to the qutrits 503, 504 followed by SWAP gates 512, 514 that are coupled to qutrits 502, 504 and 502, 503, respectively. A carry value ci+1 is then available at the qutrit 503 and function values ƒ(ai,bi,ci),g(ai,bi,ci) are available at the qutrits 504, 502, respectively. The values of the functions ƒ(ai,bi,ci),g(ai,bi,ci) appear as outputs of the carry circuit 500 as shown, but these values can be processed to return input values as needed using inverse operations as discussed below. FIG. 6 illustrates an inverse carry circuit 600.


Referring to FIG. 7, a three-trit quantum adder 700 includes input qutrits 702, 704, 706 that form a three-trit register and that are associated with low, medium, and high trit values a0,a1,a2, respectively. The three-trit quantum adder 700 also includes input qutrits 703, 705, 707 that form a three-trit register and that are associated with low, medium, and high trit values b0,b1,b2, respectively.


A first carry-adder circuit 712 is coupled to receive a carry value c0 and low order trit values a0,b0 and produce a carry value c1 on the qutrit 703. A second carry-adder circuit 714 is coupled to the first carry-adder circuit 712 and to medium trit values a1,b1 followed by a third carry circuit 716 that is coupled to the second carry-adder circuit 714 and high trit values a2,b2. In this way, carry values c1 and c2 are produced on the qutrits 705, 707. A SUM gate 718 couples the carry trit value c2 as an overflow trit value s3 to an ancilla qutrit 720.


An inverse carry-adder circuit 722 is coupled to the qutrits 706, 706, 707 to restore input trit values a2, b2 and a SUM circuit 724 is coupled to the qutrits 706, 707 to produce a sum a2+b2; a SUM circuit 726 is coupled to the qutrits 705, 707 to produce a sum a2+b2+c2 that is provided on the qutrit 707 as a high sum trit value s2.


An inverse carry-adder circuit 730 is coupled to the qutrits 703, 704, 705 to restore input trit values a1, b1. A SUM circuit 732 is coupled to the qutrits 704, 705 to produce a sum a1+b1; a SUM circuit 734 is coupled to the qutrits 703, 704 to produce a sum a1+b1+c1 that is provided on the qutrit 703 as medium sum trit value s1.


An inverse carry-adder circuit 740 is coupled to the qutrits 710, 702, 703 to restore input trit values a0, b0. SUM circuits 742, 744 are coupled to the qutrits 702, 703 to produce a sum a0+b0+c0 that is provided on the qutrit 703 as a low sum trit value s0. In some cases, the input carry value is assumed to be zero and the SUM circuit 744 can be omitted.


As shown in FIG. 7, function values ƒ(ai,bi,ci),g(ai,bi,ci) produced by carry-adder circuits along with carry values are processed by inverse carry adder circuits so as to permit recovery of input values for addition operations. In the example of FIG. 7, a sum is stored in qubits associated with an input summand b; in other examples, a sum can be stored in qubits associated with summand a or in some qutrits of each of the summands a and b.



FIG. 8 illustrates a ripple-carry adder 800 that provides ternary addition of n-trit ternary numbers. Carry-adder circuits 802j, j=1, . . . , n are coupled to receive sum and carry values from a prior carry-adder circuit in the series, The carry-adder circuit 802n producers a carry value (or sum value) sn corresponding to an overflow. Each of the carry-adder circuits 802j is associated with a corresponding inverse carry adder circuit 804j and a sum circuit 806j.


Carry Look-Ahead Adders


In the ripple-carry adder, a carry ci+1 is computed after the value of ci has been obtained, and thus the overall depth of the circuit is in O(n). One protocol to reduce the depth is a ternary carry look-ahead adder, which can compute all carry trits in depth O(log n) by introducing extra O(n) ancillas.


Quantum ternary adders can take advantage of relations between ci+1 and ci, or more generally, between ci and cj for i≠j. For instance, if ai+bi=2, then ci+1=ci, i.e., the carry trit remains unchanged. If ai+bi=1, then ci+1=0 regardless of the value of ci, Relationships between carry trits and ai,bi are summarized in FIG. 9. Note that c0=0 and thus when i=0, the column ci+=ci in FIG. 9 becomes c1=c0=0. For 0≤i<j≤n, a carry status indicator C[i, j] is defined as:

    • 0, for all cj=0
    • 1, for all cj=1
    • 2, for all ci=cj
    • cj, for i=0


Carry Status Indicators C[i, j]



FIG. 10 illustrates a representative carry status circuit 1000 (AdjC) that determines carry status indicators C[i,i+1] for adjacent trits ai,bi+1. The carry-status circuit 1000 includes a SWAP gate 1002, a SUM gate 1004, and a one trit swap gate 1006; a carry value is output on a qutrit associated with an input trit value bi. The carry-status circuit includes one non-Clifford gate S00,22 and no ancilla.


To compute C[0,1], one ancilla, and two non-Clifford gates S00,22 and C(X) are needed. FIG. 11 illustrates a representative circuit 1100 (AdjC0) that calculates C[0,1] and that includes a two trit swap gate S00,22 1102, sum gates 1104, 1106, and SWAP gates 1108, 1110. In this example, C[0,1] is available on the qutrit associated with a summand b.


After computing the carry status indicators for any two adjacent indices, C[i,j] can be computed for arbitrary i≠j. For 0≤i<k<j≤n, C[i,j] can be obtained from C[i,k] and C[k,j] by a merging formula illustrated in FIG. 12. A representative merging circuit 1300 that implements this formula is illustrated in FIG. 13. Because AdjC and AdjC0 depend only on ai,bi, all the C[i,i+1] can be obtained in one time slice.


Carry-forward computation can be described as follows. For i=0,1, . . . ,n−1 let Bi be a working register configured to be C[i,i+1] at the beginning, and let Zi+1 be the working registers initialized to |0custom-character and which are used to store C[i,i+1]. n−ω(n)−└log n┘ ancillas Xi initialized to |0custom-character are used. Three processes, namely, a P-process, a C-process, and a P−1-process are used. Each process roughly contains └log n┘ rounds. In a P-process, all the carry status indicators of the form C[2tm,2t(m+1)] are computed and the results stored in the ancillas, except carry status indicators of the form C[0,2k] which are written to Z[2k].


There are └log n┘ rounds, each t=1, . . . ,└log n┘ corresponding to one round. In the tth round (referred to as a P[t]-round), the status indicators C[2tm,2t(m+1)] m=0, . . . ,









n

2
t


-
1






are computed. By the merging formula, C[2tm,2t(m+1)] can be obtained from C[2t−1(2m),2t−1(2m+1)] and [2t−1(2m+1),2t−1(2m+2)] both of which have been computed in round P[t−1]. Moreover, the merging circuit producing C[2tm,2t(m+1)] for different m's in the P[t]-round takes different carry status indicators in a P[t−1]-round as input. Note that the P[1]-round requires the carry status indicators C[i,i+1]'s in the registers Bi. Therefore, in the P[t]-round, all the merging circuits computing C[2tm,2t(m+1)] can be made parallel, and their inputs only depend on the carry status indicators from the P[t−1]-round. Thus, the depth of the circuit in P-process is └log n┘, the number of ancillas needed is n−ω(n)−└log n┘, and the complexity is n−ω(n).


In C-processes, C[0,j] is computed into the register Zj, j=1, . . . ,n. This is performed in









log


n
3




+
1




rounds. Note that the C[0,2k]'s have already been obtained in a P-process, and are located in the desired positions. For







t
=



log


n
3





,




. . . ,0, the C[t]-round consists of computing the carry status indicators C[0,2t(2m+1)],m=1, . . . ,










n

2

t
+
1



-

1
2




.




Again, by the merging formula, C[0,2t(2m+1)] is obtained from C[0,2t+1m] and C[2t(2m),2t(2m+1)]. By induction, C[0,2t+1m] has been obtained in earlier C-rounds if m is not a power of 2, and in the P[t+1+log m] round otherwise. Also C[2t(2m),2t(2m+1)] has been computed in the P[t]-round. Therefore, all the merging circuits in a C[t]-round can be executed in parallel. These circuits depend on the carry status indicators in the P[t]-round and C[k]-rounds, k≥t+1. If m is a power of 2, then the corresponding merging circuit also depends on C[0,2t+1m] from the P[t+1+log m]-round. Thus, the circuit in C-process has a depth of










log


n
3




+
1

,




and the complexity is n−[log n]−1.


In a P−1-process, the ancillas are set back to |0custom-character and thus all the merging circuits in P-processes are reversed, except for those computing C[0,2k]'s which are not stored in the ancillas. The P−1-process consists of └log n┘−1 rounds. For t=└log n┘−1, . . . , 1, the P−1[t]-round uncomputes C[2tm,2t(m+1)], m=1, . . . ,









n

2
t




-
1




by using an inverse of the merging circuit. Note that in this process, all the C[0,2k]'s are not needed. The process has a depth of [log n]−1 and the complexity of the circuit is n−ω(n)−[log n].


Most parts of C-processes and P−1 processes can be executed in parallel. All the inputs to the C[t]-round which are not of the form C[0,2m] only depend on C[k]-rounds, k≥t+1 and the P[t]-round. The inputs that are of the form C[0,2m] are computed in a P[m]-round, but they are used in a corresponding P−1 process. The P−1[t+2] round only depends on the outputs in P[t+1]-round and P[t+2]-round. Thus the C[t]-round and the P−1[t+2]-round can be performed simultaneously.



FIG. 14 illustrates an n-trit carry look-ahead ternary adder 1400 for n=10. A series 1402 of carry-status indicator circuits is coupled to respective qutrits ai,bi of respective qutrit registers a, b that store summands a, b so as to produce carry-status indicators of the form C[i, i+1] on qutrits bi. As shown in FIG. 14, the series includes circuits such as AdjC and AdjC0 so that qutrits for all i values are processed. A series of merging circuits 1404 is coupled to produce additional carry-status indicators in three P-rounds and two C-rounds. As a result, carry values of the form c0i are communicated to qubits si of an ancilla qutrit register s. (Ancilla qutrits are initialized as 0's as shown in FIG. 14). A series of inverse merging circuits 1406 and a series 1408 of inverse carry-status circuits are coupled to restore summand values in the ai,bi qutrits and a series 1410 of addition circuits provides sums si=ai+bi+c0i for i=0, . . . ,n. For n-qutrit registers, i=n is an overflow value, shown in FIG. 14 as sx.


The example of FIG. 14 can be referred to as an “out-of-place” adder, as sum values are produced on ancilla qutrits. FIG. 15 illustrates another representative n-trit carry look-ahead ternary adder 1500 for n=10. The configuration of FIG. 15 is referred to as an “in-place adder” as the sum values appear on qutrits used to provide the input summands. In FIG. 15, the sum values appear in the b register. FIGS. 16A-16B are enlarged views of the circuit of FIG. 15 showing a comparison of processing with respect to the out of place adder (i.e., showing “In” steps” and “Out steps”). In contrast to FIG. 14, a series 1510 of adders is coupled to produce sums in the b register.


Out-of-Place Procedure


An Out-of-Place procedure for ternary addition is described below in which input summands a, b are obtained from n-qutrit registers A, B and Z is an ancilla register. (1) For 0<i≤n−1, run the circuit AdjC on Ai,Bi which outputs C[i,i+1] to Bi. Run AdjC0 on A0,B0 and Z0 with Z0 as the ancilla, which outputs C[0,1] to B0, C[0,1] is copied to Z1 with the SUM gate. The circuit has a depth of 2, and it consist of n−1 AdjC circuits, one AdjC0 circuit, and one SUM circuit. (2) Compute all the C[0,i]'s with the ancillas Xi's and the merging circuit (and its inverse). At the end of this process, the ancillas are returned to 0, and Zi=C[0,i],i=1, . . . ,n. Note that Z1=C[0,1] is obtained in a prior step. This requires 3n−2ω(n)−2└log n┘−1 calls to the merging circuits, and has a circuit depth of












log





n



+





log


n
3


+




2.





(
3
)







Undo all the AdjC and AdjC0 operations with corresponding inverse circuits to obtain Bi=bi,Zi=C[0,i]=ci. The circuit has a depth of 2 and it consist of n−1 inverse AdjC circuits, one inverse AdjC0 circuit, and one inverse SUM circuit. (4) Set Zi=Zi⊕Ai⊕Bi, 0≤i≤n−1. This requires 2n SUM gates.


In-Place Procedure


Let 2 be the n-trit number with all 2's, namely 2=3n−1. For two n-trit numbers a,b denote by a⊕b as the number obtained by trit-wise summation modulo 3 and denote by a′ the number obtained by replacing every trit ai by 2−ai. Then, a⊕a′=2, and a+a′=3n−1. Let c=c0 . . . cn-1 be the sequence of the n low carry trits for a and b, and let s be the n low trits of a+b. Then, s=a+b (mod 3n) and s=a⊕b⊕c. Also note that:






s′+a=3n−1−s+a=3n−1−b=b′(mod 3n).


Let d=d0 . . . dn-1 be the n low carry trits resulting from adding s′ and a. Then s′⊕a⊕d=b′, and






2a⊕b⊕d=s⊕s′⊕a⊕b⊕d=s⊕b′⊕b=2a⊕b⊕c.


Therefore, c=d, i.e., the n low carry trits for a, b are the same as those for s′, a. This can be used to implement an in-place adder. For 0≤i≤n−1 let Ai,Bi be the working registers initialized with ai,bi respectively. 2n−ω(n)−[log n] ancillas are used, n of which are denoted Z0,Z1, . . . ,Zn-1 and the rest are Xi's. Let Zn be the working register which will store the high trit of a+b. All ancillas start with 0.


As described with reference to the Out-of-place Procedure steps (1)-(3), compute all carry trits C[0, j] into Zj,j=0, . . . ,n. The ancillas Xi and working registers Ai,Bi are all returned to their initial configuration at the end of the process. This has a circuit depth of










log





n



+



log


n
3




+
6

,




with complexity of 5n−2ω(n)−2└log n┘+1. (2) For 0≤i≤n−1, let Bi=Bi⊕Ai⊕Zi so that the register Bi's store the n low trits of the sum. (3) Next, erase the n carry trits C[0,i]=ci,i=0, . . . ,n−1. For 0≤i≤n−2, let Bi=2−Bi with n−1 S0,2 gates. (4) Apply the inverse of the Out-of-place Procedure, Steps 1-3 on the Ai,Bi's for 0≤i≤n−2 to erase the carry trits cj stored in Zj,j=0, . . . ,n−1. For 0≤i≤n−2 let Bi=2−Bi. This can be done by n−1 S0,2 gates.


EXAMPLE
Quantum Ternary Subtraction

With quantum ternary addition circuits such as disclosed above, quantum ternary subtraction can also be carried out. Referring to FIG. 17, a method 1700 of subtraction of two n-trit numbers a,b includes converting a to a′ at 1702 by replacing each ai with 2−ai. i.e., a′=3n−a−1. At 1704, a sum a′+b is obtained. At 1706, this sum is converted as follows to produce the difference:





(a′+b)′=(3n−1−a−b)′=3n−1−(3n−1−a−b)=a−b.


This difference is output at 1708.


A representative quantum ternary subtraction circuit 1800 is illustrated in FIG. 18. An a register storing a ternary a value is coupled to a conversion circuit 1802 that produces an output a′=3n−a−1. This output and a ternary value from a b register are coupled to an adder 1804 to produce an output a′+b that is coupled to a conversion circuit to produce the difference. As shown in FIG. 18, the a register is used to store the sum a′+b, but the b register or an ancilla register can be used instead.


EXAMPLE
Quantum Ternary Comparison

A comparison of two ternary numbers a, b can be determined using ternary subtraction as discussed above, but a comparison can also be obtained with less complexity as only a high (most significant) trit value of a−b is needed. Referring to FIG. 19, a comparison method 1900 includes converting a ternary value a to a′=3n−a−1 at 1902. At 1904, value of a most significant (high) trit value of a sum a′+b is determined. At 1906, if this trit value is 0, then difference a−b≥0 as output at 1908; otherwise, a−b<0 as output at 1910.


In the carry look-ahead adder, again a is first converted to a′. To compute a sum a′+b the circuit sequentially generates all the carry status indicators. However, since only a high trit cn=C[0,n] is needed, a more efficient circuit can be used to implement the comparison.


As discussed above, in a P-process, all the carry status indicators of the form C[2tm,2t(m+1)], and in particular, any C[0,2k] are obtained. If n=2k for some k then cn is obtained at the end of a P-process and there is no need to go through a C-process. Instead, cn is copied into the register storing the result, and the P-process is undone.


In general, let k=┌log n┐; a and b are padded by adding zeros to make them 2k-trit numbers, and the circuit described above is used to compare a and b. For convenience, the padded numbers are referred to herein as a and b as well. For 0≤i≤n−1, let Ai=ai,Bi=bi be the working registers, and let R be the register which will store the result of the comparison. 2k+2(2k−n) ancillas are needed, among which 2(2k−n) are used to hold the extra zeros in from of a and b, one is denoted by Z0 as the ancilla to the AdjC0 circuit, and the rest are denoted by Xi.


Note that after padding s a and b with zeros, the carry status indicators C[i, j] for n≤i<j≤2k are known before compilation, thus their values can be stored in the registers and there is no need to recompute them later.


Carry Look-Ahead Comparison


In a first step, convert a to a′. This requires 2kS0,2 gates. In a second step, for 0<i≤n−1, run the circuit AdjC on Ai,Bi which outputs C[i,i+1] to Bi. Run AdjC0 on A0,B0 and Z0 with Z0 as the ancilla, which outputs C[0,1] to B0. The circuit has a depth of 2 and consists of n−1 AdjC circuits and one AdjC0 circuit. Third, perform the P-process in discussed above to compute all C[2tm,2t(m+1)] that are not known before compilation into the ancillary registers Xi. Since the Zi registers are not available, all C[0,2m]'s are also written to the Xi registers. The depth of the circuit is k, and the complexity is 2k−ω(2k)−(2k−n−ω(2k−n))=n+ω(2k−n)−1. Fourth, copy c2k to the result register R. Fifth, undo steps 3, 2, and 1. Total depth of such a circuit is 2k+4=2┌log n┐+4 and it has the complexity of 4n+2ω(2k−n)=4n+2ω(2┌log n┐−n). The number of ancillas used is 3·2┌log n┐−2n.


EXAMPLE
Quantum Ternary Modular Addition

Referring to FIG. 20, an modular addition circuit 2000 for 3-qutrit addition is similar to the circuit of FIG. 7 but a higher order sum trit (or overflow trit) need not be computed so the carry-adder circuits 716, the adder circuit 718, and the inverse carry-adder circuit 720 are not needed. In addition, the ancilla qutrit 720 used to store s3 can be omitted. Modular addition circuits for other values of n are similar. Carry-save modular addition circuits are similar to the carry-save addition circuits of FIGS. 14-16B but only the low n−1 trits are needed, i.e., only a0, . . . an-2,b0, . . . bn-2 are used as inputs.


Techniques of Constructing Quantum Gates


The methods and apparatus for quantum ternary arithmetic are described above with reference to two types of quantum ternary adders. The building blocks of these adder circuits include the Carry circuit C, the carry status circuits AdjC,AdjC0 that compute carry status indicators, and the merging circuit M. The four non-Clifford gates used in these circuits are S00,22, C(S0,1), C(X), C(SUM). It suffices to have custom-character(X) along with the Clifford gates to produce the other three non-Clifford gates exactly. Algebraic expressions of these gates can be used. As shown below, custom-character(X) and the Horner gate are equivalent up to Clifford gates, and that all other non-Clifford gates can be obtained from custom-character(X).


A universal gate set defined below is referred to as a supermetaplectic basis, which is a qutrit analog of the qubit Clifford+T gate set. It is also shown that custom-character(X) and the Horner gate can both be implemented exactly over the supermetaplectic basis. Therefore, with the supermetaplectic basis, ternary circuits for arithmetic can be realized exactly.


Construction of Reversible Gates Using Polynomial Expressions


Let F3 be the field with three elements {0,1,2}. Then any n-qutrit reversible gate can be represented as a map F3ncustom-characterF3n or a sequence of n functions F3ncustom-characterF3 if each |icustom-character is identified with 0, 1, 2. Reversible gates have polynomial representations and these polynomial representations can be used to construct one reversible gate from another. Note that 02=0,12=22=1mod 3, and thus δi,0=1−i2 mod 3. By default, arithmetic within a ket is taken modulo 3. The following is a list of polynomial expressions associated with some non-Clifford gates.





SUM=∨(X): |i,jcustom-charactercustom-character|i,i+jcustom-character  (soft control)






C
0(X): |i,jcustom-charactercustom-character|i,j+δi,0custom-character=|i,j−i2+1custom-character  (hard control)





Horner:=Λ(Λ(X)):|i,j,kcustom-charactercustom-character|i,j,ij+kcustom-character  (soft control)






C
0(SUM):|i,j,kcustom-charactercustom-character|i,j,k+(1−i2)jcustom-character  (hard control)


As shown above, if a qutrit works as a soft control, then it contributes a linear factor in the expression of the target qutrit, while a hard control qutrit contributes a quadratic factor. Define C′(X): |i,jcustom-charactercustom-character|i,jcustom-character+i2 so that C′(X)=(I⊗X)C0(X)−1 is equivalent to C(X). custom-character(X) is used below for the construction of other gates.


The relation between the expressions of the Horner gate and custom-character(X) resembles that of a bilinear form and a quadratic form, which are equivalent. This suggests that these gates are equivalent. FIGS. 21-22 give constructions of the Horner gate and custom-character(X) from one another. FIG. 23 shows a construction of C(SUM) from custom-character(X).


C(S0,1) and S00,22 can be similarly implemented. Note that the circuit of FIG. 24 shows an implementation of S01,10. In addition,






S
00,22=SUM−1(X−1⊗I)S01,10(X⊗I)SUM.






C
0(S0,1)=SUM2,1−1(X−1⊗X−1)S00,22(X⊗X)SUM2,1.


Supermetaplectic Basis


Recall that custom-character is the qutrit Clifford group generated H, Q, X and SUM. Some other gates in custom-character are Z and ∨(Z), wherein Z=diag(1,ζ332) and ∨(Z)=(I⊗H)SUM(I⊗H−1). It can be directly confirmed that ∨(Z) can be expressed as:





∨(Z): |i,jcustom-charactercustom-characterζ3ij|i,jcustom-character


The metaplectic basis is defined as a universal qutrit gate set custom-character+diag(1,1,−1) or equivalently custom-character+diag(1,ζ662). In spite of its universality, it is unlikely that all the reversible gates can be implemented exactly over the metaplectic basis. To provide superior exact implementations, the order of the root of unity used in defining the non-Clifford diagonal gate is increased, and P9 is defined as 1-qutrit diagonal gate diag(1,ζ992). The supermetaplectic gate set is then defined to be the universal gate set custom-character+P9. All reversible gates can be constructed exactly over the supermetaplectic gate set.


Construction of Diagonal Gates Using Polynomial Expressions


Polynomial expressions can be used in constructing new quantum gates in the supermetaplectic basis. Let D be the group generated by the reversible gates in custom-character together with the diagonal gates ∨(Z) and P9.


The group of reversible gates in custom-character is generated by SUM, X, S1,2. It can be shown that the set {SUM, X, S1,2} generates a maximal subgroup, which is isomorphic to ≃GL(n,F3)custom-characterF3n, of the group of reversible gates (the permutation group) for any number n of qutrits.


A function ƒ: F3ncustom-characterF3 is called affine linear if ƒ(i1, . . . ,in)=a1i1+ . . . +anin+b, wherein a1, . . . ,an,b∈F3. Let Fn be the set of all affine linear functions from F3n to F3. Note that generators of D have the following algebraic expressions:





∨(Z)|i,jcustom-character3ij|i,jcustom-character,P9|icustom-character9i|icustom-character






X|i
custom-character
=|i+1custom-character,S1,2|icustom-character=|2icustom-character,SUM|i,jcustom-character=|i,i+jcustom-character


The reversible gates X,S1,2 and SUM all have affine linear expressions. Any reversible gate with affine linear expressions can be expressed in terms of {S12,X} and SUM. Therefore, the most general n-qutrit diagonal gate in D has the form:










i
2

,





,

i
n







ζ
9




f



n






A
f



f


(


i
1

,





,

i
n


)







ζ
3




f
,

g



n







B

f
,
g




f


(


i
1

,





,

i
n


)




g


(


i
1

,





,

i
n


)










i
2

,





,

i
n









wherein Af,Bf,g are integers.


As a representative example, ∨(∨(Z)) and C2(Z) are shown to be contained in D.





∨(∨(Z)): |i,j,kcustom-charactercustom-characterζ3ijk|i,j,kcustom-character






C: |i,j
custom-character
custom-character
23i,2custom-character|i,jcustom-character


For n=3, the general expression above for an n-qutrit diagonal gates D can be written as:








L


(

i
,
j
,
k

)


=


ζ
9




a
,
b
,
c
,

d
=
0


2




A

a
,
b
,
c
,
d




(

ai
+
bj
+
ck
+
d

)






ζ
3

Bij
+
Cjk
+
Dik




,




i,j,k∈F3, wherein Aa,b,c,d,B,C,D are integer parameters.


To construct ∨(∨(Z)), set L(i,j,k)=ζ3ijk. Since ζ933, then the following equation is obtained:










Equ


(

i
,
j
,
k

)




:










a
,
b
,
c
,
d





A

a
,
b
,
c
,
d




(

ai
+
bj
+
ck
+
d

)




+

3


(

Bij
+
Cjk
+
Dik

)



=

3






ijk


(

mod





9

)




,




i,j,k∈F3 Equ(i,j,k) is a system of 27 linear equations in the variables Aa,b,c,d,B,C,D and can be solved for these variables. By direct calculation, one solution to the above system of equations is:







ζ
3
ijk

=

ζ
9


(

1
+

2

i

+
j
+
k

)

+

2


(

1
+

2





i

+
j
+

2





k


)


+

6


(

2
+

2





i

+
j
+

2





k


)


+

2


(

1
+

2





i

+

2





j

+
k

)


+

6


(

2
+

2





i

+

2





j

+
k

)


+

4


(

1
+

2





i

+

2





j

+

2





k


)


+

6


(

2
+

2





i

+

2





j

+

2





k


)








Based on the above, a circuit realizing ∨(∨(Z)) can be obtained as shown in FIG. 25. FIG. 26 illustrates a circuit for C2(Z) that can be found in a similar manner.


Note that ∨(∨(Z)) and C2(Z) are related to the Horner gate and C2(X), respectively, by the Clifford gate H, namely:





(I⊗H)C2(X)(I⊗H+)=C2(Z)





(I⊗I⊗H)Horner(I⊗I⊗H+)=∨(∨(Z))


Therefore, both of these gates can be implemented exactly over the supermetaplectic basis.


Quantum and Classical Processing Environments


With reference to FIG. 27, an exemplary system for implementing some aspects of the disclosed technology includes a computing environment 2700 that includes a quantum processing unit 2702 and one or more monitoring/measuring device(s) 2746. The quantum processor executes quantum circuits (such as the circuit ternary arithmetic circuits described above) that can be precompiled by classical compiler unit 2720 utilizing one or more classical processor(s) 2710.


With reference to FIG. 27, the compilation is the process of translation of a high-level description of a quantum algorithm into a sequence of quantum circuits. Such high-level description may be stored, as the case may be, on one or more external computer(s) 2760 outside the computing environment 2700 utilizing one or more memory and/or storage device(s) 2762, then downloaded as necessary into the computing environment 2700 via one or more communication connection(s) 2750. Alternatively, the classical compiler unit 2720 is coupled to a classical processor 2710 and a procedure library 2721 that contains some or all procedures or data necessary to implement the methods and circuits described above such as merging circuits, modular addition, comparison, and other ternary computations.



FIG. 28 and the following discussion are intended to provide a brief, general description of an exemplary computing environment in which the disclosed technology may be implemented. Although not required, the disclosed technology is described in the general context of computer executable instructions, such as program modules, being executed by a personal computer (PC). Generally, program modules include routines, programs, objects, components, data structures, etc., that perform particular tasks or implement particular abstract data types. Moreover, the disclosed technology may be implemented with other computer system configurations, including hand held devices, multiprocessor systems, microprocessor-based or programmable consumer electronics, network PCs, minicomputers, mainframe computers, and the like. The disclosed technology may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote memory storage devices.


Typically, a classical computing environment is coupled to a quantum computing environment, but a quantum computing environment is not shown in FIG. 28.


With reference to FIG. 28, an exemplary system for implementing the disclosed technology includes a general purpose computing device in the form of an exemplary conventional PC 2800, including one or more processing units 2802, a system memory 2804, and a system bus 2806 that couples various system components including the system memory 2804 to the one or more processing units 2802. The system bus 2806 may be any of several types of bus structures including a memory bus or memory controller, a peripheral bus, and a local bus using any of a variety of bus architectures. The exemplary system memory 2804 includes read only memory (ROM) 2808 and random access memory (RAM) 2810. A basic input/output system (BIOS) 2812, containing the basic routines that help with the transfer of information between elements within the PC 2800, is stored in ROM 2808.


As shown in FIG. 28, a specification of a supermetaplectic basis and procedures for synthesis using this based are stored in a memory portion 2816. Instructions for specifying ternary arithmetic circuits are stored at 2818. Processor-executable instructions for solving equations that specify supermetaplectic basis specifications are stored at 2828.


The exemplary PC 2800 further includes one or more storage devices 2830 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 2806 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 2800. 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 2830 including an operating system, one or more application programs, other program modules, and program data. Storage of circuit designs, and computer-executable instructions for circuit synthesis and configuring a quantum computer based on such circuits can be stored in the storage devices 2830 as well as or in addition to the memory 2804. A user may enter commands and information into the PC 2800 through one or more input devices 2840 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 2802 through a serial port interface that is coupled to the system bus 2806, but may be connected by other interfaces such as a parallel port, game port, or universal serial bus (USB). A monitor 2846 or other type of display device is also connected to the system bus 2806 via an interface, such as a video adapter. Other peripheral output devices 2845, such as speakers and printers (not shown), may be included. In some cases, a user interface is displayed so that a user can input user preferences regarding circuit implementations.


The PC 2800 may operate in a networked environment using logical connections to one or more remote computers, such as a remote computer 2860. In some examples, one or more network or communication connections 2850 are included. The remote computer 2860 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 2800, although only a memory storage device 2862 has been illustrated in FIG. 28. The storage device 2862 can provide storage of ternary circuit specifications and supermetaplectic basis synthesis procedures. The personal computer 2800 and/or the remote computer 2860 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 2800 is connected to the LAN through a network interface. When used in a WAN networking environment, the PC 2800 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 2800, 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.


In some examples, a logic device such as a field programmable gate array, other programmable logic device (PLD), an application specific integrated circuit can be used, and a general purpose processor is not necessary. As used herein, processor generally refers to logic devices that execute instructions that can be coupled to the logic device or fixed in the logic device. In some cases, logic devices include memory portions, but memory can be provided externally, as may be convenient. In addition, multiple logic devices can be arranged for parallel processing.

Claims
  • 1.-15. (canceled)
  • 16. A ripple carry circuit for quantum ternary addition, comprising: a first n-qutrit register that includes n qutrits, the n qutrits including a least significant qutrit, at least one intermediate qutrit, and a most significant qutrit that store a least significant trit value, at least one intermediate trit value, and a most significant trit value, respectively, wherein n is a positive integer;a second n-qutrit register that includes n qutrits, the n qutrits including a least significant qutrit, at least one intermediate qutrit, and a most significant qutrit that store a least significant trit value, at least one intermediate trit value, and a most significant trit value, respectively;a carry qutrit;a first carry circuit coupled to the least significant qutrit of the first n-qutrit register and the least significant qutrit second n-qutrit register so as to produce and store a carry value associated with a sum of the least significant trit values stored in the first and second n-qutrit quantum registers;n−2 carry circuits serially coupled to respective intermediate qutrits of the first n-qutrit register and the second n-qutrit register, wherein a kth carry circuit is coupled to a preceding carry circuit so as to receive a carry value associated with a sum of (k−1)th trit values and to kth qutrits of the first and second n-qubit registers so as to receive kth trit values stored in the first and second n-qubit registers, the kth carry circuit producing and storing a kth carry value in a kth qutrit of the second n-qutrit register;an nth carry circuit coupled to an nth qutrit of the first n-qutrit register and an nth qutrit of the second n-qutrit register so as to receive nth trit values stored in the first and second n-qubit registers, wherein the nth carry circuit is coupled to an (n−1)th carry circuit so as to receive an (n−1)th carry value, the nth carry circuit producing an nth carry value based a sum of the nth trit values in stored in the first and second n-qubit registers and the (n−1)th carry value; andan adder circuit coupled to the nth carry circuit so as to couple the nth carry value to the carry qubit.
  • 17. The ripple carry adder circuit of claim 16, further comprising n inverse carry circuits and n adder circuits, wherein: a first inverse carry circuit is coupled to the nth carry circuit and a 1st adder circuit of the n adder circuits so as to produce a sum of the nth trit values from the nth qutrit of the first and second n-qutrit registers and the carry value from the (n−1)th carry circuit, andthe kth inverse carry circuit is coupled to the (n−k)th carry circuit and a preceding inverse carry circuit and a kth adder circuit so as to produce a sum of the (n−k)th trit values from the (n−k)th qutrit of the first and second n-qutrit registers and the carry value from the preceding carry circuit, wherein k is an integer k=1, . . . , n−1.
  • 18. The ripple carry adder circuit of claim 17, wherein each of the n adders includes a first sum gate coupling the kth qutrit of the first n-qutrit register to the kth qutrit of the second n-qutrit register and a second sum gate coupling the (k−1)th qutrit of the second n-qutrit register to the kth qutrit of the second n-qutrit register.
  • 19. The ripple carry adder circuit of claim 17, wherein each of the n adders includes a first sum gate coupling the kth qutrit of the first n-qutrit register to the kth qutrit of the second n-qutrit register.
  • 20. The ripple carry adder circuit of claim 16, further comprising n inverse carry circuits and n−1 adder circuits, wherein: a first inverse carry circuit is coupled to the nth carry circuit and a 1st adder circuit of the n adder circuits so as to produce a sum of the nth trit values from the nth qutrit of the first and second n-qutrit registers and the carry value from the (n−1)th carry circuit, andthe kth inverse carry circuit is coupled to the (n−k)th carry circuit and a preceding inverse carry circuit and a kth adder circuit so as to produce a sum of the (n−k)th trit values from the (n−k)th qutrit of the first and second n-qutrit registers and the carry value from the preceding carry circuit, wherein k is an integer k=1, . . . , n−2.
  • 21. The ripple carry adder circuit of claim 20, further comprising an nth adder circuit coupled to the nth inverse carry circuit, wherein the nth adder circuit is coupled to the (n−1)th inverse carry so as to produce a sum of the 0th trit values from the 0th qutrit of the first and second n-qutrit registers.
  • 22. The ripple carry adder circuit of claim 21, wherein the nth adder circuit is coupled to the (n−1)th inverse carry so as to produce the sum of the 0th trit values from the 0th qutrit of the first and second n-qutrit registers on the 0th qutrit of the second register.
  • 23. A method of ternary addition, comprising: representing a first n-trit ternary number and a second n-trit ternary number in a first n-qutrit quantum register and a second n-qutrit quantum register, respectively;based on trit values in the first n-qutrit quantum register and the second n-trit quantum register, establishing carry status indicators for trits having adjacent indices on corresponding ancillary qutrits;merging the carry status indicators to find carry status indicator values for non-adjacent indices; andbased on the merged carry status indicators, storing a sum of the first and second n-trit ternary numbers in an output quantum register.
  • 24. The method of ternary addition of claim 23, wherein the sum of the first and second n-trit ternary numbers is stored in at least one of the first n-qutrit quantum register and the second n-qutrit register.
  • 25. The method of ternary addition of claim 23, wherein the sum of the first and second n-trit ternary numbers is stored in an n-qutrit ancilla register.
  • 26. The method of ternary addition of claim 23, wherein the merging of the carry status indicators to find carry status indicator values for non-adjacent indices alters values stored in the first n-qutrit register and the second n-qutrit register, and further comprising inverse merging so as to restore the first n-trit ternary number to the first n-qutrit register and the second n-trit ternary number to the second n-qutrit register.
  • 27. The method of ternary addition of claim 23, wherein the merging the carry status indicators to find carry status indicator values for non-adjacent indices comprises determining carry status indicators associated with a least significant trit of at least one the first n-trit ternary number and the second n-trit ternary number and a most significant trit of at least one of the second n-trit ternary number and the first n-trit ternary number, respectively.
  • 28. A ternary quantum adder for adding n-trit numbers, wherein n is a positive integer, comprising: n carry status indicator circuits coupled to respective qutrits of a first n-qutrit register and a second n-qutrit register associated with a first summand and a second summand, respectively, so as to determine carry status indicator values associated with adjacent qutrits and store the carry status indicator values on qutrits of at least one ancilla register;a plurality of merging circuits coupled to the qutrits of the first register, the second register, and the at least one ancilla register so as to store carry status indicators values associated with a coupling of the low qutrits of at least one of the first n-qutrit register and the second n-qutrit register to respective higher qutrits of at least one of the first quantum register and the second quantum register in the at least one ancilla register; andn pairs of quantum adder circuits coupled to the at least one ancilla qutrit and the qutrits of the first quantum register and the second quantum register so as to sum trit values of the corresponding qutrits of the first quantum register, the second quantum register, and the at least one ancilla qutrit to produce and store a ternary sum of the first summand and the second summand.
  • 29. The ternary quantum adder of claim 28, comprising a plurality of inverse merging circuits coupled to the qutrits of the first register, the second register, and the at least one ancilla register so as to receive values stored on the qutrits of the first register and the second register by at least one of the merging circuits so as to restore values associated with the first summand and the second summand.
  • 30. The ternary quantum adder of claim 28, wherein the ternary sum is stored in the at least one ancilla register.
  • 31. The ternary quantum adder of claim 30, wherein the ternary sum is stored in the at least one of the first n-qutrit register and the second n-qutrit register.
PCT Information
Filing Document Filing Date Country Kind
PCT/US2016/062643 11/18/2016 WO 00
Provisional Applications (1)
Number Date Country
62261179 Nov 2015 US