Projecting a multipartite state to a bipartite state

65 views
Skip to first unread message

Pradip Laha

unread,
Jun 8, 2022, 7:57:26 AM6/8/22
to QuTiP: Quantum Toolbox in Python
Hi all,

I want to know what is the best way to code the following in Qutip.

Step 1: Take a joint density matrix of 4 subsystems, say rho_{abcd} with dimensions N_a, N_b, N_c, and  N_d, respectively.

For simplicity, lets take the following example:

import numpy as np
from qutip import *

Na, Nb, Nc, Nd = 10, 11, 12, 13

rho_a = coherent_dm(Na, np.sqrt(0.5))
rho_b = thermal_dm(Nb, 0.5, 'analytic')
rho_c = coherent_dm(Nc, np.sqrt(1.0))
rho_d = thermal_dm(Nd, 1.0, 'analytic')

rho_abcd = tensor(rho_a, rho_b, rho_c, rho_d)

Step 2: Perform the following operation <0_c; 0_d| \rho_{abcd} |0_c; 0_d>.

Here |0_c; 0_d> = |0_c> |0_d>, that is the tensor product of the vacua corresponding to subsystems c and d.
This operation projects the state to the vacua for subsystems c and d (if I understood correctly).

This should give a bipartite (unnormalized) state  for the 'ab' subsystem of dimension [[Na, Nb],[Na, Nb]] and shape [Na*Nb, Na*Nb], in qutip notation.

I am unable to neatly write down the code for step 2 in qutip.

Thanks in advance,

Pradip




Christian Staufenbiel

unread,
Jun 19, 2022, 4:28:51 PM6/19/22
to QuTiP: Quantum Toolbox in Python
Hi Pradip,
I thought about a solution to your problem for Step 2. I am not aware of a function that can do the computation directly in QuTiP (but there might be). The way I would solve it is by defining the following operator:

 O := Id(Na) x Id(Nb) x |0_c><0_c| x |0_d><0_d|  (where x is the tensor product)
Then you can multiply O with the density matrix rho_abcd and perform the partial trace over the subsystems C and D.

In QuTiP I would write this as the following:

op = tensor(qeye(Na),qeye(Nb), basis(Nc,0)*basis(Nc,0).dag(), basis(Nd,0)*basis(Nd,0).dag())
rho_ab = (rho_abcd*op).ptrace([0,1])

Note that ptrace takes a list of integers which subsystems should be kept!
I'm not 100% sure if that solves your problem. Please let me know :)

Best regards,
Chris

Pradip Laha

unread,
Jun 28, 2022, 5:03:06 AM6/28/22
to QuTiP: Quantum Toolbox in Python
Hi Chris,

Thanks a lot! Yeah, it worked.


Pradip
Reply all
Reply to author
Forward
0 new messages