Contents
How do two Hadamard gates act on a single state?
In your case, you applied the Hadamard gate, H, twice on (presumably) the | 0 ⟩ state, and so you got | 0 ⟩ as your result. This happens because it is a requirement for quantum computing that gates be unitary. A unitary matrix U is defined as a matrix where
How to apply a gate to one qubit at a time?
If we want to apply a gate to only one qubit at a time (such as in the circuit below), we describe this using tensor product with the identity matrix, e.g.: We can see Qiskit has performed the tensor product: X⊗I = [0 I I 0] = ⎡ ⎢ ⎢ ⎢⎣0 0 1 0 0 0 0 1 1 0 0 0 0 1 0 0⎤ ⎥ ⎥ ⎥⎦ X ⊗ I = [ 0 I I 0] = [ 0 0 1 0 0 0 0 1 1 0 0 0 0 1 0 0]
How to create a circuit with multiple qubits?
Create a quantum circuit that produces the Bell state: 1 √2 (|01⟩+|10⟩) 1 2 ( | 01 ⟩ + | 10 ⟩) . Use the statevector simulator to verify your result. The circuit you created in question 1 transforms the state |00⟩ | 00 ⟩ to 1 √2 (|01⟩+|10⟩) 1 2 ( | 01 ⟩ + | 10 ⟩), calculate the unitary of this circuit using Qiskit’s simulator.
What happens when you have multiple qubits in a quantum computer?
However, if all we had in a quantum computer were single-qubit gates, then a calculator and certainly a classical supercomputer would dwarf its computational power. Quantum computing power arises, in part, because the dimension of the vector space of quantum state vectors grows exponentially with the number of qubits.
Which is the control qubit of the CNOT gate?
If we now try to apply the CNOT gate to the |10> state, by definition as the control qubit is |1>, the second qubit should be flipped from |0> to |1>. Let’s observe it: As expected, we get |11>.
How are quantum computers built on the Hadamard gate?
Quantum computers are built on top of single-qubit and 2-qubit operators. In the last two articles, we covered few single-qubit gates, and especially the Hadamard gate which puts a qubit into superposition. Here, we will explore the 2-qubit operators and more precisely we will look at putting qubits into entanglement with the C-NOT gate.
How to transform a truth table to a C-NOT gate?
As the C-NOT gate takes two qubits as inputs and two qubits as output it will be a 4×4 matrix. There is a useful technique to transform a truth table to a matrix. starting at row 0 column 0, you label the columns and rows consecutively in binary, from 00 to 11 for example.