Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP4366348B2 - Quantum calculation method and quantum calculation device - Google Patents
[go: Go Back, main page]

JP4366348B2 - Quantum calculation method and quantum calculation device - Google Patents

Quantum calculation method and quantum calculation device Download PDF

Info

Publication number
JP4366348B2
JP4366348B2 JP2005278052A JP2005278052A JP4366348B2 JP 4366348 B2 JP4366348 B2 JP 4366348B2 JP 2005278052 A JP2005278052 A JP 2005278052A JP 2005278052 A JP2005278052 A JP 2005278052A JP 4366348 B2 JP4366348 B2 JP 4366348B2
Authority
JP
Japan
Prior art keywords
quantum
unit
qubit
calculation
qubits
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP2005278052A
Other languages
Japanese (ja)
Other versions
JP2007087307A (en
Inventor
康博 高橋
豪 加藤
泰人 河野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NTT Inc
NTT Inc USA
Original Assignee
Nippon Telegraph and Telephone Corp
NTT Inc USA
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp, NTT Inc USA filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2005278052A priority Critical patent/JP4366348B2/en
Publication of JP2007087307A publication Critical patent/JP2007087307A/en
Application granted granted Critical
Publication of JP4366348B2 publication Critical patent/JP4366348B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N10/00Quantum computing, i.e. information processing based on quantum-mechanical phenomena
    • G06N10/60Quantum algorithms, e.g. based on quantum optimisation, quantum Fourier or Hadamard transforms
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N10/00Quantum computing, i.e. information processing based on quantum-mechanical phenomena
    • G06N10/20Models of quantum computing, e.g. quantum circuits or universal quantum computers

Landscapes

  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Condensed Matter Physics & Semiconductors (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)

Description

本発明は、量子コンピュータ分野に関し、特に、量子コンピュータを用いて位数発見に有用な数を得る技術に関する。   The present invention relates to the field of quantum computers, and more particularly to a technique for obtaining a number useful for order discovery using a quantum computer.

j桁の2進数NとNより小さい2進数Aとを入力とし、2j+3個の量子ビットを使って、jの4乗に比例した個数の基本演算をjの3乗に比例した計算ステップ数で実行することにより、Aのmod Nに関する位数(すなわち、A=1 mod Nとなる最小の2進数R)の発見に有用な2j桁の2進数Cを高い確率で出力する量子回路の構成方法が知られている(例えば、非特許文献1参照)。ここで、「位数発見に有用な2j桁の2進数C」とは、非特許文献2の式(5.13)のcを意味する。このCをjに関する多項式個の基本演算を使った古典回路に入力することにより、Aのmod Nに関する位数R(非特許文献2ではr)を高い確率で求めることができる。 Using a j-digit binary number N and a binary number A smaller than N as input, 2j + 3 qubits are used to calculate the number of basic operations proportional to the fourth power of j with the number of calculation steps proportional to the third power of j. Configuration of a quantum circuit that outputs a 2j-digit binary number C useful for finding the order of A with respect to mod N (ie, the smallest binary number R satisfying A R = 1 mod N) with high probability. The method is known (for example, refer nonpatent literature 1). Here, “a 2j-digit binary number C useful for order discovery” means c in Equation (5.13) of Non-Patent Document 2. By inputting this C into a classical circuit using polynomial basic operations related to j, the order R (r in Non-Patent Document 2) related to mod N of A can be obtained with high probability.

以下、非特許文献1に記載された従来の量子回路を概説する。なお、量子回路は、量子ビットに対する演算とCNOT演算とを基本演算とするが、図が複雑になるのを避けるため、以下では、これらの演算以外の演算も使って量子回路を構成する。すなわち、この量子回路に使われる全ての演算は、1量子ビットに対する演算とCNOT演算に分解できる(例えば、非特許文献3参照)。なお、各図はj=5の場合であるが、これらの量子回路を一般のjの場合に拡張することは容易である。また、入力に表れる各変数は、0又は1を表す。さらに、重ね合わせ状態に対する量子回路の出力は、各量子状態の線形結合により表現し、Nより大きい全ての数はmod Nで解釈される。また、|・〉は・を示す量子状態を意味する。   The conventional quantum circuit described in Non-Patent Document 1 will be outlined below. In addition, although a quantum circuit uses the operation for a qubit and a CNOT operation as a basic operation, in order to avoid that a figure becomes complicated, below, a quantum circuit is comprised also using operations other than these operations. That is, all the operations used in this quantum circuit can be decomposed into an operation for one qubit and a CNOT operation (for example, see Non-Patent Document 3). Each figure shows the case of j = 5, but it is easy to extend these quantum circuits to the general case of j. Each variable appearing in the input represents 0 or 1. Further, the output of the quantum circuit for the superposition state is expressed by a linear combination of the respective quantum states, and all numbers larger than N are interpreted as mod N. Further, | ·> means a quantum state indicating •.

図31は、この位数発見に有用な値を発見する量子回路の従来構成を示した図である。なお、図31の構成では、量子状態がそれぞれ|0〉と|1〉である2個の量子ビットと、量子状態|0〉の2j+1個の量子ビットとに対して量子操作を行い、観測によって位数発見に有用な2j桁の2進数c2j−1…cが得られる。なお、H,X,Rは、それぞれ図32(a)(b)及び図33のように定義された演算子である。
図34は、図31におけるCU(A)=CU(A・2)の演算の詳細を示した量子回路である。図34に示すようにCU(A)は、d∈{0,1}と、U=u・・・uと、j+2個の0とをそれぞれ示す量子状態の入力に対し、d=1であれば、dとA・U mod Nの各桁(dとA・U mod N)・・・(dとA・U mod N)と、j+2個の0とをそれぞれ示す量子状態を生成し、d=0であれば、入力の量子状態をそのまま出力する。ここで、図34のCSWAPは、図35のように示すような演算子である。また、図35に用いられる各演算子の構成を図36(a)(b)及び図37に示す。なお、図31のCU(A・2)・・・CU(A・2)は、図34のAをA・2・・・A・2に置換したものになる。
FIG. 31 is a diagram showing a conventional configuration of a quantum circuit for finding a value useful for this order finding. In the configuration of FIG. 31, quantum operations are performed on two qubits whose quantum states are | 0> and | 1> and 2j + 1 qubits of quantum state | 0>, respectively. position binary number of useful 2j digits of the number found c 2j-1 ... c 0 is obtained. H, X, and R are operators defined as shown in FIGS. 32 (a), 32 (b) and 33, respectively.
FIG. 34 is a quantum circuit showing details of the calculation of CU (A) = CU (A · 2 0 ) in FIG. As shown in FIG. 34, CU (A) has d = 1 for a quantum state input indicating dε {0, 1}, U = u 0 ... U 4 and j + 2 0s, respectively. Then, each digit of d and A · U mod N (d and A · U mod N) 0 ... (d and A · U mod N) 4 and a quantum state indicating j + 2 0s respectively If d = 0, the input quantum state is output as it is. Here, CSWAP in FIG. 34 is an operator as shown in FIG. Moreover, the structure of each operator used for FIG. 35 is shown to FIG. 36 (a) (b) and FIG. Incidentally, CU of FIG. 31 (A · 2 1) ··· CU (A · 2 9) consists of A in FIG. 34 to that replaced by A · 2 1 ··· A · 2 9.

図38は、図34におけるCMULT(A)MOD(N)の演算の詳細を示した量子回路である。図38に示すように、CMULT(A)MOD(N)は、dと、Uと、B=bj−1…bの最上位ビットに0を加えた値と、0とをそれぞれ示す量子状態を入力とし、d=1であれば、dとUとA・U+M mod Nの各桁と0と0とをそれぞれ示す量子状態を生成し、d=0であれば、入力の量子状態をそのまま出力する。なお、CMULT(A−1)MOD(N)は、図38のAをA−1に置換したものになる。
図39は、図38におけるQFT(量子フーリエ変換)の演算の詳細を示した量子回路である。なお、図39のK∈{2,…,6}は図40のような演算子である。また、図38のQFT−1は、QFTの逆演算を示す。
FIG. 38 is a quantum circuit showing details of the operation of CMULT (A) MOD (N) in FIG. As shown in FIG. 38, CMULT (A) MOD (N) is a quantum indicating d, U, a value obtained by adding 0 to the most significant bit of B = b j−1 ... B 0 , and 0, respectively. If the state is an input and d = 1, a quantum state indicating each digit of d, U, and A · U + M mod N and 0 and 0 is generated. If d = 0, the quantum state of the input is determined. Output as is. Note that CMULT (A −1 ) MOD (N) is obtained by replacing A in FIG. 38 with A −1 .
FIG. 39 is a quantum circuit showing details of the operation of QFT (quantum Fourier transform) in FIG. Note that Kε {2,..., 6} in FIG. 39 is an operator as shown in FIG. Also, QFT −1 in FIG. 38 indicates the inverse operation of QFT.

図41は、図38におけるφADD(A)MOD(N)=φADD(2・A)MOD(N)の演算の詳細を示した量子回路である。φADD(A)MOD(N)は、d,dと、最上位ビットに0を加えたBにQFTを適用した値φ(B),…,φ(B)と、0とをそれぞれ示す量子状態を入力とし、d=d=1であれば、d,dと、A+B mod NにQFTを適用した値φ(A+B mod N),…,φ(A+B mod N)と、0とをそれぞれ示す量子状態を生成し、d=d=1でなければ、入力の量子状態をそのまま出力する。なお、図41におけるφADD(A)は、図42に示すような演算子であり、最上位ビットに0を加えたBにQFTを適用した値φ(B),…,φ(B)を示す量子状態を入力とし、A+BにQFTを適用した値値φ(A+B),…,φ(A+B)を示す量子状態を生成する。なお、図42におけるσ(k∈{1,…,5})は、図43に示すような演算子である。また、φADD(A)−1は、φADD(A)の逆演算である。また、φADD(N)やφADD(N)−1は、φADD(A)やφADD(A)−1のAをNに置換した演算子である。なお、その他のφADD(A・2)MOD(N)・・・φADD(A・2)MOD(N)については、図41のAをA・2・・・A・2に置換したものになる。
S. BEAUREGARD, CIRCUIT FOR SHOR’S ALGORITHM USING 2N + 3 QUBITS, QUANTUM INFORMATION AND COMPUTATION, Vol. 3 No. 2, pp. 175‐185, 2003. PETER W. SHOR, POLYNOMIAL-TIME ALGORITHMS FOR PRIME FACTORIZATION AND DISCRETE LOGARITHMS ON A QUANTUM COMPUTER, SIAM J. COMPUT, Vol. 26, No. 5, pp. 1484‐1509, October 1997. M. A. Nielsen and I. L. Chuang, Quantum Computation and Quantum Information, Cambridge, 2000.
Figure 41 is a quantum circuit showing details of the operation of FaiADD in FIG 38 (A) MOD (N) = φADD (2 0 · A) MOD (N). φADD (A) MOD (N) is obtained by substituting d 1 , d 2 , a value obtained by applying QFT to B with 0 added to the most significant bit, φ j (B),..., φ 0 (B), and 0 If each quantum state is an input and d 1 = d 2 = 1, then d 1 , d 2 and a value obtained by applying QFT to A + B mod N φ j (A + B mod N),..., Φ 0 (A + B mod N) and quantum states respectively indicating 0 are generated, and if d 1 = d 2 = 1, the input quantum state is output as it is. Note that φADD (A) in FIG. 41 is an operator as shown in FIG. 42, and a value φ j (B),..., Φ 0 (B) obtained by applying QFT to B with 0 added to the most significant bit. the inputs the quantum state shown, a + value was applied QFT to B φ j (a + B) , ..., and generates a quantum state shown phi 0 to (a + B). Note that σ k (kε {1,..., 5}) in FIG. 42 is an operator as shown in FIG. ΦADD (A) −1 is an inverse operation of φADD (A). ΦADD (N) and φADD (N) −1 are operators obtained by replacing A in φADD (A) and φADD (A) −1 with N. For other φADD (A · 2 1 ) MOD (N)... ΦADD (A · 2 4 ) MOD (N), A in FIG. 41 is replaced with A · 2 1 ... A · 2 4 It will be.
S. BEAUREGARD, CIRCUIT FOR SHOR'S ALGORITHM USING 2N + 3 QUBITS, QUANTUM INFORMATION AND COMPUTATION, Vol. 3 No. 2, pp. 175-185, 2003. PETER W. SHOR, POLYNOMIAL-TIME ALGORITHMS FOR PRIME FACTORIZATION AND DISCRETE LOGARITHMS ON A QUANTUM COMPUTER, SIAM J. COMPUT, Vol. 26, No. 5, pp. 1448-1509, October 1997. MA Nielsen and IL Chuang, Quantum Computation and Quantum Information, Cambridge, 2000.

上述のように、非特許文献1の量子回路では、j桁の2進数Nと、Nより小さいj桁の2進数進数Aとから、Aのmod Nに関する位数の発見に有用な2j桁の2進数Cを高い確率で出力するためには、jの4乗に比例した個数の基本演算と、jの3乗に比例した計算ステップ数と、2j+3個の量子ビットとを必要とする。しかし、多数の量子ビットを実現し、協調的に操作するのは物理的に困難なため、量子ビット数はできるだけ少ないほうが良い。
本発明はこのような点に鑑みてなされたものであり、従来よりも少ない量子ビットを使って、位数発見に有用な2j桁の2進数Cを高い確率で求めることを可能にする技術を提供することを目的とする。
As described above, in the quantum circuit of Non-Patent Document 1, a 2j-digit number useful for finding the order of mod N of A from a j-digit binary number N and a j-digit binary number A smaller than N. In order to output the binary number C with high probability, the number of basic operations proportional to the fourth power of j, the number of calculation steps proportional to the third power of j, and 2j + 3 qubits are required. However, since it is physically difficult to realize a large number of qubits and operate them cooperatively, the number of qubits should be as small as possible.
The present invention has been made in view of such a point, and a technique that makes it possible to obtain a 2j-digit binary number C useful for order discovery with a high probability using fewer qubits than in the past. The purpose is to provide.

本発明では上記課題を解決するために、2進数j桁のN=nj−1…nとA=aj−1…aとをメモリに格納しておき(nh−1は2進数表記されたNのh桁目の値、ah−1は2進数表記されたAのh桁目の値)、減算部が、メモリから読み込んだNとAとからN−Aを算出する。また、COMPARISON演算部が、減算部で算出されたN−Aを用い、Nよりも小さい2進数j桁のB=bj−1…bの各桁をそれぞれ示す量子状態の量子ビットQBj−1,…,QBと、任意の量子状態の量子ビットQUj−1,…,QU,QZと、に対する第1量子操作を行い、N−A>Bの場合にのみ量子ビットQZの量子状態を反転させる。そして、COMPARISON演算部によって処理された量子ビットQZは、そのまま或いは反転されて、他の量子演算の制御ビットとして用いられる。 In order to solve the above object may be stored and binary j digits N = n j-1 ... n 0 and A = a j-1 ... a 0 in the memory (n h-1 2 The H-th value of N in decimal notation, a h-1 is the h-th value of A in binary), and the subtraction unit calculates N−A from N and A read from the memory. . Further, COMPARISON calculation unit, using the N-A calculated by the subtraction unit, qubit quantum states respectively each digit of B = b binary j digits smaller than N j-1 ... b 0 QB j −1 ,..., QB 0 and qubits QU j−1 ,..., QU 1 , QZ in any quantum state are subjected to a first quantum operation, and only when N−A> B, Invert the quantum state. Then, the qubit QZ processed by the COMPARISON operation unit is used as it is or inverted and used as a control bit for other quantum operations.

ここで、このCOMPARISON演算部の処理内容は、非特許文献1では、図41におけるφADD(A),φADD(N)−1及びQFT−1の処理に包含されていたものである。しかし、従来の図41の構成では、φADD(A),φADD(N)−1及びQFT−1の処理が施された量子ビットの1つ(図41の下から2個目の量子ビット)の量子状態を、CNOT演算によって他の量子ビット(図41の最下部の量子ビット)に移し、この他の量子ビットを他の量子演算〔φADD(N)〕の制御ビットとしなければならなかった。これに対し、本発明では、COMPARISON演算部によって処理された量子ビットQZそのものを他の量子演算の制御ビットとして用いることができる。そのため、従来、量子状態を移すために必要であった量子ビットを一つ削減できる。また、本発明では、COMPARISON演算部が、従来の図41におけるφADD(A),φADD(N)−1及びQFT−1が全く操作していなかった量子ビットQUj−1,…,QU(値u,…,uの量子状態を示す量子ビット)の操作も行い、量子ビットの有効利用を図っている。これも本発明の構成が、従来よりも量子ビット数を削減できる理由である。 Here, the processing content of this COMPARISON calculation unit is included in the processing of φADD (A), φADD (N) −1 and QFT −1 in FIG. However, in the conventional configuration of FIG. 41, one of the qubits (the second qubit from the bottom in FIG. 41) subjected to the processing of φADD (A), φADD (N) −1 and QFT −1 The quantum state must be transferred to another qubit (bottom qubit in FIG. 41) by the CNOT operation, and this other qubit must be used as a control bit for another quanta operation [φADD (N)]. On the other hand, in the present invention, the qubit QZ itself processed by the COMPARISON operation unit can be used as a control bit for other quantum operations. Therefore, it is possible to reduce one qubit that has been conventionally required to shift the quantum state. Further, in the present invention, the COMPARISON operation unit performs quantum bits QU j−1 ,..., QU 1 (where φADD (A), φADD (N) −1 and QFT −1 in FIG. 41 have not been operated at all). value u 4, ..., the operation of the quantum bit) indicating a quantum state of u 1 also performed, thereby achieving effective use of qubits. This is also the reason why the configuration of the present invention can reduce the number of qubits compared to the prior art.

また、本発明において好ましくは、COMPARISON演算部が、任意の量子状態の量子ビットQD,QDを制御ビットとして、上述の第1量子操作を行い、QFT演算部が、量子ビットQBj−1,…,QBに対して量子フーリエ変換操作を施す。そして、量子ビットQD,QD,QZを制御ビットとし、φADD演算部が、1を示す量子状態の量子ビットQB(k∈{j−1,…,0})のみに対し、 In the present invention, it is preferable that the COMPARISON operation unit performs the first quantum operation using the quantum bits QD 1 and QD 2 in arbitrary quantum states as control bits, and the QFT operation unit performs the quantum bit QB j−1. ,..., QB 0 is subjected to a quantum Fourier transform operation. Then, the qubits QD 1 , QD 2 , and QZ are used as control bits, and the φADD arithmetic unit only applies to the qubit QB k (k∈ {j−1,..., 0}) in the quantum state indicating 1

Figure 0004366348
(ただし、量子ビットQBの量子状態を|QB〉とし、eをネピア数とし、iを虚数単位とする)の演算を施し、第1NOT演算部が、量子ビットQZにNOT演算を施す。さらに、量子ビットQD,QD,QZを制御ビットとし、φADD−1演算部が、1を示す量子状態の量子ビットQBのみに対し、
Figure 0004366348
(However, the quantum state of the qubit QB k is | QB k >, e is a Napier number, and i is an imaginary number unit), and the first NOT operation unit performs a NOT operation on the qubit QZ. Further, the qubits QD 1 , QD 2 , and QZ are used as control bits, and the φADD −1 arithmetic unit only applies to the qubit QB k in the quantum state indicating 1.

Figure 0004366348
(ただし、N−A=(n−a)j−1…(n−a)とする)の演算を施し、第1NOT演算部が、量子ビットQZにNOT演算を施す。そして、QFT−1演算部が、量子ビットQBj−1,…,QBに対して量子フーリエ変換の逆演算操作を施し、COMPARISON演算部が、量子ビットQD,QDを制御ビットとして、量子ビットQBj−1,…,QB,QUj−1,…,QU,QZに対し、A>Bの場合にのみ量子ビットQZの量子状態を反転させる量子操作を行い、第1Toffoli演算部が、量子ビットQD,QDを制御ビットとし、量子ビットQZを目標ビットとしたToffoli演算を施す。
Figure 0004366348
(However, NA = (na) j-1 ... (Na) 0 ), and the first NOT operation unit performs NOT operation on the qubit QZ. Then, QFT -1 calculation unit, qubits QB j-1, ..., performs inverse calculation operation of the quantum Fourier transform to QB 0, COMPARISON calculation unit, as the control bit qubit QD 1, QD 2, Quantum bits QB j−1 ,..., QB 0 , QU j−1 ,..., QU 1 , QZ are subjected to a quantum operation that inverts the quantum state of the qubit QZ only when A> B, and the first Toffoli operation is performed. The unit performs Toffoli calculation using the qubits QD 1 and QD 2 as control bits and the qubit QZ as a target bit.

ここで、COMPARISON演算部の第1量子操作が施された量子ビットQZは、φADD演算部やφADD−1演算部の量子演算の制御ビットとして用いられている。これにより、従来構成に比べ量子ビット数を1つ削減できる。
また、本発明において好ましくは、COMPARISON演算部が行う第1量子操作は、HIGHBIT演算部が、量子ビットQBj−1,…,QBと、量子ビットQUj−1,…,QUと、量子ビットQZと対して第2量子操作を行い、量子ビットQZを、z(+)β〔βはA−N+Bの最上位桁、(+)は排他的論理和〕を示す量子状態とし、他の量子ビットQBj−1,…,QB、QUj−1,…,QUの量子状態を当該第2量子操作前の量子状態とし、第2NOT演算部が、量子ビットQZにNOT演算を施し、古典制御NOT演算部が、メモリから読み込まれたA−Nの桁(a−n)(h∈{j−1,…,0})が1となるhに対応する量子ビットQBのみにNOT演算を施し、第3NOT演算部が、各量子ビットQBj−1,…,QBにNOT演算を施し、第2Toffoli演算部が、各量子ビットQBj−1,…,QBを制御ビットとし、量子ビットQZを目標ビットとしたToffoli演算を施し、第3NOT演算部が、各量子ビットQBj−1,…,QBにNOT演算を施し、古典制御NOT演算部が、メモリから読み込まれたA−Nの桁(a−n)が1となるhに対応する量子ビットQBのみにNOT演算を施す操作である。
Here, the qubit QZ subjected to the first quantum operation of the COMPARISON operation unit is used as a control bit for the quantum operation of the φADD operation unit and the φADD- 1 operation unit. As a result, the number of qubits can be reduced by one compared to the conventional configuration.
According to another embodiment of the present invention, the first quantum operations COMPARISON calculating unit performs the, HIGHBIT calculation unit, qubits QB j-1, ..., and QB 0, qubits QU j-1, ..., and QU 1, The second quantum operation is performed on the qubit QZ, and the qubit QZ is changed to a quantum state indicating z (+) β (β is the most significant digit of A−N + B, (+) is an exclusive OR), etc. qubit QB j-1 of, ..., QB 0, QU j -1, ..., the quantum state of QU 1 quantum state before the second quantum, the 2NOT calculation unit, a NOT operation on the qubit QZ Then, the classical control NOT operation unit reads the quantum bit QB h corresponding to h for which the digit (an) n (an) h (hε {j−1,..., 0}) read from the memory is 1. Only the NOT operation is performed, and the third NOT operation unit Bit QB j-1, ..., subjected to NOT operation on QB 0, the 2Toffoli calculation unit, each qubit QB j-1, ..., a QB 0 as a control bit, the Toffoli operation in which the qubits QZ target bit The third NOT operation unit performs a NOT operation on each of the qubits QB j−1 ,..., QB 0 , and the classical control NOT operation unit reads the A−N digits (an) h read from the memory. This is an operation of performing a NOT operation only on the qubit QB h corresponding to h which becomes 1.

このように、HIGHBIT演算部が、量子ビットQUj−1,…,QUに対しても量子操作を行う構成をとることによって量子ビットの有効利用を図り、必要となる量子ビット数の低減を図っている。 In this way, the HIGHBIT operation unit is configured to perform the quantum operation on the qubits QU j−1 ,..., QU 1 as well, thereby effectively using the qubits and reducing the number of necessary qubits. I am trying.

以上のように本発明では、従来よりも少ない量子ビットを使って、位数発見に有用な2j桁の2進数Cを高い確率で求めることが可能となる。   As described above, in the present invention, it is possible to obtain a 2j-digit binary number C useful for order discovery with a high probability by using fewer qubits than in the past.

以下、本発明の実施の形態を図面を参照して説明する。
〔第1の実施の形態〕
<機能構成>
図1は、本形態における量子計算装置1の構成を例示したブロック図である。
図1に例示するように、本形態の量子計算装置1は、量子ビット10、入力部20、古典メモリ30、減算部40、乗算部50、量子計算制御部60、量子演算部70及び観測部80を有している。また、量子演算部70は、初期量子状態生成部71、CV部72、H(アダマール)演算部、R演算部74及びXCK演算部75を有している。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[First embodiment]
<Functional configuration>
FIG. 1 is a block diagram illustrating the configuration of the quantum computing device 1 in this embodiment.
As illustrated in FIG. 1, the quantum computation device 1 according to the present embodiment includes a qubit 10, an input unit 20, a classical memory 30, a subtraction unit 40, a multiplication unit 50, a quantum computation control unit 60, a quantum computation unit 70, and an observation unit. 80. The quantum computation unit 70 includes an initial quantum state generation unit 71, a CV unit 72, an H (Hadamard) computation unit, an Rk computation unit 74, and an XCK computation unit 75.

図2(a)は、CV演算部72の詳細構成を例示した図である。この図に示すように、CV演算部72は、M MOD演算部101及びCSWAP演算部102を有している。図2(b)は、M MOD演算部101の詳細構成を例示した図である。この図に示すようにM MOD演算部101は、ADD MOD演算部111及びSWAP演算部112を有している。図2(c)は、ADD MOD演算部111の詳細構成を例示した図である。この図に示すようにADD MOD演算部111は、CONPARISON演算部121、QFT演算部122、QFT−1演算部123、φADD演算部124、φADD−1演算部125、NOT演算部126及びToffoli演算部127を有している。図3(a)は、CONPARISON演算部121の詳細構成を例示した図である。この図に示すようにCONPARISON演算部121は、HIGHBIT演算部131、NOT演算部132、古典制御NOT演算部133及びToffoli演算部134を有している。図3(b)は、HIGHBIT演算部131の詳細構成を例示した図である。この図に示すようにHIGHBIT演算部131は、制御NOT演算部141、E演算部142、F演算部143、Toffoli演算部144、NOT演算部145及びF−1演算部143を有している。なお、特に断りが無い限り、量子計算装置1は、量子計算制御部60の制御のもと各処理を実行する。また、各要素の機能構成の詳細やハードウェア構成の詳細については後述する。 FIG. 2A is a diagram illustrating a detailed configuration of the CV calculation unit 72. As shown in this figure, the CV calculation unit 72 includes an M MOD calculation unit 101 and a CSWAP calculation unit 102. FIG. 2B is a diagram illustrating a detailed configuration of the M MOD calculation unit 101. As shown in this figure, the M MOD calculation unit 101 includes an ADD MOD calculation unit 111 and a SWAP calculation unit 112. FIG. 2C is a diagram illustrating a detailed configuration of the ADD MOD calculation unit 111. As shown in this figure, the ADD MOD calculation unit 111 includes a COMPARISON calculation unit 121, a QFT calculation unit 122, a QFT- 1 calculation unit 123, a φADD calculation unit 124, a φADD- 1 calculation unit 125, a NOT calculation unit 126, and a Toffoli calculation unit. 127. FIG. 3A is a diagram illustrating a detailed configuration of the COMPARISON calculation unit 121. As shown in this figure, the COMPARISON computing unit 121 includes a HIGHBIT computing unit 131, a NOT computing unit 132, a classical control NOT computing unit 133, and a Toffoli computing unit 134. FIG. 3B is a diagram illustrating a detailed configuration of the HIGHBIT calculation unit 131. As shown in this figure, the HIGHBIT calculation unit 131 includes a control NOT calculation unit 141, an E calculation unit 142, an F calculation unit 143, a Toffoli calculation unit 144, a NOT calculation unit 145, and an F- 1 calculation unit 143. Unless otherwise specified, the quantum computing device 1 executes each process under the control of the quantum computation control unit 60. Details of the functional configuration of each element and details of the hardware configuration will be described later.

<処理>
[処理の全体]
量子計算装置1は、入力されたj桁の2進数N=nj−1…n(nj−1,…,n∈{0,1})と、Nより小さいj桁の2進数A=aj−1…a(aj−1,…,a∈{0,1})に対し、2j+2個の量子ビットを用いたjの3乗に比例した計算ステップ数のjの4乗に比例した個数の基本演算を施し、位数発見に有用な2j桁の2進数C=c2j−1…c(cj−1,…,c∈{0,1})を高い確率で出力する。以下、この処理の詳細を説明していく。
<Processing>
[Overall processing]
The quantum computing device 1 inputs an input j-digit binary number N = n j−1 ... N 0 (n j−1 ,..., N 0 ∈ {0, 1}) and a j-digit binary number smaller than N. For A = a j−1 ... A 0 (a j−1 ,..., A 0 ∈ {0, 1}), j of the number of calculation steps proportional to the cube of j using 2j + 2 qubits A number of basic operations proportional to the fourth power are performed, and a 2j-digit binary number C = c 2j−1 ... C 0 (c j−1 ,..., C 0 ∈ {0, 1}) useful for order discovery is obtained. Output with high probability. Details of this processing will be described below.

図4は、本形態の量子計算装置1の処理の全体を説明するためのフローチャートである。また、図11は、この処理の全体を例示した量子回路である。なお、量子回路は、1量子ビットに対する演算とCNOTを基本演算とするが、図が複雑になるのを避けるため、図11では、これらの演算以外の演算も使って表現している。また、この量子回路に使われる全ての演算は,1量子ビットに対する演算とCNOTに分解できる(前述の非特許文献3参照)。また、図11は、j=5の場合の例である。また、Nより大きい全ての数はmod Nで解釈される。   FIG. 4 is a flowchart for explaining the entire processing of the quantum computing device 1 of the present embodiment. FIG. 11 is a quantum circuit illustrating the entire process. Note that the quantum circuit uses a calculation for one qubit and CNOT as the basic calculation, but in order to avoid the complexity of the figure, in FIG. 11, the calculation is also expressed using calculations other than these calculations. In addition, all operations used in this quantum circuit can be decomposed into operations for one qubit and CNOT (see Non-Patent Document 3 above). FIG. 11 shows an example when j = 5. All numbers greater than N are interpreted as mod N.

図11に例示するように、本形態の量子回路は、0と1と2j個の0とをそれぞれ示す量子ビットを入力とし、位数発見に有用な2j桁の2進数C=c2j−1…cを出力するものである。この構成は,従来構成を示した図31において、上から2j+3番目の量子状態を保持する量子ビットを削除し、CU(a)をCV(a)に置換したものに相当する。以下、この量子回路を構成する処理の全体を説明する。
まず、2進数j桁のN=nj−1…nと、Nよりも小さい2進数j桁のA=aj−1…aとが入力部20から入力され、古典メモリ30(図1)に格納される(ステップS1)。なお、jは例えば予め装置に設定された値とする。次に、量子計算制御部60の制御のもと初期量子状態生成部71が、量子ビットQD,QD,QU〜QUj−1,QB〜QBj−1,QZの初期量子状態を生成する(ステップS2)。この例では、量子ビットQDの量子状態を、1を示すものとし、他の量子ビットの量子状態を、0を示すものとする。次に、H演算部73が、量子ビットQDに対してH(アダマール)演算(図32(a))を適用する(ステップS3)。なお、量子演算を適用するとは、演算に相当する量子操作を量子ビットに施すことを意味する。次に、量子計算制御部60が変数gaに0を代入して古典メモリ30に格納し、さらに乗算部50が古典メモリ30から読み出したA及びgaを用いてA・22j−ga−1を算出し、これを量子計算制御部60に送る(ステップS4)。次に、量子計算制御部60は、送られたA・22j−ga−1を用いてCV演算部72を制御し、CV演算部72は、量子ビットQDを制御ビットとして、量子ビットQD,QU〜QUj−1,QB〜QBj−1,QZに対し、CV(A・22j−ga−1)演算を適用する(ステップS5)。なお、この演算の詳細は後述する。次に、H演算部73が、量子ビットQDに対してH演算(図32(a))を適用する(ステップS6)。次に、量子計算制御部60が、古典メモリ30から変数gaを読み出し、観測部80に量子ビットQDの量子状態を観測させて、その観測結果をcgaとして古典メモリ30に格納する(ステップS7)。この観測により量子ビットQDの量子状態はcgaに縮約する(以下も同様)。
As illustrated in FIG. 11, the quantum circuit according to the present embodiment receives, as input, qubits indicating 0, 1 and 2j 0s, and is a 2j-digit binary number C = c 2j−1 useful for order finding. ... c 0 is output. This configuration corresponds to a configuration in which the qubit holding the 2j + 3rd quantum state from the top is deleted and CU (a) is replaced with CV (a) in FIG. 31 showing the conventional configuration. In the following, the entire process constituting the quantum circuit will be described.
First, a binary number j digits N = n j-1 ... n 0, and binary j digits A = a j-1 ... a 0 less than N is inputted from the input unit 20, a classical memory 30 (FIG. 1) (step S1). Note that j is a value preset in the apparatus, for example. Then, based on the initial quantum state generator 71 of the control quantum computation control section 60, qubit QD 1, QD 2, QU 1 ~QU j-1, QB 0 ~QB j-1, QZ initial quantum state of Is generated (step S2). In this example, it is assumed that the quantum state of the qubit QD 2 indicates 1 and the quantum state of the other qubits indicates 0. Next, the H operation unit 73 applies an H (Hadamard) operation (FIG. 32A) to the qubit QD 1 (step S3). Note that applying a quantum operation means performing a quantum operation corresponding to the operation on the qubit. Next, the quantum calculation control unit 60 assigns 0 to the variable ga and stores it in the classical memory 30. Further, the multiplication unit 50 uses A and ga read from the classical memory 30 to calculate A · 2 2j−ga−1 . This is calculated and sent to the quantum calculation control unit 60 (step S4). Next, the quantum calculation control unit 60 controls the CV calculation unit 72 using the sent A · 2 2j-ga−1 , and the CV calculation unit 72 uses the qubit QD 1 as a control bit and the qubit QD 2 , CU (A · 2 2j−ga−1 ) calculation is applied to QU 1 to QU j−1 , QB 0 to QB j−1 , and QZ (step S5). Details of this calculation will be described later. Next, the H operation unit 73 applies the H operation (FIG. 32A) to the qubit QD 1 (step S6). Next, quantum computation control unit 60 reads out the variable ga from classical memory 30, by observing the quantum state of qubit QD 1 to the observation unit 80, and stores in the classical memory 30 the observation result c ga (step S7). By this observation, the quantum state of the qubit QD 1 is reduced to c ga (and so on).

次に、量子計算制御部60が、古典メモリ30からcgaを読み出し、Xck演算部75に、k=gaとした図32(b)の量子操作を量子ビットQDに対して適用させ、さらに、H演算部73に、量子ビットQDに対するH演算(図32(a))を適用させる(ステップS8)。次に、量子計算制御部60は、古典メモリ30に格納された変数gaを読み出し、ga+1を新たなgaとして更新し、これを古典メモリ30に格納する(ステップS9)。次に、乗算部50が古典メモリ30から読み出したA及びgaを用いてA・22j−ga−1を算出し、これを量子計算制御部60に送る。量子計算制御部60は、送られたA・22j−ga−1を用いてCV演算部72を制御し、CV演算部72は、量子ビットQDを制御ビットとして、量子ビットQD,QU〜QUj−1,QB〜QBj−1,QZに対し、CV(A・22j−ga−1)演算を適用する(ステップS10)。なお、この演算の詳細は後述する。次に、R演算部74が、量子ビットQDに対してk=gaとしたR演算(図33)を適用し(ステップS11)、観測部80が量子ビットQDの量子状態を観測し、その観測結果をcgaとして古典メモリ30に格納する(ステップS12)。 Next, quantum computation control unit 60 reads out the c ga from classical memory 30, the X ck calculation unit 75, FIG. 32 and k = ga quantum operation (b) is applied to qubits QD 1, Furthermore, the H operation unit 73 is caused to apply the H operation (FIG. 32A) on the qubit QD 1 (step S8). Next, the quantum computation control unit 60 reads the variable ga stored in the classical memory 30, updates ga + 1 as a new ga, and stores it in the classical memory 30 (step S9). Next, the multiplication unit 50 calculates A · 2 2j−ga−1 using A and ga read from the classical memory 30, and sends them to the quantum calculation control unit 60. The quantum calculation control unit 60 controls the CV calculation unit 72 using the sent A · 2 2j-ga-1 , and the CV calculation unit 72 uses the qubit QD 1 as a control bit and the qubits QD 2 , QU A CV (A · 2 2j−ga−1 ) operation is applied to 1 to QU j−1 , QB 0 to QB j−1 , and QZ (step S10). Details of this calculation will be described later. Next, the R k computation unit 74 applies the R k computation (FIG. 33) with k = ga to the qubit QD 1 (step S11), and the observation unit 80 observes the quantum state of the qubit QD 1 Then, the observation result is stored as cga in the classical memory 30 (step S12).

次に、量子計算制御部60において、古典メモリ30に格納されたgaが2j−1であるか否かを判断する。ここで、ga=2j−1でなければ、量子計算制御部60は処理をステップS8に戻す。一方、ga=2j−1であれば、量子計算制御部60は、古典メモリ30に蓄積されたC=c2j−1…cを出力する。
[CV(A)演算の詳細]
次に、ステップS5,S11で触れたCV演算の詳細を説明する。なお、以下では、AをパラメータとしたCV(A)演算を例にとって説明するが、このAをA・22j−ga−1に置換すればCV(A・22j−ga−1)演算に一般化できる。
Next, the quantum calculation control unit 60 determines whether or not ga stored in the classical memory 30 is 2j−1. Here, if not ga = 2j-1, the quantum calculation control unit 60 returns the process to step S8. On the other hand, if ga = 2j−1, the quantum computation control unit 60 outputs C = c 2j−1 ... C 0 stored in the classical memory 30.
[Details of CV (A) calculation]
Next, the details of the CV calculation mentioned in steps S5 and S11 will be described. In the following, a CV (A) operation using A as a parameter will be described as an example. However, if this A is replaced with A · 2 2j−ga−1 , a CV (A · 2 2j−ga−1 ) operation will be performed. Can be generalized.

図5は、このCV(A)演算の詳細を説明するためのフローチャートである。また、図12は、j=5の場合におけるCV(A)演算を例示した量子回路である。
図12に例示するように、CV(A)演算を示す量子回路は、dとU=uj−1…u(uj−1,…,u∈{0,1})とj+1個の0とをそれぞれ示す量子状態の量子ビットQD,QD,QU〜QUj−1〔QUh’(h’∈{0,…,j−1})がh’に対応,QB〜QBj−1,QZを入力とし、d=1であれば、量子ビットQD,QD,QU〜QUj−1,QB〜QBj−1,QZを、dとA・U mod Nの各桁(A・U mod N)…(A・U mod N)j−1とj+1個の0とをそれぞれ示す量子状態とし、d=0であれば、入力の量子状態を維持するものである。この構成は、図34の従来構成において、上から2j+3番目の量子状態を保持する量子ビットを削除し、CMULT(A)MOD(N)をM(A)MOD(N)に置換したものに相当する。以下、このCV(A)演算の詳細を説明する。
FIG. 5 is a flowchart for explaining the details of the CV (A) calculation. FIG. 12 is a quantum circuit illustrating CV (A) calculation when j = 5.
As illustrated in FIG. 12, the quantum circuit indicating the CV (A) operation includes d + 1 and U = u j−1 ... U 0 (u j−1 ,..., U 0 ε {0, 1}) and j + 1 pieces. Quantum bits QD 1 , QD 2 , QU 1 to QU j−1 [QUh ′ (h′∈ {0,..., J−1}) correspond to u h ′ ] , QB 0 to QB j−1 and QZ are input, and if d = 1, qubits QD 1 , QD 2 , QU 1 to QU j−1 , QB 0 to QB j−1 , QZ are set to d and A · Each digit of U mod N (A · U mod N) 0 (A · U mod N) is a quantum state indicating j−1 and j + 1 0 respectively, and if d = 0, the input quantum state is To maintain. This configuration corresponds to the conventional configuration of FIG. 34, in which the qubit holding the 2j + 3rd quantum state from the top is deleted and CMULT (A) MOD (N) is replaced with M (A) MOD (N). To do. The details of the CV (A) calculation will be described below.

まず、古典メモリ30からAを読み込んだ量子計算制御部60の制御のもと、M MOD演算部101(図2(a))が、量子ビットQDを制御ビットとして、量子ビットQD,QU〜QUj−1,QB〜QBj−1,QZに対し、M(A)MOD(N)演算を適用する(ステップS21)。なお、M(A)MOD(N)演算の詳細については後述する。次に、CSWAP演算部102が、量子ビットQD,QD,QU〜QUj−1,QB〜QBj−1に対しCSWAP演算(図35)を適用する(ステップS22)。次に、乗算部50(図1)が古典メモリ30に格納されたAを用いてA−1を算出し(ステップS23)、量子計算制御部60に送る。量子計算制御部60は、このA−1を用いてM MOD演算部101を制御し、M MOD演算部101は、量子ビットQDを制御ビットとして、量子ビットQD,QU〜QUj−1,QB〜QBj−1,QZに対し、M(A−1)MOD(N)演算を適用する(ステップS24)。 First, under the control of quantum computation control unit 60 to read the A from classical memory 30, M MOD calculation unit 101 (FIG. 2 (a)) is, as the control bit qubit QD 1, qubit QD 2, QU The M (A) MOD (N) operation is applied to 1 to QU j−1 , QB 0 to QB j−1 , and QZ (step S21). Details of the M (A) MOD (N) calculation will be described later. Next, the CSWAP calculation unit 102 applies the CSWAP calculation (FIG. 35) to the qubits QD 1 , QD 2 , QU 1 to QU j−1 , QB 0 to Q Bj−1 (step S 22). Next, the multiplication unit 50 (FIG. 1) calculates A −1 using A stored in the classical memory 30 (step S <b> 23) and sends it to the quantum calculation control unit 60. The quantum calculation control unit 60 controls the M MOD calculation unit 101 using this A −1 , and the M MOD calculation unit 101 uses the qubit QD 1 as a control bit and the qubits QD 2 , QU 1 to QU j−. The M (A −1 ) MOD (N) operation is applied to 1 , QB 0 to QB j−1 , QZ (step S24).

[M(A)MOD(N)演算の詳細]
次に、ステップS21,S24で触れたM(A)MOD(N)演算, M(A−1)MOD(N)演算の詳細を説明する。なお、以下では、AをパラメータとしたM(A)MOD(N)演算を例にとって説明するが、このAをA−1に置換すればM(A−1)MOD(N)演算となる。
図6は、このM(A)MOD(N)演算の詳細を説明するためのフローチャートである。また、図13は、j=5の場合におけるM(A)MOD(N)演算を例示した量子回路である。
[Details of M (A) MOD (N) operation]
Next, details of the M (A) MOD (N) calculation and the M (A −1 ) MOD (N) calculation mentioned in steps S21 and S24 will be described. In the following description, an M (A) MOD (N) operation using A as a parameter will be described as an example. If A is replaced with A- 1 , an M (A- 1 ) MOD (N) operation is obtained.
FIG. 6 is a flowchart for explaining details of the M (A) MOD (N) calculation. FIG. 13 is a quantum circuit illustrating the M (A) MOD (N) operation when j = 5.

図13に例示するように、M(A)MOD(N)演算を示す量子回路は、dとUとB=bj−1…b(bj−1,…,b∈{0,1})と0とをそれぞれ示す量子状態の量子ビットQD,QD,QU〜QUj−1,QB〜QBj−1〔QBh(h∈{0,…,j−1})がbhに対応,QZを入力とし、d=1であれば、dとUとA・X+B mod Nと0とをそれぞれ示す量子状態の量子ビットQD,QD,QU〜QUj−1,QB〜QBj−1を出力し、d=0であれば、入力の量子状態を維持するものである。ただし、A・X+B mod N=(A・X+B mod N)j−1…(A・X+B mod N)であり、QBh(h∈{0,…,j−1})が(A・X+B mod N)hに対応する。以下、このM(A)MOD(N)演算の詳細を説明する。 As illustrated in FIG. 13, the quantum circuit indicating the M (A) MOD (N) operation includes d, U, and B = b j−1 ... B 0 (b j−1 ,..., B 0 ε {0, 1}) and qubits QD 1 , QD 2 , QU 1 to QU j−1 , QB 0 to QB j−1 [QBh (h∈ {0,..., J−1}) in quantum states respectively indicating 0 There corresponds to bh] as input QZ, d = 1, then the qubit QD 1 quantum state shown d and U and a · X + B mod N and 0 and respectively, QD 2, QU 1 ~QU j- 1 , QB 0 to QB j−1 are output, and if d = 0, the input quantum state is maintained. However, A * X + B mod N = (A * X + B mod N) j-1 ... (A * X + B mod N) 0 and QBh (hε {0, ..., j-1}) is (A * X + B mod). N) corresponds to h. Hereinafter, details of the M (A) MOD (N) operations.

まず、古典メモリ30からAを読み込んだ量子計算制御部60の制御のもと、ADD MOD演算部111(図2(b))が、量子ビットQD,QDを制御ビットとして、量子ビットQU〜QUj−1,QB〜QBj−1,QZに対し、ADD(2・A)MOD(N)演算を適用する(ステップS31)。なお、ADD(2・A)MOD(N)演算の詳細については後述する。次に、量子計算制御部60が変数gbに1代入し、この変数gbを古典メモリ30に格納する(ステップS32)。次に、古典メモリ30から変数gbを読み込んだ量子計算制御部60の制御のもと、SWAP演算部112が、量子ビットQDと量子ビットQUgbに対し、SWAP演算を適用する(ステップS33)。なお、SWAP演算とは、図14のように3つの制御NOT演算を組み合わせた演算を意味する。ここでx,y∈{0,1}である。このSWAP演算により、入力された2つの量子ビットの量子状態が入れ替わる。 First, under the control of the quantum calculation control unit 60 that reads A from the classical memory 30, the ADD MOD calculation unit 111 (FIG. 2B) uses the qubits QD 1 and QD 2 as control bits and the qubit QU to 1 ~QU j-1, QB 0 ~QB j-1, QZ, ADD (2 0 · a) MOD (N) to apply an operation (step S31). Incidentally, ADD (2 0 · A) MOD (N) will be described in detail later operation. Next, the quantum calculation control unit 60 assigns 1 to the variable gb, and stores this variable gb in the classical memory 30 (step S32). Then, under the control of quantum computation control unit 60 for reading the variable gb from classical memory 30, the SWAP operation unit 112, with respect to qubits QD 2 and qubit QU gb, applying the SWAP operation (step S33) . The SWAP calculation means a calculation combining three control NOT calculations as shown in FIG. Here, x, yε {0, 1}. By this SWAP operation, the quantum states of the two input qubits are switched.

次に乗算部50が古典メモリ30からAと変数gbとを読み込み、2gb・Aを計算して量子計算制御部60に送る(ステップS34)。量子計算制御部60は、2gb・Aを用いてADD MOD演算部111を制御し、ADD MOD演算部111は、量子ビットQD,QDを制御ビットとして、量子ビットQU〜QUj−1,QB〜QBj−1,QZに対し、ADD(2gb・A)MOD(N)演算を適用する(ステップS35)。次に、古典メモリ30から変数gbを読み込んだ量子計算制御部60の制御のもと、SWAP演算部112が、量子ビットQDと量子ビットQUgbに対し、SWAP演算を適用する(ステップS36)。その後、量子計算制御部60が、古典メモリ30に格納された変数gbがj−1であるか否かを判断する(ステップS37)。ここで、gb=j−1でなければ、量子計算制御部60が、gb+1を新たな変数gbとして古典メモリ30に格納し、処理をステップS33に戻し、gb=j−1であれば、M(A)MOD(N)演算を終了する。 Next, the multiplication unit 50 reads A and the variable gb from the classical memory 30, calculates 2 gb · A, and sends it to the quantum calculation control unit 60 (step S34). The quantum calculation control unit 60 controls the ADD MOD calculation unit 111 using 2 gb · A, and the ADD MOD calculation unit 111 uses the qubits QD 1 and QD 2 as control bits and qubits QU 1 to QU j−. ADD (2 gb · A) MOD (N) operation is applied to 1 , QB 0 to QB j−1 , QZ (step S35). Then, under the control of quantum computation control unit 60 for reading the variable gb from classical memory 30, the SWAP operation unit 112, with respect to qubits QD 2 and qubit QU gb, applying the SWAP operation (step S36) . Thereafter, the quantum computation control unit 60 determines whether or not the variable gb stored in the classical memory 30 is j−1 (step S37). Here, if not gb = j−1, the quantum calculation control unit 60 stores gb + 1 as a new variable gb in the classical memory 30, returns the process to step S33, and if gb = j−1, (A) The MOD (N) operation is terminated.

[ADD(A)MOD(N)演算の詳細]
次に、ステップS31,S35で触れたADD(A)MOD(N)演算, ADD(2gb・A)MOD(N)演算の詳細を説明する。なお、以下では、AをパラメータとしたADD(A)MOD(N)演算を例にとって説明するが、このAを2gb・Aに置換すればADD(2gb・A)MOD(N)演算となる。
図7は、このADD(A)MOD(N)演算の詳細を説明するためのフローチャートである。また、図15は、j=5の場合におけるADD(A)MOD(N)演算を例示した量子回路である。
[Details of ADD (A) MOD (N) calculation]
Next, details of the ADD (A) MOD (N) calculation and ADD (2 gb · A) MOD (N) calculation mentioned in steps S31 and S35 will be described. In the following description, the the ADD (A) MOD (N) calculates the A parameter as an example, if substituted the A to 2 gb · A ADD (2 gb · A) MOD (N) and calculating Become.
FIG. 7 is a flowchart for explaining the details of the ADD (A) MOD (N) calculation. FIG. 15 is a quantum circuit illustrating an ADD (A) MOD (N) operation when j = 5.

図15に例示するように、ADD(A)MOD(N)演算を示す量子回路は、d,d∈{0,1}とu,…,uj−1∈{0,1}とBと0とをそれぞれ示す量子状態の量子ビットQD,QD,QU〜QUj−1,QB〜QBj−1,QZを入力とし、d=d=1であれば、d,dとu,…,uj−1とA+B mod Nと0とをそれぞれ示す量子状態の量子ビットQD,QD,QU〜QUj−1,QB〜QBj−1,QZを出力し、d=d=1でなければ、入力の量子状態を維持する。ただし、A+B mod N=(A+B mod N)j−1…(A+B mod N)であり、QBh(h∈{0,…,j−1})が(A+B mod N)hに対応する。以下、このADD(A)MOD(N)演算の詳細を説明する。 As illustrated in FIG. 15, the quantum circuit indicating the ADD (A) MOD (N) operation includes d 1 , d 2 ε {0, 1} and u 1 ,..., U j−1 ε {0, 1}. Quantum bits QD 1 , QD 2 , QU 1 to QU j−1 , QB 0 to QB j−1 , and QZ in the quantum state respectively indicating B, 0, and 0, and d 1 = d 2 = 1 , d 1, d 2 and u 1, ..., u j- 1 and a + B mod N and qubit QD 1 quantum state shown 0 and respectively, QD 2, QU 1 ~QU j -1, QB 0 ~QB j −1 and QZ are output, and unless d 1 = d 2 = 1, the input quantum state is maintained. However, A + B mod N = (A + B mod N) j−1 (A + B mod N) 0 , and QBh (hε {0,..., J−1}) corresponds to (A + B mod N) h. Hereinafter, details of the ADD (A) MOD (N) operations.

まず、減算部40が古典メモリ30から読み込んだAとNとからN−Aを算出し、これを量子計算制御部60に送る(ステップS41)。このN−Aを用いた量子計算制御部60の制御のもと、COMPARISON演算部121(図2(c))が、量子ビットQD,QDを制御ビットとして、量子ビットQD,QDがそれぞれ示す量子状態がともに1である場合にのみ、量子ビットQU〜QUj−1,QB〜QBj−1,QZに対し、COMPARISON(N−A)演算を適用する(ステップS42)。なお、詳細は後述するが、このCOMPARISON(N−A)演算は、N−A>Bの場合にのみ量子ビットQZの量子状態を反転(0の場合には1にし、1の場合には0に)させる演算である。次に、QFT演算部122が、量子ビットQB〜QBj−1に対し、QFT(量子フーリエ変換)演算(図39)を適用する(ステップS43)。 First, the subtraction unit 40 calculates N−A from A and N read from the classical memory 30, and sends this to the quantum calculation control unit 60 (step S41). Under the control of the quantum calculation control unit 60 using the NA, the COMPARISON calculation unit 121 (FIG. 2C) uses the qubits QD 1 and QD 2 as control bits and the qubits QD 1 and QD 2 The COMPARISON (NA) operation is applied to the qubits QU 1 to QU j−1 , QB 0 to QB j−1 , and QZ only when the quantum states indicated by are respectively 1 (step S42). . Although details will be described later, this COMPARISON (NA) operation inverts the quantum state of the qubit QZ only when N-A> B (1 when 0 and 0 when 1). This is an operation to be performed. Next, the QFT calculation unit 122 applies a QFT (quantum Fourier transform) calculation (FIG. 39) to the quantum bits QB 0 to QB j−1 (step S43).

次に、古典メモリ30からAを読み込んだ量子計算制御部60の制御のもと、φADD演算部124が、量子ビットQD,QD,QZを制御ビットとして、量子ビットQD,QD,QZがそれぞれ示す量子状態が全て1である場合にのみ、量子ビットQB〜QBj−1に対するφADD(A)演算を適用する(ステップS44)。なお、φADD(A)演算は、図42及び43に示した通りである。すなわち、ステップS44では、量子ビットQD,QD,QZを制御ビットとし、量子ビットQD,QD,QZがそれぞれ示す量子状態が全て1である場合にのみ、φADD演算部124が、1を示す量子状態の量子ビットQB(k∈{j−1,…,0})のみに対し、 Next, under the control of the quantum calculation control unit 60 that reads A from the classical memory 30, the φADD calculation unit 124 uses the qubits QD 1 , QD 2 , and QZ as control bits, and the qubits QD 1 , QD 2 , Only when the quantum states indicated by QZ are all 1, the φADD (A) operation is applied to the qubits QB 0 to QB j−1 (step S44). Note that the φADD (A) calculation is as shown in FIGS. That is, in step S44, only when the quantum bits QD 1 , QD 2 , and QZ are control bits and the quantum states indicated by the quantum bits QD 1 , QD 2 , and QZ are all 1, the φADD operation unit 124 sets the 1 Only for quantum bits QB k (k∈ {j−1,..., 0}) in the quantum state indicating

Figure 0004366348
(ただし、量子ビットQBの量子状態を|QB〉とし、eをネピア数とし、iを虚数単位とする)の演算を施す。
次に、NOT演算部126が、量子ビットQZに対してNOT演算を適用し(ステップS45)、φADD−1演算部125が、量子ビットQD,QD,QZを制御ビットとして、量子ビットQD,QD,QZがそれぞれ示す量子状態が全て1である場合にのみ、量子ビットQB〜QBj−1に対し、φADD(N−A)−1演算を適用する(ステップS46)。なお、φADD(N−A)−1演算とはφADD(N−A)演算の逆演算を意味する。すなわち、ステップS46では、量子ビットQD,QD,QZを制御ビットとし、量子ビットQD,QD,QZがそれぞれ示す量子状態が全て1である場合にのみ、φADD−1演算部125が、1を示す量子状態の量子ビットQBのみに対し、
Figure 0004366348
(However, the quantum state of the qubit QB k is set to | QB k >, e is a Napier number, and i is an imaginary unit).
Next, the NOT operation unit 126 applies a NOT operation to the qubit QZ (step S45), and the φADD −1 operation unit 125 uses the qubits QD 1 , QD 2 , and QZ as control bits, and the qubit QD Only when the quantum states indicated by 1 , QD 2 , and QZ are all 1, φADD (NA) −1 operation is applied to the qubits QB 0 to QB j−1 (step S 46). Note that the φADD (NA) -1 operation means the inverse operation of the φADD (NA) operation. That is, in step S46, only when the quantum bits QD 1 , QD 2 , and QZ are control bits and the quantum states indicated by the quantum bits QD 1 , QD 2 , and QZ are all 1, the φADD −1 calculation unit 125 is Only for qubits QB k in the quantum state indicating 1,

Figure 0004366348
(ただし、N−A=(n−a)j−1…(n−a)とする)の演算を施す。
次に、NOT演算部126が、量子ビットQZに対してNOT演算を適用し(ステップS47)、QFT−1演算部123が、量子ビットQB〜QBj−1に対し、QFT演算の逆演算であるQFT−1演算を適用する(ステップS48)。次に、古典メモリ30からAを読み込んだ量子計算制御部60の制御のもと、COMPARISON演算部121が、量子ビットQD,QDを制御ビットとして、量子ビットQD,QDがそれぞれ示す量子状態がともに1である場合にのみ、量子ビットQU〜QUj−1,QB〜QBj−1,QZに対し、COMPARISON(A)演算を適用する(ステップS49)。なお、COMPARISON(A)の詳細については後述する。そして、Toffoli演算部127が、量子ビットQD,QDを制御ビットとし、量子ビットQZを目標ビットとしたToffoli演算を適用する(ステップS50)。
Figure 0004366348
(However, N−A = (na) j−1 (n−a) 0 ) is performed.
Next, NOT operation unit 126 applies a NOT operation on qubits QZ (step S47), QFT -1 calculation section 123, to qubit QB 0 ~QB j-1, the inverse operation of QFT operation QFT −1 calculation is applied (step S48). Next, under the control of the quantum calculation control unit 60 that reads A from the classical memory 30, the COMPARISON calculation unit 121 uses the qubits QD 1 and QD 2 as control bits, and the qubits QD 1 and QD 2 respectively indicate Only when the quantum states are both 1, the COMPARISON (A) operation is applied to the qubits QU 1 to QU j−1 , QB 0 to QB j−1 , and QZ (step S49). Details of COMPARISON (A) will be described later. Then, the Toffoli calculation unit 127 applies the Toffoli calculation using the qubits QD 1 and QD 2 as control bits and the qubit QZ as a target bit (step S50).

[COMPARISON(A)演算の詳細]
次に、ステップS42,S49で触れたCOMPARISON(N−A)演算, COMPARISON(A)演算の詳細を説明する。なお、以下では、AをパラメータとしたCOMPARISON(A)演算を例にとって説明するが、このAをN−Aに置換すればCOMPARISON(N−A)演算となる。
図8は、このCOMPARISON(A)演算の詳細を説明するためのフローチャートである。また、図16は、j=5の場合におけるCOMPARISON(A)演算を例示した量子回路である。
[Details of COMPARISON (A) calculation]
Next, details of the COMPARISON (NA) calculation and the COMPARISON (A) calculation mentioned in steps S42 and S49 will be described. In the following description, the COMPARISON (A) operation using A as a parameter will be described as an example. However, if this A is replaced with NA, the COMPARISON (NA) operation is performed.
FIG. 8 is a flowchart for explaining details of the COMPARISON (A) calculation. FIG. 16 is a quantum circuit illustrating the COMPARISON (A) operation when j = 5.

図16に例示するように、COMPARISON(A)演算を示す量子回路は、B=bj−1…bとu,…,uj−1とzとをそれぞれ示す量子ビットQB〜QBj−1,QU〜QUj−1,QZに対し、B=bj−1…bとu,…,uj−1とをそれぞれ示す量子状態の量子ビットQB〜QBj−1,QU〜QUj−1と、z(+)αを示す量子状態の量子ビットQZとを出力する。なお、(+)は排他的論理和(和のmod 2を採った値)を示す。また、αは、A>Bの場合にα=1となり、A≦Bの場合にα=0となる値である。すなわち、COMPARISON(A)演算は、A>Bの場合にのみ、量子ビットQZの量子状態を反転させる演算である。以下、このCOMPARISON(A)演算の詳細を説明する。 As illustrated in FIG. 16, the quantum circuit indicating the COMPARISON (A) operation includes B = b j−1 ... B 0 and u 1 ,..., U j−1 and z indicating quantum bits QB 0 to QB, respectively. j-1, QU 1 to ~QU j-1, QZ, B = b j-1 ... b 0 and u 1, ..., u j- 1 and the quantum bit QB 0 of quantum states respectively ~QB j- 1, and QU 1 ~QU j-1, and outputs a qubit QZ quantum state indicating the z (+) α. Note that (+) indicates exclusive OR (value obtained by sum mod 2). Α is a value that α = 1 when A> B and α = 0 when A ≦ B. That is, the COMPARISON (A) operation is an operation that inverts the quantum state of the qubit QZ only when A> B. Details of the COMPARISON (A) calculation will be described below.

まず、古典メモリ30からAを読み込んだ量子計算制御部60の制御のもと、HIBIT演算部131(図3(a))が、量子ビットQU〜QUj−1,QB〜QBj−1,QZに対し、HIGHBIT(A)演算を適用する(ステップS51)。なお、HIGHBIT(A)演算の詳細については後述する。次に、NOT演算部132が、量子ビットQZに対し、NOT演算を適用する(ステップS52)。次に、古典メモリ30からAを読み込んだ量子計算制御部60の制御のもと、古典制御NOT演算部133が、Aの桁a(h∈{j−1,…,0})が1となるhに対応する量子ビットQBのみにNOT演算を適用する(ステップS53)。なお、各図においてNOT演算等の演算子を四角で囲み、その上部に符号を付したものは、この符号の値が1である場合にのみ、その四角で囲まれた演算を実行する演算子を意味する。 First, under the control of the quantum calculation control unit 60 that has read A from the classical memory 30, the HIBIT operation unit 131 (FIG. 3A) performs quantum bits QU 1 to QU j-1 and QB 0 to QB j−. 1 , HIGHBIT (A) calculation is applied to QZ (step S51). Details of the HIGHBIT (A) calculation will be described later. Next, the NOT operation unit 132 applies a NOT operation to the qubit QZ (step S52). Next, under the control of the quantum computation control unit 60 that has read A from the classical memory 30, the classical control NOT computation unit 133 determines that the digit a h (h∈ {j−1,..., 0}) of A is 1. The NOT operation is applied only to the qubit QB h corresponding to h (step S53). In each figure, an operator such as a NOT operation is enclosed in a square, and a symbol is added to the upper part thereof, and an operator that executes an operation enclosed in the square only when the value of this code is 1. Means.

その後、NOT演算部132が、量子ビットQB〜QBj−1に対し、NOT演算を適用し(ステップS54)、Toffoli演算部134が、量子ビットQB〜QBj−1を制御ビットとし、量子ビットQZを目標ビットとしたToffoli演算を適用する(ステップS55)。図17にj=5の場合のToffoli演算を示す。さらにその後、NOT演算部132が、量子ビットQB〜QBj−1に対し、NOT演算を適用する(ステップS56)。そして、古典制御NOT演算部133が、Aの桁a(h∈{j−1,…,0})が1となるhに対応する量子ビットQBのみにNOT演算を適用する(ステップS57)。 Thereafter, the NOT operation unit 132 applies a NOT operation to the qubits QB 0 to QB j−1 (step S54), and the Toffoli operation unit 134 uses the qubits QB 0 to QB j−1 as control bits. A Toffoli operation using the qubit QZ as a target bit is applied (step S55). FIG. 17 shows Toffoli calculation when j = 5. Thereafter, the NOT operation unit 132 applies a NOT operation to the qubits QB 0 to QB j−1 (step S56). Then, the classical control NOT operation unit 133 applies the NOT operation only to the qubit QB h corresponding to h in which the digit a h (hε {j−1,..., 0}) of A becomes 1. (Step S57) ).

[HIGHBIT(A)演算の詳細]
次に、ステップS51で触れたHIGHBIT(A)演算の詳細を説明する。
図9及び10は、このHIGHBIT(A)演算の詳細を説明するためのフローチャートである。また、図18は、j=5の場合におけるHIGHBIT(A)演算を例示した量子回路である。
図18に例示するように、HIGHBIT(A)演算を示す量子回路は、B=bj−1…bとu,…,uj−1とzとをそれぞれ示す量子ビットQB〜QBj−1,QU〜QUj−1,QZに対し、B=bj−1…bとu,…,uj−1とをそれぞれ示す量子状態の量子ビットQB〜QBj−1,QU〜QUj−1と、z(+)βを示す量子状態の量子ビットQZとを出力する。なお、βはA+Bの最上位ビットの値を意味する。以下、HIGHBIT(A)演算の詳細を説明する。
[Details of HIGHBIT (A) calculation]
Next, details of the HIGHBIT (A) calculation mentioned in step S51 will be described.
9 and 10 are flowcharts for explaining the details of the HIGHBIT (A) calculation. FIG. 18 is a quantum circuit illustrating the HIGHBIT (A) operation when j = 5.
As illustrated in FIG. 18, the quantum circuit indicating the HIGHBIT (A) operation includes quantum bits QB 0 to QB indicating B = b j−1 ... B 0 and u 1 ,..., U j−1 and z, respectively. j-1, QU 1 to ~QU j-1, QZ, B = b j-1 ... b 0 and u 1, ..., u j- 1 and the quantum bit QB 0 of quantum states respectively ~QB j- 1, and QU 1 ~QU j-1, and outputs a qubit QZ quantum state indicating the z (+) β. Β means the value of the most significant bit of A + B. Details of the HIGHBIT (A) calculation will be described below.

まず、制御NOT演算部141(図3(b))が、量子ビットQUj−1を制御ビットとし、量子ビットQZを目標ビットとしたCNOT演算を適用する(ステップS61)。次に、量子計算制御部60が変数gcにj−1を代入し、これを古典メモリ30に格納する(ステップS62)。
次に、古典メモリ30からAと変数gcとを読み込んだ量子計算制御部60の制御のもと、E演算部142が、量子ビットQUgc,QUgc−1,QBgcに対し、E(agc)演算を適用する(ステップS63)。
First, the control NOT operation unit 141 (FIG. 3B) applies CNOT operation using the qubit QU j−1 as a control bit and the qubit QZ as a target bit (step S61). Next, the quantum computation control unit 60 substitutes j−1 for the variable gc and stores it in the classical memory 30 (step S62).
Next, under the control of the quantum computation control unit 60 that reads A and the variable gc from the classical memory 30, the E operation unit 142 applies E (a to the quantum bits QU gc , QU gc−1 , and QB gc. gc ) An operation is applied (step S63).

図19は、このE(agc)演算を示した量子回路である。図19に示すように、E(agc)演算は、p,r,s∈{0,1}をそれぞれ示す量子状態の3つの量子ビットQUgc−1,QBgc,QUgcを入力とする。そして、E演算部142は、まず、agc=1の場合にのみ量子ビットQBgcにNOT演算を適用する。次に、E演算部142は、量子ビットQUgc−1,QBgcを制御ビットとし、量子ビットQUgcを目標ビットとしたToffoli演算を適用し、さらに、agc=1の場合にのみ量子ビットQBgcにNOT演算を適用する。これらの操作により、3つの量子ビットQUgc−1,QBgc,QUgcの量子状態が、それぞれp,r,s(+)(agc(+)r)・pを示すものとされる。以上がE(agc)演算である。 FIG. 19 is a quantum circuit showing this E (a gc ) operation. As shown in FIG. 19, the E (a gc ) operation receives three quantum bits QU gc−1 , QB gc , and QU gc in quantum states respectively indicating p, r, and s∈ {0, 1}. . Then, the E operation unit 142 first applies a NOT operation to the qubit QB gc only when a gc = 1. Next, the E operation unit 142 applies Toffoli operation using the qubits QU gc-1 and QB gc as control bits and the qubit QU gc as a target bit, and further, only when a gc = 1 Apply NOT operation to QB gc . By these operations, the quantum states of the three qubits QU gc−1 , QB gc , and QU gc indicate p, r, s (+) (a gc (+) r) · p, respectively. The above is the E (a gc ) calculation.

次に、量子計算制御部60が、古典メモリ30に格納された変数gcが2であるか否かを判断する(ステップS64)。ここで、gc=2でなければ、量子計算制御部60は、gc−1を新たなgcとして古典メモリ30に格納した後(ステップS65)、処理をステップS63に戻す。一方、gc=2であれば、量子計算制御部60は、古典メモリからAの要素aを読み込み、a=1の場合にのみ、制御NOT演算部141に、量子ビットQBを制御ビットとし、量子ビットQUを目標ビットとした制御NOT演算を適用させ、NOT演算部145に、量子ビットQBへのNOT演算を適用させる(ステップS66)。次に、量子計算制御部60は、古典メモリからAの要素aを読み込み、a=1の場合にのみ、Toffoli演算部144に、量子ビットQB,QBを制御ビットとし、量子ビットQUを目標ビットとしたToffoli演算を適用させる(ステップS67)。 Next, the quantum computation control unit 60 determines whether or not the variable gc stored in the classical memory 30 is 2 (step S64). If gc = 2 is not satisfied, the quantum computation control unit 60 stores gc-1 as a new gc in the classical memory 30 (step S65), and then returns the process to step S63. On the other hand, if gc = 2, the quantum calculation control unit 60 reads the element a 1 of A from the classical memory, and only when a 1 = 1, the control bit calculation unit 141 sets the quantum bit QB 1 to the control bit. And a control NOT operation using the qubit QU 1 as a target bit is applied, and a NOT operation on the qubit QB 1 is applied to the NOT operation unit 145 (step S66). Next, the quantum calculation control unit 60 reads the element a 0 of A from the classical memory, and only when a 0 = 1, the Toffoli calculation unit 144 uses the quantum bits QB 0 and QB 1 as control bits, and the quantum bits A Toffoli calculation using QU 1 as a target bit is applied (step S67).

次に、古典メモリ30から変数gcとAの要素agcとを読み込んだ量子計算制御部60の制御のもと、F演算部143が、量子ビットQUgc,QUgc−1,QBgcに対し、F(agc)演算を適用する(ステップS68)。
図20は、このF(agc)演算を示した量子回路である。図20に示すように、F(agc)演算は、p,r,s∈{0,1}をそれぞれ示す量子状態の3つの量子ビットQUgc−1,QBgc,QUgcを入力とする。そして、F演算部143は、まず、agc=1の場合にのみ量子ビットQBgcを制御ビットとし、量子ビットQUgcを目標ビットとした制御NOT演算を適用し、さらに量子ビットQUgcにNOT演算を適用する。次に、F演算部143は、量子ビットQUgc−1,QBgcを制御ビットとし、量子ビットQUgcを目標ビットとしたToffoli演算を適用する。これらの操作により、3つの量子ビットQUgc−1,QBgc,QUgcの量子状態が、それぞれp,agc(+)r,s(+)p・agc(+)agc・r(+)r・pを示すものとなる。以上がF(agc)演算である。
Next, under the control of the quantum calculation control unit 60 that has read the variable gc and the element a gc of the A from the classical memory 30, the F operation unit 143 applies the qubits QU gc , QU gc-1 , QB gc , F (a gc ) calculation is applied (step S68).
FIG. 20 is a quantum circuit showing this F (a gc ) operation. As shown in FIG. 20, the F (a gc ) operation receives three quantum bits QU gc−1 , QB gc , and QU gc in the quantum state respectively indicating p, r, and sε {0, 1}. . The F operation unit 143 first applies a control NOT operation using the qubit QB gc as a control bit and the qubit QU gc as a target bit only when a gc = 1, and further applies NOT to the qubit QU gc . Apply the operation. Next, the F operation unit 143 applies Toffoli operation using the qubits QU gc-1 and QB gc as control bits and the qubit QU gc as a target bit. By these operations, the quantum states of the three qubits QU gc−1 , QB gc , and QU gc are changed to p, a gc (+) r, s (+) p · a gc (+) a gc · r ( +) R · p. The above is the F (a gc ) calculation.

次に、量子計算制御部60が、古典メモリ30に格納された変数gcがj−1であるか否かを判断する(ステップS69)。ここで、gc=j−1でなければ、量子計算制御部60は、gc+1を新たなgcとして古典メモリ30に格納した後(ステップS70)、処理をステップS68に戻す。一方、gc=j−1であれば、制御NOT演算部141が、量子ビットQUj−1を制御ビットとし、量子ビットQZを目標ビットとしたCNOT演算を適用する(ステップS71)。次に、古典メモリ30から変数gcとAの要素agcとを読み込んだ量子計算制御部60の制御のもと、F演算部143が、量子ビットQUgc,QUgc−1,QBgcに対し、F(agc)演算の逆演算であるF(agc−1演算を適用する(ステップS72)。 Next, the quantum computation control unit 60 determines whether or not the variable gc stored in the classical memory 30 is j−1 (step S69). If not gc = j−1, the quantum computation control unit 60 stores gc + 1 as a new gc in the classical memory 30 (step S70), and then returns the process to step S68. On the other hand, if gc = j−1, the control NOT operation unit 141 applies the CNOT operation using the qubit QU j−1 as the control bit and the qubit QZ as the target bit (step S71). Next, under the control of the quantum calculation control unit 60 that has read the variable gc and the element a gc of the A from the classical memory 30, the F operation unit 143 applies the qubits QU gc , QU gc-1 , QB gc , F (a gc ) −1 operation that is the inverse operation of F (a gc ) operation is applied (step S72).

次に、量子計算制御部60が、古典メモリ30に格納された変数gcが2であるか否かを判断する(ステップS73)。ここで、gc=2でなければ、量子計算制御部60は、gc−1を新たなgcとして古典メモリ30に格納した後(ステップS74)、処理をステップS72に戻す。一方、gc=2であれば、量子計算制御部60は、古典メモリからAの要素aを読み込み、a=1の場合にのみ、Toffoli演算部144に、量子ビットQB,QBを制御ビットとし、量子ビットQUを目標ビットとしたToffoli演算を適用させる(ステップS75)。 Next, the quantum calculation control unit 60 determines whether or not the variable gc stored in the classical memory 30 is 2 (step S73). If gc = 2 is not satisfied, the quantum computation control unit 60 stores gc-1 as a new gc in the classical memory 30 (step S74), and then returns the process to step S72. On the other hand, if gc = 2, the quantum calculation control unit 60 reads the element a 0 of A from the classical memory, and sets the quantum bits QB 0 and QB 1 to the Toffoli calculation unit 144 only when a 0 = 1. A Toffoli operation is applied using the control bit and the qubit QU 1 as the target bit (step S75).

次に、量子計算制御部60は、古典メモリからAの要素aを読み込み、a=1の場合にのみ、NOT演算部145に、量子ビットQBへのNOT演算を適用させ、制御NOT演算部141に、量子ビットQBを制御ビットとし、量子ビットQUを目標ビットとした制御NOT演算を適用させる(ステップS76)。
次に、古典メモリ30からAと変数gcとを読み込んだ量子計算制御部60の制御のもと、E演算部142が、量子ビットQUgc,QUgc−1,QBgcに対し、E(agc)演算を適用する(ステップS77)。次に、量子計算制御部60が、古典メモリ30に格納された変数gcがj−1であるか否かを判断する(ステップS78)。ここで、gc=j−1でなければ、量子計算制御部60は、gc+1を新たなgcとして古典メモリ30に格納した後(ステップS79)、処理をステップS77に戻す。一方、gc=j−1であれば、HIGHBIT(A)演算を終了させる。
Next, the quantum calculation control unit 60 reads the element a 1 of A from the classical memory, and applies the NOT operation to the qubit QB 1 to the NOT operation unit 145 only when a 1 = 1, and performs control NOT. The control unit 141 is caused to apply a control NOT operation using the qubit QB 1 as a control bit and the qubit QU 1 as a target bit (step S76).
Next, under the control of the quantum computation control unit 60 that reads A and the variable gc from the classical memory 30, the E operation unit 142 applies E (a to the quantum bits QU gc , QU gc−1 , and QB gc. gc ) An operation is applied (step S77). Next, the quantum computation control unit 60 determines whether or not the variable gc stored in the classical memory 30 is j−1 (step S78). If not gc = j−1, the quantum computation control unit 60 stores gc + 1 as a new gc in the classical memory 30 (step S79), and then returns the process to step S77. On the other hand, if gc = j−1, the HIGHBIT (A) operation is terminated.

〔第2の実施の形態〕
本形態は、第1の実施の形態の変形例である。第1の実施の形態では、A=aj−1…aを古典情報として取り扱っていたが、第2の実施の形態では、A=aj−1…aを量子情報として取り扱う。なお、以下では、第1の実施の形態との相違点を中心に説明し、第1の実施の形態と共通する事項については説明を省略する。
<構成>
図21は、本形態における量子計算装置200の機能構成を例示したブロック図である。
[Second Embodiment]
This embodiment is a modification of the first embodiment. In the first embodiment, although not address A = a j-1 ... a 0 as a classical information, in the second embodiment deals with A = a j-1 ... a 0 as quantum information. In the following description, differences from the first embodiment will be mainly described, and description of matters common to the first embodiment will be omitted.
<Configuration>
FIG. 21 is a block diagram illustrating a functional configuration of the quantum computing device 200 in this embodiment.

第1の実施の形態の量子計算装置1と第2の実施の形態の量子計算装置200との構成上の相違点は、第1の実施の形態で古典情報として取り扱っていたA=aj−1…aの各桁a,…,aj−1の値を示す量子状態とする量子ビットQA,…QAj−1を量子ビット10に追加した量子ビット210を用いる点、量子計算部270の初期量子状態生成部271やCV演算部272が、この量子ビットQA,…QAj−1の量子情報を用いて各処理を実行する点である。
図22(a)は、本形態のCV演算部272が有するCONPARISON演算部321の詳細構成を例示した図である。この図に示すようにCONPARISON演算部321は、HIGHBIT演算部331、NOT演算部332、制御NOT演算部333及びToffoli演算部334を有している。図22(b)は、HIGHBIT演算部331の詳細構成を例示した図である。この図に示すようにHIGHBIT演算部331は、制御NOT演算部341、E演算部342、F演算部343、Toffoli演算部344、NOT演算部345及びF−1演算部343を有している。なお、その他の詳細構成については第1の実施の形態と同様であるため説明を省略する。
The difference in configuration between the quantum computing device 1 of the first embodiment and the quantum computing device 200 of the second embodiment is that A = a j− that has been treated as classical information in the first embodiment. 1 ... a each digit a 0 0, ..., the point of using the qubit 210 added qubit QA 0, a ... QA j-1 to qubit 10, the quantum state indicating the value of a j-1, quantum computing The initial quantum state generation unit 271 and the CV calculation unit 272 of the unit 270 perform each process using the quantum information of the qubits QA 0 ,... QA j−1 .
FIG. 22A is a diagram illustrating a detailed configuration of the COMPARISON calculation unit 321 included in the CV calculation unit 272 of the present embodiment. As shown in this figure, the COMPARISON computing unit 321 includes a HIGHBIT computing unit 331, a NOT computing unit 332, a control NOT computing unit 333, and a Toffoli computing unit 334. FIG. 22B is a diagram illustrating a detailed configuration of the HIGHBIT calculation unit 331. As shown in this figure, the HIGHBIT computing unit 331 includes a control NOT computing unit 341, an E computing unit 342, an F computing unit 343, a Toffoli computing unit 344, a NOT computing unit 345, and an F- 1 computing unit 343. The other detailed configuration is the same as that of the first embodiment, and a description thereof will be omitted.

<処理>
以下では第1の実施の形態との相違点を中心に説明する。
[初期量子状態生成]
第1の実施の形態では、初期量子状態生成部71が、量子ビットQD,QD,QU〜QUj−1,QB〜QBj−1,QZの初期量子状態を生成していたが(ステップS2)、本形態の初期量子状態生成部271(図21)は、さらにQA〜QAj−1の初期量子状態も生成する。具体的には、古典メモリ30からA=aj−1…aを読み込んだ量子計算制御部60の制御のもと、初期量子状態生成部271が、量子ビットQA,…QAj−1の量子状態を、それぞれA=aj−1…aの各桁a,…,aj−1の値を示す量子状態とする。
<Processing>
Below, it demonstrates centering on difference with 1st Embodiment.
[Initial quantum state generation]
In the first embodiment, the initial quantum state generation unit 71 generates the initial quantum states of the qubits QD 1 , QD 2 , QU 1 to QU j−1 , QB 0 to QB j−1 , and QZ. (Step S2), the initial quantum state generation unit 271 (FIG. 21) of this embodiment also generates initial quantum states of QA 0 to QA j−1 . Specifically, under the control of quantum computation control unit 60 to read the A = a j-1 ... a 0 from classical memory 30, the initial quantum state generator 271, qubit QA 0, ... QA j-1 of quantum states, respectively a = a j-1 ... a each digit a 0 0, ..., a quantum state indicating the value of a j-1.

[CV演算]
第1の実施の形態では、A=aj−1…aを古典情報としてCV演算を行っていたが、本形態では、量子ビットQA,…QAj−1を用い、A=aj−1…aを量子情報としてCV演算を行う。以下では、CONPARISON演算とHIGHBIT演算のみを説明する。その他の演算については、量子ビットQA,…QAj−1を用いたCONPARISON演算とHIGHBIT演算の結果を用いる以外は、第1の実施の形態と同様である。
[CV calculation]
In the first embodiment, CV operation is performed using A = a j−1 ... A 0 as classical information. However, in this embodiment, quantum bits QA 0 ,... QA j−1 are used, and A = a j −1 ... CV calculation is performed using a 0 as quantum information. Only the COMPARISON operation and the HIGHBIT operation will be described below. Other operations are the same as those in the first embodiment except that the results of the COMPARISON operation and the HIGHBIT operation using the qubits QA 0 ,... QA j−1 are used.

[CONPARISON演算の詳細]
図23は、本形態のCONPARISON演算の詳細を説明するためのフローチャートである。また、図26は、j=5の場合における本形態のCOMPARISON演算を例示した量子回路である。
図26に例示するように、本形態のCOMPARISON演算を示す量子回路は、A=aj−1…aとB=bj−1…bとu,…,uj−1とzとをそれぞれ示す量子ビットQA〜QAj−1,QB〜QBj−1,QU〜QUj−1,QZに対し、A=aj−1…aとB=bj−1…bとu,…,uj−1とをそれぞれ示す量子状態の量子ビットQA〜QAj−1,QB〜QBj−1,QU〜QUj−1と、z(+)αを示す量子状態の量子ビットQZとを出力する。また、αは、A>Bの場合にα=1となり、A≦Bの場合にα=0となる値である。すなわち、COMPARISON演算は、A>Bの場合にのみ、量子ビットQZの量子状態を反転させる演算である。以下、このCOMPARISON演算の詳細を説明する。
[Details of COMPARISON calculation]
FIG. 23 is a flowchart for explaining details of the COMPARISON calculation of the present embodiment. FIG. 26 is a quantum circuit illustrating the COMPARISON operation of this embodiment when j = 5.
As illustrated in FIG. 26, a quantum circuit showing a COMPARISON operation of this embodiment, A = a j-1 ... a 0 and B = b j-1 ... b 0 and u 1, ..., u j- 1 and z For qubits QA 0 to QA j−1 , QB 0 to QB j−1 , QU 1 to QU j−1 , QZ respectively indicating A = a j−1 ... A 0 and B = b j−1 ... B 0 and u 1 ,..., U j−1 representing quantum states QA 0 to QA j−1 , QB 0 to QB j−1 , QU 1 to QU j−1 , and z (+ ) A quantum state quantum bit QZ indicating α is output. Α is a value that α = 1 when A> B and α = 0 when A ≦ B. That is, the COMPARISON operation is an operation that inverts the quantum state of the qubit QZ only when A> B. Details of this COMPARISON calculation will be described below.

まず、NOT演算部332(図22(a))が、量子ビットQA〜QAj−1に対してNOT演算を適用する(ステップS101)。次に、古典メモリ30からAを読み込んだ量子計算制御部60の制御のもと、HIBIT演算部331が、量子ビットQU〜QUj−1,QA〜QAj−1,QB〜QBj−1,QZに対し、HIGHBIT演算を適用する(ステップS102)。なお、HIGHBIT演算の詳細については後述する。次に、NOT演算部332が、量子ビットQA〜QAj−1,QZに対してNOT演算を適用する(ステップS103)。次に、量子計算制御部60の制御のもと、制御NOT演算部333が、量子ビットQA〜QAj−1を制御ビットとし、量子ビットQB〜QBj−1を目標ビットとした制御NOT演算を適用する(ステップS104)。その後、NOT演算部332が、量子ビットQB〜QBj−1に対し、NOT演算を適用し(ステップS105)、Toffoli演算部334が、量子ビットQB〜QBj−1を制御ビットとし、量子ビットQZを目標ビットとしたToffoli演算を適用する(ステップS106)。さらにその後、NOT演算部332が、量子ビットQB〜QBj−1に対し、NOT演算を適用する(ステップS107)。そして、量子計算制御部60の制御のもと、制御NOT演算部333が、量子ビットQA〜QAj−1を制御ビットとし、量子ビットQB〜QBj−1を目標ビットとした制御NOT演算を適用する(ステップS108)。 First, the NOT operation unit 332 (FIG. 22A) applies a NOT operation to the qubits QA 0 to QA j−1 (step S101). Next, under the control of the quantum calculation control unit 60 that reads A from the classical memory 30, the HIBIT operation unit 331 performs quantum bits QU 1 to QU j−1 , QA 0 to QA j−1 , QB 0 to QB. A HIGHBIT operation is applied to j−1 and QZ (step S102). Details of the HIGHBIT calculation will be described later. Next, the NOT operation unit 332 applies a NOT operation to the qubits QA 0 to QA j−1 , QZ (step S103). Next, under the control of the quantum calculation control unit 60, the control NOT operation unit 333 performs control using the qubits QA 0 to QA j-1 as control bits and the qubits QB 0 to QB j-1 as target bits. A NOT operation is applied (step S104). Thereafter, the NOT operation unit 332 applies NOT operation to the qubits QB 0 to QB j−1 (step S105), the Toffoli operation unit 334 uses the qubits QB 0 to QB j−1 as control bits, A Toffoli operation using the qubit QZ as a target bit is applied (step S106). Thereafter, the NOT operation unit 332 applies a NOT operation to the qubits QB 0 to QB j−1 (step S107). Then, under the control of the quantum calculation control unit 60, the control NOT operation unit 333 uses the control bits with the qubits QA 0 to QA j-1 as control bits and the qubits QB 0 to QB j-1 as target bits. The calculation is applied (step S108).

[HIGHBIT演算の詳細]
次に、ステップS102で触れたHIGHBIT演算の詳細を説明する。
図24及び25は、このHIGHBIT演算の詳細を説明するためのフローチャートである。また、図27は、j=5の場合における、このHIGHBIT演算を例示した量子回路である。
図27に例示するように、HIGHBIT演算を示す量子回路は、A=aj−1…aとB=bj−1…bとu,…,uj−1とzとをそれぞれ示す量子ビットQB〜QBj−1,QU〜QUj−1,QZに対し、B=bj−1…bとu,…,uj−1とをそれぞれ示す量子状態の量子ビットQA〜QAj−1,QB〜QBj−1,QU〜QUj−1と、z(+)βを示す量子状態の量子ビットQZとを出力する。なお、βはA+Bの最上位ビットの値を意味する。以下、HIGHBIT演算の詳細を説明する。
[Details of HIGHBIT calculation]
Next, details of the HIGHBIT calculation mentioned in step S102 will be described.
24 and 25 are flowcharts for explaining the details of the HIGHBIT calculation. FIG. 27 is a quantum circuit illustrating this HIGHBIT operation when j = 5.
As illustrated in FIG. 27, a quantum circuit showing a HIGHBIT operation, A = a j-1 ... a 0 and B = b j-1 ... b 0 and u 1, ..., a u j-1 and z respectively to qubit QB 0 ~QB j-1, QU 1 ~QU j-1, QZ shown, B = b j-1 ... b 0 and u 1, ..., quantum quantum state shown u j-1 and the respective Bits QA 0 to QA j−1 , QB 0 to QB j−1 , QU 1 to QU j−1 and a quantum bit QZ in a quantum state indicating z (+) β are output. Β means the value of the most significant bit of A + B. Details of the HIGHBIT calculation will be described below.

まず、制御NOT演算部341(図22(b))が、量子ビットQUj−1を制御ビットとし、量子ビットQZを目標ビットとしたCNOT演算を適用する(ステップS111)。次に、量子計算制御部60が変数gcにj−1を代入し、これを古典メモリ30に格納する(ステップS112)。
次に、古典メモリ30から変数gcを読み込んだ量子計算制御部60の制御のもと、E演算部142が、量子ビットQUgc,QUgc−1,QAgc,QBgcに対し、E演算を適用する(ステップS113)。
First, the control NOT operation unit 341 (FIG. 22B) applies a CNOT operation using the qubit QU j−1 as a control bit and the qubit QZ as a target bit (step S111). Next, the quantum computation control unit 60 substitutes j−1 for the variable gc and stores it in the classical memory 30 (step S112).
Next, under the control of the quantum calculation control unit 60 that has read the variable gc from the classical memory 30, the E calculation unit 142 performs E calculation on the qubits QU gc , QU gc−1 , QA gc , and QB gc. Apply (step S113).

図28は、このE演算を示した量子回路である。図28に示すように、E(演算は、p,q,r,s∈{0,1}をそれぞれ示す量子状態の4つの量子ビットQUgc−1,QAgc,QBgc,QUgcを入力とする。そして、E演算部142は、まず、量子ビットQAgcを制御ビットとし、量子ビットQBgcを目標ビットとした制御NOT演算を適用する。次に、E演算部142は、量子ビットQUgc−1,QBgcを制御ビットとし、量子ビットQUgcを目標ビットとしたToffoli演算を適用し、さらに、量子ビットQAgcを制御ビットとし、量子ビットQBgcを目標ビットとした制御NOT演算を適用する。これらの操作により、4つの量子ビットQUgc−1,QAgc,QBgc,QUgcの量子状態が、それぞれp,q,r,s(+)(q(+)r)・pを示すものとなる。以上がE演算である。 FIG. 28 is a quantum circuit showing this E operation. As shown in FIG. 28, E (calculation is input with four quantum bits QU gc−1 , QA gc , QB gc , and QU gc in the quantum state respectively indicating p, q, r, and s∈ {0, 1}. Then, the E operation unit 142 first applies a control NOT operation using the qubit QA gc as the control bit and the qubit QB gc as the target bit. Apply Toffoli operation with gc-1 and QB gc as control bits and qubit QU gc as target bit, and further perform control NOT operation with qubit QA gc as control bit and qubit QB gc as target bit apply. these operations, four qubits QU gc-1, QA gc, QB gc, quantum state of QU gc is, p respectively, q, r, s (+ ) (q +) R) · p is as shown a. Above is the E operation.

次に、量子計算制御部60が、古典メモリ30に格納された変数gcが2であるか否かを判断する(ステップS114)。ここで、gc=2でなければ、量子計算制御部60は、gc−1を新たなgcとして古典メモリ30に格納した後(ステップS115)、処理をステップS113に戻す。一方、gc=2であれば、量子計算制御部60の制御のもと、Toffoli演算部344は、量子ビットQA,QBを制御ビットとし、量子ビットQUを目標ビットとしたToffoli演算を適用する(ステップS116)。次に、制御NOT演算部341は、
量子ビットQAを制御ビットとし、量子ビットQBを目標ビットとした制御NOT演算を適用する(ステップS117)。さらに、Toffoli演算部344は、量子ビットQA,QB,QBを制御ビットとし、量子ビットQUを目標ビットとしたToffoli演算を適用する(ステップS118)。図30は、このようなToffoli演算を示した量子回路である。なお図30では、それぞれの量子状態が、p,q,r,sである量子ビットQA,QB,QB,QUを入力とした例を示している。
Next, the quantum calculation control unit 60 determines whether or not the variable gc stored in the classical memory 30 is 2 (step S114). If gc = 2 is not satisfied, the quantum computation control unit 60 stores gc-1 as a new gc in the classical memory 30 (step S115), and then returns the process to step S113. On the other hand, if gc = 2, under the control of the quantum calculation control unit 60, the Toffoli calculation unit 344 performs Toffoli calculation with the qubits QA 1 and QB 1 as control bits and the qubit QU 1 as a target bit. Apply (step S116). Next, the control NOT calculation unit 341
A control NOT operation using the qubit QA 1 as a control bit and the qubit QB 1 as a target bit is applied (step S117). Further, the Toffoli calculation unit 344 applies the Toffoli calculation using the qubits QA 0 , QB 0 , and QB 1 as control bits and the qubit QU 1 as a target bit (step S118). FIG. 30 is a quantum circuit showing such a Toffoli operation. FIG. 30 shows an example in which qubits QA 0 , QB 0 , QB 1 , and QU 1 whose respective quantum states are p, q, r, and s are input.

次に、F演算部343が、量子ビットQUgc,QUgc−1 ,QAgc,QBgcに対し、F演算を適用する(ステップS119)。
図29は、このF演算を示した量子回路である。図29に示すように、F演算は、p,q,r,s∈{0,1}をそれぞれ示す量子状態の4つの量子ビットQUgc−1,QAgc,QBgc,QUgcを入力とする。そして、F演算部343は、まず、量子ビットQAgc,QBgcを制御ビットとし、量子ビットQUgcを目標ビットとしたToffoli演算を適用し、さらにQAgcを制御ビットとし、量子ビットQBgcを目標ビットとした制御NOT演算を適用する。次に、E演算部142は、量子ビットQUgc−1,QBgcを制御ビットとし、量子ビットQUgcを目標ビットとしたToffoli演算を適用する。これらの演算により、4つの量子ビットQUgc−1,QAgc,QBgc,QUgcの量子状態が、それぞれp,q,q(+)r,s(+)p・q(+)q・r(+)r・pを示すものとなる。以上がF演算である。
Next, the F operation unit 343 applies the F operation to the qubits QU gc , QU gc−1 , QA gc , and QB gc (step S119).
FIG. 29 is a quantum circuit showing this F operation. As shown in FIG. 29, the F operation inputs four quantum bits QU gc−1 , QA gc , QB gc , and QU gc in the quantum state respectively indicating p, q, r, and s∈ {0, 1}. To do. Then, the F operation unit 343 first applies Toffoli operation using the qubits QA gc and QB gc as control bits, the qubit QU gc as a target bit, further using QA gc as a control bit, and using the qubit QB gc as a control bit. A control NOT operation using the target bit is applied. Next, the E operation unit 142 applies Toffoli operation using the qubits QU gc-1 and QB gc as control bits and the qubit QU gc as a target bit. By these operations, the quantum states of the four qubits QU gc−1 , QA gc , QB gc , and QU gc become p, q, q (+) r, s (+) p · q (+) q · r (+) r · p is indicated. The above is the F operation.

次に、量子計算制御部60が、古典メモリ30に格納された変数gcがj−1であるか否かを判断する(ステップS120)。ここで、gc=j−1でなければ、量子計算制御部60は、gc+1を新たなgcとして古典メモリ30に格納した後(ステップS121)、処理をステップS119に戻す。一方、gc=j−1であれば、制御NOT演算部141が、量子ビットQUj−1を制御ビットとし、量子ビットQZを目標ビットとしたCNOT演算を適用する(ステップS122)。
次に、古典メモリ30から変数gcとAの要素agcとを読み込んだ量子計算制御部60の制御のもと、F−1演算部346が、量子ビットQUgc,QUgc−1,QAgc,QBgcに対し、F演算の逆演算であるF−1演算を適用する(ステップS123)。
Next, the quantum calculation control unit 60 determines whether or not the variable gc stored in the classical memory 30 is j−1 (step S120). If gc = j−1 is not satisfied, the quantum computation control unit 60 stores gc + 1 as a new gc in the classical memory 30 (step S121), and then returns the process to step S119. On the other hand, if gc = j−1, the control NOT operation unit 141 applies the CNOT operation using the qubit QU j−1 as the control bit and the qubit QZ as the target bit (step S122).
Next, under the control of the quantum calculation control unit 60 that reads the variable gc and the element a gc of A from the classical memory 30, the F −1 calculation unit 346 performs the quantum bits QU gc , QU gc−1 , QA gc. , QB gc , an F −1 operation that is an inverse operation of the F operation is applied (step S123).

次に、量子計算制御部60が、古典メモリ30に格納された変数gcが2であるか否かを判断する(ステップS124)。ここで、gc=2でなければ、量子計算制御部60は、gc−1を新たなgcとして古典メモリ30に格納した後(ステップS125)、処理をステップS123に戻す。一方、gc=2であれば、Toffoli演算部344は、量子ビットQA,QB,QBを制御ビットとし、量子ビットQUを目標ビットとしたToffoli演算を適用する(ステップS126)。次に、制御NOT演算部341は、
量子ビットQAを制御ビットとし、量子ビットQBを目標ビットとした制御NOT演算を適用する(ステップS127)。さらに、
Toffoli演算部344は、量子ビットQA,QBを制御ビットとし、量子ビットQUを目標ビットとしたToffoli演算を適用する(ステップS128)。
Next, the quantum computation control unit 60 determines whether or not the variable gc stored in the classical memory 30 is 2 (step S124). Here, if not gc = 2, the quantum computation control unit 60 stores gc-1 as a new gc in the classical memory 30 (step S125), and then returns the process to step S123. On the other hand, if gc = 2, the Toffoli calculation unit 344 applies the Toffoli calculation using the qubits QA 0 , QB 0 , and QB 1 as control bits and the qubit QU 1 as a target bit (step S126). Next, the control NOT calculation unit 341
A control NOT operation using the qubit QA 1 as a control bit and the qubit QB 1 as a target bit is applied (step S127). further,
The Toffoli calculation unit 344 applies the Toffoli calculation using the qubits QA 1 and QB 1 as control bits and the qubit QU 1 as a target bit (step S128).

次に、古典メモリ30から変数gcを読み込んだ量子計算制御部60の制御のもと、E演算部142が、量子ビットQUgc,QUgc−1,QAgc,QBgcに対し、E演算を適用する(ステップS129)。次に、量子計算制御部60が、古典メモリ30に格納された変数gcがj−1であるか否かを判断する(ステップS130)。ここで、gc=j−1でなければ、量子計算制御部60は、gc+1を新たなgcとして古典メモリ30に格納した後(ステップS131)、処理をステップS129に戻す。一方、gc=j−1であれば、HIGHBIT演算を終了させる。 Next, under the control of the quantum calculation control unit 60 that has read the variable gc from the classical memory 30, the E calculation unit 142 performs E calculation on the qubits QU gc , QU gc−1 , QA gc , and QB gc. Apply (step S129). Next, the quantum computation control unit 60 determines whether or not the variable gc stored in the classical memory 30 is j−1 (step S130). If not gc = j−1, the quantum computation control unit 60 stores gc + 1 as a new gc in the classical memory 30 (step S131), and then returns the process to step S129. On the other hand, if gc = j−1, the HIGHBIT operation is terminated.

〔ハードウェア構成〕
次に各実施の形態の量子計算装置1,200のハードウェア構成を例示する。
本形態の量子演算装置1は、量子コンピュータと古典コンユータとの組合せ、或いは量子コンピュータ単体で実現できる。量子コンピュータの実現する物理系としては、例えば、イオントラップを用いる方法(J. I. Cirac and P. Zoller, Quantum computations with cold trapped ions, Physical Review Letter 74;4091, 1995)、量子ビットとして光子の偏光や光路を用いる方法(Y. Nakamura, M. Kitagawa, K. Igeta, In 3-rd Proc. Asia-Pacific Phys. Comf., World Scientific, Singapore, 1988)、液体中の各スピンを用いる方法(Gershenfield, Chuang, Bulk spin resonance quantum computation, Science, 275;350, 1997)、シリコン結晶中の核スピンを用いる方法(B. E. Kane, A silicon-based nuclear spin quantum computer, Nature 393, 133, 1998)、量子ドット中の電子スピンを用いる方法(D. Loss and D. P. DiVincenzo, Quantum computation with quantum dots, Physical Review A 57, 120-126, 1998)、超伝導素子を用いる方法(Y. Nakamura, Yu. A. Pashkin and J. S. Tsai, Coherent control of macroscopic quantum states in a single-cooper pair box, Nature 393, 786-788, 1999)等を例示できる。また、それぞれの物理系に対する量子コンピュータの実現方法については、「http://www.ipa.go.jp/security/fy11/report/contents/crypto/crypto/report/QuantumComputers/contents/doc/qc_survey.pdf」や「M. A. Nielsen and I. L. Chuang, Quantum Computation and Quantum Information, Cambridge University Press, Chapter 7 Physical Realization」に詳しい。
[Hardware configuration]
Next, the hardware configuration of the quantum computing devices 1,200 according to each embodiment is illustrated.
The quantum arithmetic device 1 of this embodiment can be realized by a combination of a quantum computer and a classical computer, or a single quantum computer. As physical systems realized by quantum computers, for example, methods using ion traps (JI Cirac and P. Zoller, Quantum computations with cold trapped ions, Physical Review Letter 74; 4091, 1995), photon polarization and optical path as qubits, etc. (Y. Nakamura, M. Kitagawa, K. Igeta, In 3-rd Proc. Asia-Pacific Phys. Comf., World Scientific, Singapore, 1988), a method using each spin in a liquid (Gershenfield, Chuang , Bulk spin resonance quantum computation, Science, 275; 350, 1997), a method using nuclear spins in silicon crystals (BE Kane, A silicon-based nuclear spin quantum computer, Nature 393, 133, 1998), in quantum dots Method using electron spin (D. Loss and DP DiVincenzo, Quantum computation with quantum dots, Physical Review A 57, 120-126, 1998), method using superconducting element (Y. Nakamura, Yu. A. Pashkin and JS Tsai , Coherent control of macroscopic quantum states in a single-cooper pair box, Nature 393, 786-788, 1999). For details on how to implement quantum computers for each physical system, see `` http://www.ipa.go.jp/security/fy11/report/contents/crypto/crypto/report/QuantumComputers/contents/doc/qc_survey. pdf "and" MA Nielsen and IL Chuang, Quantum Computation and Quantum Information, Cambridge University Press, Chapter 7 Physical Realization ".

以下に、量子演算装置1を実現するための具体的なハードウェア構成を例示する。
<量子ビット>
イオントラップ量子コンピュータでは、例えば、イオンの基底状態と励起状態を利用して量子ビットを実現する。また、核スピンを量子ビットとして用いる場合には、例えば、「T. D. Ladd, et al., "All-Silicon quantum computer," Phys. Rev. Lett., vol. 89, no. 1, 017901-1‐017901-4, July 1, 2002.」に記載されているようにSi(111)基板等に各量子ビットを生成する。なお、量子ビットの初期量子状態は、例えば、他の演算の量子回路による操作によって得られたものを用いてもよいし、各量子ビットが生成された基板をmK(ミリケルビン)オーダー以下に冷却してスピンの向きを揃えた後、所定の電磁波パルスを印加して生成してもよい。また、量子ビットとして光子の偏光を用いる場合には、例えば、パラメトリックダウンコンバージョン(PDC:parametric down conversion)(例えば、「P. G. Kwiat, K. Mattle, H. Weinfurter, A. Zeilinger, A. V. Sergienko, and Y. Shih, “New high-intensity source of polarization-entangled photon pairs,” Phys. Rev. Lett. ,75:4337-4341, 1995.」「P. G. Kwiat, E. Waks, A. G. White, I. Appelbaum, and P. H. Eberhard, “Ultrabright source of polarization-entangled photons,” Phys. Rev. A, 60:R773-R776, 1999.」等参照。)により生成された複数個の単一光子を用いる。この場合、各量子ビットの初期量子状態は、例えば、他の演算の量子回路による操作によって得られたものを用いる。また、パラメトリックダウンコンバージョン等により生成された単一光子に、ビームスプリッタや偏光回転素子等によって実現されるウォルシューアダマール変換、CNOT、回転等の操作を行い、上述の初期量子状態を生成することとしてもよい。
Hereinafter, a specific hardware configuration for realizing the quantum arithmetic device 1 will be exemplified.
<Quantum bit>
In an ion trap quantum computer, for example, a quantum bit is realized by utilizing the ground state and excited state of ions. When nuclear spins are used as qubits, for example, “TD Ladd, et al.,“ All-Silicon quantum computer, ”Phys. Rev. Lett., Vol. 89, no. 1, 017901-1‐ [017901-4, July 1, 2002.], each qubit is generated on a Si (111) substrate or the like. The initial quantum state of the qubit may be, for example, one obtained by an operation by a quantum circuit for other operations, or the substrate on which each qubit is generated is cooled to the order of mK (millikelvin) or less. Then, after aligning the spin direction, a predetermined electromagnetic wave pulse may be applied and generated. When the polarization of a photon is used as a qubit, for example, parametric down conversion (PDC) (for example, “PG Kwiat, K. Mattle, H. Weinfurter, A. Zeilinger, AV Sergienko, and Y Shih, “New high-intensity source of polarization-entangled photon pairs,” Phys. Rev. Lett., 75: 4337-4341, 1995. “PG Kwiat, E. Waks, AG White, I. Appelbaum, and PH Eberhard, “Ultrabright source of polarization-entangled photons,” Phys. Rev. A, 60: R773-R776, 1999.) etc.). In this case, as the initial quantum state of each qubit, for example, the one obtained by an operation by a quantum circuit of another operation is used. In addition, the above-mentioned initial quantum state is generated by performing operations such as Walsh Hadamard transform, CNOT, and rotation realized by a beam splitter, a polarization rotation element, etc. on a single photon generated by parametric down conversion and the like. Also good.

その他、上記の文献に記載された方法で量子ビットを用意することとしてもよい。
また、演算前後や演算途中において量子ビットの量子状態を保存する必要がある場合には、例えば、量子ドット内の電子準位、核スピン、あるいは超伝導体内部の電荷(クーパー対)量を量子ビットとして用いてデータを保存する量子メモリ等を用いてもよい(A.Barenco, D.Deutsch, and A.Ekert, Phys. Rev. Lett.74,4083(1995)、松枝秀明 電子情報通信学会誌 A Vol.J81-A No.12(1998)1978、T.H.Oosterkamp et.al., Nature 395,873(1998)、D.Loss and D.P. DiVincenzo, Phys. Rev. A57(1998) 120. T.Oshima, quant-ph/0002004, http://arxiv.org/abs/quant-ph/0002004、B.E.Kane, A silicon-based nuclear spin quantum computer, Nature, 393, 133(1998)、
1127708374343_6
、Y.Nakamura, Yu. A. Pashkin and J.S.Tsai, Nature 398(1999)768)。
In addition, it is good also as preparing a quantum bit by the method described in said literature.
In addition, when it is necessary to preserve the quantum state of the qubit before and after the operation, for example, the amount of electrons in the quantum dot, the nuclear spin, or the charge (Cooper pair) in the superconductor is quantized. Quantum memories that store data using bits may be used (A. Barenco, D. Deutsch, and A. Ekert, Phys. Rev. Lett. 74, 4083 (1995), Hideaki Matsueda, Journal of the Institute of Electronics, Information and Communication Engineers) A Vol.J81-A No.12 (1998) 1978, THOosterkamp et.al., Nature 395,873 (1998), D. Loss and DP DiVincenzo, Phys. Rev. A57 (1998) 120. T. Oshima, quant-ph / 0002004, http://arxiv.org/abs/quant-ph/0002004, BEKane, A silicon-based nuclear spin quantum computer, Nature, 393, 133 (1998),
1127708374343_6
Y. Nakamura, Yu. A. Pashkin and JSTsai, Nature 398 (1999) 768).

<CNOT演算>
イオントラップ量子コンピュータでは、例えば、イオンを直線上に並べ、各イオンに狙いを定めたレーザービーム照射によってCNOT演算を実現する。また、量子ビットとして光子の偏光を用いる場合には、例えば、偏光ビームスプリッタ等を用い、「T.B. Pittman, M.J. Fitch, B.C. Jacobs, J.D. Franson: “Experimental Controlled-NOT Logic Gate for Single Photons in the Coincidence Basis,” quant-ph/0303095, http://arxiv.org/abs/quant-ph/0303095」記載のPittman et al. 方式によってCNOT演算を実現する。また、核スピンを量子ビットとして用いる場合には、例えば、所定の電磁波パルスを量子ビットに印加することによってCNOT演算を実現できる。
<CNOT operation>
In the ion trap quantum computer, for example, ions are arranged on a straight line, and CNOT calculation is realized by laser beam irradiation aiming at each ion. In addition, when using photon polarization as a qubit, for example, a polarization beam splitter or the like is used, and TB Pittman, MJ Fitch, BC Jacobs, JD Franson: “Experimental Controlled-NOT Logic Gate for Single Photons in the Coincidence Basis , “Quant-ph / 0303095, http://arxiv.org/abs/quant-ph/0303095”, the CNOT operation is realized by the Pittman et al. Method. When nuclear spin is used as a qubit, for example, a CNOT operation can be realized by applying a predetermined electromagnetic wave pulse to the qubit.

その他、上記の文献に記載された方法でCNOT演算を実現してもよい。
<量子ビット単体操作>
イオントラップ量子コンピュータでは、例えば、イオンを直線上に並べ、各イオンに狙いを定めたレーザービーム照射によって量子ビット単体の操作を実現する。核スピンを量子ビットとして用いる場合には、電磁波パルスやレーザービーム照射によって各処理を実現する。また、量子ビットとして光子の偏光を用いる場合には、例えば、偏光回転素子等によって実現する。
In addition, you may implement | achieve CNOT calculation by the method described in said literature.
<Single qubit operation>
In the ion trap quantum computer, for example, ions are arranged on a straight line, and the operation of a single qubit is realized by laser beam irradiation aimed at each ion. When nuclear spins are used as qubits, each processing is realized by electromagnetic pulse or laser beam irradiation. Moreover, when using the polarization of a photon as a qubit, it implement | achieves by a polarization rotation element etc., for example.

<量子計算制御部60・古典メモリ30>
量子計算制御部60は、例えば公知のコンピュータに所定のプログラムを実行させて実現してもよいし、上述の量子コンピュータによって実現してもよい。また、古典メモリ30は、DRAM、SRAM、フラッシュメモリ、NV(Nonvolatile)RAM等の読書き可能な半導体メモリである。また、古典メモリ30の代わりに上述の量子メモリを用いてもよい。
なお、本発明は上述の実施の形態に限定されるものではなく、その他、本発明の趣旨を逸脱しない範囲で適宜変更が可能であることはいうまでもない。また、上述の各種の処理は、記載に従って時系列に実行されるのみならず、処理を実行する装置の処理能力あるいは必要に応じて並列的にあるいは個別に実行されてもよい。
<Quantum calculation control unit 60 / classical memory 30>
The quantum calculation control unit 60 may be realized, for example, by causing a known computer to execute a predetermined program, or may be realized by the above-described quantum computer. The classical memory 30 is a readable / writable semiconductor memory such as DRAM, SRAM, flash memory, or NV (Nonvolatile) RAM. Further, the above-described quantum memory may be used instead of the classical memory 30.
Needless to say, the present invention is not limited to the above-described embodiment, and can be appropriately changed without departing from the spirit of the present invention. In addition, the various processes described above are not only executed in time series according to the description, but may be executed in parallel or individually according to the processing capability of the apparatus that executes the processes or as necessary.

本発明の利用分野としては、例えば、RSA等の因数分解の困難性に安全性の根拠をおく暗号方式の安全性評価装置等を例示できる。   As a field of use of the present invention, for example, an encryption-type safety evaluation apparatus and the like that bases safety on the difficulty of factorization such as RSA can be exemplified.

図1は、第1の実施の形態における量子計算装置の構成を例示したブロック図である。FIG. 1 is a block diagram illustrating the configuration of the quantum computing device according to the first embodiment. 図2(a)は、第1の実施の形態におけるCV演算部の詳細構成を例示した図である。図2(b)は、M MOD演算部の詳細構成を例示した図である。図2(c)は、ADD MOD演算部の詳細構成を例示した図である。FIG. 2A is a diagram illustrating a detailed configuration of the CV calculation unit according to the first embodiment. FIG. 2B is a diagram illustrating a detailed configuration of the M MOD calculation unit. FIG. 2C is a diagram illustrating a detailed configuration of the ADD MOD calculation unit. 図3(a)は、第1の実施の形態におけるCONPARISON演算部の詳細構成を例示した図である。図3(b)は、HIGHBIT演算部の詳細構成を例示した図である。FIG. 3A is a diagram illustrating a detailed configuration of the COMPARISON calculation unit according to the first embodiment. FIG. 3B is a diagram illustrating a detailed configuration of the HIGHBIT calculation unit. 図4は、第1の実施の形態の量子計算装置の処理の全体を説明するためのフローチャートである。FIG. 4 is a flowchart for explaining the entire processing of the quantum computing device according to the first embodiment. 図5は、CV(A)演算の詳細を説明するためのフローチャートである。FIG. 5 is a flowchart for explaining details of the CV (A) calculation. 図6は、このM(A)MOD(N)演算の詳細を説明するためのフローチャートである。FIG. 6 is a flowchart for explaining details of the M (A) MOD (N) calculation. 図7は、ADD(A)MOD(N)演算の詳細を説明するためのフローチャートである。FIG. 7 is a flowchart for explaining the details of the ADD (A) MOD (N) calculation. 図8は、COMPARISON(A)演算の詳細を説明するためのフローチャートである。FIG. 8 is a flowchart for explaining the details of the COMPARISON (A) operation. 図9は、HIGHBIT(A)演算の詳細を説明するためのフローチャートである。FIG. 9 is a flowchart for explaining the details of the HIGHBIT (A) calculation. 図10は、HIGHBIT(A)演算の詳細を説明するためのフローチャートである。FIG. 10 is a flowchart for explaining the details of the HIGHBIT (A) calculation. 図11は、第1の実施の形態の量子計算装置の処理の全体を例示した量子回路である。FIG. 11 is a quantum circuit illustrating the entire processing of the quantum computing device according to the first embodiment. 図12は、j=5の場合におけるCV(A)演算を例示した量子回路である。FIG. 12 is a quantum circuit illustrating CV (A) calculation when j = 5. 図13は、j=5の場合におけるM(A)MOD(N)演算を例示した量子回路である。FIG. 13 is a quantum circuit illustrating the M (A) MOD (N) operation when j = 5. 図14は、SWAP演算を示した量子回路である。FIG. 14 is a quantum circuit showing the SWAP operation. 図15は、j=5の場合におけるADD(A)MOD(N)演算を例示した量子回路である。FIG. 15 is a quantum circuit illustrating an ADD (A) MOD (N) operation when j = 5. 図16は、j=5の場合におけるCOMPARISON(A)演算を例示した量子回路である。FIG. 16 is a quantum circuit illustrating the COMPARISON (A) operation when j = 5. 図17は、j=5の場合のToffoli演算を示した量子回路である。FIG. 17 is a quantum circuit showing the Toffoli calculation when j = 5. 図18は、j=5の場合におけるHIGHBIT(A)演算を例示した量子回路である。FIG. 18 is a quantum circuit illustrating the HIGHBIT (A) operation when j = 5. 図19は、E(agc)演算を示した量子回路である。FIG. 19 is a quantum circuit showing the E (a gc ) operation. 図20は、F(agc)演算を示した量子回路である。FIG. 20 is a quantum circuit illustrating the F (a gc ) operation. 図21は、第2の実施の形態における量子計算装置の機能構成を例示したブロック図である。FIG. 21 is a block diagram illustrating a functional configuration of the quantum computing device according to the second embodiment. 図22(a)は、第2の実施の形態のCV演算部が有するCONPARISON演算部の詳細構成を例示した図である。図22(b)は、HIGHBIT演算部の詳細構成を例示した図である。FIG. 22A is a diagram illustrating a detailed configuration of a COMPARISON calculation unit included in the CV calculation unit according to the second embodiment. FIG. 22B is a diagram illustrating a detailed configuration of the HIGHBIT calculation unit. 図23は、第2の実施の形態のCONPARISON演算の詳細を説明するためのフローチャートである。FIG. 23 is a flowchart for explaining details of the COMPARISON calculation according to the second embodiment. 図24は、HIGHBIT演算の詳細を説明するためのフローチャートである。FIG. 24 is a flowchart for explaining the details of the HIGHBIT calculation. 図25は、HIGHBIT演算の詳細を説明するためのフローチャートである。FIG. 25 is a flowchart for explaining the details of the HIGHBIT calculation. 図26は、j=5の場合における、第2の実施の形態のCOMPARISON演算を例示した量子回路である。FIG. 26 is a quantum circuit illustrating the COMPARISON operation of the second embodiment when j = 5. 図27は、j=5の場合における、第2の実施の形態のHIGHBIT演算を例示した量子回路である。FIG. 27 is a quantum circuit illustrating the HIGHBIT operation of the second embodiment when j = 5. 図28は、E演算を示した量子回路である。FIG. 28 is a quantum circuit showing the E operation. 図29は、F演算を示した量子回路である。FIG. 29 is a quantum circuit showing the F operation. 図30は、Toffoli演算を示す量子回路である。FIG. 30 is a quantum circuit showing Toffoli calculation. 図31は、位数発見に有用な値を発見する量子回路の従来構成を示した図である。FIG. 31 is a diagram showing a conventional configuration of a quantum circuit that finds a value useful for order discovery. 図32(a)は、図31の演算子Hを示す量子回路であり、図32(b)は、図31の演算子Xを示す量子回路である。32A is a quantum circuit showing the operator H in FIG. 31, and FIG. 32B is a quantum circuit showing the operator X in FIG. 図33は、図31の演算子Rを示す量子回路である。FIG. 33 is a quantum circuit showing the operator R of FIG. 図34は、図31におけるCU(A)=CU(A・2)の演算の詳細を示した量子回路である。FIG. 34 is a quantum circuit showing details of the calculation of CU (A) = CU (A · 2 0 ) in FIG. 図35は、図34のCSWAP演算を示す量子回路である。FIG. 35 is a quantum circuit showing the CSWAP operation of FIG. 図36(a)は、NOT演算を示す量子回路であり、図36(b)は、制御NOT演算を示す量子回路である。FIG. 36A is a quantum circuit showing a NOT operation, and FIG. 36B is a quantum circuit showing a control NOT operation. 図37は、Toffoli演算を示す量子回路である。FIG. 37 is a quantum circuit showing Toffoli calculation. 図38は、図34におけるCMULT(A)MOD(N)の演算の詳細を示した量子回路である。FIG. 38 is a quantum circuit showing details of the operation of CMULT (A) MOD (N) in FIG. 図39は、図38におけるQFTの演算の詳細を示した量子回路である。FIG. 39 is a quantum circuit showing details of the QFT operation in FIG. 図40は、図39の演算子K∈{2,…,6}を示した量子回路である。FIG. 40 is a quantum circuit showing the operators K∈ {2,..., 6} in FIG. 図41は、図38におけるφADD(A)MOD(N)=φADD(2・A)MOD(N)の演算の詳細を示した量子回路である。Figure 41 is a quantum circuit showing details of the operation of FaiADD in FIG 38 (A) MOD (N) = φADD (2 0 · A) MOD (N). 図42は、図41におけるφADD(A)演算の詳細を示した量子回路である。FIG. 42 is a quantum circuit illustrating details of the φADD (A) operation in FIG. 図43は、図42における演算子σ(k∈{1,…,5})を示した量子回路である。FIG. 43 is a quantum circuit showing the operator σ k (k∈ {1,..., 5}) in FIG.

符号の説明Explanation of symbols

1,200 量子計算装置   1,200 quantum computing device

Claims (5)

2進数j桁のN=nj−1…nと、2進数j桁の j−1 、2進数j桁のB=b j−1 …b とから、F+B mod Nを算出する量子計算方法であって、
(a)メモリに上記Nととを格納するステップと、
(b)減算部が、上記メモリから読み込んだNととからN−を算出するステップと、
(c)第1COMPARISON演算部が、上記減算部算出たN−を用い、前記B=bj−1…bの各桁をそれぞれ示す量子状態の量子ビットQBj−1, … ,QBと、任意の量子状態の量子ビットQUj−1,… QU,QZと、に対し、前記N−FとBとを比較する第1量子操作を行い、N−>Bの場合にのみ量子ビットQZの量子状態を反転させるステップと、
(d)QFT演算部が、前記第1COMPARISON演算部が演算した結果の量子ビットQB j−1 ,…,QB にQFT(量子フーリエ変換)演算を適用するステップと、
(e)φADD演算部が、前記第1COMPARISON演算部が演算した結果の量子ビットQZが1を示す量子状態のときのみ、前記QFT演算部が演算した結果の前記量子ビットQB j−1 ,…,QB のうち1を示す量子状態の量子ビットQB (0≦k≦j−1)に対し、
Figure 0004366348
(ただし、量子ビットQB の量子状態を|QB 〉とし、eをネピア数とし、iを虚数単位とする)の演算を施すステップと、
(f)第1NOT演算部が、前記第1COMPARISON演算部が演算した結果の量子ビットQZにNOT演算を施すステップと、
(g)φADD −1 演算部が、前記第1NOT演算部が演算した結果の量子ビットQZが1を示す量子状態のときのみ、前記φADD演算部が演算した結果の量子ビットQB j−1 ,…,QB のうち1を示す量子状態の量子ビットQB (0≦k≦j−1)に対し、
Figure 0004366348
(ただし、N−F=(n−f) j−1 …(n−f) とする)の演算を施すステップと、
(h)第2NOT演算部が、前記第1NOT演算部が演算した結果の量子ビットQZにNOT演算を施すステップと、
(i)QFT −1 演算部が、前記φADD −1 演算部が演算した結果の量子ビットQB j−1 ,…,QB にQFT演算の逆演算を適用するステップと、
(j)第2COMPARISON演算部が、前記FとBと用い、前記QFT −1 演算部が演算した結果の量子ビットQB j−1 ,… ,QB と、前記第1COMPARISON演算部が演算した結果の量子ビットQU j−1 ,…,QU と前記第2NOT演算部が演算した結果の量子ビットQZと、に対し、前記FとBとを比較する第1量子操作を行い、F>Bの場合にのみ前記第2NOT演算部が演算した結果の量子ビットQZの量子状態を反転させる量子操作を行うステップと、を実行し、
前記第2COMPARISON演算部が演算した結果の量子ビットQB ・・・QB j−1 を前記F+B mod Nの各桁に対応する量子状態を表す量子ビットとして出力することを特徴とする量子計算方法。
From binary j digits N = n j−1 ... N 0 , binary j digits F = f j−1 ... F 0 and binary j digits B = b j−1 ... B 0 , F + B A quantum calculation method for calculating mod N ,
(A) storing the N and F in a memory;
(B) subtracting unit, calculating a N-F from the read N and the F from the memory,
(C) a 1 COMPARISON calculation unit, using the N-F of the subtraction unit is calculated, the B = b j-1 ... b qubit QB j-1 of the quantum states respectively each digit of 0, ... , and QB 0, qubits QU j-1 of any quantum state, and ... QU 1, QZ, against two, performs a first quantum operation for comparing the N-F and B, N-F> B Inverting the quantum state of the qubit QZ only in the case of
(D) a QFT operation unit applying a QFT (quantum Fourier transform) operation to the qubits QB j−1 ,..., QB 0 as a result of the operation of the first COMPARISON operation unit ;
(E) The quantum bit QB j−1 ,..., The result of the calculation by the QFT calculation unit only when the φADD calculation unit is in a quantum state in which the quantum bit QZ as a result of calculation by the first COMPARISON calculation unit is 1 . For quantum bits QB k (0 ≦ k ≦ j−1) in the quantum state indicating 1 out of QB 0 ,
Figure 0004366348
( Wherein the quantum state of the qubit QB k is | QB k >, e is a Napier number, and i is an imaginary unit);
(F) a first NOT operation unit performing a NOT operation on the qubit QZ resulting from the operation of the first COMPARISON operation unit;
(G) The quantum bit QB j−1 , the result of calculation by the φADD calculation unit only when the φADD −1 calculation unit is in a quantum state in which the qubit QZ as a result of calculation by the first NOT calculation unit is 1 . , QB 0 for quantum bits QB k (0 ≦ k ≦ j−1) in the quantum state indicating 1
Figure 0004366348
(Where N−F = (n−f) j−1 ... (N−f) 0 ),
(H) a second NOT operation unit performing a NOT operation on the qubit QZ as a result of the operation of the first NOT operation unit;
(I) a step in which a QFT −1 operation unit applies a reverse operation of the QFT operation to the qubits QB j−1 ,..., QB 0 resulting from the operation of the φADD −1 operation unit ;
(J) The second COMPARISON calculation unit uses the F and B, and the quantum bits QB j−1 ,..., QB 0 calculated by the QFT- 1 calculation unit and the result calculated by the first COMPARISON calculation unit When the quantum bit QU j−1 ,..., QU 1 and the qubit QZ calculated by the second NOT operation unit are subjected to the first quantum operation for comparing F and B, and F> B Performing a quantum operation that inverts the quantum state of the qubit QZ as a result of the calculation by the second NOT operation unit only,
A quantum calculation method characterized in that qubits QB 0 ... QB j−1 as a result of calculation by the second COMPARISON calculation unit are output as qubits representing quantum states corresponding to the respective digits of F + B mod N.
請求項1に記載のF+B mod Nを算出する量子計算方法を用いて、前記2進数j桁のN=n j−1 …n と、前記Nよりも小さい2進数j桁のA=a j−1 …a とから、A =1 mod Nを満たす最小のRの算出に有用な値C=c 2j−1 ・・・c を計算する量子計算方法であって、
初期量子状態生成部が、0と1と2j個の0とをそれぞれ示す量子ビットQD ,QD ,QU ,・・・QU j−1 ,QB ,・・・,QB j−1 ,QZを生成するステップと、
(A)H演算部が、量子ビットQD にアダマール演算を適用するステップと、
(B)第1乗算部が、前記Aと変数gaとからA・2 2j−ga−1 を算出するステップと、
(C)第1M MOD演算部が、量子ビットQD とQD とが1を示す量子状態のときのみ、量子ビットQU ,・・・QU j−1 ,QB ,・・・,QB j−1 ,QZとに対し、前記第1乗算部が算出したA・2 2j−ga−1 から計算した2 ・A・2 2j−ga−1 を前記Fとして請求項1に記載のステップ(a)〜(j)を実行し、その結果の量子ビットQD とQD を制御ビットとしQZを標的ビットとするToffoli演算を適用し、さらに、変数gb=1からj−1まで、量子ビットQD とU gb にSWAP演算を適用し、前記変数gbと前記第1乗算部が算出したA・2 2j−ga−1 とから計算した2 gb ・A・2 2j−ga−1 を前記Fとして請求項1に記載のステップ(a)〜(j)を適用し、その結果の量子ビットQD とQU gb にSWAP演算を適用する演算を繰り返すステップと、
(D)CSWAP演算部が、量子ビットQD ,QD ,QU ,・・・QU j−1 ,QB ,・・・,QB j−1 に対し、QD をQU として、k=0からj−1について、QB を制御ビットとしQU を目標ビットとした制御NOT演算を適用し、QD とQU を制御ビットとしQB を目標ビットとしたToffoli演算を適用し、QB を制御ビットとしQU を目標ビットとした制御NOT演算を適用するステップと、
(E)第2乗算部が、前記第1乗算部で算出したA・2 2j−ga−1 から(A・2 2j−ga−1 −1 を算出するステップと、
(F)第2M MOD演算部が、量子ビットQD とQD とが1を示す量子状態のときのみ、量子ビットQU ,・・・QU j−1 ,QB ,・・・,QB j−1 ,QZとに対し、前記第2乗算部が算出した(A・2 2j−ga−1 −1 から計算した2 ・(A・2 2j−ga−1 −1 を前記Fとして請求項1に記載の(a)〜(j)を適用し、その結果の量子ビットQD とQD を制御ビットとしQZを標的ビットとするToffoli演算を適用し、さらに、その結果の量子ビットに対して、変数gb=0からj−1まで、量子ビットQD とU gb にSWAP演算を適用し、前記変数gbと前記第2乗算部が算出した(A・2 2j−ga−1 −1 とから計算した2 gb ・(A・2 2j−ga−1 −1 を前記Fとして請求項1に記載のステップ(a)〜(j)を適用し、その結果の量子ビットQD とQU gb にSWAP演算を適用する演算を繰り返すステップと、
(G)観測部が、量子ビットQD の量子状態を観測し、その結果を前記c ga として前記メモリに格納するステップと、
(H)X ck 演算部が、前記観測部で観測した結果c ga が1のときのみ、量子ビットQD の量子状態を反転させるステップと、
(I)R 演算部が、量子ビットQD が1を示す量子状態のときのみ、QD
Figure 0004366348
(ただし、量子ビットQD の量子状態を|QD >とする)の演算を施すステップと、
量子計算制御部が、変数gaに0を代入して上記ステップ(A)〜(F)を順に実行させ、その結果の量子ビットに対して上記ステップ(A)を実行させ、更に、上記ステップ(G)を実行させ、その結果の量子ビットに対して、変数ga=1からga=2j−1まで順番にgaを1ずつ増やしながら上記ステップ(H),(A)〜(F),(I),(G)を順に実行させ、前記観測部が観測したc ga (ga=0,・・・,2j−1)を前記A =1 mod Nを満たす最小のRの算出に有用な値Cの各桁として出力することを特徴とする量子計算方法。
The quantum calculation method for calculating F + B mod N according to claim 1, wherein the binary j digits N = n j−1 ... N 0 and the binary j digits smaller than N A = a j -1 ... from a 0 Prefecture, a quantum computation method for calculating the minimum value C = c 2j-1 ··· c 0 useful for the calculation of R that satisfies a R = 1 mod N,
Initial quantum state generator is 0 the qubit QD 1 showing 1 and 2j zeros and respectively, QD 2, QU 1, ··· QU j-1, QB 0, ···, QB j-1, Generating QZ; and
(A) a step of applying an Hadamard operation to the qubit QD 1 by the H operation unit ;
(B) a first multiplying unit calculating A · 2 2j−ga−1 from the A and the variable ga ;
(C) The qubits QU 1 ,..., QU j−1 , QB 0 ,..., QB j only when the first M MOD calculation unit is in a quantum state where the qubits QD 1 and QD 2 indicate 1 . The step according to claim 1 , wherein 2 0 · A · 2 2j-ga-1 calculated from A · 2 2j-ga-1 calculated by the first multiplication unit is set as F for −1 and QZ. a) to (j) are executed, and the toffoli operation is applied using the resulting qubits QD 1 and QD 2 as control bits and QZ as the target bit, and further, the variable gb = 1 to j−1 SWAP operation is applied to QD 2 and U gb , and 2 gb · A · 2 2j-ga-1 calculated from the variable gb and A · 2 2j-ga-1 calculated by the first multiplication unit is changed to F Applying steps (a) to (j) according to claim 1 as And repeating an operation of applying a SWAP operation on qubits QD 2 and QU gb results,
(D) For the qubits QD 1 , QD 2 , QU 1 ,..., QU j−1 , QB 0 ,..., QB j−1 , QD 2 is set to QU 0 and k = For 0 to j−1, a control NOT operation with QB k as the control bit and QU k as the target bit is applied, a Toffoli operation with QD 1 and QU k as the control bits and QB k as the target bit is applied, and QB applying a control NOT operation with k as the control bit and QU k as the target bit;
(E) a step in which the second multiplier unit calculates the (A · 2 2j-ga- 1) -1 from A · 2 2j-ga-1 calculated by the first multiplication section,
(F) The qubits QU 1 ,..., QU j−1 , QB 0 ,..., QB j only when the second M MOD calculation unit is in a quantum state where the qubits QD 1 and QD 2 indicate 1 . −1 , QZ, and 2 0 · (A · 2 2j−ga−1 ) −1 calculated from (A · 2 2j−ga−1 ) −1 calculated by the second multiplication unit as F applying the (a) ~ (j) according to claim 1, the QZ a result qubits QD 1 and QD 2 and the control bits applied to Toffoli operation that targets bit further, qubits result For the variable gb = 0 to j−1 , the SWAP operation is applied to the qubits QD 2 and U gb , and the variable gb and the second multiplication unit calculate (A · 2 2j−ga−1 ). was calculated from the Metropolitan -1 2 gb · (a · 2 2j-ga-1) -1 And repeating an operation of applying the serial steps of claim 1 as F (a) ~ (j) , applying a SWAP operation on the result of the qubit QD 2 and QU gb,
(G) an observing unit observing the quantum state of the qubit QD 1 and storing the result in the memory as the cga ;
(H) X ck calculation unit, the result of observation by the observation unit c ga only when the 1, comprising the steps of reversing the quantum state of qubit QD 1,
(I) R k calculation unit, only when the quantum state quantum bits QD 1 indicates 1, the QD 1
Figure 0004366348
(However, the quantum state of qubit QD 1 is set to | QD 1 >);
The quantum computation control unit assigns 0 to the variable ga, causes the above steps (A) to (F) to be executed in order, executes the above step (A) for the resulting quantum bits, G) is executed, and the above steps (H), (A) to (F), (I) are performed while increasing ga one by one from the variable ga = 1 to ga = 2j−1 for the resulting qubit. ), (G) are sequentially executed, and c ga (ga = 0,..., 2j−1) observed by the observation unit is a value useful for calculating the minimum R satisfying A R = 1 mod N A quantum calculation method characterized by outputting each digit of C.
請求項1又は2に記載の量子計算方法であって、
上記第1COMPARISON演算部が行う上記第1量子操作は、
HIGHBIT演算部が、量子ビットQBj−1,…,QBと、量子ビットQUj−1,…,QUと、量子ビットQZと対して第2量子操作を行い、量子ビットQZを、z(+)β〔βはN−F+Bの最上位桁、(+)は排他的論理和〕を示す量子状態とし、他の量子ビットQBj−1,…,QB、QUj−1,…,QUの量子状態を当該第2量子操作前の量子状態とするステップと、
NOT演算部が、量子ビットQZにNOT演算を施すステップと、
古典情報によって制御される第4NOT演算部が、上記メモリから読み込まれた古典情報である−Fの桁(n−f(h∈{j−1,…,0})の値が1となるhに対応する量子ビットQBのみにNOT演算を施すステップと、
NOT演算部が、各量子ビットQBj−1,…,QBにNOT演算を施すステップと、
第2Toffoli演算部が、各量子ビットQBj−1,…,QBを制御ビットとし、量子ビットQZを目標ビットとしたToffoli演算を施すステップと、
NOT演算部が、各量子ビットQBj−1,…,QBにNOT演算を施すステップと、
古典情報によって制御される第7NOT演算部が、上記メモリから読み込まれた古典情報である−Fの桁(n−f の値が1となるhに対応する量子ビットQBのみにNOT演算を施すステップと、
を有することを特徴とする量子計算方法。
The quantum calculation method according to claim 1 or 2,
The first quantum operation performed by the first COMPARISON calculation unit is:
HIGHBIT calculation unit, qubits QB j-1, ..., and QB 0, qubits QU j-1, ..., and QU 1, performs a second Quantum for the qubit QZ, a qubit QZ, z (+) Β [β is the most significant digit of N −F + B, (+) is exclusive OR], and other quantum bits QB j−1 ,..., QB 0 , QU j−1 , ..., setting the quantum state of QU 1 to the quantum state before the second quantum operation;
A third NOT operation unit performing a NOT operation on the qubit QZ;
The 4 NOT operation unit which is controlled by classical information, digit N -F classical information read from the memory (n -f) h (h∈ { j-1, ..., 0}) is the value of Performing a NOT operation only on the qubit QB h corresponding to h which becomes 1,
A fifth NOT operation unit performing a NOT operation on each qubit QB j−1 ,..., QB 0 ;
A second Toffoli operation unit performs a Toffoli operation with each qubit QB j−1 ,..., QB 0 as a control bit and a qubit QZ as a target bit;
A sixth NOT operation unit performs a NOT operation on each qubit QB j−1 ,..., QB 0 ;
The 7 NOT operation unit which is controlled by classical information, only the qubits QB h to the value of the digit (n -f) h of N -F classical information read from the memory corresponds to h which becomes 1 Performing a NOT operation;
A quantum computation method characterized by comprising:
2進数j桁のN=nj−1…nと、2進数j桁の j−1 、2進数j桁のB=b j−1 …b とから、F+B mod Nを算出する量子計算装置であって、
上記Nととを格納するメモリと、
上記メモリから読み込んだNととからN−を算出する減算部と、
上記減算部算出たN−を用い、前記B=bj−1…bの各桁をそれぞれ示す量子状態の量子ビットQBj−1, … ,QBと、任意の量子状態の量子ビットQUj−1,… QU,QZと、に対し、前記N−FとBとを比較する第1量子操作を行い、N−>Bの場合にのみ量子ビットQZの量子状態を反転させる第1COMPARISON演算部と、
前記第1COMPARISON演算部が演算した結果の量子ビットQB j−1 ,…,QB にQFT(量子フーリエ変換)演算を適用するQFT演算部と、
前記第1COMPARISON演算部が演算した結果の量子ビットQZが1を示す量子状態のときのみ、前記QFT演算部が演算した結果の前記量子ビットQB j−1 ,…,QB のうち1を示す量子状態の量子ビットQB (0≦k≦j−1)に対し、
Figure 0004366348
(ただし、量子ビットQB の量子状態を|QB 〉とし、eをネピア数とし、iを虚数単位とする)の演算を施すφADD演算部と、
前記第1COMPARISON演算部が演算した結果の量子ビットQZにNOT演算を施す第1NOT演算部と、
前記第1NOT演算部が演算した結果の量子ビットQZが1を示す量子状態のときのみ、前記φADD演算部が演算した結果の量子ビットQB j−1 ,…,QB のうち1を示す量子状態の量子ビットQB (0≦k≦j−1)に対し、
Figure 0004366348
(ただし、N−F=(n−f) j−1 …(n−f) とする)の演算を施すφADD −1 演算部と、
前記第1NOT演算部が演算した結果の量子ビットQZにNOT演算を施す第2NOT演算部と、
前記φADD −1 演算部が演算した結果の量子ビットQB j−1 ,…,QB にQFT演算の逆演算を適用するQFT −1 演算部と、
前記FとBと用い、前記QFT −1 演算部が演算した結果の量子ビットQB j−1 ,… ,QB と、前記第1COMPARISON演算部が演算した結果の量子ビットQU j−1 ,…,QU と前記第2NOT演算部が演算した結果の量子ビットQZと、に対し、前記FとBとを比較する第1量子操作を行い、F>Bの場合にのみ前記第2NOT演算部が演算した結果の量子ビットQZの量子状態を反転させる量子操作を行う第2COMPARISON演算部と、を有し、
前記第2COMPARISON演算部が演算した結果の量子ビットQB ・・・QB j−1 を前記F+B mod Nの各桁に対応する量子状態を表す量子ビットとして出力することを特徴とする量子計算装置。
From binary j digits N = n j−1 ... N 0 , binary j digits F = f j−1 ... F 0, and binary j digits B = b j−1 ... B 0 , F + B a quantum computing device for calculating mod N ,
A memory for storing N and F ;
A subtracting section for calculating a N-F from the read N and the F from the memory,
Using N-F of the subtraction unit is calculated, the B = b j-1 ... b qubit QB j-1 of the quantum states respectively each digit of 0, ..., and QB 0, any quantum state qubit QU j-1, ... and QU 1, QZ, against two, performs a first quantum operation for comparing the N-F and B, N-F> quantum state of qubit QZ only if B A first COMPARISON calculation unit for inverting
A QFT operation unit that applies a QFT (quantum Fourier transform) operation to the qubits QB j−1 ,..., QB 0 as a result of the operation of the first COMPARISON operation unit ;
The qubit QB j-1 of the results qubit QZ results claim 1COMPARISON calculation unit is calculated only when the quantum state indicating 1, the QFT calculation unit is calculated, ..., quantum showing one of the QB 0 For state qubits QB k (0 ≦ k ≦ j−1),
Figure 0004366348
A φADD operation unit that performs an operation of ( where the quantum state of the qubit QB k is | QB k >, e is a Napier number, and i is an imaginary unit);
A first NOT operation unit that performs a NOT operation on the qubit QZ obtained as a result of the operation of the first COMPARISON operation unit;
Quantum state indicating 1 out of quantum bits QB j−1 ,..., QB 0 calculated by the φADD calculation unit only when the quantum bit QZ calculated by the first NOT calculation unit is 1 For qubits QB k (0 ≦ k ≦ j−1) of
Figure 0004366348
A φADD −1 operation unit that performs an operation of (where N−F = (n−f) j−1 ... (N−f) 0 ) ;
A second NOT operation unit that performs a NOT operation on the qubit QZ resulting from the operation of the first NOT operation unit;
A QFT −1 operation unit that applies a reverse operation of the QFT operation to the qubits QB j−1 ,..., QB 0 obtained by the φADD −1 operation unit ;
The use as F and B, the QFT -1 result calculating unit is calculated qubit QB j-1, ..., QB 0 and, as a result of the first 1COMPARISON calculation unit has calculated qubit QU j-1, ..., A first quantum operation for comparing F and B is performed on QU 1 and a qubit QZ obtained as a result of calculation by the second NOT calculation unit, and the second NOT calculation unit calculates only when F> B. A second COMPARISON operation unit that performs a quantum operation to invert the quantum state of the resulting qubit QZ,
A quantum computation device that outputs qubits QB 0 ... QB j−1 as a result of computation by the second COMPARISON computation unit as qubits representing a quantum state corresponding to each digit of F + B mod N.
請求項1に記載のF+B mod Nを算出する量子計算方法を用いて、前記2進数j桁のN=n j−1 …n と、前記Nよりも小さい2進数j桁のA=a j−1 …a とから、A =1 mod Nを満たす最小のRの算出に有用な値C=c 2j−1 ・・・c を計算する量子計算装置であって、
0と1と2j個の0とをそれぞれ示す量子ビットQD ,QD ,QU ,・・・QU j−1 ,QB ,・・・,QB j−1 ,QZを生成する初期量子状態生成部と、
量子ビットQD にアダマール演算を適用するH演算部と、
前記Aと変数gaとからA・2 2j−ga−1 を算出する第1乗算部と、
量子ビットQD とQD とが1を示す量子状態のときのみ、量子ビットQU ,・・・QU j−1 ,QB ,・・・,QB j−1 ,QZとに対し、前記第1乗算部が算出したA・2 2j−ga−1 から計算した ・A・2 2j−ga−1 を前記Fとして請求項1に記載のステップ(a)〜(j)を実行し、その結果の量子ビットQD とQD を制御ビットとしQZを標的ビットとするToffoli演算を適用し、さらに、変数gb=1からj−1まで、量子ビットQD とU gb にSWAP演算を適用し、前記変数gbと前記第1乗算部が算出したA・2 2j−ga−1 とから計算した2 gb ・A・2 2j−ga−1 を前記Fとして請求項1に記載のステップ(a)〜(j)を適用し、その結果の量子ビットQD とQU gb にSWAP演算を適用する演算を繰り返す第1M MOD演算部と、
量子ビットQD ,QD ,QU ,・・・QU j−1 ,QB ,・・・,QB j−1 に対し、QD をQU として、k=0からj−1について、QB を制御ビットとしQU を目標ビットとした制御NOT演算を適用し、QD とQU を制御ビットとしQB を目標ビットとしたToffoli演算を適用し、QB を制御ビットとしQU を目標ビットとした制御NOT演算を適用するCSWAP演算部と、
前記第1乗算部で算出したA・2 2j−ga−1 から(A・2 2j−ga−1 −1 を算出する第2乗算部と、
量子ビットQD とQD とが1を示す量子状態のときのみ、量子ビットQU ,・・・QU j−1 ,QB ,・・・,QB j−1 ,QZとに対し、前記第2乗算部が算出した(A・2 2j−ga−1 −1 から計算した2 ・(A・2 2j−ga−1 −1 を前記Fとして請求項1に記載の(a)〜(j)を適用し、その結果の量子ビットQD とQD を制御ビットとしQZを標的ビットとするToffoli演算を適用し、さらに、その結果の量子ビットに対して、変数gb=0からj−1まで、量子ビットQD とU gb にSWAP演算を適用し、前記変数gbと前記第2乗算部が算出した(A・2 2j−ga−1 −1 とから計算した2 gb ・(A・2 2j−ga−1 −1 を前記Fとして請求項1に記載のステップ(a)〜(j)を適用し、その結果の量子ビットQD とQU gb にSWAP演算を適用する演算を繰り返す第2M MOD演算部と、
量子ビットQD の量子状態を観測し、その結果を前記c ga として前記メモリに格納する観測部と、
前記観測部で観測した結果c ga が1のときのみ、量子ビットQD の量子状態を反転させるX ck 演算部と、
量子ビットQD が1を示す量子状態のときのみ、QD
Figure 0004366348
(ただし、量子ビットQD の量子状態を|QD >とする)の演算を施すR 演算部と、
変数gaに0を代入し、上記H演算部の処理(A)、上記第1乗算部の処理(B)、上記第1M MOD演算部の処理(C)、上記CSWAP演算部の処理(D)、上記第2乗算部の処理(E)、及び上記第2M MOD演算部の処理(F)を順に実行させ、その結果の量子ビットに対して上記処理(A)を実行させ、更に、上記観測部の処理(G)を実行させ、その結果の量子ビットに対して、変数ga=1からga=2j−1まで順番にgaを1ずつ増やしながら上記X ck 演算部の処理(H)、上記処理(A)〜(F),上記R 演算部の処理(I),上記処理(G)を順に実行させ、前記観測部が観測したc ga (ga=0,・・・,2j−1)を前記A =1 mod Nを満たす最小のRの算出に有用な値Cの各桁として出力させる量子計算制御部と、
を有することを特徴とする量子計算装置。
The quantum calculation method for calculating F + B mod N according to claim 1, wherein the binary j digits N = n j−1 ... N 0 and the binary j digits smaller than N A = a j -1 ... from a 0 Prefecture, a quantum computing device for calculating the minimum value C = c 2j-1 ··· c 0 useful for the calculation of R that satisfies a R = 1 mod N,
Initial quantum states for generating qubits QD 1 , QD 2 , QU 1 ,..., QU j−1 , QB 0 ,..., QB j−1 , QZ respectively indicating 0, 1 and 2j 0 A generator,
An H operation unit that applies a Hadamard operation to the qubit QD 1 ;
A first multiplier for calculating A · 2 2j−ga−1 from A and the variable ga ;
Only when the qubit QD 1 and QD 2 is a quantum state indicating 1, qubit QU 1, ··· QU j-1 , QB 0, ···, to the QB j-1, QZ, wherein the 1 perform step (a) ~ (j) according to 2 0 · a · 2 2j- ga-1 calculated from the multiplying unit a · 2 2j-ga-1 was calculated to claim 1 as the F, Apply the Toffoli operation with the resulting qubits QD 1 and QD 2 as control bits and QZ as the target bit, and apply the SWAP operation to qubits QD 2 and U gb from variable gb = 1 to j−1 The step (a) according to claim 1 , wherein 2 gb · A · 2 2j-ga-1 calculated from the variable gb and A · 2 2j-ga-1 calculated by the first multiplication unit is defined as F. ) was applied - the (j), the qubit QD 2 resulting A first 1M MOD calculator repeats operation to apply the SWAP operation on U gb,
For the qubits QD 1 , QD 2 , QU 1 ,..., QU j−1 , QB 0 ,..., QB j−1 , QD 2 is QU 0 and k = 0 to j−1 the QU k and the control bits k by applying a control NOT operation with the goal bits, by applying the Toffoli operation with the goal bits QB k as a control bit QD 1 and QU k, the QU k as a control bit QB k A CSWAP calculation unit that applies a control NOT calculation as a target bit;
A second multiplying unit for calculating a (A · 2 2j-ga- 1) -1 from A · 2 2j-ga-1 calculated by the first multiplication section,
Only when the qubit QD 1 and QD 2 is a quantum state indicating 1, qubit QU 1, ··· QU j-1 , QB 0, ···, to the QB j-1, QZ, wherein the 2. (a) to (a) to (1) according to claim 1 , wherein 2 0 · (A · 2 2j−ga−1 ) −1 calculated from (A · 2 2j−ga−1 ) −1 calculated by the 2 multiplication unit is defined as F. (J) is applied, and the Toffoli operation with the resulting qubits QD 1 and QD 2 as control bits and QZ as the target bit is applied, and the variable gb = 0 to j Up to −1 , the SWAP operation is applied to the qubits QD 2 and U gb , and 2 gb · ( 2 ) calculated from the variable gb and (A · 2 2j−ga−1 ) −1 calculated by the second multiplication unit. scan of claim 1 a · 2 2j-ga-1 ) -1 as the F A second M MOD operation unit that applies the steps (a) to (j) and repeats the operation of applying the SWAP operation to the resulting qubits QD 2 and QU gb ;
An observation unit that observes the quantum state of the qubit QD 1 and stores the result in the memory as the cga ;
An X ck operation unit that inverts the quantum state of the qubit QD 1 only when the result cga observed by the observation unit is 1 ,
Only when qubit QD 1 is a quantum state indicating 1, the QD 1
Figure 0004366348
An R k operation unit that performs an operation of ( where the quantum state of the qubit QD 1 is | QD 1 >) ;
Substituting 0 into the variable ga, the processing of the H calculation unit (A), the processing of the first multiplication unit (B), the processing of the first M MOD calculation unit (C), the processing of the CSWAP calculation unit (D) , The processing of the second multiplication unit (E) and the processing of the second M MOD calculation unit (F) are sequentially executed, the processing (A) is performed on the resultant qubit, and the observation Process (G), and the X ck calculation process (H) described above while incrementing ga by 1 sequentially from variable ga = 1 to ga = 2j−1 for the resulting qubit C ga (ga = 0,..., 2j−1 ) observed by the observation unit by sequentially executing the processes (A) to (F), the process (I) of the R k calculation unit, and the process (G). ) As each digit of the value C useful for calculating the minimum R satisfying A R = 1 mod N A quantum computation control unit,
A quantum computing device comprising:
JP2005278052A 2005-09-26 2005-09-26 Quantum calculation method and quantum calculation device Expired - Lifetime JP4366348B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005278052A JP4366348B2 (en) 2005-09-26 2005-09-26 Quantum calculation method and quantum calculation device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005278052A JP4366348B2 (en) 2005-09-26 2005-09-26 Quantum calculation method and quantum calculation device

Publications (2)

Publication Number Publication Date
JP2007087307A JP2007087307A (en) 2007-04-05
JP4366348B2 true JP4366348B2 (en) 2009-11-18

Family

ID=37974205

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005278052A Expired - Lifetime JP4366348B2 (en) 2005-09-26 2005-09-26 Quantum calculation method and quantum calculation device

Country Status (1)

Country Link
JP (1) JP4366348B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8957699B2 (en) * 2012-10-26 2015-02-17 Northrop Grumman Systems Corporation Efficient Toffoli state generation from low-fidelity single qubit magic states

Also Published As

Publication number Publication date
JP2007087307A (en) 2007-04-05

Similar Documents

Publication Publication Date Title
Wang et al. Qudits and high-dimensional quantum computing
Bhatia et al. An efficient quantum computing technique for cracking RSA using Shor’s algorithm
Shen et al. Scalable implementation of boson sampling with trapped ions
JP4847914B2 (en) Quantum addition operation method and quantum addition operation device
Hey Quantum computing: an introduction
US20050133780A1 (en) Quantum-state-generating apparatus, Bell measurement apparatus, quantum gate apparatus, and method for evaluating fidelity of quantum gate
WO2007006144A1 (en) Systems, methods and apparatus for factoring numbers
Herrman et al. Continuous-time quantum walks on dynamic graphs
JP5227942B2 (en) Quantum error estimation device, quantum error estimation method, program thereof, quantum error correction device, quantum error correction method
JP5351862B2 (en) Quantum operation method and quantum operation device
JP5204698B2 (en) Quantum operation method, quantum operation device, quantum circuit
JP4700413B2 (en) Quantum operation apparatus and quantum operation method using quantum circuit
Kim et al. Distributed variational quantum algorithm with many-qubit for optimization challenges
JP5129646B2 (en) Quantum circuit, quantum operation device, and quantum operation method
Hughes Cryptography, quantum computation and trapped ions
Hughes Quantum computation
Niemann et al. Synthesis of quantum circuits for dedicated physical machine descriptions
JP4366348B2 (en) Quantum calculation method and quantum calculation device
JP4332167B2 (en) Quantum circuit for performing approximate quantum Fourier transform, approximate quantum Fourier transform calculation method and apparatus
JP6182123B2 (en) Quantum calculation method
Kenarangui et al. " Quantum supremacy" challenged. Instantaneous noise-based logic with benchmark demonstrations
Iftemi et al. Quantum computing applications and impact for cyber physical systems
JP4829623B2 (en) Quantum operation method and quantum operation device
Freegarde et al. Algorithmic cooling in a momentum state quantum computer
Anand How quantum computing powers the future of artificial intelligence

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070810

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090414

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090612

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20090811

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090824

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120828

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4366348

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130828

Year of fee payment: 4

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

EXPY Cancellation because of completion of term