tnpy.operators.FullHamiltonian
2.3. tnpy.operators.FullHamiltonian#
- class tnpy.operators.FullHamiltonian(mpo)[source]#
Bases:
object
Construct the Hamiltonian from
MatrixProductOperator
(MPO).- Parameters
mpo (MatrixProductOperator) – The matrix product operator.
Examples
The matrix element of Hamiltonian can be accessed through the property
matrix
.>>> ham = FullHamiltonian(mpo).matrix
- Raises
ResourceWarning – When the dimensions of matrix are larger than \(4096 \times 4096\).
- Parameters
mpo (MatrixProductOperator) –
- __init__(mpo)[source]#
Construct the Hamiltonian from
MatrixProductOperator
(MPO).- Parameters
mpo (tnpy.operators.MatrixProductOperator) – The matrix product operator.
Examples
The matrix element of Hamiltonian can be accessed through the property
matrix
.>>> ham = FullHamiltonian(mpo).matrix
- Raises
ResourceWarning – When the dimensions of matrix are larger than \(4096 \times 4096\).
- Parameters
Methods
__init__
(mpo)Construct the Hamiltonian from
MatrixProductOperator
(MPO).Attributes
- __init__(mpo)[source]#
Construct the Hamiltonian from
MatrixProductOperator
(MPO).- Parameters
mpo (tnpy.operators.MatrixProductOperator) – The matrix product operator.
Examples
The matrix element of Hamiltonian can be accessed through the property
matrix
.>>> ham = FullHamiltonian(mpo).matrix
- Raises
ResourceWarning – When the dimensions of matrix are larger than \(4096 \times 4096\).
- Parameters
- property n_sites: int#
- property phys_dim: int#
- property matrix: numpy.ndarray#