# importing Qiskit
from qiskit import Aer, transpile, assemble
from qiskit import QuantumCircuit, ClassicalRegister, QuantumRegister
from qiskit.visualization import plot_histogram, plot_bloch_multivector
from qiskit.visualization import plot_state_paulivec, plot_state_hinton, plot_state_city
from qiskit.visualization import plot_state_qsphere

# import basic plot tools
from qiskit.visualization import plot_histogram, plot_bloch_multivector

import matplotlib.pyplot as plt

#get backend simulator
sim = Aer.get_backend('aer_simulator') 

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

#print circuit
print(qc)

#draw bloch spheres
qc.save_statevector()
statevector = sim.run(qc).result().get_statevector()

print("\n")
print(statevector)
print("\n")

plot_bloch_multivector(statevector)

plot_state_city(statevector)

plot_state_qsphere(statevector)

