netket.errors.OperatorMultiplicationError#
- exception netket.errors.OperatorMultiplicationError[source]#
Error raised when multiplying two operators with
A*B.The
A*Bsyntax for operator multiplication was deprecated in NetKet 3.20 and has been removed. UseA@Binstead for the matrix multiplication of operators, which follows Python’s standard matrix multiplication operator.Examples
Instead of:
result = operator1 * operator2 # Error
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.