# Packeges you must load
from qiskit import QuantumRegister, ClassicalRegister, QuantumCircuit
from qiskit import transpile
from qiskit.providers.aer import QasmSimulator

# The packeges you should load )()
from qiskit.quantum_info import Statevector
from qiskit.visualization import plot_state_qsphere
from qiskit.quantum_info import DensityMatrix   # For using Density matrix
from qiskit.visualization import plot_state_city
from qiskit.visualization import plot_state_hinton
from qiskit.visualization import plot_state_paulivec
from qiskit.visualization import plot_bloch_multivector
from qiskit.visualization import plot_histogram

q = QuantumRegister(1)

c = ClassicalRegister(1)

qc = QuantumCircuit(q,c)

qc.draw('mpl')

ψ1 = Statevector(qc)

ψ1.draw('latex')

plot_state_qsphere(qc)

Statevector(qc).draw('latex')

ρ1 = DensityMatrix(qc)
ρ1.draw('latex',prefix = '\\rho_1 = ')

plot_state_city(qc)

plot_state_hinton(qc)

plot_state_paulivec(qc)

plot_bloch_multivector(qc)

qc.measure(q[0],c[0])
qc.draw('mpl')

backend = QasmSimulator()
result = backend.run(transpile(qc,backend),shots=1024).result()
counts = result.get_counts()
plot_histogram(counts)

# It can be nice if you try the effect of different gates on a circuit with one qubit gate



