Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

Partial traces
[Tensor product structures]

Collaboration diagram for Partial traces:

Methods for tracing an operator (or state projector) over part of a tensor product structure. More...

Functions

OperatorPTrace (const State &psi, Operator &rho, bool flagTraceOverMSB=false)
 Does a simple partial trace of $ |\psi\rangle\langle\psi| $ over as many dimensions as needed to fit the result in $ \rho $ .
DenseMatrix< complexpartial_trace (const DenseMatrix< complex > &m, const TensorProductStructure &TPS, ISet &indices)
 Creates and returns a new matrix which is the partial trace of m, over the indices indices in the tensor product structure TPS.
DenseMatrix< complexpartial_trace (const DenseVector< complex > &v, const TensorProductStructure &TPS, ISet &indices)
 Creates and returns a new matrix which is the partial trace of the projector onto v, over the indices indices in the tensor product structure TPS.
DenseMatrix< complexpartial_trace_asymm (const DenseVector< complex > &ket, const DenseVector< complex > &bra, const TensorProductStructure &TPS, ISet &indices)
 Creates and returns a new matrix which is the partial trace of the (non-Hermitian) outer product |ket><bra|, over the indices indices in the tensor product structure TPS.
StatePurify (const Operator &rho, State &psi)

Detailed Description

Methods for tracing an operator (or state projector) over part of a tensor product structure.


Function Documentation

Operator& PTrace const State psi,
Operator rho,
bool  flagTraceOverMSB
 

Does a simple partial trace of $ |\psi\rangle\langle\psi| $ over as many dimensions as needed to fit the result in $ \rho $ .

$ D=\mathrm{Dim}( \rho )$ must evenly divide $\mathrm{Dim}( |\psi\rangle )$ . PTrace will trace out part of $ |\psi\rangle\langle\psi| $ to fit the result in $ \rho $ . The assumption is that we want to trace over the least significant indices of $ |\psi\rangle\langle\psi| $ -- i.e., $ \rho_{i,j} = \sum_k{ \psi_{iD+k}\psi^*_{jD+k} } $ , but if flagTraceOverMSB is set, then we'll compute $ \rho_{i,j} = \sum_k{ \psi_{kD+i}\psi^*_{kD+j} }$ .

State& Purify const Operator rho,
State psi
 

$ D=\mathrm{Dim}( \rho )$ must evenly divide $\mathrm{Dim}( |\psi\rangle )$ . This function basically undoes a partial trace (nonuniquely!), by generating a pure state on a larger Hilbert space which, when partially traced over its least- significant bits (the ancilla), will yield the desired density matrix. This is not necessarily possible unless the ancilla is just as big as the system with the mixed state, but we try anyway.

Eigenvalues of $ \rho $ less than $ 10^-9$ are ignored. All others get their eigenvectors correlated with one of a set of mutually orthogonal pure states on the ancilla. The whole superposition is returned in psi. If the ancilla is smaller than the original system but the Schmidt rank of $ \rho $ is low, then purification will be successful. Otherwise we generate another warning message, and return a state that might do sort of well.


Generated on Wed Jun 14 22:25:40 2006 for linalg by  doxygen 1.4.4