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

quantum.cpp File Reference

Source code for several of the methods in the quantum library. More...

#include "linalg.h"
#include "quantum.h"

Include dependency graph for quantum.cpp:


Functions

bool PathOpen (const char *pathname, std::ofstream &os)
 Opens os for writing to the file given by pathname. Creating all necessary directories. Returns FALSE if it fails.
void SimplifySubsystemDivision (TensorProductStructure &Universe, ISet &Subsystem)
 Specialized function to collapse a TensorProductStructure for partial iteration.
double Entanglement (const State &psi, const TensorProductStructure &Universe, ISet &SubSystem)
 Computes the bipartite entanglement of psi between SubSystem and its complement, using Von Neumann entropy.
double Entropy (Operator &rho)
 Computes the Von Neumann entropy $ H(\rho) = -\mathrm{Tr}\rho\ln\rho $ of the positive semidefinite matrix rho.
OperatorRandomMixedState (Operator &Rho, itype Nancillae)
 Assigns to Rho a random mixed state from the induced measure on 1+Nancillae copies.
OperatorHilbertSchmidtRandomize (Operator &Rho)
 Assigns to Rho a positive semidefinite matrix selected from Hilbert-Schmidt measure. Equivalent to RandomMixedState() with Nancillae=1.
OperatorHaarRandomize (Operator &Rho)
 Assigns to Rho a random pure state. Equivalent to RandomMixedState() with Nancillae=0.
double TraceNorm (Operator &M)
 Computes the sum of the absolute values of the eigenvalues of a Hermitian matrix M.
double InfinityNorm (Operator &M)
 Computes the square root of the largest eigenvalue of $ M^\dagger M $ . If $ M $ is Hermitian, then this is the maximum of the absolute values of $ M $ 's eigenvalues.
double Fidelity (Operator &Sigma, Operator &Rho)
 Computes the fidelity between two states as $ F = \left[\mathrm{Tr}\sqrt{\sqrt{\rho}\sigma\sqrt{\rho}}\right]^2 $ .
double Fidelity (Operator &Sigma, State &Psi)
 Computes the fidelity between a mixed state $ \sigma $ and a pure state $ \left|\psi\right\rangle $ : $ F = \left\langle\psi\right|\sigma\left|\psi\right\rangle $ .
double Fidelity (State &Psi, Operator &Rho)
 Computes the fidelity between a pure state $ \left|\psi\right\rangle $ and a mixed state a mixed state $ \rho $ : $ F = \left\langle\psi\right|\rho\left|\psi\right\rangle $ .
double Fidelity (State &Psi, State &Phi)
 Computes the fidelity between two pure states $ \left|\phi\right\rangle $ and $ \left|\psi\right\rangle $ : $ F = \left|\left\langle\psi|\phi\right\rangle\right|^2 $ .
double NullspaceProjection (Operator &Sigma, Operator &Rho, double MinProbability)
 Computes the projection of $ \rho $ onto the nullspace of $ \sigma $ .
double RelativeEntropy (Operator &Sigma, Operator &Rho, double MinProbability)
 Computes the relative entropy, or Kullback-Leibler divergence, of $ \sigma $ relative to $ \rho $ : $ S(\rho||\sigma) = \mathrm{Tr}\rho\ln\frac{\rho}{\sigma} $.
void RelativeEntropyAndNullProjection (double &RelEnt, double &NullProj, Operator &Sigma, Operator &Rho, double MinProbability)
 Computes the relative entropy of $ \sigma $ relative to $ \rho $ and the projection of $ \rho $ onto $ \sigma $ 's null space.
OperatorPositivize (Operator &M)
 Converts M to a positive-definite matrix by replacing all its negative eigenvalues with 0.
OperatorSquareRoot (Operator &M)
 Replaces the Hermitian positive-definite matrix M with its unique positive-definite square root.
StatePurify (const Operator &rho, State &psi)
OperatorPTrace (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 $ .
Operator partial_trace (const State &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 State &ket, const State &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.
Operator partial_trace (const Operator &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.

Detailed Description

Source code for several of the methods in the quantum library.


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