mqt.bench.targets.gatesets

Handles the available native gatesets.

Submodules

Package Contents

register_gateset(gateset_name: str) → Callable[[_GatesetFactory], _GatesetFactory][source]

Decorator to register a gateset factory under a unique gateset_name.

The factory runs on every lookup and must return a new basis-gate list that shares no mutable data with other results.

Parameters:

gateset_name – unique identifier for the gateset (e.g., "ibm_heron").

Returns:

The original factory function, unmodified.

Raises:

ValueError – if the chosen name is already present in the registry.

get_available_gateset_names() → list[str][source]

Return a list of available gateset names.

get_gateset(gateset_name: str) → list[str][source]

Return a fresh basis-gate list from the registered factory.

get_target_for_gateset(name: str, num_qubits: int) → Target[source]

Return a native gate-set target without hardware constraints.