Gate Decorator System

hal_py.gate_decorator_system.has_decorator_type(gate: hal_py.gate, decorator_type: gate_decorator_system::decorator_type) → bool

Checks whether the system has a decorator of the desired type for the gate.

Parameters:
  • gate (hal_py.gate) – The gate to check for.
  • decorator_type – The type to check for.
Returns:

True on success.

Return type:

bool

hal_py.gate_decorator_system.query_decorator(gate: hal_py.gate, decorator_type: gate_decorator_system::decorator_type) → gate_decorator

Queries a gate decorator.

Parameters:
  • gate (hal_py.gate) – The gate to decorate.
  • decorator_type – The requested type.
Returns:

Decorator on success or None on error.

Return type:

hal_py.gate_decorator or None