Contents
Which is the sequence of gates equivalent to any qubit state?
Show that applying the sequence of gates: HZH, to any qubit state is equivalent to applying an X-gate. Find a combination of X, Z and H-gates that is equivalent to a Y-gate (ignoring global phase). 4. Digression: Measuring in Different Bases We have seen that the Z-axis is not intrinsically special, and that there are infinitely many other bases.
Why does the Z gate have no effect on a qubit?
Eigenvectors are very important in quantum computing, and it is important you have a solid grasp of them. You may also notice that the Z-gate appears to have no effect on our qubit when it is in either of these two states. This is because the states | 0⟩|0⟩ and | 1⟩|1⟩ are the two eigenstates of the Z-gate.
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]
What is the state of a qubit in a quantum circuit?
We can indeed see the state of the qubit is | 1⟩|1⟩ as expected. We can think of this as a rotation by ππ radians around the x-axis of the Bloch sphere. The X-gate is also often called a NOT-gate, referring to its classical analogue. Similarly to the X-gate, the Y & Z Pauli matrices also act as the Y & Z-gates in our quantum circuits:
What happens when you change the qubits in a circuit?
Try changing the gates in the circuit above. Calculate their tensor product, and then check your answer using the unitary simulator. Note: Different books, softwares and websites order their qubits differently. This means the tensor product of the same circuit can look very different.
How does the H gate work in a qubit gate?
Starting in the Z-basis, the H-gate switches our qubit to the X-basis, the Z-gate performs a NOT in the X-basis, and the final H-gate returns our qubit to the Z-basis. We can verify this always behaves like an X-gate by multiplying the matrices:
How to create a single qubit gate with two H Gates?
In the quick exercises above, we saw you could create an X-gate by sandwiching our Z-gate between two H-gates: Starting in the Z-basis, the H-gate switches our qubit to the X-basis, the Z-gate performs a NOT in the X-basis, and the final H-gate returns our qubit to the Z-basis.
Which is the correct equation for Qiskit U 3 gate?
Qiskit provides U 2 and U 1 -gates, which are specific cases of the U 3 gate in which θ = π 2θ= π 2, and θ = ϕ = 0 θ = ϕ= 0 respectively. You will notice that the U 1 -gate is equivalent to the R ϕ -gate. U 3(π 2,ϕ,λ) = U 2 = 1 √2 [ 1 −eiλ eiϕ eiλ+iϕ] U 3(0,0,λ) = U 1 =[10