seemps.state.MPSSum#

class seemps.state.MPSSum#

Bases: object

Class representing a weighted sum (or difference) of two or more MPS.

This class is an intermediate representation for the linear combination of MPS quantum states. Assume that \(\psi, \phi\) and \(\xi\) are MPS and \(a, b, c\) some real or complex numbers. The addition \(a \psi - b \phi + c \xi\) can be stored as MPSSum([a, -b, c], [ψ, ϕ, ξ]).

Parameters:
weightslist[Weight]

Real or complex numbers representing the weights of the linear combination.

stateslist[MPS]

List of matrix product states weighted.

conj() MPSSum[source]#

Return the complex-conjugate of this quantum state.

copy() MPSSum[source]#

Return a shallow copy of the MPS sum and its data. Does not copy the states, only the list that stores them.

delete_zero_components() float[source]#

Compute the norm-squared of the linear combination of weights and states and eliminate states that are zero or have zero weight.

error() float[source]#

Upper bound of the norm-2 error accumulated in this MPS.

join() MPS[source]#

Create an MPS by combining all tensors from all states in the linear combination.

Returns:
MPS

Quantum state approximating this sum.

join_canonical(*args, **kwdargs) CanonicalMPS[source]#

Similar to join() but return canonical form

norm() float[source]#

Norm-2 \(\Vert{\psi}\Vert^2\) of this MPS.

norm_squared() float[source]#

Norm-2 squared \(\Vert{\psi}\Vert^2\) of this MPS.

physical_dimensions() list[int][source]#

List of physical dimensions for the quantum subsystems.

reverse() MPSSum[source]#

Reverse the sites (see reverse()).

to_tensor() Vector[source]#

Convert this MPS to a multidimensional tensor.

to_vector() Vector[source]#

Return the wavefunction of this quantum state.