#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 ![]() rho . | |
Operator & | RandomMixedState (Operator &Rho, itype Nancillae) |
Assigns to Rho a random mixed state from the induced measure on 1+Nancillae copies. | |
Operator & | HilbertSchmidtRandomize (Operator &Rho) |
Assigns to Rho a positive semidefinite matrix selected from Hilbert-Schmidt measure. Equivalent to RandomMixedState() with Nancillae =1. | |
Operator & | HaarRandomize (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 ![]() ![]() ![]() | |
double | Fidelity (Operator &Sigma, Operator &Rho) |
Computes the fidelity between two states as ![]() | |
double | Fidelity (Operator &Sigma, State &Psi) |
Computes the fidelity between a mixed state ![]() ![]() ![]() | |
double | Fidelity (State &Psi, Operator &Rho) |
Computes the fidelity between a pure state ![]() ![]() ![]() | |
double | Fidelity (State &Psi, State &Phi) |
Computes the fidelity between two pure states ![]() ![]() ![]() | |
double | NullspaceProjection (Operator &Sigma, Operator &Rho, double MinProbability) |
Computes the projection of ![]() ![]() | |
double | RelativeEntropy (Operator &Sigma, Operator &Rho, double MinProbability) |
Computes the relative entropy, or Kullback-Leibler divergence, of ![]() ![]() ![]() | |
void | RelativeEntropyAndNullProjection (double &RelEnt, double &NullProj, Operator &Sigma, Operator &Rho, double MinProbability) |
Computes the relative entropy of ![]() ![]() ![]() ![]() | |
Operator & | Positivize (Operator &M) |
Converts M to a positive-definite matrix by replacing all its negative eigenvalues with 0. | |
Operator & | SquareRoot (Operator &M) |
Replaces the Hermitian positive-definite matrix M with its unique positive-definite square root. | |
State & | Purify (const Operator &rho, State &psi) |
Operator & | PTrace (const State &psi, Operator &rho, bool flagTraceOverMSB) |
Does a simple partial trace of ![]() ![]() | |
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< complex > | partial_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 . |