It is always useful to check the documentation: https://qiskit.org/documentation/_modules/qiskit/visualization/state_visualization.html You can see there the source code for all visualization tools in
plot_bloch_multivector is somehow factorizing the state and converting the statevector data into products of individual qubit vectors in the Bloch sphere.
The steps are the following, import the factorization routine called
_bloch_multivector_data as follows:
from qiskit.visualization.utils import _bloch_multivector_data
and then store the data of your multivector called
bloch_data = (_bloch_multivector_data(state))
i=0,1,2,3 has three entries with correspond to the
i-th qubit in Cartesian coordinates ($x,y,z$), which can be used to get the angles.
For example if you chose qubit 2
then its coordinates are :
qubitvector_x=qubitvector for $x$,
qubitvector_y=qubitvector for $y$,
qubitvector_z=qubitvector for $z$.
The angles can be retrieved by looking at the definition of the spherical coordinates (in a unit sphere):
- the azimuthal angle is given by $\tan \varphi = y/x$, and
- the polar angle is given by $\cos \theta = z$.
Disclaimer: this procedure works only for products of single qubit states. This procedure will not work if you use any entangling gates (gates that apply to more than one qubit like CNOT) in your quantum circuit.