MPOState
class MPOState(*args, **kwargs)
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 the DynamicMPF
algorithm when using the TEBDEvolver
.
Initialize a MPOState
instance.
All arguments (positional and keyword) are simply forwarded to the quimb.tensor.MatrixProductOperator
constructor. Additionally, the vidal_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
Type: 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_split(gate, where, inplace=False, conj=False, **split_opts)
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.NoteThis 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 the gate
applied and contracted.
Return type
gate_split_
gate_split_(gate, where, *, inplace=True, conj=False, **split_opts)
Parameters
Return type
overlap
overlap(initial_state)
Compute the overlap of this state with the provided initial state.
This implementation only supports instances of quimb.tensor.MatrixProductState
for initial_state
.
Parameters
initial_state (Any) – the initial state with which to compute the overlap.
Raises
TypeError – if the provided initial state has an incompatible type.
Returns
The overlap of this state with the provided one.
Return type