seemps.operators.MPOSum#
- class seemps.operators.MPOSum#
Bases:
objectObject representing a linear combination of matrix-product opeators.
- Parameters:
- apply(state: TypeAliasForwardRef('~seemps.state.MPS') | TypeAliasForwardRef('~seemps.state.MPSSum'), strategy: TypeAliasForwardRef('~seemps.state.Strategy') | None = None, simplify: bool | None = None)[source]#
Implement multiplication A @ state between an MPOSum ‘A’ and a Matrix Product State ‘state’.
- dimensions() list[int][source]#
Return the physical dimensions (Deprecated, see
dimensions()).
- expectation(bra: MPS, ket: TypeAliasForwardRef('~seemps.state.MPS') | None = None) Weight[source]#
Expectation value of MPOList on one or two MPS states.
If one state is given, this state is interpreted as \(\psi\) and this function computes \(\langle{\psi|O\psi}\rangle\) If two states are given, the first one is the bra \(\psi\), the second one is the ket \(\phi\), and this computes \(\langle\psi|O|\phi\rangle\).
- extend(L: int, sites: list[int] | None = None, dimensions: int | list[int] = 2) MPOSum[source]#
Enlarge an MPOSum so that it acts on a larger Hilbert space with ‘L’ sites.
- join(strategy: TypeAliasForwardRef('~seemps.state.Strategy') | None = None) MPO[source]#
Create an MPO by combining all tensors from all states in the linear combination.
- Returns:
MPS|CanonicalMPSQuantum state approximating this sum.
- set_strategy(strategy: Strategy, strategy_components: TypeAliasForwardRef('~seemps.state.Strategy') | None = None) MPOSum[source]#
Return MPOSum with the given strategy.
- to_matrix() DenseOperator[source]#
Return the matrix representation of this MPO.
- tomatrix() DenseOperator[source]#
Return the matrix representation of this MPO (Deprecated, see
to_matrix()).