mm.physics.ansatze.Ansatz

class mrmustard.physics.ansatze.Ansatz[source]

Bases: ABC

A function over a continuous and/or discrete domain.

An ansatz supports basic mathematical operations such as addition, subtraction, multiplication, division, negation, equality, etc.

Note that n-dimensional arrays are like functions defined over an integer lattice of points, so this class also works for, e.g., the Fock representation.

This class is abstract. Concrete Ansatz classes have to implement the __call__, __mul__, __add__, __sub__, __neg__, and __eq__ methods.

__call__(point)

Evaluates this ansatz at a given point in the domain.

abstract __call__(point)[source]

Evaluates this ansatz at a given point in the domain.

Return type:

Union[TypeVar(R, float16, float32, float64), TypeVar(C, complex64, complex128), TypeVar(Z, int16, int32, int64), TypeVar(N, uint16, uint32, uint64)]