2

I need to find the polar angles and azimuthal angles of the following bloch vector:

$$ \frac{1-i}{2}|0\rangle - \frac{i}{\sqrt{2}}|1\rangle $$

I just couldn't figure it out, and I could also not find out how I could factor out the global phase, can anyone here please help?

I got to the point where I knew that $\cos(\frac{\theta}{2}) = \frac{1-i}{2}$ and $\sin (\frac{\theta}{2}) e^{i\phi} = -\frac{i}{\sqrt{2}}$, I'm guessing I have to factor out some global phase here and ignore it in order to solve the equations, but I couldn't figure it out. I've tried looking elsewhere for methods on how to solve this, but could not find it.

glS
  • 24,708
  • 5
  • 34
  • 108
Spacetoon
  • 23
  • 4
  • I've edited my post with what I figured out so far. For $|0\rangle$ I'd say polar angle is 0 and for $|1\rangle$ it is $\pi$? – Spacetoon Jan 22 '23 at 20:11
  • does https://quantumcomputing.stackexchange.com/q/9404/55, https://quantumcomputing.stackexchange.com/a/10122/55, or one of the links therein, answer your question? – glS Jan 23 '23 at 10:25

2 Answers2

1

Start by writing your amplitudes in polar form $$ \frac{1}{\sqrt{2}}e^{-i\pi/4}|0\rangle+\frac{1}{\sqrt{2}}e^{-i\pi/2}|1\rangle. $$ This makes it easy to pull out the global phase, as you suggest. What should you pick? The one that makes the amplitude in front of $|0\rangle$ real. In other words, $$ e^{-i\pi/4}\left(\frac{1}{\sqrt{2}}|0\rangle+\frac{e^{-i\pi/4}}{\sqrt{2}}|1\rangle\right). $$ Now you can set $$ \cos\frac{\theta}{2}=\frac{1}{\sqrt{2}} $$ and $$ \sin\frac{\theta}{2}e^{i\phi}=\frac{1}{\sqrt{2}}e^{-i\pi/4}. $$ In other words, $\theta=\pi/2$ and $\phi=-\pi/4$.

DaftWullie
  • 57,689
  • 3
  • 46
  • 124
0

Let's assume you were able to compute the $x, y, z$ coordinates of the state on the Bloch sphere (where $r = 1$), then there is the standard conversion of cartesian coordinates $(x, y, z)$ to spherical coordinates $(r, \theta, \phi)$: $$ \cos \theta = \frac{z}{r} $$ $$ \cos \phi = \frac{x}{\sqrt{x^2 + y^2}} $$

To compute the cartesian coordinates $x, y, z$ for a state $\psi$ you first make a density matrix by computing the outer product of the state with itself: $$ \rho = |\psi\rangle\langle\psi| $$ and then compute something equivalent to this code:

def density_to_cartesian(rho: np.ndarray) -> Tuple[float, float, float]:
  """Compute Bloch sphere coordinates from 2x2 density matrix."""

a = rho[0, 0] b = rho[1, 0] x = 2.0 * b.real y = 2.0 * b.imag z = 2.0 * a - 1.0

rhundt
  • 988
  • 4
  • 12