From the course: Cloud Quantum Computing Essentials
Unlock this course with a free trial
Join today to access over 25,600 courses taught by industry experts.
Quantum entanglement with CNOT gate
From the course: Cloud Quantum Computing Essentials
Quantum entanglement with CNOT gate
- [Instructor] In this example, we are demonstrating quantum entanglement with the use of the not gate and a new gate to us, the cnot. So let me show you how this works. In lines one through five, you're setting up your register with two qubits and you're initializing both of them to zero. So you can see that here. That's on line four of the code. The entangle section consists of these two operations. So the first operation is the had on the first qubit. So take a look at the circle notation when I click here and this is line eight. When I click this you can see how the had puts the first qubit into a superposition. Then subsequently this is the notation in this language for a cnot, which will then entangle on the first qubit. You can see it's being passed a which is the first qubit line nine. So when I click this watch what happens in the circle notation. Did you see that? I'm going to do it again so you can see…