improved ptrace for pure states

61 views
Skip to first unread message

Rajeev Singh

unread,
Apr 17, 2015, 4:42:45 PM4/17/15
to qu...@googlegroups.com
Hi,

The current implementation of partial trace, though generic, has a
heavy footprint in terms of memory once the system size is somewhat
large even for pure states (tracing 7 out of 13 spins require about
2gb RAM). For this case I have implemented an algorithm which requires
much less memory and is much faster for large systems (~10 times
faster for tracing 6 out of 12 spins). I do not have sufficient
understanding of the code structure of qutip to implement the
algorithm in the library directly. However if someone is interested
and have the required expertise, they are welcome to copy the code in
qutip. A self-contained program which compares this implementation to
that of qutip can be found here -

https://www.dropbox.com/s/bzhc629e28ffun8/ptrace.py?dl=0

I hope it is useful to someone else too.

Cheers,
Rajeev

Paul Nation

unread,
Apr 17, 2015, 9:32:31 PM4/17/15
to qu...@googlegroups.com
Indeed, we immediately form the density matrix from a given state vector which is not an optimal way to do it. I will look to see what you did an see how to implement it. I think this hasn’t been noticed until now since taking the partial trace of a density matrix is more common than tracing over a state vector.

Paul
> --
> You received this message because you are subscribed to the Google Groups "QuTiP: Quantum Toolbox in Python" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to qutip+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages