apply()

apply()#

abstract OpInfOperator.apply(state: ndarray, input_=None) ndarray#

Apply the operator mapping to the given state / input.

Parameters:
state(r,) or (r, k) ndarray

State vector or matrix of state vectors.

input_(m,) or (m, k) ndarray or None

Input vector or matrix of input vectors.

Returns:
out(r,) or (r, k) ndarray

Application of the operator to the state / input, with the same number of dimensions as state and (if provided) input_.