43double Fidelity(
const QState& a,
const QState& b);
66double Purity(
const QState& s);
86bool IsPure(
const QState& s,
double tol = 1e-12);
double VonNeumannEntropy(const QState &s)
Compute the von Neumann entropy of a quantum state in bits.
double Purity(const QState &s)
Compute the purity of a quantum state.
double Fidelity(const QState &a, const QState &b)
Compute fidelity between two QState objects of the same backend type.
double TraceDistance(const QState &a, const QState &b)
Compute the trace distance between two QState objects of the same backend type.
bool IsPure(const QState &s, double tol)
Check whether a quantum state is pure within a numerical tolerance.