netket.errors.OperatorMultiplicationDeprecationWarning

netket.errors.OperatorMultiplicationDeprecationWarning#

exception netket.errors.OperatorMultiplicationDeprecationWarning[source]#

Warning issued when using deprecated A*B syntax for operator multiplication.

The A*B syntax for operator multiplication is deprecated and will be removed in a future version of NetKet. Use A@B instead for matrix multiplication of operators, which follows Python’s standard matrix multiplication operator.

Examples

Instead of:

result = operator1 * operator2  # Deprecated

Use:

result = operator1 @ operator2  # Correct

Note

The @ operator was introduced in Python 3.5 specifically for matrix multiplication and is the standard way to express this operation in NumPy, JAX, and other scientific computing libraries.