Це відео відноситься до openHPI курсу Einführung in das Quantencomputing - Teil 2. Бажаєте побачити більше?
An error occurred while loading the video player, or it takes a long time to initialize. You can try clearing your browser cache. Please try again later and contact the helpdesk if the problem persists.
Прокрутити до поточної позиції
- 00:00a warm welcome ladies and gentlemen to the course basics
- 00:03of quantum computing part two and now we're going to talk about quantum
- 00:07Adder We can all do addition we learn it in elementary school
- 00:12and now the question is quantum adder
- 00:15first look where are we in the course we are in the course always
- 00:20still at the classical functions and we have already
- 00:25videos that in principle you can use any classical function
- 00:28can be recreated on a quantum computer but there was a
- 00:31Disclaimer this is not how it is done in practice and I would like to
- 00:34now show you quantum adders that are done in practice.
- 00:38built like this and are an incredibly important application for
- 00:42all kinds of quantum algorithms so addition is a
- 00:47incredibly important application for arithmetic and quantum adder
- 00:50are very important for the more complicated quantum
- 00:54algorithms let us first see what a classical adder
- 00:59so an adder does not make now in the decimal system like we do
- 01:02learn it in school but in the binary system that means
- 01:05the adder has two input bits x one and x two which can be respectively
- 01:09be zero or one and it calculates the sum x one plus
- 01:14x two in binary representation so that it really means the sum
- 01:18that means if both are zero, zero comes out the binary-
- 01:24representation is 00 if one of them is one comes one plus
- 01:30zero comes out so 1 the binary representation is zero one but
- 01:36if both are one plus one is two and two has the
- 01:41The binary representation 10 so this is what a classical
- 01:45adder does calculates two input bits both zero or one
- 01:49the real sum
- 01:52and therefore has two output bits which are typically called
- 01:57c for carry thus the carry bit and s for sum the sum
- 02:03Function values as written even more
- 02:08zero zero becomes zero zero zero one and one zero that the sum
- 02:13one becomes no carry but the sum is one and one plus
- 02:17one is a carry and the sum is zero some of them
- 02:21feel at the written adder added with the carry
- 02:24exactly the same that is the classic adder has
- 02:29two input bits 2 classic input bits what does the
- 02:34Quantum adder quantum adder has four input bits x one and
- 02:45x two and two more answer qubits that are initialized to zero
- 02:50can typically be and typically are
- 02:53Will be and it has four output qubits x one x two c
- 02:59and s are called the okay Quantum circuit with four
- 03:06qubits x one x two and two answer qubits has a total of 16 possible
- 03:11states sixteen base states two to the power of 4 I want to give them
- 03:18now not show what the quantum adder on
- 03:20does on all base states but only on those where the
- 03:24where the two output bits are initialized to zero that would have
- 03:30we would like it to do that here is the input x one x two 00 01 10 11
- 03:34Answer qubits are
- 03:38initialized to zero and at the end after the calculation shall be
- 03:43the x-en remain as they are so again the input
- 03:48that makes then the backward calculation
- 03:50and the two answer qubits are supposed to carry the carry-
- 03:56bit and the sum bit the quantum circuit sees
- 04:02as follows first look Answer-Qubits are both with zero
- 04:10initialized so and now the idea is to say well if
- 04:16x one and x two are both one then let the carry be one
- 04:23be we see exactly when the two are one then the carry is one at all
- 04:30something is done to the carry bit yes and the sum is calculated
- 04:37by looking is an x one one if yes with CNOT the
- 04:41Answer qubit flip no then it does nothing is
- 04:45x two one if yes with CNOT flip the answer qubit and
- 04:50if now it was the two one then the two one lift
- 04:52CNOTs otherwise if both were zero it is sum bit zero
- 04:57and if one was one and the other was zero then it is sum bit
- 05:01one so this is what a quantum adder looks like for two classical
- 05:10bits looks like for the time being now, of course, you can and that will
- 05:14of course also used in quantum algorithms in the quantum
- 05:18Adders also enter superpositions not only base states
- 05:24what happens if you put a superposition into the
- 05:27quantum adder so the answer qubits are again
- 05:30initialized with zero and the superposition has the form
- 05:33somehow often times 00 to somehow often times 01 alpha one
- 05:37plus alpha two times one zero alpha three times one
- 05:40one tensor the answer qubits are first of all not correlated
- 05:46so that 00 are the answer qubits multiplied out looks
- 05:53the state looks like that the base states in the superposition
- 05:56still get two zeros on it we had
- 06:06looked at how the base states |0000⟩ |0100⟩ |1000⟩ |1100⟩
- 06:11so the four that occur here like the ones through
- 06:18the quantum circuit here it is written again
- 06:22and the superposition is seen now is changed in the same way
- 06:27with the same amplitudes so that is this input state
- 06:30transitions to α_0 |0000⟩ + α_1 |0101⟩ + α_2 |1001⟩ + α_3 |1110⟩
- 06:36α_0 |0000⟩ + α_1 |0101⟩ + α_2 |1001⟩ + α_3 |1110⟩
- 06:42α_0 |0000⟩ + α_1 |0101⟩ + α_2 |1001⟩ + α_3 |1110⟩
- 06:46α_0 |0000⟩ + α_1 |0101⟩ + α_2 |1001⟩ + α_3 |1110⟩
- 06:48this is what the quantum adder looks like and this is what you can do now
- 07:01times differently write I would like to show them still the know
- 07:04we already know the quantum adder has four input bits and it has now
- 07:08two more answer qubits and they are now not going to be
- 07:11initialized to zero but we want to make the quantum circuit
- 07:14as such and then you don't necessarily have to
- 07:18be initialized to anything but we just look at
- 07:20the quantum circuit so it has four input bits which are called
- 07:23x one x two and answer qubits and has four output qubits
- 07:28x1 x2 c and s how to write c and s no yes
- 07:36x one and x two come out unchanged
- 07:39quantum circuit out again x three is the carry-
- 07:45Bit we have seen that becomes x three plus the carry of
- 07:49x one and x two this plus here is the exclusive or or
- 07:55this here is to say that x three is reversed if the carry is
- 07:59of x one x two is one we have already seen if
- 08:07x three was initialized with zero then the carry bit is
- 08:13yes 0 or 1 depending on what the sum of x one x two is
- 08:16yes and if x three was initialized with 1 then it will be yes
- 08:20is also reversed exactly when the two inputs
- 08:22bits were one then the sum is now zero the exclusive or
- 08:30and this complicated situation
- 08:34is reversed exactly when the carry is one can be
- 08:36one can write as formula briefly so x three xor carry of
- 08:40x one and x two and exactly the same
- 08:47you can also do with the sum bit that is x four the
- 08:50what before was zero or one xor the sum bit of
- 08:54x one and x two here is normal for them as a foil
- 08:58this is the xor the value is one exactly if exactly one
- 09:01of the two summands is one and that is called flipping
- 09:09Example now let's take a base state |0110⟩
- 09:15where now not both answer qubits were at zero
- 09:18but are initialized to one zero and if they want to
- 09:21see what the output state is of this quantum-
- 09:26circuit so you can follow it piece by piece
- 09:31what the Toffoli gate and the two CNOTs are doing
- 09:36feel free to stop and try important it comes
- 09:43out zero one one one the carry bit is not reversed
- 09:50because we are not at inputs one and the sum bit
- 09:54but is reversed because one of them is one
- 09:58Quantum adders as said have an enormous importance
- 10:06for many algorithms often is run in before one bit
- 10:10runs a qubit in also just changes it somehow
- 10:13so that you can calculate some kind of weighted sum with it
- 10:16but you can see that now simply is a circuit of a
- 10:21classical function calculated on quantum and really so maybe
- 10:29one more remark you see with this circuit he uses
- 10:32only Toffoli gate and and CNOT he could use x as well
- 10:36and this leads to the fact that base states in base states
- 10:40it is nice property if you think of classical
- 10:43boolean functions thinks quantum circuit the base state
- 10:46is not transferred to a base state, for example, in the case of the
- 10:49Hadamard uses it is not appropriate to use the classical Boolean
- 10:52function but here we have base state purely
- 10:55base state out superposition in exactly the same superposition out
Щоб увімкнути запис, виберіть мову в меню налаштувань відео.