From the course: Quantum Computing Fundamentals
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Phase shift gates with Qiskit
From the course: Quantum Computing Fundamentals
Phase shift gates with Qiskit
- [Olivia] To demonstrate some of the phase shift gates with Qiskit, we'll use this simple circuit, which initializes three qubits with Hadamard gates. On the block spheres below, we can see that that means all three of their state vectors are pointing in the same direction along the X-axis. Now, to apply an S-gate to the middle qubit, I'll type circuit.s and give it the index of 1. While we're at it, let's go ahead and apply an S-dagger gate to the last qubit by typing circuit.sdg with an index of 2. I'll click the Run All button to run all the cells and we can see the updated circuit diagram and visualizations on the block spheres. Remember that the left qubit shows the state that all three qubits were in before we applied the S-gates. The S-gate phase shifted the middle qubit by pi over two radians, which rotated it 90 degrees counterclockwise around the Z-axis, and the S-dagger gate phase shifted the third qubit…
Contents
-
-
-
-
-
-
Hadamard gate4m 30s
-
(Locked)
Hadamard gate with Qiskit3m 3s
-
(Locked)
Measurement on an arbitrary basis6m
-
(Locked)
Phase shift gates4m 27s
-
(Locked)
Phase shift gates with Qiskit1m 55s
-
(Locked)
Parameterized rotation gates3m 23s
-
(Locked)
Parameterized rotation gates with Qiskit3m 1s
-
(Locked)
Single-qubit gates on multi-qubit states3m 57s
-
(Locked)
Challenge: Random numbers1m 45s
-
(Locked)
Solution: Random numbers2m 2s
-
-
-
-
-
-