JP2006331249A - Quantum program conversion apparatus, its method and program, and recording medium - Google Patents

Quantum program conversion apparatus, its method and program, and recording medium Download PDF

Info

Publication number
JP2006331249A
JP2006331249A JP2005156722A JP2005156722A JP2006331249A JP 2006331249 A JP2006331249 A JP 2006331249A JP 2005156722 A JP2005156722 A JP 2005156722A JP 2005156722 A JP2005156722 A JP 2005156722A JP 2006331249 A JP2006331249 A JP 2006331249A
Authority
JP
Japan
Prior art keywords
quantum
information
class library
program
error correction
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.)
Granted
Application number
JP2005156722A
Other languages
Japanese (ja)
Other versions
JP4718244B2 (en
Inventor
Yasuhito Kono
泰人 河野
Noboru Harada
登 原田
Takeshi Kato
豪 加藤
Yasuhiro Takahashi
康博 高橋
Hiromi Nakajima
裕美 中島
Seiichiro Tani
誠一郎 谷
Hideki Sakurada
英樹 櫻田
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
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 filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2005156722A priority Critical patent/JP4718244B2/en
Publication of JP2006331249A publication Critical patent/JP2006331249A/en
Application granted granted Critical
Publication of JP4718244B2 publication Critical patent/JP4718244B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N10/00Quantum computing, i.e. information processing based on quantum-mechanical phenomena

Abstract

<P>PROBLEM TO BE SOLVED: To execute the programming of a quantum computer without considering the hardware of the quantum computer. <P>SOLUTION: Class library in which class library identification information corresponding to a quantum system of the quantum computer, quantum processing description information and quantum gate information are related to each other is previously stored in a class library storage part 140. Then an analysis part 161 extracts class library specification information for specifying the class library identification information and the quantum processing description information from a quantum program. Then a retrieval part 162 extracts the quantum gate information corresponding to the class library specification information and the quantum processing description information which are extracted by the analysis part 161 from the class library. Then a quantum circuit generation part 163 generates a quantum circuit by using the quantum gate information extracted by the retrieval part 162 and outputs quantum circuit information indicating the quantum circuit. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、量子コンピュータによる処理内容が記述されたソースコードを量子回路に変換する量子プログラム変換装置、その方法、そのプログラム及び記録媒体に関する。   The present invention relates to a quantum program conversion apparatus, a method thereof, a program thereof, and a recording medium for converting a source code describing processing contents by a quantum computer into a quantum circuit.

[量子コンピュータ]
因数分解や検索などの特定の問題に関して、現在のコンピュータよりもはるかに高速に問題を解くことができる「量子コンピュータ」と呼ばれるコンピュータが提案されている。量子コンピュータとは、普通のコンピュータで用いられる計算単位のビットの代わりに、「キュービット」を計算単位として用いるコンピュータのことである。キュービットを用いると、ビット列の重ねあわせが表現できる。量子コンピュータの高速性は、重ねあわせを利用した量子並列計算によって得られる。
[Quantum computer]
Computers called “quantum computers” have been proposed that can solve problems much faster than current computers for specific problems such as factorization and search. A quantum computer is a computer that uses “qubits” as a calculation unit instead of bits of a calculation unit used in ordinary computers. When qubits are used, bit string superposition can be expressed. The high speed of a quantum computer can be obtained by quantum parallel computation using superposition.

量子力学の理論では、n個のキュービットが作る量子状態を2次元のヒルベルト空間のベクトルで表現し、量子操作を2×2のユニタリ行列で表現し、量子状態の実験的な測定を射影作用素によって表現する。量子コンピュータでは、入力データをキュービット列の量子状態で表現し、それを量子的に操作して、最後に観測を行うことによって、計算を行う。この過程を量子力学の理論の言葉で表現すると、初期状態を表すヒルベルト空間中のベクトルを、量子操作を表現するユニタリ行列で変換し、得られたベクトルに射影作用素を作用させ、それによって得られた値を量子コンピュータの出力とすることに相当する。 In quantum mechanics theory, the quantum state created by n qubits is represented by a 2 n- dimensional Hilbert space vector, the quantum operation is represented by a 2 n × 2 n unitary matrix, and the quantum state is experimentally measured. Is expressed by a projection operator. In the quantum computer, the input data is expressed by the quantum state of the qubit string, and the calculation is performed by manipulating the input data and performing the observation at the end. When this process is expressed in terms of quantum mechanics theory, a vector in the Hilbert space that represents the initial state is transformed with a unitary matrix that represents the quantum operation, and a projection operator is applied to the obtained vector to obtain it. Is equivalent to the output of the quantum computer.

[ユニバーサルゲート]
一般に、任意に与えられたユニタリ行列を物理的に実現することは困難である。そこで、組み合わせれば任意のユニタリ行列を近似できる基本操作の組を用意し、その基本操作を組み合わせることで所望のユニタリ行列を実現する。組み合わせれば任意のユニタリ行列を近似できる基本操作の組をユニバーサルゲートと呼ぶ。なお、これらの基本操作は論理ゲート風の記号で表現されることが多く、量子ゲートとも呼ばれる。また、量子ゲートを論理回路のように並べて作ったものを量子回路と呼ぶ。
[Universal Gate]
In general, it is difficult to physically realize an arbitrarily given unitary matrix. Therefore, a combination of basic operations capable of approximating an arbitrary unitary matrix if prepared in combination is prepared, and a desired unitary matrix is realized by combining the basic operations. A combination of basic operations that can approximate any unitary matrix by combining them is called a universal gate. These basic operations are often expressed by logic gate-like symbols and are also called quantum gates. In addition, a circuit in which quantum gates are arranged like a logic circuit is called a quantum circuit.

最も有名なユニバーサルゲートは、1キュービット回転操作とCNOTの組である(例えば、非特許文献1参照)。また、1キュービット回転操作と制御回転ゲートの組み合わせもユニバーサルゲートである。これらのユニバーサルゲートを使うと、任意のユニタリ行列を量子ゲートで(近似的にではなく)正確に表現できる。しかし、これらのユニバーサルゲートを用いて任意のユニタリ行列を表現するためには無限個の量子ゲートを使用しなければならない。
その一方で、有限個の量子ゲートの組で構成されるユニバーサルゲートも存在する。よく知られた例は、アダマールゲート、フェーズゲート、CNOT、π/8ゲートの組である。これは1キュービット回転操作とCNOTで構成されるユニバーサルゲートの有限部分集合である。このユニバーサルゲートでは、ユニタリ行列を正確に表現することはできないが近似することはできる。そのため、これら4つの量子ゲートを使って量子計算を実行することができる。また、アダマールゲート、フェーズゲート、CNOTゲート、トフォリゲートの組も、有限個でユニバーサルになる例である(例えば、非特許文献2参照)。
The most famous universal gate is a set of 1-qubit rotation operation and CNOT (see Non-Patent Document 1, for example). The combination of the 1-qubit rotation operation and the control rotation gate is also a universal gate. With these universal gates, any unitary matrix can be accurately represented (not approximate) by a quantum gate. However, in order to represent an arbitrary unitary matrix using these universal gates, an infinite number of quantum gates must be used.
On the other hand, there is a universal gate composed of a limited number of quantum gates. A well-known example is a set of Hadamard gate, phase gate, CNOT, and π / 8 gate. This is a finite subset of universal gates consisting of one qubit rotation operation and CNOT. In this universal gate, the unitary matrix cannot be expressed accurately but can be approximated. Therefore, quantum computation can be executed using these four quantum gates. Further, a set of Hadamard gates, phase gates, CNOT gates, and tori gates is an example in which a limited number of units become universal (see, for example, Non-Patent Document 2).

[ユニバーサルゲートに要求される物理的制約]
上述のようなユニバーサルゲートを量子コンピュータに実装する場合、その量子系ごとに所定の物理的制約が存在する。また、そのような物理的制約を前提に最適な量子回路を構成する研究も進められている。
例えば、ほとんどの量子系においてユニバーサルゲートに要求される可能性が高い物理的制約として、近接キュービット間相互作用がある。量子コンピュータの操作ではエンタングル状態をコントロールしなければならないため、CNOTのような2キュービット以上の量子ゲートが必須である。そして、1キュービット回転操作とCNOTのユニバーサルゲートモデルでは、遠くは離れた2キュービット間のCNOT操作を認めている。しかし、イオントラップを除くほとんどの量子系では、遠く離れたキュービット問での相互作用は困難である。これに対し、近接キュービット間の相互作用しか利用できない量子系において、効率的な量子回路を構成する方法が特許文献1に開示されている。
[Physical constraints required for Universal Gate]
When the universal gate as described above is implemented in a quantum computer, there are predetermined physical constraints for each quantum system. Research is also underway to construct an optimal quantum circuit based on such physical constraints.
For example, physical constraints that are likely to be required for universal gates in most quantum systems include the interaction between adjacent qubits. Since the entangled state must be controlled in the operation of the quantum computer, a quantum gate of 2 qubits or more such as CNOT is essential. In the universal gate model of 1 qubit rotation operation and CNOT, CNOT operation between 2 qubits that are far apart is permitted. However, in most quantum systems except ion traps, it is difficult to interact with qubits that are far away. On the other hand, Patent Document 1 discloses a method for constructing an efficient quantum circuit in a quantum system in which only an interaction between adjacent qubits can be used.

また、交換操作は、スピン系の振る舞いを記述するハイゼンベルグ・ハミル卜ニアンから自然に導かれるため、スピン系で量子コンピュータを作る場合、モデルにこのような制約を置くことは自然である。さらに、交換操作だけで量子計算を実行することは、外部からのノイズの影響を低減するために効果があることが知られており、スピン系で作られる量子コンビュータでは有力な一つのモデルである。非特許文献3では、このような近接キュービット間での交換操作しか認めないという制約を課した場合において効率的な量子回路を構成する方法が開示されている。   In addition, since the exchange operation is naturally derived from Heisenberg-Hamiltonian describing the behavior of the spin system, it is natural to place such constraints on the model when creating a quantum computer with a spin system. Furthermore, it is known that performing quantum computations only by exchange operations is effective in reducing the influence of external noise, and is a powerful model for quantum computers made with spin systems. . Non-Patent Document 3 discloses a method for constructing an efficient quantum circuit in a case where such a restriction that only an exchange operation between adjacent qubits is allowed is imposed.

このように、各量子系に対する物理的制約から、ユニタリ行列を表現するための最適なユニバーサルゲートは量子系に応じて異なる場合が多い。例えば、量子系によってはCNOTよりも他の操作の方が物理的な構成が簡単に実現できる場合もある。そして、量子回路は、現在のコンピュータでいうアセンブラプログラムのようなものであるため、同じユニタリ変換を実現する場合でも、使用するユニバーサルゲートが異なれば、それを近似する量子回路はまったく異なる。
[量子プログラムと量子コンパイラ]
このように、量子系に応じてさまざまユニバーサルゲートが想定できるため、量子プログラム(量子コンピュータによる処理内容を記述したコード)を設計する技術者が量子回路を直接設計することは、非現実的である。そして、量子アルゴリズムの設計のために、より人間が扱いやすい量子言語とそれを量子回路に変換する量子コンパイラが望まれているのは自然の流れである。
Thus, due to physical restrictions on each quantum system, the optimal universal gate for expressing the unitary matrix often differs depending on the quantum system. For example, depending on the quantum system, a physical configuration may be more easily realized by an operation other than CNOT. Since the quantum circuit is like an assembler program in a current computer, even if the same unitary transformation is realized, if the universal gate to be used is different, the quantum circuit that approximates it is completely different.
[Quantum programs and quantum compilers]
In this way, various universal gates can be assumed depending on the quantum system, so it is unrealistic for an engineer who designs a quantum program (a code describing processing contents by a quantum computer) to directly design a quantum circuit. . In order to design a quantum algorithm, it is natural that a quantum language that is easier for humans to handle and a quantum compiler that converts it into a quantum circuit are desired.

最も単純な量子言語は、既存のプログラムにユニタリ行列と観測の記述を加えたものである。そして、既存のプログラム部分は既存の古典コンピュータが実行し、ユニタリ行列と観測部分は、ユニタリ行列をユニバーサルゲートに分解して量子コンピュータが実行する。与えられたユニタリ行列を、1キュービット回転操作とCNOTに分解する方法は、例えば、非特許文献4,5に開示されている。また、非特許文献6には、型理論に基づく量子プログラミング言語が提案されている。
A. Barenco, C. H. Bennett, R. Cleve, D. P. DiVincenzo, N. Margolus, P. Shor, P. Sleator, J. A. Smolin, H. Weinfurter, Elementary Gates for Quantum Computation, Physical Review A 52, 3457(1995) M. A. Nielsen and I. L. Chuang, Quantum Computation and Quantum Information, Section 4.5, Cambridge University Press. 河野泰人,木村欣司,関川浩,「Decoherence-free subspaceにおける量子ゲートについて」,信学技法,COMP2004-23, 2004年6月 R. R. Tucci, A Rudimentary Quantum Compiler (2nd edition), [online], [平成17年5月20日検索], インターネット<http://arxiv.org/abs/quant-ph/9902062> R. R. Tucci, Qubiter Algorithm Modification, Expressing Unstructured Unitary Matrices with Fewer CNOTs), [online], [平成17年5月20日検索], インターネット<http://arxiv.org/abs/quant-ph/0411027> Peter Selinger, Towards a quantum programming language, Mathematical Structures in Computer Science 14(4): 527-586, 2004. 特開2004−094885号公報
The simplest quantum language is an existing program with unitary matrix and observational descriptions. The existing program portion is executed by the existing classical computer, and the unitary matrix and the observation portion are executed by the quantum computer by decomposing the unitary matrix into universal gates. A method of decomposing a given unitary matrix into a 1-qubit rotation operation and CNOT is disclosed in Non-Patent Documents 4 and 5, for example. Non-Patent Document 6 proposes a quantum programming language based on type theory.
A. Barenco, CH Bennett, R. Cleve, DP DiVincenzo, N. Margolus, P. Shor, P. Sleator, JA Smolin, H. Weinfurter, Elementary Gates for Quantum Computation, Physical Review A 52, 3457 (1995) MA Nielsen and IL Chuang, Quantum Computation and Quantum Information, Section 4.5, Cambridge University Press. Yasuno Kawano, Junji Kimura, Hiroshi Sekigawa, “On Quantum Gates in the Decoherence-free subspace”, Science Technique, COMP2004-23, June 2004 RR Tucci, A Rudimentary Quantum Compiler (2nd edition), [online], [Search May 20, 2005], Internet <http://arxiv.org/abs/quant-ph/9902062> RR Tucci, Qubiter Algorithm Modification, Expressing Unstructured Unitary Matrices with Fewer CNOTs), [online], [Search May 20, 2005], Internet <http://arxiv.org/abs/quant-ph/0411027> Peter Selinger, Towards a quantum programming language, Mathematical Structures in Computer Science 14 (4): 527-586, 2004. JP 2004-094885 A

しかし、従来は、量子コンピュータのハードウェアに関する豊富な知識がなければ、量子コンピュータのプログラミングを行うことが困難であった。
すなわち、前述のように、最適なユニバーサルゲートは量子コンピュータの量子系に依存する。ところが、量子プログラムの設計者は、プログラミングに詳しくても量子コンピュータに詳しいとは限らない。そのため、量子コンピュータ普及のためには、使用できる量子ゲートを意識せずに、プログラミングができる環境が求められていた。
本発明はこのような点に鑑みてなされたものであり、人間が扱いやすい量子言語を、量子コンピュータの量子系に応じた最適な量子回路に自動的に変換することにより、量子コンピュータのハードウェアを考慮することなく、量子コンピュータのプログラミングを行うことを可能にする技術的思想を提供することを目的とする。
Conventionally, however, it has been difficult to program a quantum computer without a wealth of knowledge about the hardware of the quantum computer.
That is, as described above, the optimal universal gate depends on the quantum system of the quantum computer. However, designers of quantum programs are not necessarily familiar with quantum computers even if they are familiar with programming. Therefore, for the spread of quantum computers, there has been a demand for an environment where programming can be performed without being aware of usable quantum gates.
The present invention has been made in view of these points, and by automatically converting a quantum language that is easy to handle by humans into an optimal quantum circuit corresponding to the quantum system of the quantum computer, the hardware of the quantum computer is provided. It is an object of the present invention to provide a technical idea that enables programming of a quantum computer without considering the above.

本発明では上記課題を解決するために、クラスライブラリ記憶部に、量子コンピュータの量子系に対応するクラスライブラリ識別情報と、量子コンピュータによる処理内容を記述した量子処理記述情報と、当該クラスライブラリ識別情報に対応する量子コンピュータにおいて当該量子処理記述情報が示す処理内容を実現するために適した量子ゲートを示す量子ゲート情報と、が関連付けられたクラスライブラリを記憶させておく。量子プログラムが入力されると、解析部において、量子プログラムから、クラスライブラリ識別情報を指定するためのクラスライブラリ指定情報と量子処理記述情報とを抽出する。次に、検索部において、解析部が抽出したクラスライブラリ指定情報と量子処理記述情報とに対応する量子ゲート情報をクラスライブラリから抽出する。その後、量子回路生成部において、検索部が抽出した量子ゲート情報を用いて量子回路を生成し、当該量子回路を示す量子回路情報を出力する。   In the present invention, in order to solve the above-mentioned problem, class library identification information corresponding to the quantum system of the quantum computer, quantum processing description information describing processing contents by the quantum computer, and the class library identification information are stored in the class library storage unit. A class library in which quantum gate information indicating a quantum gate suitable for realizing the processing content indicated by the quantum processing description information is stored in the quantum computer corresponding to the above is stored. When a quantum program is input, the analysis unit extracts class library designation information and quantum processing description information for designating class library identification information from the quantum program. Next, in the search unit, quantum gate information corresponding to the class library designation information and the quantum processing description information extracted by the analysis unit is extracted from the class library. Thereafter, the quantum circuit generation unit generates a quantum circuit using the quantum gate information extracted by the search unit, and outputs quantum circuit information indicating the quantum circuit.

ここで、量子プログラムを実行させる量子コンピュータに対応するクラスライブラリ指定情報を量子プログラムに埋め込んでおけば、その量子コンピュータに適した量子回路が自動的に生成される。
また、好ましくは、クラスライブラリ記憶部に、量子コンピュータの量子系に対応するクラスライブラリ識別情報と、量子コンピュータによる処理内容を記述した量子処理記述情報と、当該クラスライブラリ識別情報に対応する量子コンピュータにおいて当該量子処理記述情報が示す処理内容を実現するために適した量子ゲートを示す量子ゲート情報と、が関連付けられたクラスライブラリを記憶させておき、さらにエラー訂正ライブラリ記憶部に、量子コンピュータの量子系に対応するエラー訂正ライブラリ識別情報と、量子ゲート情報と、当該量子ゲート情報をエラー訂正可能な回路構成に変換したエラー訂正量子ゲート情報と、が関連付けられたエラー訂正ライブラリを記憶させておく。量子プログラムが入力されると、解析部において、当該量子プログラムから、クラスライブラリ識別情報を指定するためのクラスライブラリ指定情報と、エラー訂正ライブラリ識別情報を指定するためのエラー訂正ライブラリ指定情報と、量子処理記述情報とを抽出する。次に、第1検索部において、解析部が抽出したクラスライブラリ指定情報と量子処理記述情報とに対応する量子ゲート情報を、クラスライブラリから抽出する。また、第2検索部において、解析部が抽出したエラー訂正ライブラリ指定情報と第1検索部が抽出した量子ゲート情報とに対応するエラー訂正量子ゲート情報を、エラー訂正ライブラリから抽出する。そして、量子回路生成部において、第2検索部が抽出したエラー訂正量子ゲート情報を用いて量子回路を生成し、当該量子回路を示す量子回路情報を出力する。
Here, if class library designation information corresponding to a quantum computer that executes a quantum program is embedded in the quantum program, a quantum circuit suitable for the quantum computer is automatically generated.
Preferably, the class library storage unit stores class library identification information corresponding to a quantum system of the quantum computer, quantum processing description information describing processing contents by the quantum computer, and a quantum computer corresponding to the class library identification information. A class library associated with quantum gate information indicating a quantum gate suitable for realizing the processing content indicated by the quantum processing description information is stored, and the error correction library storage unit further stores a quantum system of the quantum computer. The error correction library associated with the error correction library identification information corresponding to the above, quantum gate information, and error correction quantum gate information obtained by converting the quantum gate information into a circuit configuration capable of error correction is stored. When a quantum program is input, the analysis unit, from the quantum program, class library designation information for designating class library identification information, error correction library designation information for designating error correction library identification information, quantum Process description information is extracted. Next, in the first search unit, quantum gate information corresponding to the class library designation information and the quantum processing description information extracted by the analysis unit is extracted from the class library. In the second search unit, error correction quantum gate information corresponding to the error correction library designation information extracted by the analysis unit and the quantum gate information extracted by the first search unit is extracted from the error correction library. The quantum circuit generation unit generates a quantum circuit using the error correction quantum gate information extracted by the second search unit, and outputs quantum circuit information indicating the quantum circuit.

ここで、量子プログラムを実行させる量子コンピュータに対応するクラスライブラリ指定情報とエラー訂正ライブラリ指定情報とを量子プログラムに埋め込んでおけば、その量子コンピュータに適したエラー訂正可能な量子回路が自動的に生成される。   Here, if the class library specification information and error correction library specification information corresponding to the quantum computer that executes the quantum program is embedded in the quantum program, an error-correctable quantum circuit suitable for the quantum computer is automatically generated. Is done.

本発明では、量子プログラムから量子コンピュータに適した量子回路が自動的に生成されるため、量子コンピュータのハードウェアを考慮することなく、量子コンピュータのプログラミングを行うことが可能となる。   In the present invention, since a quantum circuit suitable for a quantum computer is automatically generated from a quantum program, the quantum computer can be programmed without considering the hardware of the quantum computer.

以下、本発明の実施の形態を図面を参照して説明する。
〔第1の実施の形態〕
<装置構成>
図1は、第1の実施の形態における量子プログラム変換装置100の構成を例示したブロック図である。
この図に例示するように、本形態の量子プログラム変換装置100は、制御部110、入力部120、出力部130、クラスライブラリ記憶部140、一時メモリ150、解析部161、検索部162、量子回路生成部163、古典コード生成部165及びリンカ部166を有し、入力された量子プログラムを量子回路情報に変換して出力する。なお、解析部161は、字句解析部161a、構文解析部161b及び意味解析部161cを具備し、一時メモリ150は、領域151〜158を具備している。また、解析部161及び古典コード生成部165が用いるライブラリの記載は省略してある。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[First Embodiment]
<Device configuration>
FIG. 1 is a block diagram illustrating the configuration of the quantum program conversion apparatus 100 according to the first embodiment.
As illustrated in this figure, the quantum program conversion apparatus 100 of this embodiment includes a control unit 110, an input unit 120, an output unit 130, a class library storage unit 140, a temporary memory 150, an analysis unit 161, a search unit 162, and a quantum circuit. It has a generation unit 163, a classical code generation unit 165, and a linker unit 166, and converts the input quantum program into quantum circuit information and outputs it. The analysis unit 161 includes a lexical analysis unit 161a, a syntax analysis unit 161b, and a semantic analysis unit 161c, and the temporary memory 150 includes regions 151 to 158. Further, description of the library used by the analysis unit 161 and the classical code generation unit 165 is omitted.

ここで、この例の量子プログラム変換装置100は、制御部、演算部及びレジスタ等を有するCPU(Central Processing Unit)、RAM(Random Access Memory)やROM(Read Only Memory)等の主記憶装置、ハードディスク装置等の補助記憶装置、入出力インタフェース等を有する公知のノイマン型のコンピュータに、所定のプログラムが読み込まれることにより構成されるものである。具体的には、例えば、制御部110、解析部161、検索部162、量子回路生成部163、古典コード生成部165及びリンカ部166は、CPUに所定のプログラムが読み込まれ、CPUがこれを実行することにより構成されるものである。また、入力部120及び出力部130は、USB(Universal Serial Bus)等の入出力インタフェースである。さらに、クラスライブラリ記憶部140及び一時メモリ150は、例えば、レジスタ、キャッシュメモリ、RAM、ハードディスク装置等から構成される。   Here, the quantum program conversion apparatus 100 of this example includes a CPU (Central Processing Unit) having a control unit, a calculation unit, a register, and the like, a main storage device such as a RAM (Random Access Memory) and a ROM (Read Only Memory), and a hard disk A predetermined program is read into a known Neumann computer having an auxiliary storage device such as a device and an input / output interface. Specifically, for example, the control unit 110, the analysis unit 161, the search unit 162, the quantum circuit generation unit 163, the classical code generation unit 165, and the linker unit 166 read a predetermined program into the CPU and execute it It is comprised by doing. The input unit 120 and the output unit 130 are input / output interfaces such as USB (Universal Serial Bus). Furthermore, the class library storage unit 140 and the temporary memory 150 are configured from, for example, a register, a cache memory, a RAM, a hard disk device, and the like.

<データ構成>
図2(a)は、図1に例示したクラスライブラリ記憶部140に記憶されるクラスライブラリ200−1〜200−nの様子を例示した概念図である。
図2(a)に例示するように、クラスライブラリ記憶部140には、複数のクラスライブラリ200−1〜200−nが格納されている。これらの各クラスライブラリ200−1〜200−nは、量子プログラムから生成する量子回路が実装される量子コンピュータの量子系(核磁気共鳴(NMR)系、結晶格子量子系、イオントラップ系、線形光学素子系等に代表される量子力学特有の現象を動作原理とする物理素子から成るシステム)にそれぞれ対応して設けられる。
<Data structure>
FIG. 2A is a conceptual diagram illustrating the state of the class libraries 200-1 to 200-n stored in the class library storage unit 140 illustrated in FIG.
As illustrated in FIG. 2A, the class library storage unit 140 stores a plurality of class libraries 200-1 to 200-n. Each of these class libraries 200-1 to 200-n is a quantum system (nuclear magnetic resonance (NMR) system, crystal lattice quantum system, ion trap system, linear optics) of a quantum computer in which a quantum circuit generated from a quantum program is mounted. The system is formed corresponding to a physical element whose operation principle is a phenomenon specific to quantum mechanics represented by an element system or the like.

図2(b)は、図2(a)におけるクラスライブラリ200−1のデータ構成を例示した概念図である。
図2(b)に例示するように、クラスライブラリ200−1は、量子コンピュータの量子系に対応するクラスライブラリ識別情報210−1と、量子コンピュータによる処理内容を記述した量子処理記述情報220−1と、当該クラスライブラリ識別情報210−1に対応する量子コンピュータにおいて当該量子処理記述情報220−1が示す処理内容を実現するために適した量子ゲートを示す量子ゲート情報230−1と、が関連付けられている。
FIG. 2B is a conceptual diagram illustrating the data configuration of the class library 200-1 in FIG.
As illustrated in FIG. 2B, the class library 200-1 includes class library identification information 210-1 corresponding to the quantum system of the quantum computer, and quantum processing description information 220-1 describing processing contents by the quantum computer. And quantum gate information 230-1 indicating a quantum gate suitable for realizing the processing content indicated by the quantum processing description information 220-1 in the quantum computer corresponding to the class library identification information 210-1. ing.

この例のクラスライブラリ識別情報210−1は、クラスライブラリ200−1を識別するための情報であり、この例では「cstd1」が設定されている。また、この例の量子処理記述情報220−1は、CNOT(y.CNOT(x);)、否定CNOT(コントロールビットが0のときにターゲットビットを反転させる)(y.CNOT(!x);)、アダマール変換(x.hadamard();)、S変換(x.S();)、π/8ゲート(x.T();)、制御回転(y.CRk(x);)、Toffoli(z.toffoli(x,y);)等を示す記述であり、解析部161が量子プログラムを解析することにより抽出されるコードに対応するものである。さらに、量子ゲート情報230−1は、各量子処理記述情報220−1に対応する量子ゲートを示す情報である。なお、量子処理記述情報220−1は、基本量子ゲート(例えば、CNOT等)のみに対応するものであってもよいし、基本量子ゲートを組み合わせた量子ゲート(例えば、量子フーリエ変換や加算等)に対応するものを含んでもよい。 The class library identification information 210-1 in this example is information for identifying the class library 200-1, and “cstd1” is set in this example. The quantum processing description information 220-1 in this example includes CNOT (y.CNOT (x);), negative CNOT (inverts the target bit when the control bit is 0) (y.CNOT (! X); ), Hadamard transform (x.hadamard ();), S transform (xS ();), π / 8 gate (xT ();), control rotation (y.CR k (x);), Toffoli (z. toffoli (x, y);) etc., and corresponds to the code extracted by the analysis unit 161 analyzing the quantum program. Further, the quantum gate information 230-1 is information indicating a quantum gate corresponding to each quantum processing description information 220-1. The quantum processing description information 220-1 may correspond to only a basic quantum gate (for example, CNOT), or a quantum gate (for example, a quantum Fourier transform, addition, etc.) that combines the basic quantum gates. The thing corresponding to may be included.

図3及び図4は、量子処理記述情報220−1が示す量子ゲートを例示した図である。ここで図3(a)〜(d)は、それぞれ、CNOT(y.CNOT(x);)、否定CNOT(y.CNOT(!x);)、アダマール変換(x.hadamard();)、S変換(x.S();)に対応する量子ゲートを示し、図4(a)〜(c)は、π/8ゲート(x.T();)、制御回転(y.CRk(x);)、Toffoli(z.toffoli(x,y);)に対応する量子ゲートを示す。なお、各量子ゲートのデータ表現方法はどのようなものでもよいが、例えば、「ゲート名.コントロールビット.ターゲットビット.回転角度」の組(要素が存在しない位置にはnull値を入れる)によって表現する。この例の場合、CNOT(y.CNOT(x);)に対応する量子ゲート情報1−1は、「NOT.xに対応する量子ビット位置.yに対応する量子ビット位置.null値」となる。また、複数の基本量子ゲートの組によって量子処理記述情報220−1が構成される場合(例えば、量子フーリエ変換や加算等)には、複数の「ゲート名.コントロールビット.ターゲットビット.回転角度」の組を時系列に沿って配置し、量子処理記述情報220−1を構成してもよい。 3 and 4 are diagrams illustrating the quantum gate indicated by the quantum processing description information 220-1. Here, FIGS. 3A to 3D respectively show CNOT (y.CNOT (x);), negative CNOT (y.CNOT (! X);), Hadamard transform (x.hadamard ();), FIG. 4A to FIG. 4C show a π / 8 gate (xT ();) and a control rotation (y.CR k (x);). , Shows a quantum gate corresponding to Toffoli (z.toffoli (x, y);). Any quantum gate data representation method may be used. For example, it is represented by a set of “gate name. Control bit. Target bit. Rotation angle” (a null value is inserted at a position where no element exists). To do. In this example, the quantum gate information 1-1 corresponding to CNOT (y.CNOT (x);) is “quantum bit position corresponding to NOT.x.quantum bit position corresponding to y.null value”. . Further, when the quantum processing description information 220-1 is configured by a set of a plurality of basic quantum gates (for example, quantum Fourier transform, addition, etc.), a plurality of “gate name. Control bit. Target bit. Rotation angle”. May be arranged in time series to constitute the quantum processing description information 220-1.

図5(a)は、図2(a)におけるクラスライブラリ200−2のデータ構成を例示した概念図である。
このクラスライブラリ200−2も、クラスライブラリ識別情報210−2と量子処理記述情報220−2と量子ゲート情報230−2とが関連付けられて構成されている。しかし、クラスライブラリ200−1の場合とは別の量子系の量子コンピュータに対応するものであるため、量子ゲート情報230−2の内容の少なくとも一部はクラスライブラリ200−1と相違する。
FIG. 5A is a conceptual diagram illustrating the data configuration of the class library 200-2 in FIG.
The class library 200-2 is also configured by associating class library identification information 210-2, quantum processing description information 220-2, and quantum gate information 230-2. However, since it corresponds to a quantum computer of a quantum system different from the case of the class library 200-1, at least a part of the contents of the quantum gate information 230-2 is different from the class library 200-1.

図5(b)は、クラスライブラリ200−2の否定CNOT(y.CNOT(!x);)に対応する量子ゲート情報2−2の内容を例示したものである。ここで、前述した図3(b)と比較するとわかるとおり、クラスライブラリ200−1とクラスライブラリ200−2とでは、同じ量子処理記述情報220−1,2(否定CNOT(y.CNOT(!x);))に対し、異なる量子ゲート情報230−1,2が対応付けられている。これは、それぞれに対応する量子コンピュータにおいて物理的に最適な量子ゲート情報が設定されるためである。
なお、その他のクラスライブラリもクラスライブラリ識別情報と量子処理記述情報と量子ゲート情報とが関連付けられて構成されるが、対応する各量子コンピュータに応じ、量子ゲート情報の内容が異なる。
FIG. 5B illustrates the contents of the quantum gate information 2-2 corresponding to negative CNOT (y.CNOT (! X);) of the class library 200-2. Here, as can be seen from comparison with FIG. 3B described above, in the class library 200-1 and the class library 200-2, the same quantum processing description information 220-1, 2 (negative CNOT (y.CNOT (! X );)) Are associated with different quantum gate information 230-1 and 230-2. This is because physically optimum quantum gate information is set in the corresponding quantum computers.
Other class libraries are also configured by associating class library identification information, quantum processing description information, and quantum gate information, but the contents of quantum gate information differ depending on each corresponding quantum computer.

<量子プログラム>
図6は、第1の実施の形態における量子プログラム300を例示した図である。
この図に例示するように、量子プログラム300は、古典コンピュータでの処理内容を記載したソースコードである古典処理記述情報ソースコード301、前述のクラスライブラリ識別情報を指定するためのクラスライブラリ指定情報ソースコード302及び量子コンピュータでの処理内容を記載したソースコードである量子処理記述情報ソースコード303を有している。なお、量子処理記述情報ソースコード303には、量子コンピュータでの処理内容のみが記載され、具体的な量子回路に関する情報は記載されていない。
<Quantum program>
FIG. 6 is a diagram illustrating a quantum program 300 according to the first embodiment.
As illustrated in this figure, the quantum program 300 includes a classic processing description information source code 301 which is a source code describing processing contents in a classical computer, and a class library designation information source for designating the class library identification information described above. The code 302 and the quantum processing description information source code 303 which is a source code describing the processing contents in the quantum computer are included. Note that the quantum processing description information source code 303 describes only the processing contents in the quantum computer, and does not describe specific information about the quantum circuit.

<処理>
次に、第1の実施の形態における量子プログラム変換処理について説明する。
図7は、第1の実施の形態における量子プログラム変換処理を説明するためのフローチャートである。以下、この図に沿って、本形態の量子プログラム変換処理を説明する。
まず、入力部120において、量子プログラムが入力され、入力された量子プログラムは、一旦、一時メモリ150の領域151に格納される(ステップS1)。次に、解析部161において、一時メモリ150の領域151から量子プログラムを読み込み、当該量子プログラムから、クラスライブラリ識別情報を指定するためのクラスライブラリ指定情報と量子処理記述情報と古典処理記述情報とを抽出する(ステップS2)。具体的には、例えばまず、字句解析部161aにおいて、一時メモリ150の領域151から量子プログラムを読み込み、その字句解析を行い、その字句解析結果を領域152に格納する。次に、構文解析部161bにおいて、一時メモリ150の領域152から字句解析結果を読み込み、その構文解析を行い、その構文解析結果を領域153に格納する。最後に、意味解析部161cにおいて、一時メモリ150の領域153から構文解析結果を読み込み、その意味解析を行い、その意味解析結果である「クラスライブラリ指定情報」「量子処理記述情報」「古典処理記述情報」を領域154に格納する。なお、「クラスライブラリ指定情報」「量子処理記述情報」及び「古典処理記述情報」は、前述の「クラスライブラリ指定情報ソースコード」「量子処理記述情報ソースコード」及び「古典処理記述情報ソースコード」(図6参照)からそれぞれ抽出されたものである。また、ここで抽出される「量子処理記述情報」は、クラスライブラリ200−1〜nの量子処理記述情報の何れかに対応するものである。さらに、量子処理記述情報の抽出には、例えば、「R. R. Tucci, A Rudimentary Quantum Compiler (2nd edition), [online], [平成17年5月20日検索], インターネット<http://arxiv.org/abs/quant-ph/9902062>」や「R. R. Tucci, Qubiter Algorithm Modification, Expressing Unstructured Unitary Matrices with Fewer CNOTs), [online], [平成17年5月20日検索], インターネット<http://arxiv.org/abs/quant-ph/0411027>」に開示された方法を用いる。
<Processing>
Next, quantum program conversion processing in the first embodiment will be described.
FIG. 7 is a flowchart for explaining the quantum program conversion processing according to the first embodiment. Hereinafter, the quantum program conversion process of this embodiment will be described with reference to this figure.
First, a quantum program is input in the input unit 120, and the input quantum program is temporarily stored in the area 151 of the temporary memory 150 (step S1). Next, in the analysis unit 161, a quantum program is read from the area 151 of the temporary memory 150, and class library designation information, quantum processing description information, and classical process description information for designating class library identification information are obtained from the quantum program. Extract (step S2). Specifically, for example, first, the lexical analyzer 161 a reads a quantum program from the area 151 of the temporary memory 150, analyzes the lexical analysis, and stores the lexical analysis result in the area 152. Next, the syntax analysis unit 161 b reads the lexical analysis result from the area 152 of the temporary memory 150, performs the syntax analysis, and stores the syntax analysis result in the area 153. Finally, the semantic analysis unit 161c reads the syntax analysis result from the area 153 of the temporary memory 150, performs the semantic analysis, and performs the semantic analysis result “class library designation information” “quantum processing description information” “classical processing description”. Information ”is stored in area 154. “Class library designation information”, “quantum processing description information”, and “classical processing description information” are the above-mentioned “class library designation information source code”, “quantum processing description information source code”, and “classical processing description information source code”. (See FIG. 6). The “quantum processing description information” extracted here corresponds to any of the quantum processing description information of the class libraries 200-1 to 200-n. Furthermore, for extracting quantum processing description information, for example, “RR Tucci, A Rudimentary Quantum Compiler (2nd edition), [online], [searched on May 20, 2005], Internet <http://arxiv.org / abs / quant-ph / 9902062> ”,“ RR Tucci, Qubiter Algorithm Modification, Expressing Unstructured Unitary Matrices with Fewer CNOTs), [online], [May 20, 2005 search], Internet <http: // arxiv .org / abs / quant-ph / 0411027> ”is used.

次に、検索部162において、一時メモリ150の領域154から、解析部161が抽出したクラスライブラリ指定情報と量子処理記述情報とを読み込み、これらに対応する量子ゲート情報を、クラスライブラリ記憶部140に記憶されたクラスライブラリから抽出する(ステップS3)。
この例の場合、検索部162は、まず、読み込んだクラスライブラリ指定情報が指定するクラスライブラリ識別情報に関連付けられているクラスライブラリをクラスライブラリ記憶部140から抽出する。例えば、図6に例示した量子プログラム300の場合、検索部162は、クラスライブラリ指定情報ソースコード302から抽出されたクラスライブラリ指定情報「cstd1lib」が指定するクラスライブラリ識別情報「cstd1」210−1に関連付けられているクラスライブラリ200−1(図2(b))をクラスライブラリ記憶部140から抽出する。次に、検索部162は、抽出したクラスライブラリにおいて、読み込んだ量子処理記述情報と関連付けられている量子ゲート情報を抽出する。図6に例示した量子プログラム300の場合、検索部162は、抽出したクラスライブラリ200−1(図2(b))において、読み込んだ量子処理記述情報と関連付けられている量子ゲート情報を抽出する。その後、検索部162は、抽出した量子ゲート情報を一時メモリ150の領域155に格納する。
Next, the search unit 162 reads the class library designation information and the quantum processing description information extracted by the analysis unit 161 from the area 154 of the temporary memory 150, and stores the corresponding quantum gate information in the class library storage unit 140. Extracted from the stored class library (step S3).
In this example, the search unit 162 first extracts the class library associated with the class library identification information specified by the read class library specification information from the class library storage unit 140. For example, in the case of the quantum program 300 illustrated in FIG. 6, the search unit 162 stores the class library identification information “cstd1” 210-1 specified by the class library specifying information “cstd1lib” extracted from the class library specifying information source code 302. The associated class library 200-1 (FIG. 2B) is extracted from the class library storage unit 140. Next, the search unit 162 extracts quantum gate information associated with the read quantum processing description information in the extracted class library. In the case of the quantum program 300 illustrated in FIG. 6, the search unit 162 extracts quantum gate information associated with the read quantum processing description information in the extracted class library 200-1 (FIG. 2B). Thereafter, the search unit 162 stores the extracted quantum gate information in the area 155 of the temporary memory 150.

次に、量子回路生成部163において、一時メモリ150の領域155から検索部162が抽出した量子ゲート情報を読み込み、必要であれば領域154から量子記述情報の少なくとも一部(例えば、量子ゲートが作用するキュービット位置に関する情報等)を読み込み、それらを用いて量子回路を生成し、当該量子回路を示す量子回路情報を出力する(ステップS4)。なお、ここでの量子回路の生成は、例えば、各量子ゲート情報を時系列に従って配置して行われる。この例の場合、出力された量子回路情報は一時メモリ150の領域156に格納される。図8は、以上のような処理によって、図6に例示した量子プログラム300の量子処理記述情報ソースコード303から生成された量子回路350の例である。   Next, the quantum circuit generation unit 163 reads the quantum gate information extracted by the search unit 162 from the region 155 of the temporary memory 150, and if necessary, at least a part of the quantum description information from the region 154 (for example, the quantum gate is activated). Information relating to the qubit position to be generated), a quantum circuit is generated using them, and quantum circuit information indicating the quantum circuit is output (step S4). The generation of the quantum circuit here is performed by arranging each quantum gate information in time series, for example. In this example, the output quantum circuit information is stored in the area 156 of the temporary memory 150. FIG. 8 is an example of the quantum circuit 350 generated from the quantum processing description information source code 303 of the quantum program 300 illustrated in FIG. 6 by the processing as described above.

次に、古典コード生成部165において、一時メモリ150の領域154から古典処理記述情報を読み込み、これらから公知の方法によって古典オブジェクトコード(アセンブラ、機械言語等)を生成し、領域157に格納する(ステップS5)。
次に、リンカ部166において、一時メモリ150の領域156から量子回路情報を、領域157から古典オブジェクトコードを、それぞれ読み込む。そして、リンカ部166は、量子回路情報及び古典オブジェクトコードの動的リンクを形成し、このリンク情報を領域158に格納する(ステップS6)。
Next, the classic code generation unit 165 reads the classic process description information from the area 154 of the temporary memory 150, generates a classic object code (assembler, machine language, etc.) from these using a known method, and stores it in the area 157 ( Step S5).
Next, the linker unit 166 reads the quantum circuit information from the area 156 of the temporary memory 150 and the classic object code from the area 157, respectively. Then, the linker unit 166 forms a dynamic link between the quantum circuit information and the classical object code, and stores this link information in the area 158 (step S6).

最後に、出力部130において、一時メモリ150の領域155,157,158から、量子回路情報、古典オブジェクトコード及びリンク情報が読み込まれ、これらを出力する(ステップS7)。このように出力された量子回路情報、古典オブジェクトコード及びリンク情報は、量子コンピュータ(あるいは量子シミュレータ)及び古典コンピュータに入力され、それらにおいて各処理が実行される。
<本形態の特徴>
本形態では、量子コンピュータの各量子系に対して最適なクラスライブラリを設定しておき、量子プログラムを実装する量子コンピュータに応じて最適なクラスライブラリを用いて、量子プログラムから量子回路への変換を行うこととした。これにより、プログラマが量子コンピュータのハードウェアの違いを意識せずに量子プログラムを記述し、実行させることができる。例えば、本形態の量子プログラム変換装置100では、
main{
qubit x[5],y[6];
y.qadd(x);
}
という入力xとyからx+yを計算し、yに入力する量子プログラムに対し、量子系の違いに応じた以下のような量子回路を自動的に生成できる。例えば、量子プログラム変換装置100は、CNOTゲートよりも制御回転ゲートを用いることが望ましい量子系に対しては、CNOTゲートの代わりに制御回転ゲートを用いたクラスライブラリを用い、量子回路を生成する。その結果、図9(a)に例示するようなキュービット回転ゲートと制御回転ゲートからなるユニバーサルゲートを持つ量子回路が生成される。なお、QFT(量子フーリエ変換)部分の量子回路は図10に示すとおりである。一方、量子プログラム変換装置100は、CNOTゲートを用いることが望ましい量子系に対しては、CNOTゲートを用いたクラスライブラリを用い、量子回路を生成する。その結果、図9(a)に例示するような1キュービット回転ゲートとCNOTゲートからなるユニバーサルゲートを持つ量子回路が生成される。しかし、いずれの場合も、プログラマから見た量子プログラムは同一である。
Finally, the output unit 130 reads the quantum circuit information, the classical object code, and the link information from the areas 155, 157, and 158 of the temporary memory 150, and outputs them (step S7). The quantum circuit information, classic object code, and link information output in this way are input to a quantum computer (or a quantum simulator) and a classic computer, and each process is executed on them.
<Features of this embodiment>
In this mode, an optimal class library is set for each quantum system of the quantum computer, and conversion from the quantum program to the quantum circuit is performed using the optimal class library according to the quantum computer that implements the quantum program. I decided to do it. As a result, the programmer can write and execute the quantum program without being aware of the hardware differences of the quantum computer. For example, in the quantum program conversion apparatus 100 of this embodiment,
main {
qubit x [5], y [6];
y.qadd (x);
}
X + y is calculated from the inputs x and y, and the following quantum circuit corresponding to the difference in the quantum system can be automatically generated for the quantum program input to y. For example, the quantum program conversion apparatus 100 generates a quantum circuit by using a class library using a control rotation gate instead of the CNOT gate for a quantum system in which the control rotation gate is desired to be used rather than the CNOT gate. As a result, a quantum circuit having a universal gate composed of a qubit rotation gate and a control rotation gate as illustrated in FIG. 9A is generated. The quantum circuit of the QFT (quantum Fourier transform) part is as shown in FIG. On the other hand, the quantum program conversion apparatus 100 generates a quantum circuit using a class library using a CNOT gate for a quantum system in which it is desirable to use a CNOT gate. As a result, a quantum circuit having a universal gate composed of a 1-qubit rotation gate and a CNOT gate as illustrated in FIG. 9A is generated. However, in either case, the quantum program as seen from the programmer is the same.

その他、実装する量子コンピュータの量子系が変更されたとしても、それまでの量子プログラムを継続して利用できるというメリットもある。さらに、量子コンピュータの端末装置に量子シミュレータをインストールし、量子プログラムのデバッグと量子コンピュータの実行を同じ端末装置で実行することもできる。量子コンピュータの計算環境維持が困難な状況下において、この方法は、量子プログラムの開発に大きな恩恵をもたらすことになる。
また、本形態で説明してきたように、この技術を利用することにより、量子プログラムに古典コンピュータの動作命令と、量子コンピュータの動作命令を混在して記述することができる。これにより、プログラマから見て、量子コンピュータと古典コンピュータの区別をすることなく、同じ感覚でプログラミングをすることが可能となる。
In addition, even if the quantum system of the mounted quantum computer is changed, there is an advantage that the quantum program up to that point can be used continuously. Furthermore, a quantum simulator can be installed in the terminal device of the quantum computer, and debugging of the quantum program and execution of the quantum computer can be executed by the same terminal device. In a situation where it is difficult to maintain the computing environment of the quantum computer, this method will greatly benefit the development of the quantum program.
Further, as described in this embodiment, by using this technique, it is possible to describe a classical computer operation instruction and a quantum computer operation instruction in a quantum program. This makes it possible to program with the same feeling without distinguishing between a quantum computer and a classical computer from the viewpoint of a programmer.

<第2の実施の形態>
本形態は、第1の実施の形態の変形例であり、量子プログラムをエラー訂正可能な量子回路に変形する点が第1の実施の形態と相違する。以下では、第1の実施の形態との相違点を中心に説明し、第1の実施の形態と共通する事項については説明を省略する。
<装置構成>
図11は、第2の実施の形態における量子プログラム変換装置400の構成を例示したブロック図である。なお、この図において第1の実施の形態と共通する部分については図1と同じ符号を付した。
<Second Embodiment>
This embodiment is a modification of the first embodiment, and differs from the first embodiment in that the quantum program is transformed into a quantum circuit capable of error correction. Below, it demonstrates centering around difference with 1st Embodiment, and abbreviate | omits description about the matter which is common in 1st Embodiment.
<Device configuration>
FIG. 11 is a block diagram illustrating a configuration of the quantum program conversion apparatus 400 according to the second embodiment. In this figure, the same reference numerals as those in FIG. 1 are assigned to portions common to the first embodiment.

この図に例示するように、本形態の量子プログラム変換装置400は、制御部110、入力部120、出力部130、クラスライブラリ記憶部140、エラー訂正ライブラリ記憶部440、一時メモリ150、解析部161、検索部162,461、量子回路生成部163、古典コード生成部165、リンカ部166を有し、入力された量子プログラムを量子回路情報に変換して出力する。なお、解析部161は、字句解析部161a、構文解析部161b及び意味解析部161cを具備し、一時メモリ150は、領域151〜158,451,454を具備している。また、解析部161及び古典コード生成部165が用いるライブラリの記載は省略してある。   As illustrated in this figure, the quantum program conversion apparatus 400 of this embodiment includes a control unit 110, an input unit 120, an output unit 130, a class library storage unit 140, an error correction library storage unit 440, a temporary memory 150, and an analysis unit 161. , A search unit 162, 461, a quantum circuit generation unit 163, a classical code generation unit 165, and a linker unit 166, which convert the input quantum program into quantum circuit information and output it. The analysis unit 161 includes a lexical analysis unit 161a, a syntax analysis unit 161b, and a semantic analysis unit 161c, and the temporary memory 150 includes regions 151 to 158, 451, and 454. Further, description of the library used by the analysis unit 161 and the classical code generation unit 165 is omitted.

<データ構成>
クラスライブラリ記憶部140に格納されるデータの構成は第1の実施の形態と同じである。以下では、エラー訂正ライブラリ記憶部440に格納されるデータの構成について説明する。
図12は、図11に例示したエラー訂正ライブラリ記憶部440に記憶されるエラー訂正ライブラリ500−1〜500−mの様子を例示した概念図である。
図12に例示するように、エラー訂正ライブラリ記憶部440には、複数のエラー訂正ライブラリ500−1〜500−mが格納されている。これらのエラー訂正ライブラリ500−1〜500−mは、量子プログラムから生成する量子回路が実装される量子コンピュータの量子系にそれぞれ対応して設けられる。
<Data structure>
The configuration of data stored in the class library storage unit 140 is the same as that in the first embodiment. Hereinafter, the configuration of data stored in the error correction library storage unit 440 will be described.
FIG. 12 is a conceptual diagram illustrating the state of the error correction libraries 500-1 to 500-m stored in the error correction library storage unit 440 illustrated in FIG.
As illustrated in FIG. 12, the error correction library storage unit 440 stores a plurality of error correction libraries 500-1 to 500-m. These error correction libraries 500-1 to 500-m are provided corresponding to the quantum systems of the quantum computers on which the quantum circuits generated from the quantum programs are mounted.

図13(a)(b)は、図12におけるエラー訂正ライブラリ500−1,2のデータ構成をそれぞれ例示した概念図である。
これらの図に例示するように、エラー訂正ライブラリ500−1,2は、それぞれ量子コンピュータの量子系に対応するエラー訂正ライブラリ識別情報(「7qubitcode1」「7qubitcode2」)510−1,2と、量子ゲート情報520−1,2と、当該量子ゲート情報520−1,2をエラー訂正可能な回路構成に変換したエラー訂正量子ゲート情報530−1,2と、が関連付けられたテーブルである。その他のエラー訂正ライブラリも同様な構成となっている。しかし、コンピュータの量子系の違いに応じ、エラー訂正量子ゲート情報が異なる場合もあるため、各エラー訂正ライブラリのデータ内容自体はエラー訂正ライブラリごとに相違する。なお、エラー訂正ライブラリにおける量子ゲート情報は、クラスライブラリにおける量子ゲート情報と同じであってもよいし、クラスライブラリにおける量子ゲート情報が示す量子ゲートをさらに分解した量子ゲートや、クラスライブラリにおける量子ゲート情報が示す量子ゲートを統合した量子ゲートの情報であってもよい。また、エラー訂正量子ゲートとしては、例えば、7qubitエラー訂正ゲートを例示できる。なお、7qubitエラー訂正やそれへの変換手法については、例えば、「Michael A.Nielsen, Isaac L.Chuang共著,木村達也訳,”量子コンピュータと量子通信”,オーム社」に詳しく説明されている。
FIGS. 13A and 13B are conceptual diagrams illustrating data configurations of the error correction libraries 500-1 and 500-2 in FIG.
As illustrated in these figures, the error correction libraries 500-1 and 500-2 are error correction library identification information ("7qubitcode1" and "7qubitcode2") 510-1 and 2 corresponding to the quantum system of the quantum computer, respectively, and quantum gates. This is a table in which the information 520-1 and 520-2 and the error correction quantum gate information 530-1 and 530-2 converted from the quantum gate information 520-1 and 520-2 to a circuit configuration capable of error correction are associated with each other. Other error correction libraries have the same configuration. However, the error correction quantum gate information may differ depending on the difference in the quantum system of the computer, so that the data content itself of each error correction library is different for each error correction library. The quantum gate information in the error correction library may be the same as the quantum gate information in the class library, a quantum gate obtained by further decomposing the quantum gate indicated by the quantum gate information in the class library, or quantum gate information in the class library The information of the quantum gate which integrated the quantum gate shown by may be sufficient. An example of the error correction quantum gate is a 7 qubit error correction gate. The 7-qubit error correction and the conversion method therefor are described in detail in, for example, “Co-authored by Michael A. Nielsen and Isaac L. Chuang, translated by Tatsuya Kimura,“ Quantum Computer and Quantum Communication ”, Ohmsha.”

<量子プログラム>
図14は、第2の実施の形態における量子プログラム600を例示した図である。
この図に例示するように、量子プログラム600は、古典コンピュータでの処理内容を記載したソースコードである古典処理記述情報ソースコード601、前述のクラスライブラリ識別情報を指定するためのクラスライブラリ指定情報ソースコード602、前述のエラー訂正ライブラリ識別情報を指定するためのエラー訂正ライブラリ識別情報ソースコード603、及び量子コンピュータでの処理内容を記載したソースコードである量子処理記述情報ソースコード604を有している。なお、量子処理記述情報ソースコード604には、量子コンピュータでの処理内容のみが記載され、具体的な量子回路に関する情報は記載されていない。
<Quantum program>
FIG. 14 is a diagram illustrating a quantum program 600 according to the second embodiment.
As illustrated in this figure, the quantum program 600 includes a classic processing description information source code 601 which is a source code describing processing contents in a classical computer, a class library designation information source for designating the class library identification information described above. A code 602, an error correction library identification information source code 603 for designating the above-described error correction library identification information, and a quantum processing description information source code 604 which is a source code describing processing contents in the quantum computer. . Note that the quantum processing description information source code 604 describes only the processing contents in the quantum computer, and does not describe specific information about the quantum circuit.

<処理>
次に、第2の実施の形態における量子プログラム変換処理について説明する。
図15は、第2の実施の形態における量子プログラム変換処理を説明するためのフローチャートである。以下、この図に沿って、本形態の量子プログラム変換処理を説明する。
まず、入力部120において、量子プログラムが入力され、入力された量子プログラムは、一旦、一時メモリ150の領域151に格納される(ステップS11)。次に、第1の実施の形態と同様に、解析部161において、一時メモリ150の領域151から量子プログラムを読み込み、当該量子プログラムから、クラスライブラリ識別情報を指定するためのクラスライブラリ指定情報とエラー訂正ライブラリ指定情報と量子処理記述情報と古典処理記述情報とを抽出し、一時メモリ150の領域454に格納する(ステップS12)。なお、「エラー訂正ライブラリ指定情報」は、前述の「エラー訂正ライブラリ識別情報ソースコード」(図14参照)から抽出されたものである。
<Processing>
Next, the quantum program conversion process in the second embodiment will be described.
FIG. 15 is a flowchart for explaining the quantum program conversion process according to the second embodiment. Hereinafter, the quantum program conversion process of this embodiment will be described with reference to this figure.
First, a quantum program is input in the input unit 120, and the input quantum program is temporarily stored in the area 151 of the temporary memory 150 (step S11). Next, as in the first embodiment, the analysis unit 161 reads a quantum program from the area 151 of the temporary memory 150, and class library specification information and error for specifying class library identification information from the quantum program. Correction library designation information, quantum processing description information, and classical processing description information are extracted and stored in the area 454 of the temporary memory 150 (step S12). The “error correction library designation information” is extracted from the aforementioned “error correction library identification information source code” (see FIG. 14).

次に、第1の実施の形態と同様に、(第1)検索部162において、一時メモリ150の領域454から、解析部161が抽出したクラスライブラリ指定情報と量子処理記述情報とを読み込み、これらに対応する量子ゲート情報を、クラスライブラリ記憶部140に記憶されたクラスライブラリから抽出し、領域155に格納する(ステップS13)。
次に、(第2)検索部461において、一時メモリ150の領域454から解析部161が抽出したエラー訂正ライブラリ指定情報(例えば「7qubitcode1lib」)を読み込み、領域155から検索部162が抽出した量子ゲート情報を読み込む。そして、検索部461は、これらに対応するエラー訂正量子ゲート情報を、エラー訂正ライブラリ記憶部440に記憶されたエラー訂正ライブラリ(上記の例では、エラー訂正ライブラリ識別情報(7qubitcode1)510−1に対応するエラー訂正ライブラリ500−1を用いる。)から抽出する(ステップS14)。
Next, as in the first embodiment, the (first) search unit 162 reads the class library designation information and the quantum processing description information extracted by the analysis unit 161 from the area 454 of the temporary memory 150. Is extracted from the class library stored in the class library storage unit 140 and stored in the region 155 (step S13).
Next, in the (second) search unit 461, the error correction library designation information (for example, “7qubitcode1lib”) extracted by the analysis unit 161 from the region 454 of the temporary memory 150 is read, and the quantum gate extracted by the search unit 162 from the region 155 Read information. Then, the search unit 461 corresponds the error correction quantum gate information corresponding to these to the error correction library (in the above example, the error correction library identification information (7 qubitcode1) 510-1) stored in the error correction library storage unit 440. The error correction library 500-1 is used.) (Step S14).

次に、量子回路生成部163において、一時メモリ150の領域155から検索部461が抽出したエラー訂正量子ゲート情報を読み込み、必要であれば領域454から量子記述情報の少なくとも一部(例えば、量子ゲートが作用するキュービット位置に関する情報等)を読み込み、これら用いて量子回路を生成し、当該量子回路を示す量子回路情報を出力する(ステップS15)。なお、ここでの量子回路の生成は、例えば、各エラー訂正量子ゲート情報を時系列に従って配置して行われる。また、この例の場合、出力された量子回路情報は一時メモリ150の領域156に格納される。   Next, the quantum circuit generation unit 163 reads the error correction quantum gate information extracted by the search unit 461 from the region 155 of the temporary memory 150, and if necessary, at least part of the quantum description information (for example, the quantum gate) from the region 454. Information on the qubit position where the quat acts, etc.) is read and used to generate a quantum circuit, and quantum circuit information indicating the quantum circuit is output (step S15). Here, the generation of the quantum circuit is performed by arranging each error correction quantum gate information in time series, for example. In this example, the output quantum circuit information is stored in the area 156 of the temporary memory 150.

図16は、以上のような処理によって、図14に例示した量子プログラム600の量子処理記述情報ソースコード604から生成された量子回路700の例である。また、図17(a)は、図16の7qubitエラー訂正H量子ゲート回路710(アダマール変換ゲートの7qubitエラー訂正ゲート)を例示した図であり、図17(b)は、図16の7qubitエラー訂正コントロールS量子ゲート回路720(コントロールSゲートの7qubitエラー訂正ゲート)を例示した図である。また、図18は、図17(b)における7qubitシンドローム検出・リカバリー量子回路の構成を例示した図である。   FIG. 16 is an example of the quantum circuit 700 generated from the quantum processing description information source code 604 of the quantum program 600 illustrated in FIG. 14 by the processing as described above. 17A is a diagram illustrating the 7-qubit error correction H quantum gate circuit 710 (7-qubit error correction gate of Hadamard transform gate) in FIG. 16, and FIG. 17B is a 7-qubit error correction in FIG. It is the figure which illustrated control S quantum gate circuit 720 (7 qubit error correction gate of control S gate). FIG. 18 is a diagram illustrating the configuration of the 7-qubit syndrome detection / recovery quantum circuit in FIG.

次に、古典コード生成部165において、一時メモリ150の領域454から古典処理記述情報を読み込み、これらから公知の方法によって古典オブジェクトコードを生成し、領域157に格納する(ステップS16)。
次に、リンカ部166において、一時メモリ150の領域156から量子回路情報を、領域157から古典オブジェクトコードを、それぞれ読み込む。そして、リンカ部166は、量子回路情報及び古典オブジェクトコードの動的リンクを形成し、このリンク情報を領域158に格納する(ステップS17)。
Next, the classic code generation unit 165 reads the classic process description information from the area 454 of the temporary memory 150, generates a classic object code from these using a known method, and stores it in the area 157 (step S16).
Next, the linker unit 166 reads the quantum circuit information from the area 156 of the temporary memory 150 and the classic object code from the area 157, respectively. Then, the linker unit 166 forms a dynamic link between the quantum circuit information and the classic object code, and stores this link information in the area 158 (step S17).

最後に、出力部130において、一時メモリ150の領域155,157,158から、量子回路情報、古典オブジェクトコード及びリンク情報が読み込まれ、これらを出力する(ステップS18)。
<本形態の特徴>
本形態では、第1の実施の形態に加え、量子プログラムの量子系ごとにエラー訂正ライブラリを設け、量子系に応じてエラー訂正ライブラリを使い分けつつ、量子ゲート情報からエラー訂正量子ゲートへの変換を行い、これらのエラー訂正量子ゲートから量子回路を構成することとした。これにより、プログラマが量子コンピュータのハードウェアの違いを意識せずに量子プログラムを記述し、エラー訂正可能な量子回路によって各処理を実行させることができる。
Finally, in the output unit 130, the quantum circuit information, the classic object code, and the link information are read from the areas 155, 157, and 158 of the temporary memory 150, and these are output (step S18).
<Features of this embodiment>
In this embodiment, in addition to the first embodiment, an error correction library is provided for each quantum system of the quantum program, and conversion from the quantum gate information to the error correction quantum gate is performed while properly using the error correction library according to the quantum system. It was decided to construct a quantum circuit from these error correcting quantum gates. As a result, the programmer can describe the quantum program without being aware of the difference in hardware of the quantum computer, and can execute each processing by the quantum circuit capable of error correction.

なお、本発明は上述の各実施の形態に限定されるものではない。例えば、量子コンピュータの処理内容のみを記述した量子プログラムに対して本発明を適用することとしてもよく、また、一部に量子回路についての記述を含む量子プログラムに対して本発明を適用することとしてもよい。また、上述の各種の処理は、記載に従って時系列に実行されるのみならず、処理を実行する装置の処理能力あるいは必要に応じて並列的にあるいは個別に実行されてもよい。その他、本発明の趣旨を逸脱しない範囲で適宜変更が可能であることはいうまでもない。   The present invention is not limited to the above-described embodiments. For example, the present invention may be applied to a quantum program that describes only the processing contents of a quantum computer, or may be applied to a quantum program that partially includes a description of a quantum circuit. Also good. 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. Needless to say, other modifications are possible without departing from the spirit of the present invention.

また、上述の各構成をコンピュータによって実現する場合、各装置が有すべき機能の処理内容はプログラムによって記述される。そして、このプログラムをコンピュータで実行することにより、上記処理機能がコンピュータ上で実現される。
この処理内容を記述したプログラムは、コンピュータで読み取り可能な記録媒体に記録しておくことができる。コンピュータで読み取り可能な記録媒体としては、例えば、磁気記録装置、光ディスク、光磁気記録媒体、半導体メモリ等どのようなものでもよいが、具体的には、例えば、磁気記録装置として、ハードディスク装置、フレキシブルディスク、磁気テープ等を、光ディスクとして、DVD(Digital Versatile Disc)、DVD−RAM(Random Access Memory)、CD−ROM(Compact Disc Read Only Memory)、CD−R(Recordable)/RW(ReWritable)等を、光磁気記録媒体として、MO(Magneto-Optical disc)等を、半導体メモリとしてEEP−ROM(Electronically Erasable and Programmable-Read Only Memory)等を用いることができる。
Further, when the above-described configurations are realized by a computer, the processing contents of functions that each device should have are described by a program. The processing functions are realized on the computer by executing the program on the computer.
The program describing the processing contents can be recorded on a computer-readable recording medium. The computer-readable recording medium may be any medium such as a magnetic recording device, an optical disk, a magneto-optical recording medium, or a semiconductor memory. Specifically, for example, the magnetic recording device may be a hard disk device or a flexible Discs, magnetic tapes, etc. as optical disks, DVD (Digital Versatile Disc), DVD-RAM (Random Access Memory), CD-ROM (Compact Disc Read Only Memory), CD-R (Recordable) / RW (ReWritable), etc. As the magneto-optical recording medium, MO (Magneto-Optical disc) or the like can be used, and as the semiconductor memory, EEP-ROM (Electronically Erasable and Programmable-Read Only Memory) or the like can be used.

また、このプログラムの流通は、例えば、そのプログラムを記録したDVD、CD−ROM等の可搬型記録媒体を販売、譲渡、貸与等することによって行う。さらに、このプログラムをサーバコンピュータの記憶装置に格納しておき、ネットワークを介して、サーバコンピュータから他のコンピュータにそのプログラムを転送することにより、このプログラムを流通させる構成としてもよい。
このようなプログラムを実行するコンピュータは、例えば、まず、可搬型記録媒体に記録されたプログラムもしくはサーバコンピュータから転送されたプログラムを、一旦、自己の記憶装置に格納する。そして、処理の実行時、このコンピュータは、自己の記録媒体に格納されたプログラムを読み取り、読み取ったプログラムに従った処理を実行する。また、このプログラムの別の実行形態として、コンピュータが可搬型記録媒体から直接プログラムを読み取り、そのプログラムに従った処理を実行することとしてもよく、さらに、このコンピュータにサーバコンピュータからプログラムが転送されるたびに、逐次、受け取ったプログラムに従った処理を実行することとしてもよい。また、サーバコンピュータから、このコンピュータへのプログラムの転送は行わず、その実行指示と結果取得のみによって処理機能を実現する、いわゆるASP(Application Service Provider)型のサービスによって、上述の処理を実行する構成としてもよい。なお、本形態におけるプログラムには、電子計算機による処理の用に供する情報であってプログラムに準ずるもの(コンピュータに対する直接の指令ではないがコンピュータの処理を規定する性質を有するデータ等)を含むものとする。
The program is distributed by selling, transferring, or lending a portable recording medium such as a DVD or CD-ROM in which the program is recorded. Furthermore, the program may be distributed by storing the program in a storage device of the server computer and transferring the program from the server computer to another computer via a network.
A computer that executes such a program first stores, for example, a program recorded on a portable recording medium or a program transferred from a server computer in its own storage device. When executing the process, the computer reads a program stored in its own recording medium and executes a process according to the read program. As another execution form of the program, the computer may directly read the program from the portable recording medium and execute processing according to the program, and the program is transferred from the server computer to the computer. Each time, the processing according to the received program may be executed sequentially. Also, the program is not transferred from the server computer to the computer, and the above-described processing is executed by a so-called ASP (Application Service Provider) type service that realizes the processing function only by the execution instruction and result acquisition. It is good. Note that the program in this embodiment includes information that is used for processing by an electronic computer and that conforms to the program (data that is not a direct command to the computer but has a property that defines the processing of the computer).

また、この形態では、コンピュータ上で所定のプログラムを実行させることにより、本装置を構成することとしたが、これらの処理内容の少なくとも一部をハードウェア的に実現することとしてもよい。   In this embodiment, the present apparatus is configured by executing a predetermined program on a computer. However, at least a part of these processing contents may be realized by hardware.

本発明の利用分野としては、例えば、量子コンピュータや量子シミュレータにおけるコンパイラやインタプリタを例示できる。   As an application field of the present invention, for example, a compiler or interpreter in a quantum computer or a quantum simulator can be exemplified.

図1は、第1の実施の形態における量子プログラム変換装置の構成を例示したブロック図である。FIG. 1 is a block diagram illustrating the configuration of the quantum program conversion apparatus according to the first embodiment. 図2(a)は、図1に例示したクラスライブラリ記憶部に記憶されるクラスライブラリの様子を例示した概念図である。図2(b)は、図2(a)におけるクラスライブラリのデータ構成を例示した概念図である。FIG. 2A is a conceptual diagram illustrating the state of the class library stored in the class library storage unit illustrated in FIG. FIG. 2B is a conceptual diagram illustrating the data configuration of the class library in FIG. 図3は、量子処理記述情報が示す量子ゲートを例示した図である。FIG. 3 is a diagram illustrating a quantum gate indicated by the quantum processing description information. 図4は、量子処理記述情報が示す量子ゲートを例示した図である。FIG. 4 is a diagram illustrating a quantum gate indicated by the quantum processing description information. 図5(a)は、図2(a)におけるクラスライブラリのデータ構成を例示した概念図である。図5(b)は、クラスライブラリの否定CNOT(y.CNOT(!x);)に対応する量子ゲート情報の内容を例示したものである。FIG. 5A is a conceptual diagram illustrating the data configuration of the class library in FIG. FIG. 5B illustrates the contents of quantum gate information corresponding to the negative CNOT (y.CNOT (! X);) of the class library. 図6は、第1の実施の形態における量子プログラムを例示した図である。FIG. 6 is a diagram illustrating a quantum program in the first embodiment. 図7は、第1の実施の形態における量子プログラム変換処理を説明するためのフローチャートである。FIG. 7 is a flowchart for explaining the quantum program conversion processing according to the first embodiment. 図8は、図6に例示した量子プログラムの量子処理記述情報ソースコードから生成された量子回路の例である。FIG. 8 is an example of a quantum circuit generated from the quantum processing description information source code of the quantum program illustrated in FIG. 図9(a)(b)は、本形態において生成される量子回路を例示した図である。FIGS. 9A and 9B are diagrams illustrating a quantum circuit generated in this embodiment. 図10は、QFT(量子フーリエ変換)部分の量子回路を例示した図である。FIG. 10 is a diagram illustrating a quantum circuit in a QFT (quantum Fourier transform) portion. 図11は、第2の実施の形態における量子プログラム変換装置の構成を例示したブロック図である。FIG. 11 is a block diagram illustrating the configuration of the quantum program conversion device according to the second embodiment. 図12は、図11に例示したエラー訂正ライブラリ記憶部に記憶されるエラー訂正ライブラリの様子を例示した概念図である。FIG. 12 is a conceptual diagram illustrating the state of the error correction library stored in the error correction library storage unit illustrated in FIG. 図13(a)(b)は、図12におけるエラー訂正ライブラリのデータ構成をそれぞれ例示した概念図である。13A and 13B are conceptual diagrams illustrating the data configuration of the error correction library in FIG. 図14は、第2の実施の形態における量子プログラムを例示した図である。FIG. 14 is a diagram illustrating a quantum program according to the second embodiment. 図15は、第2の実施の形態における量子プログラム変換処理を説明するためのフローチャートである。FIG. 15 is a flowchart for explaining the quantum program conversion process according to the second embodiment. 図16は、図14に例示した量子プログラムの量子処理記述情報ソースコードから生成された量子回路の例である。FIG. 16 is an example of a quantum circuit generated from the quantum processing description information source code of the quantum program illustrated in FIG. 図17(a)は、図16の7qubitエラー訂正H量子ゲート回路を例示した図であり、図17(b)は、図16の7qubitエラー訂正コントロールS量子ゲート回路を例示した図である。17A is a diagram illustrating the 7-qubit error correction H quantum gate circuit of FIG. 16, and FIG. 17B is a diagram illustrating the 7-qubit error correction control S quantum gate circuit of FIG. 図18は、図17(b)における7qubitシンドローム検出・リカバリー量子回路の構成を例示した図である。FIG. 18 is a diagram illustrating the configuration of the 7 qubit syndrome detection / recovery quantum circuit in FIG.

符号の説明Explanation of symbols

100,400 量子プログラム変換装置
140 クラスライブラリ記憶部
440 エラー訂正ライブラリ記憶部
100,400 Quantum program conversion device 140 Class library storage unit 440 Error correction library storage unit

Claims (8)

量子コンピュータによる処理内容が記述されたソースコードを具備する量子プログラムから量子回路を生成する量子プログラム変換装置であって、
量子コンピュータの量子系に対応するクラスライブラリ識別情報と、量子コンピュータによる処理内容を記述した量子処理記述情報と、当該クラスライブラリ識別情報に対応する量子コンピュータにおいて当該量子処理記述情報が示す処理内容を実現するために適した量子ゲートを示す量子ゲート情報と、が関連付けられたクラスライブラリを記憶したクラスライブラリ記憶部と、
量子プログラムが入力され、当該量子プログラムから、クラスライブラリ識別情報を指定するためのクラスライブラリ指定情報と量子処理記述情報とを抽出する解析部と、
上記解析部が抽出した上記クラスライブラリ指定情報と上記量子処理記述情報とに対応する上記量子ゲート情報を、上記クラスライブラリから抽出する検索部と、
上記検索部が抽出した上記量子ゲート情報を用いて量子回路を生成し、当該量子回路を示す量子回路情報を出力する量子回路生成部と、
を有することを特徴とする量子プログラム変換装置。
A quantum program conversion device for generating a quantum circuit from a quantum program having a source code in which processing contents by a quantum computer are described,
Class library identification information corresponding to the quantum system of the quantum computer, quantum processing description information describing processing contents by the quantum computer, and processing contents indicated by the quantum processing description information in the quantum computer corresponding to the class library identification information are realized. A class library storage unit that stores a class library associated with quantum gate information indicating a quantum gate suitable for
An analysis unit that receives a quantum program and extracts class library designation information and quantum processing description information for designating class library identification information from the quantum program;
A search unit for extracting the quantum gate information corresponding to the class library designation information and the quantum processing description information extracted by the analysis unit from the class library;
A quantum circuit generating unit that generates a quantum circuit using the quantum gate information extracted by the search unit, and outputs quantum circuit information indicating the quantum circuit;
A quantum program conversion device comprising:
請求項1に記載の量子プログラム変換装置であって、
前記クラスライブラリ記憶部が、
複数の量子系にそれぞれ対応する複数の前記クラスライブラリを具備する、
ことを特徴とする量子プログラム変換装置。
The quantum program conversion device according to claim 1,
The class library storage unit
A plurality of the class libraries respectively corresponding to a plurality of quantum systems;
A quantum program conversion device characterized by the above.
量子コンピュータによる処理内容が記述されたソースコードを具備する量子プログラムから量子回路を生成する量子プログラム変換装置であって、
量子コンピュータの量子系に対応するクラスライブラリ識別情報と、量子コンピュータによる処理内容を記述した量子処理記述情報と、当該クラスライブラリ識別情報に対応する量子コンピュータにおいて当該量子処理記述情報が示す処理内容を実現するために適した量子ゲートを示す量子ゲート情報と、が関連付けられたクラスライブラリを記憶したクラスライブラリ記憶部と、
量子コンピュータの量子系に対応するエラー訂正ライブラリ識別情報と、量子ゲート情報と、当該量子ゲート情報をエラー訂正可能な回路構成に変換したエラー訂正量子ゲート情報と、が関連付けられたエラー訂正ライブラリを記憶したエラー訂正ライブラリ記憶部と、
量子プログラムが入力され、当該量子プログラムから、クラスライブラリ識別情報を指定するためのクラスライブラリ指定情報と、エラー訂正ライブラリ識別情報を指定するためのエラー訂正ライブラリ指定情報と、量子処理記述情報とを抽出する解析部と、
上記解析部が抽出した上記クラスライブラリ指定情報と上記量子処理記述情報とに対応する上記量子ゲート情報を、上記クラスライブラリから抽出する第1検索部と、
上記解析部が抽出した上記エラー訂正ライブラリ指定情報と上記第1検索部が抽出した上記量子ゲート情報とに対応する上記エラー訂正量子ゲート情報を、上記エラー訂正ライブラリから抽出する第2検索部と、
上記第2検索部が抽出した上記エラー訂正量子ゲート情報を用いて量子回路を生成し、当該量子回路を示す量子回路情報を出力する量子回路生成部と、
を有することを特徴とする量子プログラム変換装置。
A quantum program conversion device for generating a quantum circuit from a quantum program having a source code in which processing contents by a quantum computer are described,
Class library identification information corresponding to the quantum system of the quantum computer, quantum processing description information describing processing contents by the quantum computer, and processing contents indicated by the quantum processing description information in the quantum computer corresponding to the class library identification information are realized. A class library storage unit that stores a class library associated with quantum gate information indicating a quantum gate suitable for
Stores an error correction library that associates error correction library identification information corresponding to the quantum system of the quantum computer, quantum gate information, and error correction quantum gate information obtained by converting the quantum gate information into a circuit configuration capable of error correction. Error correction library storage unit,
When a quantum program is input, class library specification information for specifying class library identification information, error correction library specification information for specifying error correction library identification information, and quantum processing description information are extracted from the quantum program. An analysis unit to
A first search unit for extracting the quantum gate information corresponding to the class library designation information and the quantum processing description information extracted by the analysis unit from the class library;
A second search unit for extracting the error correction quantum gate information corresponding to the error correction library designation information extracted by the analysis unit and the quantum gate information extracted by the first search unit from the error correction library;
A quantum circuit generating unit that generates a quantum circuit using the error correction quantum gate information extracted by the second search unit, and outputs quantum circuit information indicating the quantum circuit;
A quantum program conversion device comprising:
請求項3に記載の量子プログラム変換装置であって、
前記エラー訂正ライブラリ記憶部が、
複数の量子系にそれぞれ対応する複数の前記エラー訂正ライブラリを具備する、
ことを特徴とする量子プログラム変換装置。
The quantum program conversion device according to claim 3,
The error correction library storage unit
A plurality of error correction libraries respectively corresponding to a plurality of quantum systems;
A quantum program conversion device characterized by the above.
量子コンピュータによる処理内容が記述されたソースコードを具備する量子プログラムから量子回路を生成する量子プログラム変換方法であって、
量子コンピュータの量子系に対応するクラスライブラリ識別情報と、量子コンピュータによる処理内容を記述した量子処理記述情報と、当該クラスライブラリ識別情報に対応する量子コンピュータにおいて当該量子処理記述情報が示す処理内容を実現するために適した量子ゲートを示す量子ゲート情報と、が関連付けられたクラスライブラリがクラスライブラリ記憶部に記憶された状態において、
量子プログラムが解析部に入力され、当該解析部において、当該量子プログラムから、クラスライブラリ識別情報を指定するためのクラスライブラリ指定情報と量子処理記述情報とを抽出するステップと、
検索部において、上記解析部が抽出した上記クラスライブラリ指定情報と上記量子処理記述情報とに対応する上記量子ゲート情報を上記クラスライブラリから抽出するステップと、
量子回路生成部において、上記検索部が抽出した上記量子ゲート情報を用いて量子回路を生成し、当該量子回路を示す量子回路情報を出力するステップと、
を有することを特徴とする量子プログラム変換方法。
A quantum program conversion method for generating a quantum circuit from a quantum program having a source code in which processing contents by a quantum computer are described,
Class library identification information corresponding to the quantum system of the quantum computer, quantum processing description information describing processing contents by the quantum computer, and processing contents indicated by the quantum processing description information in the quantum computer corresponding to the class library identification information are realized. In a state in which the class library associated with the quantum gate information indicating the quantum gate suitable for performing is stored in the class library storage unit,
A step in which a quantum program is input to the analysis unit, and the analysis unit extracts class library designation information and quantum processing description information for designating class library identification information from the quantum program;
In the search unit, extracting the quantum gate information corresponding to the class library designation information and the quantum processing description information extracted by the analysis unit from the class library;
In the quantum circuit generation unit, a step of generating a quantum circuit using the quantum gate information extracted by the search unit and outputting quantum circuit information indicating the quantum circuit;
A quantum program conversion method comprising:
量子コンピュータによる処理内容が記述されたソースコードを具備する量子プログラムから量子回路を生成する量子プログラム変換方法であって、
量子コンピュータの量子系に対応するクラスライブラリ識別情報と、量子コンピュータによる処理内容を記述した量子処理記述情報と、当該クラスライブラリ識別情報に対応する量子コンピュータにおいて当該量子処理記述情報が示す処理内容を実現するために適した量子ゲートを示す量子ゲート情報と、が関連付けられたクラスライブラリがクラスライブラリ記憶部に記憶され、
量子コンピュータの量子系に対応するエラー訂正ライブラリ識別情報と、量子ゲート情報と、当該量子ゲート情報をエラー訂正可能な回路構成に変換したエラー訂正量子ゲート情報と、が関連付けられたエラー訂正ライブラリがエラー訂正ライブラリ記憶部に記憶された状態において、
量子プログラムが解析部に入力され、当該解析部において、当該量子プログラムから、クラスライブラリ識別情報を指定するためのクラスライブラリ指定情報と、エラー訂正ライブラリ識別情報を指定するためのエラー訂正ライブラリ指定情報と、量子処理記述情報とを抽出するステップと、
第1検索部において、上記解析部が抽出した上記クラスライブラリ指定情報と上記量子処理記述情報とに対応する上記量子ゲート情報を、上記クラスライブラリから抽出するステップと、
第2検索部において、上記解析部が抽出した上記エラー訂正ライブラリ指定情報と上記第1検索部が抽出した上記量子ゲート情報とに対応する上記エラー訂正量子ゲート情報を、上記エラー訂正ライブラリから抽出するステップと、
量子回路生成部において、上記第2検索部が抽出した上記エラー訂正量子ゲート情報を用いて量子回路を生成し、当該量子回路を示す量子回路情報を出力するステップと、
を有することを特徴とする量子プログラム変換方法。
A quantum program conversion method for generating a quantum circuit from a quantum program having a source code in which processing contents by a quantum computer are described,
Class library identification information corresponding to the quantum system of the quantum computer, quantum processing description information describing processing contents by the quantum computer, and processing contents indicated by the quantum processing description information in the quantum computer corresponding to the class library identification information are realized. A class library associated with quantum gate information indicating a quantum gate suitable for the storage is stored in the class library storage unit,
The error correction library associated with the error correction library identification information corresponding to the quantum system of the quantum computer, the quantum gate information, and the error correction quantum gate information obtained by converting the quantum gate information into a circuit configuration capable of error correction is an error. In the state stored in the correction library storage unit,
A quantum program is input to the analysis unit, and in the analysis unit, class library specification information for specifying class library identification information from the quantum program, and error correction library specification information for specifying error correction library identification information; Extracting quantum processing description information;
In the first search unit, extracting the quantum gate information corresponding to the class library designation information and the quantum processing description information extracted by the analysis unit from the class library;
In the second search unit, the error correction quantum gate information corresponding to the error correction library designation information extracted by the analysis unit and the quantum gate information extracted by the first search unit is extracted from the error correction library. Steps,
In the quantum circuit generation unit, generating a quantum circuit using the error correction quantum gate information extracted by the second search unit, and outputting quantum circuit information indicating the quantum circuit;
A quantum program conversion method comprising:
請求項1から4の何れかに記載の量子プログラム変換装置としてコンピュータを機能させるためのプログラム。   The program for functioning a computer as a quantum program conversion apparatus in any one of Claim 1 to 4. 請求項7に記載のプログラムを格納したコンピュータ読み取り可能な記録媒体。   A computer-readable recording medium storing the program according to claim 7.
JP2005156722A 2005-05-30 2005-05-30 Quantum program conversion apparatus, method thereof, program thereof and recording medium Expired - Fee Related JP4718244B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005156722A JP4718244B2 (en) 2005-05-30 2005-05-30 Quantum program conversion apparatus, method thereof, program thereof and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005156722A JP4718244B2 (en) 2005-05-30 2005-05-30 Quantum program conversion apparatus, method thereof, program thereof and recording medium

Publications (2)

Publication Number Publication Date
JP2006331249A true JP2006331249A (en) 2006-12-07
JP4718244B2 JP4718244B2 (en) 2011-07-06

Family

ID=37552853

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005156722A Expired - Fee Related JP4718244B2 (en) 2005-05-30 2005-05-30 Quantum program conversion apparatus, method thereof, program thereof and recording medium

Country Status (1)

Country Link
JP (1) JP4718244B2 (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008142816A1 (en) * 2007-05-23 2008-11-27 Japan Science And Technology Agency Quantum program concealing devic e and quantum program concealing method
JP2013114366A (en) * 2011-11-28 2013-06-10 Hitachi Ltd Quantum computer system, control method and program for quantum computer system
CN108885720A (en) * 2015-11-06 2018-11-23 谷歌有限责任公司 Quantum error correction in situ
CN109376866A (en) * 2018-09-17 2019-02-22 合肥本源量子计算科技有限责任公司 The operation method and device of the recording method of metadata and device, quantum program
CN110889506A (en) * 2019-10-29 2020-03-17 合肥本源量子计算科技有限责任公司 Method, device and system for generating quantum instruction and electronic device
CN110929873A (en) * 2019-12-11 2020-03-27 合肥本源量子计算科技有限责任公司 Quantum program processing method and device, storage medium and electronic device
JP2020091873A (en) * 2019-12-25 2020-06-11 グーグル エルエルシー In-situ quantum error correction
JP2021504829A (en) * 2017-11-28 2021-02-15 イオンキュー インコーポレイテッド Software-defined quantum computer
WO2021075566A1 (en) * 2019-10-17 2021-04-22 国立大学法人東京大学 Quantum gate and quantum computer
AU2020233743A1 (en) * 2020-02-10 2021-08-26 Beijing Baidu Netcom Science Technology Co., Ltd. Quantum pulse determining method, apparatus, device and readable storage medium
JP2022501802A (en) * 2018-08-30 2022-01-06 インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation External port measurement of qubit port response
WO2023103612A1 (en) * 2021-12-08 2023-06-15 深圳市腾讯计算机系统有限公司 Quantum program execution method and quantum program compilation method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002042104A (en) * 2000-07-27 2002-02-08 Yamaha Motor Co Ltd Control system and control method using quantum soft computing
JP2002244875A (en) * 2001-02-16 2002-08-30 Sony Corp Electronic equipment programming system and programming method
JP2005513680A (en) * 2001-12-22 2005-05-12 ディー−ウェイヴ システムズ インコーポレイテッド Integrated development environment for quantum computing
WO2006061926A1 (en) * 2004-12-09 2006-06-15 National University Corporation NARA Institute of Science and Technology Program development support device for computer system including quantum computer, program development support program, and simulation device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002042104A (en) * 2000-07-27 2002-02-08 Yamaha Motor Co Ltd Control system and control method using quantum soft computing
JP2002244875A (en) * 2001-02-16 2002-08-30 Sony Corp Electronic equipment programming system and programming method
JP2005513680A (en) * 2001-12-22 2005-05-12 ディー−ウェイヴ システムズ インコーポレイテッド Integrated development environment for quantum computing
WO2006061926A1 (en) * 2004-12-09 2006-06-15 National University Corporation NARA Institute of Science and Technology Program development support device for computer system including quantum computer, program development support program, and simulation device

Cited By (32)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008142816A1 (en) * 2007-05-23 2008-11-27 Japan Science And Technology Agency Quantum program concealing devic e and quantum program concealing method
JP2008294666A (en) * 2007-05-23 2008-12-04 Japan Science & Technology Agency Quantum program secreting device, and quantum program secreting method
AU2007353565B2 (en) * 2007-05-23 2011-01-06 Japan Science And Technology Agency Quantum program concealing device and quantum program concealing method
US8189779B2 (en) 2007-05-23 2012-05-29 Japan Science And Technology Agency Quantum program concealing device and quantum program concealing method
JP2013114366A (en) * 2011-11-28 2013-06-10 Hitachi Ltd Quantum computer system, control method and program for quantum computer system
US11948045B2 (en) 2015-11-06 2024-04-02 Google Llc In-situ quantum error correction
US11106992B2 (en) 2015-11-06 2021-08-31 Google Llc In-situ quantum error correction
JP2019502216A (en) * 2015-11-06 2019-01-24 グーグル エルエルシー In-situ quantum error correction
CN108885720A (en) * 2015-11-06 2018-11-23 谷歌有限责任公司 Quantum error correction in situ
US10692009B2 (en) 2015-11-06 2020-06-23 Google Llc In-situ quantum error correction
US11651265B2 (en) 2015-11-06 2023-05-16 Google Llc In-situ quantum error correction
JP2021504829A (en) * 2017-11-28 2021-02-15 イオンキュー インコーポレイテッド Software-defined quantum computer
JP7315550B2 (en) 2017-11-28 2023-07-26 イオンキュー インコーポレイテッド software-defined quantum computer
US20220156628A1 (en) * 2017-11-28 2022-05-19 Duke University Software-defined quantum computer
JP7403536B2 (en) 2018-08-30 2023-12-22 インターナショナル・ビジネス・マシーンズ・コーポレーション External port measurements of qubit port responses
JP2022501802A (en) * 2018-08-30 2022-01-06 インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation External port measurement of qubit port response
CN109376866B (en) * 2018-09-17 2021-03-12 合肥本源量子计算科技有限责任公司 Method and device for recording metadata and method and device for running quantum program
CN109376866A (en) * 2018-09-17 2019-02-22 合肥本源量子计算科技有限责任公司 The operation method and device of the recording method of metadata and device, quantum program
WO2021075566A1 (en) * 2019-10-17 2021-04-22 国立大学法人東京大学 Quantum gate and quantum computer
JP2021067964A (en) * 2019-10-17 2021-04-30 国立大学法人 東京大学 Quantum gate and quantum computer
CN110889506A (en) * 2019-10-29 2020-03-17 合肥本源量子计算科技有限责任公司 Method, device and system for generating quantum instruction and electronic device
CN110929873A (en) * 2019-12-11 2020-03-27 合肥本源量子计算科技有限责任公司 Quantum program processing method and device, storage medium and electronic device
CN110929873B (en) * 2019-12-11 2023-07-04 合肥本源量子计算科技有限责任公司 Quantum program processing method and device, storage medium and electronic device
JP2021106029A (en) * 2019-12-25 2021-07-26 グーグル エルエルシーGoogle LLC In-situ quantization error correction
JP2022172094A (en) * 2019-12-25 2022-11-15 グーグル エルエルシー In-situ quantum error correction
JP7119159B2 (en) 2019-12-25 2022-08-16 グーグル エルエルシー In situ quantum error correction
JP7400037B2 (en) 2019-12-25 2023-12-18 グーグル エルエルシー In-situ quantum error correction
JP2020091873A (en) * 2019-12-25 2020-06-11 グーグル エルエルシー In-situ quantum error correction
US11362663B2 (en) 2020-02-10 2022-06-14 Beijing Baidu Netcom Science Technology Co., Ltd. Quantum pulse determining method, apparatus, device and readable storage medium
AU2020233743B2 (en) * 2020-02-10 2021-11-18 Beijing Baidu Netcom Science Technology Co., Ltd. Quantum pulse determining method, apparatus, device and readable storage medium
AU2020233743A1 (en) * 2020-02-10 2021-08-26 Beijing Baidu Netcom Science Technology Co., Ltd. Quantum pulse determining method, apparatus, device and readable storage medium
WO2023103612A1 (en) * 2021-12-08 2023-06-15 深圳市腾讯计算机系统有限公司 Quantum program execution method and quantum program compilation method

Also Published As

Publication number Publication date
JP4718244B2 (en) 2011-07-06

Similar Documents

Publication Publication Date Title
JP4718244B2 (en) Quantum program conversion apparatus, method thereof, program thereof and recording medium
Zulehner et al. Advanced simulation of quantum computations
Kissinger et al. PyZX: Large scale automated diagrammatic reasoning
Hidary et al. Quantum computing: an applied approach
JP7186797B2 (en) Method and system for quantum computing
JP5921856B2 (en) Quantum computer system, control method and program for quantum computer system
CN109886412B (en) Quantum program persistent storage method and device and storage medium
CN106164942A (en) Being effectively synthesized of &#34; repeating until success &#34; circuit on the basis of Clifford+T
Marella et al. Introduction to quantum computing
JP6237278B2 (en) Compilation program, compilation method, and compilation apparatus
JPWO2009017131A1 (en) Nondeterministic finite automaton generation system, method and program without ε transition
CN110569979A (en) Logical-physical bit remapping method for noisy medium-sized quantum equipment
Lin et al. FTQLS: Fault-tolerant quantum logic synthesis
Smith et al. Leap: Scaling numerical optimization based synthesis using an incremental approach
Wille et al. Tools for quantum computing based on decision diagrams
CN114175060A (en) Measurement sequence determination for quantum computing devices
Tichai et al. Symmetry reduction of tensor networks in many-body theory: I. Automated symbolic evaluation of SU (2) algebra
JP4260751B2 (en) Unitary matrix decomposition apparatus, unitary matrix decomposition method, unitary matrix decomposition program, and recording medium
Surana et al. Deep learning for conversions between melodic frameworks of indian classical music
Bernard et al. New techniques for inferring L-systems using genetic algorithm
US11574030B1 (en) Solving optimization problems using a hybrid computer system
Vinkhuijzen et al. Efficient implementation of LIMDDs for quantum circuit simulation
Velasquez et al. Automated synthesis of quantum circuits using symbolic abstractions and decision procedures
Russo et al. A massively parallel Grammatical Evolution technique with OpenCL
JP5429164B2 (en) Finite automaton generation system

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: 20110208

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110224

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20110322

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: 20110331

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20140408

Year of fee payment: 3

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

LAPS Cancellation because of no payment of annual fees