from qiskit import *
from qiskit.visualization import plot_bloch_multivector, visualize_transition, plot_histogram

# Create a quantum circuit with a single qubit
qc = QuantumCircuit(1)

qc.x(0)

qc.h(0)
qc.z(0)
qc.h(0)

# qc.draw()
qc.draw('mpl')

backend = Aer.get_backend('statevector_simulator')


out = execute(qc,backend).result().get_statevector()

plot_bloch_multivector(out)

visualize_transition(qc)

out = execute(qc,backend).result()
counts = out.get_counts()
plot_histogram(counts)

