I have several questions, but before ask, I want to write some theoretical. As we know, we can represent any single-qubit quantum state by the next representation:
$$ |\psi\rangle=c_0|0\rangle+c_1|1\rangle, $$ using two numbers, $c_0$ and $c_1$, called probability amlitudes.
We can put these probability amplitudes to vector-column:
$$ \begin{bmatrix} c_0 \\ c_1 \\ \end{bmatrix} $$
In other side, we can represent any single-qubit quantum state next:
$\theta$ and $\phi$ represents next angles in Bloch sphere:
As we can see, enough only one complex number to represent single-qubit quantum state, using $|0\rangle$ and $|1\rangle$ base. In this case $c_0 = \cos{\frac{\theta}{2}}$ and $c_1 = e^{i\phi}\sin{\frac{\theta}{2}}$. By watching Bloch Sphere and using probability amplitudes we can write 6 the most usual quantum states:
$|0\rangle = \cos{\frac{0}{2}}|0\rangle + e^{i0}\sin{\frac{0}{2}}|1\rangle = 1|0\rangle+0|1\rangle=\begin{bmatrix} 1 \\ 0 \\ \end{bmatrix}$
$|1\rangle = \cos{\frac{\pi}{2}}|0\rangle + e^{i0}\sin{\frac{\pi}{2}}|1\rangle = 0|0\rangle+1|1\rangle=\begin{bmatrix} 0 \\ 1 \\ \end{bmatrix}$
$|+\rangle = \cos{\frac{\pi}{4}}|0\rangle + e^{i0}\sin{\frac{\pi}{4}}|1\rangle = \frac{1}{\sqrt{2}}|0\rangle+\frac{1}{\sqrt{2}}|1\rangle=\begin{bmatrix} \frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} \\ \end{bmatrix}$
$|-\rangle = \cos{\frac{\pi}{4}}|0\rangle + e^{i\pi}\sin{\frac{\pi}{4}}|1\rangle = \frac{1}{\sqrt{2}}|0\rangle+(-1)*\frac{1}{\sqrt{2}}|1\rangle=\frac{1}{\sqrt{2}}|0\rangle-\frac{1}{\sqrt{2}}|1\rangle=\begin{bmatrix} \frac{1}{\sqrt{2}} \\ -\frac{1}{\sqrt{2}} \\ \end{bmatrix}$
$|+i\rangle = \cos{\frac{\pi}{4}}|0\rangle + e^{i\frac{\pi}{2}}\sin{\frac{\pi}{4}}|1\rangle = \frac{1}{\sqrt{2}}|0\rangle+i*\frac{1}{\sqrt{2}}|1\rangle=\begin{bmatrix} \frac{1}{\sqrt{2}} \\ \frac{i}{\sqrt{2}} \\ \end{bmatrix}$
$|-i\rangle = \cos{\frac{\pi}{4}}|0\rangle + e^{i\frac{3\pi}{2}}\sin{\frac{\pi}{4}}|1\rangle = \frac{1}{\sqrt{2}}|0\rangle+(-i)*\frac{1}{\sqrt{2}}|1\rangle=\frac{1}{\sqrt{2}}|0\rangle-i*\frac{1}{\sqrt{2}}|1\rangle=\begin{bmatrix} \frac{1}{\sqrt{2}} \\ -\frac{i}{\sqrt{2}} \\ \end{bmatrix}$
Let me now use Qiskit. We can use U3 universal matrix to create any single-qubit quantum state. For example, if I use
qc = QuantumCircuit(1)
qc.u3(pi/2,pi/2,0,0)
we will have $|+i\rangle$ state with next statevector:
However, if we do next code:
qc = QuantumCircuit(1)
qc.h(0)
qc.rz(pi/2,0)
we will have next statevector:
As I understand, here is used global phase. But how can I connect these two statevectors with each other? And why it's difference between each other? Honestly, I had experience only with single-qubit representation, when we use only one complex number, and $i$ can be only in second coefficient of Jones vector. But when I see two complex numbers - I am little bit confused.
Additionally, if we start from $|+\rangle$ state and rotate state around Z for $\frac{\pi}{4}$ angle, we can do it by using "rc" gate:
qc = QuantumCircuit(1)
qc.h(0)
qc.rz(pi/4,0)
and we will have next result:
Or we will use next gate:
qc = QuantumCircuit(1)
qc.h(0)
qc.u1(pi/4,0)
and we will have next result:
Again, in first case we will have two complecs numbers, in second case only one, but states are same.
Could you, please, explain these differences?
Thank you!