Skip main navigation

Basic Algorithmic Flow/アルゴリズムの基本的な流れ

Basic Algorithmic Flow/アルゴリズムの基本的な流れ
3.5
A so called quantum algorithm generally has five parts. First part of quantum algorithm, we perform classical computation. The classical pre-processing might even involve re-compiling the quantum program to be input data specific. Now, we start the actual quantum part of the algorithm. Firstly initialize the processor or system of qubit to zero. For most algorithms, the next step is to create a superposition of all possible states, we do using Hadamard gate. For example, we prepare three qubits in the zero state and perform Hadamard gates to set those qubits to superposition of 0 and 1. After initialization, quantum computation will progress using an appropriate combination of one and two qubits gates and measurement operations.
57.3
In usual case, the amount of entanglement is maximized at the middle part of computation. Classical computer algorithms is often loop until something happens. Each time through the loop, they check to see if they have found the answer. If so, the algorithm can stop. But for quantum algorithms, checking to see if we are done is hard. If we try to see the answer, the quantum state will be destroyed. So quantum algorithms generally run for fixed time. There are some exceptions to this, where the next gate we execute depends on the result of measuring a qubit, but they don’t really affect the overall flow of the algorithm.
101.7
At the end of this phase, hopefully the algorithm has used interference to make a state that is the solution of the problem. To read the result of computation, we measure the qubits. Through these measurements, qubits become classical states 0 or 1 and the entanglement disappears. Given that most quantum algorithms only probabilistically generate the right answer, the classical post-processing not only involves some additional calculations, it involves confirming that the answer is correct. If not, we probably have to go back to step 1 and repeat.
量子アルゴリズムは基本的には5つの部分に分けることができます。1つ目は古典による前処理。次にプロセッサーや量子レジスターを0に初期化し、必要な重ね合わせなどを作成。初期化が済んだら各々のアルゴリズムのための量子ゲートと測定オペレーションを並べます。計算結果は量子ビットを測定しそれを古典の0または1に変換することで得ることができます。この測定のプロセスの中で量子もつれなどは壊れてしまいます。最後に古典による後処理が行われますが、ここでは単に追加で必要な計算をするだけではなく計算結果が正しいかどうかの確認も行われます。もし結果が正しくなければもう一度初めのステップからやり直すというプロセスを繰り返していきます。
This article is from the free online

量子コンピュータ入門

Created by
FutureLearn - Learning For Life

Our purpose is to transform access to education.

We offer a diverse selection of courses from leading universities and cultural institutions from around the world. These are delivered one step at a time, and are accessible on mobile, tablet and desktop, so you can fit learning around your life.

We believe learning should be an enjoyable, social experience, so our courses offer the opportunity to discuss what you’re learning with others as you go, helping you make fresh discoveries and form new ideas.
You can unlock new opportunities with unlimited access to hundreds of online short courses for a year by subscribing to our Unlimited package. Build your knowledge with top universities and organisations.

Learn more about how FutureLearn is transforming access to education