Source code for bragi_quantum.experiments.nodes.qubit_control.ramsey_fringes.node

# ══════════════════════════════════════════════════════════════════════════
#     ___   ___ ___   _      _   ___
#    / _ \ / __|_  ) | |    /_\ | _ )
#   | (_) | (__ / /  | |__ / _ \| _ \
#    \__\_\\___/___| |____/_/ \_\___/
#
#   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:
#
#   Matteo Robbiati, robbiati@chalmers.se
#   Axel Andersson, axean@chalmers.se
#   Adrián Navarro Fuentes, adrianfu@chalmers.se
#   Michele Faucci Giannelli, faucci@chalmers.se
# ══════════════════════════════════════════════════════════════════════════


"""
Node implementation for Ramsey-fringes (detuning) calibration.
"""

import numpy as np

from bragi_quantum.experiments.nodes.qubit_control.ramsey_fringes.analysis import (
    RamseyDetuningsAnalysis,
)
from bragi_quantum.experiments.nodes.qubit_control.ramsey_fringes.measurement import (
    RamseyDetuningsMeasurement,
)
from bragi_quantum.experiments.nodes.qubit_control.ramsey_fringes.parameters import (
    Ramsey01QOI,
    RamseyBaseQOI,
    RamseyParameters,
)
from bragi_quantum.experiments.nodes.schedule_node import ScheduleQubitNode


[docs] class RamseyFringes(ScheduleQubitNode): """ Execution node for performing Ramsey-fringes (detuning) calibration. A single node class handles both the 0->1 and 1->2 transitions; the transition is selected by the ``transition`` field in ``RamseyParameters``. """ measurement_cls = RamseyDetuningsMeasurement analysis_cls = RamseyDetuningsAnalysis parameters: RamseyParameters def __init__( self, parameters: RamseyParameters, qoi_cls: type[RamseyBaseQOI] = Ramsey01QOI, ): """ Initializes the Ramsey-fringes node. Args: parameters: Validated experimental parameters. qoi_cls: The QOI class used to store results. """ super().__init__( parameters=parameters, qoi_cls=qoi_cls, ) self.schedule_keywords = { "transition": self.parameters.transition, "repetitions": self.parameters.repetitions, "sequence": self.parameters.sequence, } self.schedule_samplespace = { "ramsey_delays": { qubit: np.array(self.parameters_by_qubit[qubit].ramsey_delays) for qubit in self.all_qubits }, "artificial_detunings": { qubit: np.array(self.parameters_by_qubit[qubit].artificial_detunings) for qubit in self.all_qubits }, }