# We import the necessary functions from Qiskit
from qiskit.visualization import plot_bloch_multivector, visualize_transition
from qiskit import QuantumCircuit, Aer, execute
from math import pi

# We create a quantum circuit with one qubit
qc = QuantumCircuit(1)

# We execute the quantum circuit on a statevector simulator backend
backend = Aer.get_backend('statevector_simulator')
result = execute(qc, backend).result()

# We get the statevector of the quantum circuit
statevector = result.get_statevector(qc)

# We plot the statevector on the Bloch sphere
plot_bloch_multivector(statevector)

qc.ry(pi/2, 0)

qc.draw(output='mpl')

visualize_transition(qc)

qc1 = QuantumCircuit(1)
qc1.rx(pi/3, 0)

qc1.draw(output='mpl')

visualize_transition(qc1)

qc2 = QuantumCircuit(1)
qc2.rz(pi, 0)

qc2.draw(output='mpl')

visualize_transition(qc2)