import numpy as np

# Importing standard Qiskit libraries
from qiskit import QuantumCircuit,execute, transpile, Aer, IBMQ
from qiskit.tools.jupyter import *
from qiskit.visualization import *
from ibm_quantum_widgets import *
from qiskit.providers.aer import QasmSimulator

# Loading your IBM Quantum account(s)
provider = IBMQ.load_account()

from qiskit.visualization import plot_state_qsphere
from qiskit.visualization import plot_bloch_multivector

qc=QuantumCircuit(1)
statevector_simulator = Aer.get_backend('statevector_simulator')
result=execute(qc,statevector_simulator).result()
statevector_results=result.get_statevector(qc)
plot_bloch_multivector(statevector_results)

plot_state_qsphere(statevector_results)

qc.x(0)


result=execute(qc,statevector_simulator).result()
statevector_results=result.get_statevector(qc)
plot_bloch_multivector(statevector_results)

plot_state_qsphere(statevector_results)


qc.h(0)
result=execute(qc,statevector_simulator).result()
statevector_results=result.get_statevector(qc)
plot_bloch_multivector(statevector_results)


plot_state_qsphere(statevector_results)

