You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
0.14.2- Qiskit Terra version:
3.7.6- Python version:
Windows 10 64 bit- Operating system:
What is the current behavior?
I am trying to use qsphere function to display the states of the qubits in my quantum circuit but I am unable to display labels to indicate the state and angles of the qubit state. I am attaching the code below
Steps to reproduce the problem
from qiskit import *
from qiskit.tools.visualization import plot_state_qsphere
import numpy as np
%matplotlib inline
qr = QuantumRegister(3)
cr = ClassicalRegister(3)
qc = QuantumCircuit(qr, cr)
qc.ry(np.pi/2, 0)
qc.cx(0, 1)
backend = Aer.get_backend('statevector_simulator')
out = execute(qc,backend).result().get_statevector()
show_state_phases = True, use_degrees = True
plot_state_qsphere(out)
What is the expected behavior?
I was discussing this issue on the Slack channel. Initially i assumed that plot_state_qsphere() will display labels by default but someone suggested I use, show_state_phases = True, use_degrees = True is show labels but adding this line did not make any difference. Could you please help me resolve this to display labels.
Suggested solutions
The text was updated successfully, but these errors were encountered:
The PR did indeed fix that fix this on master already. It hasn't been included in a release yet since it was a new feature so wasn't backportable as a bugfix [1] in the recent 0.14.2 bugfix release. The next version of qiskit terra 0.15.0 will include that PR adding the new features for the qsphere plot.
Since, this has already been fixed on master I'm going to close this issue. But, if I'm missing something please feel free to reopen this.
Information
0.14.2- Qiskit Terra version:
3.7.6- Python version:
Windows 10 64 bit- Operating system:
What is the current behavior?
I am trying to use qsphere function to display the states of the qubits in my quantum circuit but I am unable to display labels to indicate the state and angles of the qubit state. I am attaching the code below
Steps to reproduce the problem
What is the expected behavior?
I was discussing this issue on the Slack channel. Initially i assumed that plot_state_qsphere() will display labels by default but someone suggested I use, show_state_phases = True, use_degrees = True is show labels but adding this line did not make any difference. Could you please help me resolve this to display labels.
Suggested solutions
The text was updated successfully, but these errors were encountered: