seemps.analysis.space.Space#

class seemps.analysis.space.Space[source]#

Bases: object

Coordinate grid class.

Class to encode the definition space of a discretized multidimensional function.

Parameters:
qubits_per_dimensionlist[int]

Number of qubits for each dimension.

LSequence[tuple[Real, Real]]

Position space intervals (a_i,b_i) for each dimension i.

closedbool

If closed is True, the position space intervals are closed (symmetrically defined). If False, the interval is open. (defaults to True).

orderMPSOrder, default = “A”

The order in which sites are organized. Default is “A” (sequential).

change_qubits(new_qubits_per_dimension: list[int]) Space[source]#

Creates a new Space object with increased resolution based on the new qubits per dimension.

Parameters:
new_qubits_per_dimensionlist[int]

New number of qubits for each dimension.

Returns:
Space

A new Space object with the increased resolution.

enlarge_dimension(dim: int, amount: int) Space[source]#

Enlarges the specified dimension by adding more qubits to one dimension.

Parameters:
dimint

The dimension to enlarge.

amountint

The number of qubits to add.

Returns:
Space

A new Space object with the enlarged dimension.

extend(op: _Operator, dim: int) _Operator[source]#

Extends an MPO acting on a 1D space to a multi-dimensional MPS.

Parameters:
opMPO

The MPO to extend.

dimint

The dimension to extend along.

Returns:
MPO

The extended multi-dimensional MPO.

get_sites()[source]#

Generates the sites for each dimension based on the order.

Returns:
list[list[int]]

A list of lists containing site indices for each dimension.

new_positions_from_old_space(space: Space) list[int][source]#

Maps the qubits from a smaller space, to their respective positions in the quantum register for a larger space.

Parameters:
spaceSpace

The old Space object to map positions from.

Returns:
list[int]

List of new positions in the current Space object.