Predefined Operators (MPO)#

The SeeMPS library provides exact MPO representations of operators commonly used in numerical analysis. These include coordinate operators, momentum operators, and elementary functions that act multiplicatively on function representations.

Coordinate and momentum operators#

The position operator \(\hat{x}\) and momentum operator \(\hat{p}\) are fundamental building blocks for constructing differential operators and potentials:

  • x_to_n_mpo() creates \(\hat{x}^n\), which acts by multiplying a function by \(x^n\).

  • p_to_n_mpo() creates \(\hat{p}^n\), where \(\hat{p}\) is the momentum operator conjugate to \(x\) via the Fourier transform.

These operators have low bond dimension that grows linearly with the power \(n\).

Multiplicative operators#

Several elementary functions are provided as diagonal MPOs that multiply the input function pointwise:

  • exponential_mpo(): Multiplication by \(\exp(cx)\)

  • cos_mpo(): Multiplication by \(\cos(x)\)

  • sin_mpo(): Multiplication by \(\sin(x)\)

These are useful for constructing potential energy terms or weight functions.

Example:

from seemps.analysis.operators import exponential_mpo, x_to_n_mpo

n_qubits = 10
a, dx = 0.0, 0.01  # Grid parameters

# Create operators
x_squared = x_to_n_mpo(n_qubits, a, dx, n=2)  # x² operator
exp_minus_x = exponential_mpo(n_qubits, a, dx, c=-1.0)  # exp(-x)

Utility operators#

  • id_mpo(): Identity operator, useful as a baseline for constructing linear combinations.

  • mpo_cumsum(): Computes the cumulative sum (discrete integration) of an MPS.

  • mpo_affine(): Applies an affine transformation mapping coordinates from one interval to another.

API reference#

id_mpo(n_qubits[, strategy])

Identity MPO.

x_to_n_mpo(n_qubits, a, dx, n[, strategy])

x^n MPO.

p_to_n_mpo(n_qubits, dx, n[, strategy])

p^n MPO.

exponential_mpo(n, a, dx[, c, strategy])

exp(cx) MPO.

cos_mpo(n, a, dx[, strategy])

cos(x) MPO.S

sin_mpo(n, a, dx[, strategy])

sin(x) MPO.

mpo_affine(mpo, orig, dest)

mpo_cumsum(n)

Returns an MPO that computes the cumulative sum of an input MPS.