qml.decomposition.controlled_resource_rep¶
- controlled_resource_rep(base_class, base_params, num_control_wires, num_zero_control_values=0, num_work_wires=0)[source]¶
Creates a
CompressedResourceOp
representation of a general controlled operator.- Parameters
base_class – the base operator type
base_params (dict) – the resource params of the base operator
num_control_wires (int) – the number of control wires
num_zero_control_values (int) – the number of control values that are 0
num_work_wires (int) – the number of work wires