seemps.evolution.Trotter2ndOrder#

class seemps.evolution.Trotter2ndOrder#

Bases: Trotter

Class implementing a 2nd order Trotter algorithm.

This class implements a Trotter algorithm in TEBD form for a nearest-neighbor interaction Hamiltonain \(\sum_i h_{i,i+1}\). This second-order formula is a variation of the two-sweep algorithm

\[\prod_{j=1}^{N} \exp(-\frac{i}{2} h_{j,j+1} dt) \prod_{j=N}^{1} \exp(-\frac{i}{2} h_{j,j+1} dt)\]
Parameters:
HNNHamiltonian

The Hamiltonian with nearest-neighbor interactions generating the unitary transformations.

dtfloat

Length of the time step.

strategyStrategy

Truncation strategy for the application of the unitaries.

apply(state: MPS) CanonicalMPS[source]#

Apply a Trotter 2nd order unitary approximation onto an MPS state.

Parameters:
stateMPS

The state to be evolved.

Returns:
CanonicalMPS

A fresh new MPS wih the state evolved by one time step.

apply_inplace(state: MPS) CanonicalMPS[source]#

Apply a Trotter 2nd order unitary approximation onto an MPS state.

Parameters:
stateMPS

The state to be evolved.

Returns:
CanonicalMPS

The same state object modified by the unitary, if it was a CanonicalMPS Otherwise a fresh new state evolved.