QONMetricRegistry#

class QONMetricRegistry#

Bases: object

Registry for QONMetric subclasses, mapping method names to parser classes.

Allows extensible registration of new metric parsing strategies for new methods.

Module: iqm.station_control.client.qon

Methods

get_parser

Retrieve the parser class for a given method name.

register

Decorator for registering a QONMetric subclass as the parser for one or more method names.

registered_methods

Get a list of all registered method names.

_registry: dict[str, type[QONMetric]] = {'coherence_cz': <class 'iqm.station_control.client.qon.QONGateMetric'>, 'coherence_gef': <class 'iqm.station_control.client.qon.QONSystemMetric'>, 'conditional_reset': <class 'iqm.station_control.client.qon.QONGateMetric'>, 'entanglement_coherence': <class 'iqm.station_control.client.qon.QONGateMetric'>, 'ghz_state': <class 'iqm.station_control.client.qon.QONSystemMetric'>, 'irb': <class 'iqm.station_control.client.qon.QONGateMetric'>, 'msmt_qndness': <class 'iqm.station_control.client.qon.QONGateMetric'>, 'ncz_swap': <class 'iqm.station_control.client.qon.QONGateMetric'>, 'npopex_echo': <class 'iqm.station_control.client.qon.QONGateMetric'>, 'npopex_long': <class 'iqm.station_control.client.qon.QONGateMetric'>, 'qndness': <class 'iqm.station_control.client.qon.QONGateMetric'>, 'rb': <class 'iqm.station_control.client.qon.QONGateMetric'>, 'readout_rb': <class 'iqm.station_control.client.qon.QONGateMetric'>, 'relaxation_ef': <class 'iqm.station_control.client.qon.QONSystemMetric'>, 'restless_ssro': <class 'iqm.station_control.client.qon.QONGateMetric'>, 'simultaneous_coherence_gef': <class 'iqm.station_control.client.qon.QONSystemMetric'>, 'ssro': <class 'iqm.station_control.client.qon.QONGateMetric'>, 't1_coupled': <class 'iqm.station_control.client.qon.QONSystemMetric'>}#

Mapping from QONMetric method name to the subclass that handles it.

_inv_registry: dict[type[QONMetric], frozenset[str]] = {<class 'iqm.station_control.client.qon.QONGateMetric'>: frozenset({'coherence_cz', 'conditional_reset', 'entanglement_coherence', 'irb', 'msmt_qndness', 'ncz_swap', 'npopex_echo', 'npopex_long', 'qndness', 'rb', 'readout_rb', 'restless_ssro', 'ssro'}), <class 'iqm.station_control.client.qon.QONSystemMetric'>: frozenset({'coherence_gef', 'ghz_state', 'relaxation_ef', 'simultaneous_coherence_gef', 't1_coupled'})}#

Mapping from QONMetric subclass to the methods it handles.

classmethod register(method_names)#

Decorator for registering a QONMetric subclass as the parser for one or more method names.

Parameters:

method_names (Iterable[str]) – One or more method names to associate with the subclass.

Returns:

The decorator function.

classmethod get_parser(method_name)#

Retrieve the parser class for a given method name.

Parameters:

method_name (str) – The method name to look up.

Returns:

The QONMetric subclass registered for the method.

Raises:

UnknownObservationErrormethod_name is not registered.

Return type:

type[QONMetric]

classmethod registered_methods()#

Get a list of all registered method names.

Returns:

List of registered method names.

Return type:

list[str]