Eigen-vector/value Statistics (quanguru.QuantumToolbox.eigenVecVal
)#
Contains functions to calculate eigen-vector/value statistics in various cases.
Functions#
|
Calculates eigenvalues and eigenvectors of a given matrix (intended for internal use). |
|
Calculates all the amplitudes |
|
Calculates all the amplitudes |
|
Intended for internal use, and used in eigenvector statistics calculation of symplectic class. |
|
Intended for internal use, and used in eigenvector statistics calculation of symplectic class. |
|
Calculates component amplitudes |
Function Name |
Docstrings |
Examples |
Unit Tests |
Tutorials |
---|---|---|---|---|
_eigs |
✅ |
❌ |
❌ |
❌ |
_eigStat |
✅ |
❌ |
❌ |
❌ |
_eigStatSymp |
✅ |
❌ |
❌ |
❌ |
_eigStatEig |
✅ |
❌ |
❌ |
❌ |
_eigsStatEigSymp |
✅ |
❌ |
❌ |
❌ |
eigVecStatKet |
✅ |
✅ |
❌ |
❌ |
- _eigs(Mat: Union[scipy.sparse._base.spmatrix, numpy.ndarray]) tuple [source]#
Calculates eigenvalues and eigenvectors of a given matrix (intended for internal use).
- Parameters
Mat (Matrix) – a matrix
- Returns
tuple containing (eigenvalues, eigenvectors)
- Return type
tuple
Examples
# TODO
- _eigStat(Mat: Union[scipy.sparse._base.spmatrix, numpy.ndarray], symp: bool = False) List[float] [source]#
Calculates all the amplitudes
of entries
for all the eigenvectors
of a given matrix.
symp is used to calculate eigenvector statistics of systems with degeneracies, corresponding to symplectic class by summing every odd entry amplitude with the following even entry amplitude.
- Parameters
Mat (Matrix) – a matrix
symp (bool, optional) – If True (False) sum every odd entry amplitude with the following even entry amplitude.
- Returns
list of entry amplitudes
- Return type
floatList
Examples
# TODO
- _eigStatSymp(Mat: Union[scipy.sparse._base.spmatrix, numpy.ndarray]) List[float] [source]#
Intended for internal use, and used in eigenvector statistics calculation of symplectic class.
- Parameters
Mat (Matrix) – a matrix
- Returns
list of entry amplitudes
- Return type
floatList
Examples
# TODO
- _eigStatEig(EigVecs: Union[scipy.sparse._base.spmatrix, numpy.ndarray], symp=False) List[float] [source]#
Calculates all the amplitudes
of entries
for a given list of eigenvectors
.
symp is used to calculate eigenvectors statistics of systems with degeneracies, corresponding to symplectic class by summing every odd entry amplitude with the following even entry amplitude.
- Parameters
EigVecs (Matrix) – a list of ket vectors
symp (bool, optional) – If True (False) sum every odd entry amplitude with the following even entry amplitude.
- Returns
list of entry amplitudes
- Return type
floatList
Examples
# TODO
- _eigsStatEigSymp(EigVecs: Union[scipy.sparse._base.spmatrix, numpy.ndarray]) List[float] [source]#
Intended for internal use, and used in eigenvector statistics calculation of symplectic class.
- Parameters
EigVecs (Matrix) – a list of ket vectors
- Returns
list of entry amplitudes
- Return type
floatList
Examples
# TODO
- eigVecStatKet(basis: List[Union[scipy.sparse._base.spmatrix, numpy.ndarray]], ket: Union[scipy.sparse._base.spmatrix, numpy.ndarray], symp=True) Tuple [source]#
Calculates component amplitudes
of a ket
in a basis
.
Main use is in eigenvector statistics.
- Parameters
basis (matrixList) – a complete basis
ket (Matrix) – the ket state
- Returns
list of component values in the basis
- Return type
floatList
Examples
>>> ket = basis(2, 1) >>> completeBasis = completeBasis(dimension=2) >>> eigVecStatKet(basis=completeBasis, ket=ket) [0, 1]