Skip to main content

OperatorGeneric<complex>

Class representing a generic operator. The operator is parametrized with a function accepting a matrix of state vector coefficients and an array of integers labelling the basis states corresponding to the coefficients. The function modifies the matrix in-place to apply the operator effect. The operator also includes the site indices where it acts.

Factories

operator_generic(const OperatorGenericFunction<ComplexMatrix, IntegerArray> function, const List<integer> sites) -> OperatorGeneric<complex>

Creates a spin-1/2 OperatorGeneric from a string representation.

Parameters

  • function: A function taking a vector and an array of indices.
  • sites: Vector of site indices where the operator acts.

operator_generic(const OperatorGenericFunction<ComplexMatrix, IntegerArray> function, const List<integer> sites, as_complex type_tag) -> OperatorGeneric<complex>

Creates a spin-1/2 OperatorGeneric from a string representation.

Parameters

  • function: A function taking a vector and an array of indices.
  • sites: Vector of site indices where the operator acts.
  • type_tag: A global constant tagging the object type.

Symbols

NameDescription
=Assignment operator for the spin-1/2 OperatorGeneric.