from qiskit import QuantumCircuit,Aer,transpile
from qiskit.visualization import plot_state_qsphere
from math import pi
 
backend = Aer.get_backend("aer_simulator_statevector")

qc = QuantumCircuit(3)
qc.rx(pi, 0)
qc.ry(pi/8, 2)
qc.swap(0, 2)
qc.h(0)
qc.cp(pi/2,0, 1)
qc.cp(pi/4, 0, 2)
qc.h(1)
qc.cp(pi/2, 1, 2)
qc.h(2)
qc.save_statevector()

tqc = transpile(qc, backend)
job = backend.run(tqc)
result = job.result()
statevector = result.get_statevector()

plot_state_qsphere(statevector)

from qiskit.quantum_info import DensityMatrix, \
                                      Operator
from qiskit.visualization import plot_state_city

dens_mat = 0.5*DensityMatrix.from_label('11') + \
  0.5*DensityMatrix.from_label('+0')
tt_op = Operator.from_label('TT')
dens_mat = dens_mat.evolve(tt_op)

plot_state_city(dens_mat)

from qiskit import QuantumCircuit,Aer,transpile
from qiskit.visualization import plot_bloch_multivector
from math import pi

backend = Aer.get_backend("aer_simulator_statevector")

qc = QuantumCircuit(3)
qc.rx(pi, 0)
qc.ry(pi/8, 2)
qc.swap(0, 2)
qc.h(0)
qc.cp(pi/2,0, 1)
qc.cp(pi/4, 0, 2)
qc.h(1)
qc.cp(pi/2, 1, 2)
qc.h(2)
qc.save_statevector()

tqc = transpile(qc, backend)
job = backend.run(tqc)
result = job.result()
statevector = result.get_statevector()

plot_bloch_multivector(statevector)

from qiskit.quantum_info import DensityMatrix, \
                                      Operator
from qiskit.visualization import plot_state_hinton

dens_mat = 0.5*DensityMatrix.from_label('11') + \
  0.5*DensityMatrix.from_label('+0')
tt_op = Operator.from_label('TT')
dens_mat = dens_mat.evolve(tt_op)

plot_state_hinton(dens_mat)

from qiskit.quantum_info import DensityMatrix, \
                                      Operator
from qiskit.visualization import plot_state_paulivec

dens_mat = 0.5*DensityMatrix.from_label('11') + \
  0.5*DensityMatrix.from_label('+0')
tt_op = Operator.from_label('TT')
dens_mat = dens_mat.evolve(tt_op)

plot_state_paulivec(dens_mat)