WEBVTT
Kind: captions
Language: en-US
00:00:03.460 --> 00:00:06.920
A so called quantum algorithm generally has five parts.
00:00:06.920 --> 00:00:09.250
First part of quantum algorithm,
00:00:09.250 --> 00:00:11.340
we perform classical computation.
00:00:11.340 --> 00:00:14.760
The classical pre-processing might even involve
00:00:14.760 --> 00:00:19.060
re-compiling the quantum program to be input data specific.
00:00:19.060 --> 00:00:22.900
Now, we start the actual quantum part of the algorithm.
00:00:22.900 --> 00:00:27.400
Firstly initialize the processor
or system of qubit to zero.
00:00:27.400 --> 00:00:29.520
For most algorithms,
00:00:29.520 --> 00:00:33.780
the next step is to create a superposition
of all possible states,
00:00:33.780 --> 00:00:37.240
we do using Hadamard gate.
00:00:37.240 --> 00:00:38.800
For example,
00:00:38.800 --> 00:00:41.360
we prepare three qubits in the zero state
00:00:41.360 --> 00:00:43.160
and perform Hadamard gates
00:00:43.170 --> 00:00:45.760
to set those qubits to superposition of
00:00:45.760 --> 00:00:47.880
0 and 1.
00:00:47.880 --> 00:00:49.540
After initialization,
00:00:49.540 --> 00:00:50.700
quantum computation
00:00:50.710 --> 00:00:53.600
will progress using an appropriate combination of
00:00:53.600 --> 00:00:55.480
one and two qubits gates
00:00:55.480 --> 00:00:57.280
and measurement operations.
00:00:57.280 --> 00:00:58.740
In usual case,
00:00:58.740 --> 00:01:00.860
the amount of entanglement is maximized
00:01:00.860 --> 00:01:03.740
at the middle part of computation.
00:01:03.740 --> 00:01:07.660
Classical computer algorithms is often loop
until something happens.
00:01:07.660 --> 00:01:09.600
Each time through the loop,
00:01:09.600 --> 00:01:12.980
they check to see if they have found
the answer.
00:01:12.980 --> 00:01:16.320
If so, the algorithm can stop.
00:01:16.320 --> 00:01:18.460
But for quantum algorithms,
00:01:18.460 --> 00:01:21.500
checking to see if we are done is hard.
00:01:21.500 --> 00:01:23.740
If we try to see the answer,
00:01:23.740 --> 00:01:26.320
the quantum state will be destroyed.
00:01:26.320 --> 00:01:30.020
So quantum algorithms generally run for fixed time.
00:01:30.020 --> 00:01:32.520
There are some exceptions to this,
00:01:32.520 --> 00:01:33.960
where the next gate
00:01:33.960 --> 00:01:37.340
we execute depends on the result of measuring a qubit,
00:01:37.340 --> 00:01:41.680
but they donâ€™t really affect the overall flow of the algorithm.
00:01:41.680 --> 00:01:43.760
At the end of this phase,
00:01:43.760 --> 00:01:47.780
hopefully the algorithm
has used interference to make a state
00:01:47.780 --> 00:01:50.180
that is the solution of the problem.
00:01:50.180 --> 00:01:52.700
To read the
result of computation,
00:01:52.700 --> 00:01:54.860
we measure the qubits.
00:01:54.860 --> 00:01:56.020
Through these measurements,
00:01:56.020 --> 00:01:58.320
qubits become classical states
00:01:58.320 --> 00:02:01.700
0 or 1 and the entanglement disappears.
00:02:01.700 --> 00:02:04.380
Given that most quantum algorithms
00:02:04.380 --> 00:02:07.440
only probabilistically generate the right answer,
00:02:07.440 --> 00:02:10.840
the classical post-processing not only involves
00:02:10.840 --> 00:02:12.680
some additional calculations,
00:02:12.680 --> 00:02:16.320
it involves confirming that the answer is correct.
00:02:16.320 --> 00:02:17.360
If not,
00:02:17.360 --> 00:02:21.060
we probably have to go back to step 1 and repeat.