qp.decomposition.has_decomp

has_decomp(op)[source]

Checks whether an operator has decomposition rules defined.

Parameters:

op (type or Operator or str) – the operator or operator type to check for decomposition rules. For symbolic operators, use strings like "Adjoint(RY)", "Pow(H)", "C(RX)", etc.

Returns:

whether decomposition rules are defined for the given operator.

Return type:

bool