Contents
How to optimize rotation of a qubit?
The task at hand is to optimize two rotation gates in order to flip a single qubit from state |0⟩ | 0 ⟩ to state |1⟩ | 1 ⟩. In the qubit rotation example, we wish to implement the following quantum circuit:
How is qubit rotation used in Pennylane example?
To see how PennyLane allows the easy construction and optimization of quantum functions, let’s consider the simple case of qubit rotation the PennyLane version of the ‘Hello, world!’ example. The task at hand is to optimize two rotation gates in order to flip a single qubit from state |0⟩ | 0 ⟩ to state |1⟩ | 1 ⟩.
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 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:
How are multiple qubits and entangled states represented?
1. Representing Multi-Qubit States We saw that a single bit has two possible states, and a qubit state has two complex amplitudes. Similarly, two bits have four possible states: And to describe the state of two qubits requires four complex amplitudes. We store these amplitudes in a 4D-vector like so:
Which is the correct form of a qubit?
For simplicity, we consider a qubit to have the form | φ 〉= α e iθ1 |0〉+ β e iθ2 |1〉, where α, β ∈ R and α2 + β2 =1. A qubit may be prepared by starting with an available component or superposition state and transforming it into the desired superposition state by applying a unitary transformation.
How to get the superposition state of a qubit?
One can obtain a superposition state by use of a rotation operator which, in its most general form, is the following matrix: (1) α e i θ 1 β e − i θ 2 β e i θ 2 −α e − i θ 1, where θ1 and θ2 are unknown phase angles. This leads to the superposition state (2) α e i θ 1 |0〉+β e i θ 2 |1〉.
Can a unitary transformation be performed on multiple qubits?
As in the single-qubit case, any unitary transformation is a valid operation on qubits. In general, a unitary transformation on n n qubits is a matrix U U of size 2n ×2n 2 n × 2 n (so that it acts on vectors of size 2n 2 n ), such that U −1 = U † U − 1 = U † .
How is the quantum state of multiple qubits represented?
More generally, you can see that the quantum state of n n qubits is represented by a unit vector v1 ⊗v2 ⊗⋯⊗vn v 1 ⊗ v 2 ⊗ ⋯ ⊗ v n of dimension 2⋅2⋅2⋯ = 2n 2 ⋅ 2 ⋅ 2 ⋯ = 2 n using this construction. Just as with single qubits, the quantum state vector of multiple qubits holds all the information needed to describe the system’s behavior.