arcade.features
Feature extraction for ARCADE classifiers.
- class arcade.features.BaseFeatureExtractor[source]
Bases:
ABCContract for turning IQ / ADC traces into a feature matrix.
Matched filters, NG-RC polynomials, and path signatures all implement this interface. Subclass and decorate with
register_extractor().- name
Registry name (set by the decorator).
- feature_kind
Short tag describing the output feature family.
Example:
@register_extractor("my_features") class MyExtractor(BaseFeatureExtractor): feature_kind = "custom" def extract(self, traces, **kwargs): return np.zeros((len(traces), 10))
- class arcade.features.FilterSet(num_qubits, num_levels, filters=<factory>, thresholds=<factory>, trace_length=None)[source]
Bases:
objectContainer for per-qubit matched filter envelopes and thresholds.
- Parameters:
- num_qubits
Number of qubits.
- num_levels
Energy levels per qubit (2 for qubit, 3 for qutrit).
- filters
Nested dict
filters[qubit][filter_name]-> ndarray.
- thresholds
Nested dict
thresholds[qubit][filter_name]-> float.
- trace_length
Number of time steps the filters were computed for.
- class arcade.features.MatchedFilterExtractor[source]
Bases:
BaseFeatureExtractorMatched filter feature extractor.
Computes filter templates from labelled training data, then projects new traces onto those templates to produce scalar features.
- class arcade.features.NGRCFeatureExtractor(window_size=10, polynomial_degree=2, boxcar_ends=None)[source]
Bases:
BaseFeatureExtractorNG-RC polynomial feature extractor.
Combines: apply_boxcar_masks -> window_average_iq -> expand_features.
- class arcade.features.PathSignatureExtractor(signature_depth=5, time_augmentation=False)[source]
Bases:
BaseFeatureExtractorPath signature feature extractor.
Combines: compute_weights -> build_weighted_path -> compute_signature_features.
- class arcade.features.RelaxationFilterExtractor[source]
Bases:
BaseFeatureExtractorRelaxation matched filter (REMF) feature extractor.
Uses post-selection to separate true state preparations from relaxation/excitation events.
- arcade.features.get_extractor(name)[source]
Resolve an extractor class by registry name or dotted import path.
- Parameters:
name (
str) – Registered key orpackage.module.ClassName.- Return type:
- Returns:
The extractor class.
- Raises:
- arcade.features.list_extractors()[source]
Return sorted names of all registered feature extractors.
- arcade.features.register_extractor(name)[source]
Register a
BaseFeatureExtractorsubclass under name.