LocalMPSTensor

class mpsprep.mpsstatepreparation.LocalMPSTensor(tensor=None, left_bond_dim=None, right_bond_dim=None, physical_dim=None)[source]

Bases: object

Cores of the tensor network. These are the tensors that are multiplied together to form the Matrix Product State (MPS).

__init__(tensor=None, left_bond_dim=None, right_bond_dim=None, physical_dim=None)[source]

Initialize the tensor.

Parameters
tensornp.ndarray

The tensor.

left_bond_dimint

The left bond dimension.

right_bond_dimint

The right bond dimension.

physical_dimint

The physical dimension.

Methods

__init__([tensor, left_bond_dim, ...])

Initialize the tensor.

to_left_matrix()

Convert to a left matrix.

to_right_matrix([order])

Convert to a right matrix.

Attributes

left_bond_dim

The dimension of the left bond.

physical_dim

The physical dimension of the tensor.

right_bond_dim

The dimension of the right bond.

property left_bond_dim

The dimension of the left bond.

Type

int

property physical_dim

The physical dimension of the tensor.

Type

int

property right_bond_dim

The dimension of the right bond.

Type

int

to_left_matrix()[source]

Convert to a left matrix.

Returns
matrixnp.ndarray

The left matrix.

to_right_matrix(order='F')[source]

Convert to a right matrix.

Parameters
order{“F”, “C”}, optional

The layout of the matrix in memory. Default is “F”.

Returns
matrixnp.ndarray

The right matrix.