How can I perform partial trace for a pure state with four subsystems?

10 ビュー (過去 30 日間)
Vikash
Vikash 2025 年 8 月 18 日
コメント済み: Vikash 2025 年 8 月 19 日
Hello everyone,
I am working a quantum system of Hilbert space 2X2XNXN and investigating the dynamical evolution of the entanglement between subsystems (1,3) and (2,4). At every time step, I have a pure state \ket{psi} of dimension 2X2XNXN, and I want to find a reduced density matrix after tracing out subsystems 2nd and 4th, i.e., the reduced density matrix should be 2NX2N dimensional.
I looked at some functions which are available online for doing these (one of the very famous one is from QETLAB) but they are very slow and I need to call them after each time step.
Given that I have pure state at all time steps, is there an efficient way to do this partial trace without using those complicated functions?

回答 (1 件)

Matt J
Matt J 2025 年 8 月 18 日
Does this do what you want?
% reshape |psi> into tensor (s1,s2,s3,s4)
psi_tensor = reshape(psi,[2,2,N,N]);
% reorder to group (s1,s3) vs (s2,s4), then flatten
psi_mat = reshape(permute(psi_tensor,[1,3,2,4]), [2*N, 2*N]);
% reduced density matrix rho_13 = psi_mat * psi_mat'
rho_13 = psi_mat * psi_mat';
  1 件のコメント
Vikash
Vikash 2025 年 8 月 19 日
Hi Matt J,
Thanks for your reply. I did try that and unfortunately it is not working. I also thought it should be straighforward.
For example, I am doing something like this.
% Standard method using a function from QETLAB
rho = sparse(psif*psif');
rhoC = sparse(PartialTrace(rho, [2 4], [2 2 dimL dimL]));
% The method you suggested
% reshape |psi> into tensor (s1,s2,s3,s4)
psi_tensor = reshape(full(psif),[2,2,dimL,dimL]);
% reorder to group (s1,s3) vs (s2,s4), then flatten
psi_mat = reshape(permute(psi_tensor,[1,3,2,4]), [2*dimL, 2*dimL]);
% reduced density matrix rho_13 = psi_mat * psi_mat'
rho_13 = psi_mat * psi_mat';
where I took dimL = 5 as an example and psif is column vector of dimension 4*dimL*dimL. These two methods produce different output as attached in the image.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeOperating on Diagonal Matrices についてさらに検索

製品


リリース

R2024b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by