MPOState¶
- class MPOState(*args, **kwargs)[source]¶
- Bases: - MatrixProductOperator,- State- An MPO enforcing the Vidal gauge. - This specialization of quimb’s existing - quimb.tensor.MatrixProductOperatorenforces the Vidal gauge throughout its existence. This ensures a stable behavior of the- DynamicMPFalgorithm when using the- TEBDEvolver.- Initialize a - MPOStateinstance.- Hint - All arguments (positional and keyword) are simply forwarded to the - quimb.tensor.MatrixProductOperatorconstructor. Additionally, the- vidal_singular_valuesattribute 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.MatrixProductStateconstructor.
- kwargs – all keyword arguments will be forwarded to the - quimb.tensor.MatrixProductStateconstructor.
 
 - 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 of- d, 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 - MPOStatewith 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 - DynamicMPFare differentiated, by passing their- Evolver.conjugateproperty 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 - MPOStatewith the- gateapplied 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.MatrixProductStatefor- initial_state.