From the course: Quantum Computing Fundamentals
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Represent multiple qubits with Qiskit
From the course: Quantum Computing Fundamentals
Represent multiple qubits with Qiskit
- [Instructor] Let's see how to create quantum circuits with multiple qubits by modifying our previous example program which displays a single qubit state on the Bloch sphere. Growing the circuit from one to two bits is as simple as changing the parameters that we use to initialize the quantum and classical registers from one to two. This will create a circuit with two qubits, apply the Hadamard or H operation on both of them, then measure them and place the results into the corresponding classical bits. I'll click the Run All button to run the entire notebook. Now we see two Bloch spheres, representing the final state of our two qubits after being measured. The first qubit, indexed as number zero is on the left and the second qubit, indexed as cubit number one is on the right. Also, notice that the printed state vector just above that contains four numbers since we now have a two qubit system. Now, rather than…