![]() |
ECF 1.5
|
Public Member Functions | |
| void | applyOp (int space) |
| void | applyOp (int startSpace, int endSpace) |
| void | applyOp (int space1, int space2, Basis &op) |
| void | applyOp (int space1, int space2, int space3, Basis &op) |
| void | applyOp (int space, algebra::mat &U) |
| void | applyOp (algebra::mat &U, int transitSpace) |
| void | applyConditionalOp (int condSpace, int cond, int space, algebra::mat &U) |
| void | swap (int space1, int space2) |
| void | measureAndSave (int measureSpace, int saveSpace) |
| void | measure (int measureSpace) |
| double | SafeLog (double x) |
| double | ShannonEntropy () |
| double | entropy () |
| double | calculatePr (int measureSpace, int state) |
| double | calculatePr (int space1, int state1, int space2, int state2) |
| double | calculatePr (const std::vector< int > &spaceList, const std::vector< int > &stateList) |
| void | splitAndSave (double p1, double p2, int space) |
| void | computeDensityMat (algebra::mat &output) |
| void | computeDensityMat (std::vector< Basis > &basis, algebra::mat &output) |
| void | computeDensityMatFast (algebra::mat &output) |
| void | trace (int space, DensityList &output) |
| void | trace (int space) |
| double | trace () |
| void | project (int space, int state, DensityList &output) |
| void | project (int space, int state) |
| void | CNOT (int controlSpace, int targetSpace) |
| void | NOT (int space) |
| void | applyHadamard (int space) |
| void | applyRotation (int space, double rotation) |
| void | applySU2 (int space, double p, double theta, double psi) |
| void | applyHadamard (int target, int control) |
| void | applyNOT (int target, int control) |
| void | applyPiOver8 (int target, int control) |
| void | applySU2 (int target, int control, double p, double theta, double psi) |
| void | conditionalSet (std::vector< int > &targetSpace, std::vector< int > &targetVal, std::vector< int > &condSpace, std::vector< int > &condVal) |
| void | print (std::ostream &f) |
Public Attributes | |
| std::vector< int > | dimension |
| std::list< KetBra > | density |
| void quantum::DensityList::applyConditionalOp | ( | int | condSpace, |
| int | cond, | ||
| int | space, | ||
| algebra::mat & | U | ||
| ) |
Definition at line 439 of file Quantum.cpp.
| void quantum::DensityList::applyHadamard | ( | int | space | ) |
Definition at line 680 of file Quantum.cpp.
| void quantum::DensityList::applyHadamard | ( | int | target, |
| int | control | ||
| ) |
Definition at line 722 of file Quantum.cpp.
| void quantum::DensityList::applyNOT | ( | int | target, |
| int | control | ||
| ) |
Definition at line 772 of file Quantum.cpp.
| void quantum::DensityList::applyOp | ( | algebra::mat & | U, |
| int | transitSpace | ||
| ) |
Definition at line 571 of file Quantum.cpp.
| void quantum::DensityList::applyOp | ( | int | space | ) |
Definition at line 113 of file Quantum.cpp.
| void quantum::DensityList::applyOp | ( | int | space, |
| algebra::mat & | U | ||
| ) |
Definition at line 504 of file Quantum.cpp.
| void quantum::DensityList::applyOp | ( | int | space1, |
| int | space2, | ||
| Basis & | op | ||
| ) |
Definition at line 281 of file Quantum.cpp.
| void quantum::DensityList::applyOp | ( | int | space1, |
| int | space2, | ||
| int | space3, | ||
| Basis & | op | ||
| ) |
Definition at line 353 of file Quantum.cpp.
| void quantum::DensityList::applyOp | ( | int | startSpace, |
| int | endSpace | ||
| ) |
Definition at line 174 of file Quantum.cpp.
| void quantum::DensityList::applyPiOver8 | ( | int | target, |
| int | control | ||
| ) |
Definition at line 736 of file Quantum.cpp.
| void quantum::DensityList::applyRotation | ( | int | space, |
| double | rotation | ||
| ) |
Definition at line 691 of file Quantum.cpp.
| void quantum::DensityList::applySU2 | ( | int | space, |
| double | p, | ||
| double | theta, | ||
| double | psi | ||
| ) |
Definition at line 703 of file Quantum.cpp.
| void quantum::DensityList::applySU2 | ( | int | target, |
| int | control, | ||
| double | p, | ||
| double | theta, | ||
| double | psi | ||
| ) |
Definition at line 751 of file Quantum.cpp.
| double quantum::DensityList::calculatePr | ( | const std::vector< int > & | spaceList, |
| const std::vector< int > & | stateList | ||
| ) |
Definition at line 1009 of file Quantum.cpp.
| double quantum::DensityList::calculatePr | ( | int | measureSpace, |
| int | state | ||
| ) |
Definition at line 907 of file Quantum.cpp.
| double quantum::DensityList::calculatePr | ( | int | space1, |
| int | state1, | ||
| int | space2, | ||
| int | state2 | ||
| ) |
Definition at line 964 of file Quantum.cpp.
| void quantum::DensityList::CNOT | ( | int | controlSpace, |
| int | targetSpace | ||
| ) |
Definition at line 783 of file Quantum.cpp.
| void quantum::DensityList::computeDensityMat | ( | algebra::mat & | output | ) |
Definition at line 1122 of file Quantum.cpp.
| void quantum::DensityList::computeDensityMatFast | ( | algebra::mat & | output | ) |
for(int i=0; i<dimension[basisIndex]; ++i) { for(int j=0; j<dimension[basisIndex]; ++j) { Complex k = basis[basis.size()-1].B[Iter->ket[basisIndex]][i]; // 0 used to be basis index Complex b = conj(basis[basis.size()-1].B[Iter->bra[basisIndex]][j]); Complex c = algebra::ComplexHelper::mult(k, b); k = algebra::ComplexHelper::mult(Iter->p, c); output(startRow+i, startCol+j) += k; } }
Definition at line 1062 of file Quantum.cpp.
| void quantum::DensityList::conditionalSet | ( | std::vector< int > & | targetSpace, |
| std::vector< int > & | targetVal, | ||
| std::vector< int > & | condSpace, | ||
| std::vector< int > & | condVal | ||
| ) |
Definition at line 143 of file Quantum.cpp.
| double quantum::DensityList::entropy | ( | ) |
Definition at line 846 of file Quantum.cpp.
| void quantum::DensityList::measure | ( | int | measureSpace | ) |
Definition at line 889 of file Quantum.cpp.
| void quantum::DensityList::measureAndSave | ( | int | measureSpace, |
| int | saveSpace | ||
| ) |
Definition at line 869 of file Quantum.cpp.
| void quantum::DensityList::NOT | ( | int | space | ) |
Definition at line 799 of file Quantum.cpp.
|
inline |
| void quantum::DensityList::project | ( | int | space, |
| int | state | ||
| ) |
Definition at line 663 of file Quantum.cpp.
| void quantum::DensityList::project | ( | int | space, |
| int | state, | ||
| DensityList & | output | ||
| ) |
Definition at line 647 of file Quantum.cpp.
| double quantum::DensityList::ShannonEntropy | ( | ) |
Definition at line 853 of file Quantum.cpp.
| void quantum::DensityList::splitAndSave | ( | double | p1, |
| double | p2, | ||
| int | space | ||
| ) |
Definition at line 811 of file Quantum.cpp.
| void quantum::DensityList::swap | ( | int | space1, |
| int | space2 | ||
| ) |
Definition at line 830 of file Quantum.cpp.
| double quantum::DensityList::trace | ( | ) |
Definition at line 951 of file Quantum.cpp.
| void quantum::DensityList::trace | ( | int | space | ) |
Definition at line 261 of file Quantum.cpp.
| void quantum::DensityList::trace | ( | int | space, |
| DensityList & | output | ||
| ) |
Definition at line 243 of file Quantum.cpp.