I'd like the plot_bloch_multivector function (or some other function that I can use in Qiskit) to display a Bloch sphere in a way that makes it clear whether the arrow points toward the front of the sphere or toward the back of the sphere. As it is, the display of |-> can be mistaken for an arrow that's undergone an ry(pi/4) and rz(p/4) operation from |0>.
2 Answers
normally it should always label x,y. Can you provide a picture of your output looks like. Normal way to fix it, is just reinstall qiskit-terra. Or just imagine it, because it only got one position of view.
from qiskit import QuantumCircuit
from qiskit.quantum_info import Statevector
from qiskit.visualization import plot_bloch_multivector
%matplotlib inline
qc = QuantumCircuit(2)
qc.h(0)
qc.x(1)
state = Statevector.from_instruction(qc)
plot_bloch_multivector(state)
-
-
$\begingroup$ @bburd good idea, I will request a issue and pr about this. $\endgroup$– poigJun 18 at 21:48
-
$\begingroup$ @bburd github.com/Qiskit/qiskit-terra/issues/8202#issue-1275923578 $\endgroup$– poigJun 20 at 18:30
-
$\begingroup$ @bburd current solution is you can make change of github.com/Qiskit/qiskit-terra/blob/…, to add any parameter that is allowed for
FancyArrowPatch
$\endgroup$– poigJun 20 at 18:33 -