netket.operator._sum.SumContinuousOperator#

class netket.operator._sum.SumContinuousOperator[source]#

Bases: SumOperator, ContinuousOperator

This class implements the action of the _expect_kernel()-method of ContinuousOperator for a sum of ContinuousOperator objects.

Inheritance
Inheritance diagram of netket.operator._sum.SumContinuousOperator
__init__(*operators, coefficients=1.0, dtype=None)[source]#

Returns the action of a sum of local operators. :type operators: tuple[ContinuousOperator, ...] :param operators: A list of ContinuousOperator objects :type coefficients: float | Iterable[float] :param coefficients: A coefficient for each ContinuousOperator object :type dtype: Union[None, str, type[Any], dtype, _SupportsDType] :param dtype: Data type of the coefficients

Parameters:
Attributes
H#

Returns the Conjugate-Transposed operator

T#

Returns the transposed operator

coefficients#

The coefficients for each operator term in the sum.

Each coefficient corresponds to \(c_i\) in the sum \(\sum_i c_i \hat{O}_i\), where each coefficient multiplies its corresponding operator from operators.

Returns:

A JAX array containing the scalar coefficients for each operator.

dtype#

The data type of the operator coefficients.

Returns:

The numpy/JAX dtype used for the coefficients array.

hilbert#

The hilbert space associated to this observable.

is_hermitian#
operators#

The tuple of all operators in the terms of this sum.

Each operator corresponds to a term \(\hat{O}_i\) in the sum \(\sum_i c_i \hat{O}_i\), where each operator is multiplied by its corresponding coefficient from coefficients.

Returns:

A tuple containing all the quantum operators being summed.

Methods
collect()[source]#

Returns a guaranteed concrete instance of an operator.

As some operations on operators return lazy wrappers (such as transpose, hermitian conjugate…), this is used to obtain a guaranteed non-lazy operator.

Return type:

AbstractOperator

conj(*, concrete=False)[source]#
Return type:

AbstractOperator

conjugate(*, concrete=False)[source]#

Returns the complex-conjugate of this operator.

Parameters:

concrete – if True returns a concrete operator and not a lazy wrapper

Return type:

AbstractOperator

Returns:

if concrete is not True, self or a lazy wrapper; the complex-conjugated operator otherwise

replace(**kwargs)[source]#

Replace the values of the fields of the object with the values of the keyword arguments. If the object is a dataclass, dataclasses.replace will be used. Otherwise, a new object will be created with the same type as the original object.

Return type:

TypeVar(P, bound= Pytree)

Parameters:
  • self (P)

  • kwargs (Any)

transpose(*, concrete=False)[source]#

Returns the transpose of this operator.

Parameters:

concrete – if True returns a concrete operator and not a lazy wrapper

Return type:

AbstractOperator

Returns:

if concrete is not True, self or a lazy wrapper; the transposed operator otherwise