FunctionOperator¶
- class FunctionOperator(func, operator, func_name=None)[source]¶
Bases:
AbstractSubsystemOperator
A function applied on an operator. This assumes the output is the same shape/dimension as the input.
Initialize.
- Parameters:
func – The function.
operator – The operator.
func_name – The name of the function.
Methods
- matrix(ordered_subsystems=None)¶
Build the matrix for the operator relative to the ordered subsystems.
- remove_subsystems(subsystems)¶
Return operator with subsystems removed.
Components of operators with support on removed subsystems will be set to 0.
- Return type:
AbstractSubsystemOperator
- restrict_subsystems(subsystems)¶
Reduce the operator to the list of subsystems.
Components of operators with support on removed subsystems will be set to 0.
- Return type:
AbstractSubsystemOperator
Attributes
- func¶
The function applied to the operator.
- subsystems¶
Get the subsystems the operator acts on.