MPOState¶
- class MPOState(*args, **kwargs)[source]¶
Bases:
MatrixProductOperator
,State
An MPO enforcing the Vidal gauge.
This specialization of quimb’s existing
quimb.tensor.MatrixProductOperator
enforces the Vidal gauge throughout its existence. This ensures a stable behavior of theDynamicMPF
algorithm when using theTEBDEvolver
.Initialize a
MPOState
instance.Hint
All arguments (positional and keyword) are simply forwarded to the
quimb.tensor.MatrixProductOperator
constructor. Additionally, thevidal_singular_values
attribute gets initialized to a list of empty lists of length equal to the number of sites in this MPO.- Parameters:
args – all positional arguments will be forwarded to the
quimb.tensor.MatrixProductState
constructor.kwargs – all keyword arguments will be forwarded to the
quimb.tensor.MatrixProductState
constructor.
Attributes
- vidal_singular_values: list[list[float]]¶
A nested list of singular values. The outer list is of equal length as this MPO itself (
quimb.tensor.TensorNetwork1D.L
). Every item is another list of all the singular values for determining the Vidal gauge at that site.
Methods
- gate_split(gate, where, inplace=False, conj=False, **split_opts)[source]¶
Apply a two-site gate and contract it back into the MPO.
The basic principle of this method is the same as that of
quimb.tensor.MatrixProductState.gate_split()
. However, the implementation ensures that the Vidal gauge is conserved.- Parameters:
gate (ndarray) – the gate to be applied to the MPO. Its shape should be either
(d**2, d**2)
for a physical dimension ofd
, or a reshaped version thereof.where (tuple[int, int]) – the indices of the sites where the gate should be applied.
inplace (bool) – whether to perform the gate application in-place or return a new
MPOState
with the gate applied to it.conj (bool) –
whether the gate should be applied to the lower (
conj=False
, the default,lower_ind()
) or upper (conj=True
,upper_ind()
) indices of the underlying MPO.Note
This is essentially how the LHS and RHS of the
DynamicMPF
are differentiated, by passing theirEvolver.conjugate
property to this argument.split_opts – additional keyword arguments that will be forwarded to the
quimb.tensor.tensor_split()
function. These can be used to affect the truncation of the tensor before it gets contracted back into the MPO.
- Returns:
The
MPOState
with thegate
applied and contracted.- Return type:
- gate_split_(gate, where, *, inplace=True, conj=False, **split_opts)¶
- overlap(initial_state)[source]¶
Compute the overlap of this state with the provided initial state.
Warning
This implementation only supports instances of
quimb.tensor.MatrixProductState
forinitial_state
.