from qiskit import QuantumCircuit,BasicAer,execute
from qiskit.visualization import *

qc=QuantumCircuit(2,2)
qc.h(0)
qc.x(1)
qc.draw(output="mpl")

backend=BasicAer.get_backend('statevector_simulator')
job=execute(qc,backend)
result=job.result()
sv=result.get_statevector()
print(sv)


plot_state_city(sv)

plot_state_qsphere(sv)

qc=QuantumCircuit(2,2)
qc.x(0)
qc.h(0)
qc.h(1)
qc.s(0)

qc.draw(output="mpl")

backend=BasicAer.get_backend('statevector_simulator')
job=execute(qc,backend)
result=job.result()
sv=result.get_statevector()
print(sv)

plot_state_qsphere(sv)

plot_state_paulivec(sv)

plot_state_hinton(sv)

plot_bloch_multivector(sv)

qc=QuantumCircuit(2,2)
qc.h(0)
qc.cx(0,1)
qc.draw(output="mpl")

backend=BasicAer.get_backend('statevector_simulator')
job=execute(qc,backend)
result=job.result()
sv=result.get_statevector()
print(sv)

plot_bloch_multivector(sv)

plot_state_qsphere(sv)

plot_state_city(sv)

