mm.physics.ansatze.ArrayAnsatz

class mrmustard.physics.ansatze.ArrayAnsatz(array)[source]

Bases: Ansatz

The ansatz of the Fock-Bargmann representation.

Represents the ansatz as a multidimensional array.

Parameters:

array (Batch[ndarray[Tuple[int, ...], Union[TypeVar(R, float16, float32, float64), TypeVar(C, complex64, complex128), TypeVar(Z, int16, int32, int64), TypeVar(N, uint16, uint32, uint64)]]]) – A batched array.

>>> from mrmustard.physics.ansatze import ArrayAnsatz

>>> array = np.random.random((2, 4, 5))
>>> ansatz = ArrayAnsatz(array)

conj

The conjugate of this ansatz.

conj

The conjugate of this ansatz.

__call__(point)

Evaluates this ansatz at a given point in the domain.

__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)]