Hi Sakhouf,
QuTiP has a guide for this:
https://qutip.org/docs/latest/guide/guide-visualization.html#quantum-process-tomography.
I would recommend starting there.
For your particular case, one could write something like:
""" GHZ tomography """
import matplotlib.pyplot as plt
from qutip import tensor
from qutip import spre, spost, qeye, sigmax, sigmay, sigmaz
from qutip.qip.operations import hadamard_transform, cnot
from qutip.tomography import qpt, qpt_plot_combined
op_basis = [[qeye(2), sigmax(), sigmay(), sigmaz()]] * 3
op_labels = [["i", "x", "y", "z"]] * 3
# plot chi for identity operation for fun and education:
U = qeye([2] * 3)
U_rho = spre(U) * spost(U.dag())
chi = qpt(U_rho, op_basis)
fig, ax = qpt_plot_combined(chi, op_labels)
ax.set_title("chi: Identity")
plt.show()
# plot chi for GHZ circuit [H(0), CNOT(0, 1), CNOT(1, 2)]:
H0 = tensor(hadamard_transform(), qeye(2), qeye(2))
CNOT01 = tensor(cnot(), qeye(2))
CNOT02 = tensor(qeye(2), cnot())
U = CNOT02 * CNOT01 * H0
U_rho = spre(U) * spost(U.dag())
chi = qpt(U_rho, op_basis)
fig, ax = qpt_plot_combined(chi, op_labels)
ax.set_title("chi: GHZ circuit")
plt.show()
# EOF
There are certainly nicer ways to construct the GHZ circuit in QuTiP
using
https://qutip.org/docs/latest/guide/qip/qip-basics.html#quantum-circuit,
but I thought it would be instructive to use low-level gate
construction here.
Regards,
Simon