Source code for bragi_quantum.experiments.abstract.errors

# ══════════════════════════════════════════════════════════════════════════
#     ___   ___ ___   _      _   ___
#    / _ \ / __|_  ) | |    /_\ | _ )
#   | (_) | (__ / /  | |__ / _ \| _ \
#    \__\_\\___/___| |____/_/ \_\___/
#
#   QC2 @ CHALMERS CALIBRATION TOOLKIT
#   (c) 2026 Chalmers University of Technology and Project Contributors
# ──────────────────────────────────────────────────────────────────────────
#   Licensed under the Apache License, Version 2.0 (the "License");
#   you may not use this file except in compliance with the License.
#   You may obtain a copy of the License at
#
#       https://www.apache.org/licenses/LICENSE-2.0
#
#   Unless required by applicable law or agreed to in writing, software
#   distributed under the License is distributed on an "AS IS" BASIS,
#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#   See the License for the specific language governing permissions and
#   limitations under the License.
# ──────────────────────────────────────────────────────────────────────────
#   CONTRIBUTORS list:
#
#   Axel Andersson, axean@chalmers.se
#   Matteo Robbiati, robbiati@chalmers.se
# ══════════════════════════════════════════════════════════════════════════


[docs] class ExperimentBuildingError(Exception): """ Raised when a node violates bragi_quantum.experiments's build assumptions. """
[docs] class ExperimentRegistryError(Exception): """ Raised when the bragi_quantum.experiments node registry (``nodes.yaml``) fails to load, or a registered variant is used in a way that violates its spec. """
[docs] class ExperimentParameterError(Exception): """ Raised when a ``BaseParameters`` subclass violates a parameter convention/restriction introduced by bragi_quantum.experiments itself — e.g. a variant- defining field that isn't a finite type, a ``metadata_field`` marked as variant-defining, or an instance matching a declared ``invalid_variant_combinations`` entry. Covers what would otherwise be a mix of ``ValueError``/``TypeError`` so all such violations share one type. """