JP4718244B2 - Quantum program conversion apparatus, method thereof, program thereof and recording medium - Google Patents
Quantum program conversion apparatus, method thereof, program thereof and recording medium Download PDFInfo
- Publication number
- JP4718244B2 JP4718244B2 JP2005156722A JP2005156722A JP4718244B2 JP 4718244 B2 JP4718244 B2 JP 4718244B2 JP 2005156722 A JP2005156722 A JP 2005156722A JP 2005156722 A JP2005156722 A JP 2005156722A JP 4718244 B2 JP4718244 B2 JP 4718244B2
- 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.)
- Expired - Fee Related
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N10/00—Quantum computing, i.e. information processing based on quantum-mechanical phenomena
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)
- Stored Programmes (AREA)
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個のキュービットが作る量子状態を2n次元のヒルベルト空間のベクトルで表現し、量子操作を2n×2nのユニタリ行列で表現し、量子状態の実験的な測定を射影作用素によって表現する。量子コンピュータでは、入力データをキュービット列の量子状態で表現し、それを量子的に操作して、最後に観測を行うことによって、計算を行う。この過程を量子力学の理論の言葉で表現すると、初期状態を表すヒルベルト空間中のベクトルを、量子操作を表現するユニタリ行列で変換し、得られたベクトルに射影作用素を作用させ、それによって得られた値を量子コンピュータの出力とすることに相当する。 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
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,
また、交換操作は、スピン系の振る舞いを記述するハイゼンベルグ・ハミル卜ニアンから自然に導かれるため、スピン系で量子コンピュータを作る場合、モデルにこのような制約を置くことは自然である。さらに、交換操作だけで量子計算を実行することは、外部からのノイズの影響を低減するために効果があることが知られており、スピン系で作られる量子コンビュータでは有力な一つのモデルである。非特許文献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 with 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
このように、各量子系に対する物理的制約から、ユニタリ行列を表現するための最適なユニバーサルゲートは量子系に応じて異なる場合が多い。例えば、量子系によっては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には、型理論に基づく量子プログラミング言語が提案されている。
しかし、従来は、量子コンピュータのハードウェアに関する豊富な知識がなければ、量子コンピュータのプログラミングを行うことが困難であった。
すなわち、前述のように、最適なユニバーサルゲートは量子コンピュータの量子系に依存する。ところが、量子プログラムの設計者は、プログラミングに詳しくても量子コンピュータに詳しいとは限らない。そのため、量子コンピュータ普及のためには、使用できる量子ゲートを意識せずに、プログラミングができる環境が求められていた。
本発明はこのような点に鑑みてなされたものであり、人間が扱いやすい量子言語を、量子コンピュータの量子系に応じた最適な量子回路に自動的に変換することにより、量子コンピュータのハードウェアを考慮することなく、量子コンピュータのプログラミングを行うことを可能にする技術的思想を提供することを目的とする。
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 problem, class library identification information corresponding to a quantum system of a quantum computer, quantum processing description information describing processing contents by the quantum computer, and the class library identification information are stored in a 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
As illustrated in this figure, the quantum
ここで、この例の量子プログラム変換装置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
<データ構成>
図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
As illustrated in FIG. 2A, the class
図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
図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
<処理>
次に、第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
次に、検索部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
In this example, the
次に、量子回路生成部163において、一時メモリ150の領域155から検索部162が抽出した量子ゲート情報を読み込み、必要であれば領域154から量子記述情報の少なくとも一部(例えば、量子ゲートが作用するキュービット位置に関する情報等)を読み込み、それらを用いて量子回路を生成し、当該量子回路を示す量子回路情報を出力する(ステップS4)。なお、ここでの量子回路の生成は、例えば、各量子ゲート情報を時系列に従って配置して行われる。この例の場合、出力された量子回路情報は一時メモリ150の領域156に格納される。図8は、以上のような処理によって、図6に例示した量子プログラム300の量子処理記述情報ソースコード303から生成された量子回路350の例である。
Next, the quantum
次に、古典コード生成部165において、一時メモリ150の領域154から古典処理記述情報を読み込み、これらから公知の方法によって古典オブジェクトコード(アセンブラ、機械言語等)を生成し、領域157に格納する(ステップS5)。
次に、リンカ部166において、一時メモリ150の領域156から量子回路情報を、領域157から古典オブジェクトコードを、それぞれ読み込む。そして、リンカ部166は、量子回路情報及び古典オブジェクトコードの動的リンクを形成し、このリンク情報を領域158に格納する(ステップS6)。
Next, the classic
Next, the linker unit 166 reads the quantum circuit information from the
最後に、出力部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
<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
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
その他、実装する量子コンピュータの量子系が変更されたとしても、それまでの量子プログラムを継続して利用できるというメリットもある。さらに、量子コンピュータの端末装置に量子シミュレータをインストールし、量子プログラムのデバッグと量子コンピュータの実行を同じ端末装置で実行することもできる。量子コンピュータの計算環境維持が困難な状況下において、この方法は、量子プログラムの開発に大きな恩恵をもたらすことになる。
また、本形態で説明してきたように、この技術を利用することにより、量子プログラムに古典コンピュータの動作命令と、量子コンピュータの動作命令を混在して記述することができる。これにより、プログラマから見て、量子コンピュータと古典コンピュータの区別をすることなく、同じ感覚でプログラミングをすることが可能となる。
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
この図に例示するように、本形態の量子プログラム変換装置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
<データ構成>
クラスライブラリ記憶部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
FIG. 12 is a conceptual diagram illustrating the state of the error correction libraries 500-1 to 500-m stored in the error correction
As illustrated in FIG. 12, the error correction
図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. 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
As illustrated in this figure, the
<処理>
次に、第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
次に、第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)
Next, in the (second)
次に、量子回路生成部163において、一時メモリ150の領域155から検索部461が抽出したエラー訂正量子ゲート情報を読み込み、必要であれば領域454から量子記述情報の少なくとも一部(例えば、量子ゲートが作用するキュービット位置に関する情報等)を読み込み、これら用いて量子回路を生成し、当該量子回路を示す量子回路情報を出力する(ステップS15)。なお、ここでの量子回路の生成は、例えば、各エラー訂正量子ゲート情報を時系列に従って配置して行われる。また、この例の場合、出力された量子回路情報は一時メモリ150の領域156に格納される。
Next, the quantum
図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
次に、古典コード生成部165において、一時メモリ150の領域454から古典処理記述情報を読み込み、これらから公知の方法によって古典オブジェクトコードを生成し、領域157に格納する(ステップS16)。
次に、リンカ部166において、一時メモリ150の領域156から量子回路情報を、領域157から古典オブジェクトコードを、それぞれ読み込む。そして、リンカ部166は、量子回路情報及び古典オブジェクトコードの動的リンクを形成し、このリンク情報を領域158に格納する(ステップS17)。
Next, the classic
Next, the linker unit 166 reads the quantum circuit information from the
最後に、出力部130において、一時メモリ150の領域155,157,158から、量子回路情報、古典オブジェクトコード及びリンク情報が読み込まれ、これらを出力する(ステップS18)。
<本形態の特徴>
本形態では、第1の実施の形態に加え、量子プログラムの量子系ごとにエラー訂正ライブラリを設け、量子系に応じてエラー訂正ライブラリを使い分けつつ、量子ゲート情報からエラー訂正量子ゲートへの変換を行い、これらのエラー訂正量子ゲートから量子回路を構成することとした。これにより、プログラマが量子コンピュータのハードウェアの違いを意識せずに量子プログラムを記述し、エラー訂正可能な量子回路によって各処理を実行させることができる。
Finally, in the
<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 a 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.
100,400 量子プログラム変換装置
140 クラスライブラリ記憶部
440 エラー訂正ライブラリ記憶部
100,400 Quantum
Claims (8)
量子コンピュータの量子系に対応するクラスライブラリ識別情報と、量子コンピュータによる処理内容を記述した量子処理記述情報と、当該クラスライブラリ識別情報に対応する量子コンピュータにおいて当該量子処理記述情報が示す処理内容を実現するために適した量子ゲートを示す量子ゲート情報と、が関連付けられたクラスライブラリを記憶したクラスライブラリ記憶部と、
量子プログラムが入力され、当該量子プログラムから、クラスライブラリ識別情報を指定するためのクラスライブラリ指定情報と量子処理記述情報とを抽出する解析部と、
上記解析部が抽出した上記クラスライブラリ指定情報と上記量子処理記述情報とに対応する上記量子ゲート情報を、上記クラスライブラリから抽出する検索部と、
上記検索部が抽出した上記量子ゲート情報を用いて量子回路を示す量子回路情報を生成し、当該量子回路を示す量子回路情報を出力する量子回路生成部と、
を有することを特徴とする量子プログラム変換装置。 A quantum program conversion device for generating quantum circuit information indicating 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 quantum circuit information indicating 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:
前記クラスライブラリ記憶部が、
複数の量子系にそれぞれ対応する複数の前記クラスライブラリを具備する、
ことを特徴とする量子プログラム変換装置。 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 quantum circuit information indicating 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 generation unit that generates quantum circuit information indicating 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:
前記エラー訂正ライブラリ記憶部が、
複数の量子系にそれぞれ対応する複数の前記エラー訂正ライブラリを具備する、
ことを特徴とする量子プログラム変換装置。 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 quantum circuit information indicating 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, generating quantum circuit information indicating 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 quantum circuit information indicating 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 the quantum circuit information indicating the quantum circuit using the error correction quantum gate information extracted by the second search unit, and outputting the quantum circuit information indicating the quantum circuit;
A quantum program conversion method comprising:
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 JP2006331249A (en) | 2006-12-07 |
JP4718244B2 true 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) |
Families Citing this family (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5105408B2 (en) * | 2007-05-23 | 2012-12-26 | 独立行政法人科学技術振興機構 | Quantum program concealment device and quantum program concealment method |
JP5921856B2 (en) * | 2011-11-28 | 2016-05-24 | 株式会社日立製作所 | Quantum computer system, control method and program for quantum computer system |
JP6641494B2 (en) | 2015-11-06 | 2020-02-05 | グーグル エルエルシー | In-situ quantum error correction |
US11281987B2 (en) * | 2017-11-28 | 2022-03-22 | Duke University | Software-defined quantum computer |
US11087232B2 (en) * | 2018-07-18 | 2021-08-10 | IonQ, Inc. | Quantum hybrid computation |
US10621502B2 (en) * | 2018-08-30 | 2020-04-14 | International Business Machines Corporation | External port measurement of qubit port responses |
CN109376866B (en) * | 2018-09-17 | 2021-03-12 | 合肥本源量子计算科技有限责任公司 | Method and device for recording metadata and method and device for running quantum program |
US10637480B1 (en) * | 2019-04-25 | 2020-04-28 | International Business Machines Corporation | Multi-control quantum state inversion gate |
JP6977009B2 (en) * | 2019-10-17 | 2021-12-08 | 国立大学法人 東京大学 | Quantum gates and quantum computers |
CN110889506A (en) * | 2019-10-29 | 2020-03-17 | 合肥本源量子计算科技有限责任公司 | Method, device and system for generating quantum instruction and electronic device |
CN110929873B (en) * | 2019-12-11 | 2023-07-04 | 合肥本源量子计算科技有限责任公司 | Quantum program processing method and device, storage medium and electronic device |
JP6862533B2 (en) * | 2019-12-25 | 2021-04-21 | グーグル エルエルシーGoogle LLC | Quantum error correction |
CN111415011B (en) * | 2020-02-10 | 2022-04-26 | 北京百度网讯科技有限公司 | Quantum pulse determination method, device, equipment and readable storage medium |
CN116243974A (en) * | 2021-12-08 | 2023-06-09 | 深圳市腾讯计算机系统有限公司 | Quantum program execution method and quantum program compiling method |
Citations (3)
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 |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070294070A1 (en) * | 2004-12-09 | 2007-12-20 | National University Corporation NARA Institute of Science and Technology | Program Development Support Apparatus for Computer System Including Quantum Computer, Program Development Support Program, and Simulation Apparatus |
-
2005
- 2005-05-30 JP JP2005156722A patent/JP4718244B2/en not_active Expired - Fee Related
Patent Citations (3)
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 |
Also Published As
Publication number | Publication date |
---|---|
JP2006331249A (en) | 2006-12-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4718244B2 (en) | Quantum program conversion apparatus, method thereof, program thereof and recording medium | |
JP7186797B2 (en) | Method and system for quantum computing | |
Marella et al. | Introduction to quantum computing | |
US20030169041A1 (en) | Quantum computing integrated development environment | |
CN109886412B (en) | Quantum program persistent storage method and device and storage medium | |
CN106164942A (en) | Being effectively synthesized of " repeating until success " circuit on the basis of Clifford+T | |
US12067075B1 (en) | Solving optimization problems using a hybrid computer system | |
JP2013114366A (en) | Quantum computer system, control method and program for quantum computer system | |
CN110569979A (en) | Logical-physical bit remapping method for noisy medium-sized quantum equipment | |
JP2005513680A6 (en) | Integrated development environment for quantum computing | |
WO2007096935A1 (en) | Program analysis method, program analysis device, and program analysis program | |
Lin et al. | FTQLS: Fault-tolerant quantum logic synthesis | |
Smith et al. | Leap: Scaling numerical optimization based synthesis using an incremental approach | |
CN114175060A (en) | Measurement sequence determination for quantum computing devices | |
JP2015143939A (en) | Compilation program, compilation method, and compilation device | |
Arthuis et al. | ADG: Automated generation and evaluation of many-body diagrams II. Particle-number projected Bogoliubov many-body perturbation theory | |
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 | |
Smith et al. | Programming physical quantum systems with pulse-level control | |
Vinkhuijzen et al. | Efficient implementation of LIMDDs for quantum circuit simulation | |
Bernard et al. | New techniques for inferring L-systems using genetic algorithm | |
WO2019167642A1 (en) | Symbol string generator, sentence compaction device, symbol string generation method, and program | |
Velasquez et al. | Automated synthesis of quantum circuits using symbolic abstractions and decision procedures | |
JP4758965B2 (en) | Unitary matrix decomposition method, unitary matrix decomposition apparatus, unitary matrix decomposition program, and recording medium | |
Gushanskiy et al. | Development of a scheme of a hardware accelerator of quantum computing for correction quantum types of errors |
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 |