Skip to content

Commit

Permalink
Merge pull request #854 from qiboteam/doc_generation
Browse files Browse the repository at this point in the history
Fix protocols documentation generation
  • Loading branch information
andrea-pasquale authored May 16, 2024
2 parents 6633379 + 48c5429 commit 37d0605
Show file tree
Hide file tree
Showing 95 changed files with 47 additions and 77 deletions.
2 changes: 1 addition & 1 deletion src/qibocal/auto/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from qibolab.serialize import dump_platform

from ..config import log
from ..protocols.characterization import Operation
from ..protocols import Operation
from .mode import ExecutionMode
from .operation import Data, DummyPars, Results, Routine, dummy_operation
from .runcard import Action, Id, Targets
Expand Down
5 changes: 1 addition & 4 deletions src/qibocal/fitting/classifier/qubit_fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
import numpy as np
import numpy.typing as npt

from qibocal.protocols.characterization.utils import (
cumulative,
effective_qubit_temperature,
)
from qibocal.protocols.utils import cumulative, effective_qubit_temperature


def constructor(_hyperparams):
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from qibocal.auto.operation import RESULTSFILE, Data, Parameters, Results, Routine
from qibocal.auto.serialize import serialize
from qibocal.fitting.classifier import run
from qibocal.protocols.characterization.utils import (
from qibocal.protocols.utils import (
LEGEND_FONT_SIZE,
MESH_SIZE,
TITLE_SIZE,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

from qibocal import update
from qibocal.auto.operation import Data, Parameters, Results, Routine
from qibocal.protocols.characterization.utils import (
from qibocal.protocols.utils import (
HZ_TO_GHZ,
lorentzian,
lorentzian_fit,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from qibolab.sweeper import Parameter, Sweeper, SweeperType

from qibocal.auto.operation import Results, Routine
from qibocal.protocols.characterization.utils import (
from qibocal.protocols.utils import (
GHZ_TO_HZ,
HZ_TO_GHZ,
lorentzian,
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from qibolab.qubits import QubitId

from qibocal.auto.operation import Data, Parameters, Results, Routine
from qibocal.protocols.characterization.utils import table_dict, table_html
from qibocal.protocols.utils import table_dict, table_html

# TODO: IBM Fast Reset until saturation loop
# https://quantum-computing.ibm.com/lab/docs/iql/manage/systems/reset/backend_reset
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

from qibocal.auto.operation import Routine
from qibocal.config import log
from qibocal.protocols.characterization.utils import table_dict, table_html
from qibocal.protocols.utils import table_dict, table_html

from .flipping_signal import (
FlippingSignalData,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from qibocal import update
from qibocal.auto.operation import Data, Parameters, Results, Routine
from qibocal.config import log
from qibocal.protocols.characterization.utils import table_dict, table_html
from qibocal.protocols.utils import table_dict, table_html


@dataclass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
from qibolab.qubits import QubitId, QubitPairId

from qibocal.auto.operation import Data, Results, Routine
from qibocal.protocols.characterization.two_qubit_interaction.utils import order_pair
from qibocal.protocols.characterization.utils import HZ_TO_GHZ, table_dict, table_html
from qibocal.protocols.two_qubit_interaction.utils import order_pair
from qibocal.protocols.utils import HZ_TO_GHZ, table_dict, table_html

from .qubit_flux_dependence import QubitFluxParameters, QubitFluxType
from .qubit_flux_dependence import _acquisition as flux_acquisition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
from qibocal import update
from qibocal.auto.operation import Data, Results, Routine
from qibocal.config import log
from qibocal.protocols.characterization.qubit_spectroscopy_ef import (
DEFAULT_ANHARMONICITY,
)
from qibocal.protocols.qubit_spectroscopy_ef import DEFAULT_ANHARMONICITY

from ..utils import GHZ_TO_HZ, HZ_TO_GHZ, extract_feature, table_dict, table_html
from . import resonator_flux_dependence, utils
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,13 @@

from qibocal.auto.operation import Routine
from qibocal.fitting.classifier import run
from qibocal.protocols.characterization.classification import (
from qibocal.protocols.classification import (
ClassificationType,
SingleShotClassificationData,
SingleShotClassificationParameters,
SingleShotClassificationResults,
)
from qibocal.protocols.characterization.utils import (
MESH_SIZE,
evaluate_grid,
plot_results,
)
from qibocal.protocols.utils import MESH_SIZE, evaluate_grid, plot_results

COLUMNWIDTH = 600
LEGEND_FONT_SIZE = 20
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from qibocal import update
from qibocal.auto.operation import Parameters, Routine
from qibocal.config import log
from qibocal.protocols.characterization.rabi.length_signal import (
from qibocal.protocols.rabi.length_signal import (
RabiLengthVoltData,
RabiLengthVoltResults,
)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@
from qibolab.qubits import QubitId

from qibocal.auto.operation import Results, Routine
from qibocal.protocols.characterization.randomized_benchmarking.utils import (
rb_acquisition,
)
from qibocal.protocols.characterization.utils import table_dict, table_html
from qibocal.protocols.randomized_benchmarking.utils import rb_acquisition
from qibocal.protocols.utils import table_dict, table_html

from .standard_rb import RBData, StandardRBParameters

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class StandardRBParameters(Parameters):
Defaults is ``None``."""
noise_model: Optional[str] = None
"""For simulation purposes, string has to match what is in
:mod:`qibocal.protocols.characterization.randomized_benchmarking.noisemodels`"""
:mod:`qibocal.protocols.randomized_benchmarking.noisemodels`"""
noise_params: Optional[list] = field(default_factory=list)
"""With this the noise model will be initialized, if not given random values will be used."""
nshots: int = 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
execute_transpiled_circuits,
)
from qibocal.config import raise_error
from qibocal.protocols.characterization.randomized_benchmarking import noisemodels
from qibocal.protocols.characterization.utils import significant_digit
from qibocal.protocols.randomized_benchmarking import noisemodels
from qibocal.protocols.utils import significant_digit

from .circuit_tools import add_inverse_layer, add_measurement_layer, layer_circuit

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

from qibocal import update
from qibocal.auto.operation import Data, Parameters, Results, Routine
from qibocal.protocols.characterization.utils import (
from qibocal.protocols.utils import (
effective_qubit_temperature,
format_error_single_cell,
round_report,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from qibocal import update
from qibocal.auto.operation import Data, Parameters, Results, Routine
from qibocal.fitting.classifier.qubit_fit import QubitFit
from qibocal.protocols.characterization.utils import table_dict, table_html
from qibocal.protocols.utils import table_dict, table_html


@dataclass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from qibocal import update
from qibocal.auto.operation import Data, Parameters, Results, Routine
from qibocal.fitting.classifier.qubit_fit import QubitFit
from qibocal.protocols.characterization.utils import HZ_TO_GHZ, table_dict, table_html
from qibocal.protocols.utils import HZ_TO_GHZ, table_dict, table_html


@dataclass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@

from qibocal import update
from qibocal.auto.operation import Data, Parameters, Results, Routine
from qibocal.protocols.characterization import classification
from qibocal.protocols.characterization.readout_optimization.resonator_frequency import (
from qibocal.protocols import classification
from qibocal.protocols.readout_optimization.resonator_frequency import (
ResonatorFrequencyType,
)
from qibocal.protocols.characterization.utils import HZ_TO_GHZ, table_dict, table_html
from qibocal.protocols.utils import HZ_TO_GHZ, table_dict, table_html


@dataclass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,8 @@
from qibolab.qubits import QubitId

from qibocal.auto.operation import Data, Parameters, Results, Routine
from qibocal.protocols.characterization.resonator_spectroscopy import (
resonator_spectroscopy,
)
from qibocal.protocols.characterization.utils import (
HZ_TO_GHZ,
PowerLevel,
table_dict,
table_html,
)
from qibocal.protocols.resonator_spectroscopy import resonator_spectroscopy
from qibocal.protocols.utils import HZ_TO_GHZ, PowerLevel, table_dict, table_html


@dataclass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

from qibocal import update
from qibocal.auto.operation import Data, Parameters, Results, Routine
from qibocal.protocols.characterization import classification
from qibocal.protocols.characterization.utils import HZ_TO_GHZ, table_dict, table_html
from qibocal.protocols import classification
from qibocal.protocols.utils import HZ_TO_GHZ, table_dict, table_html


@dataclass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

from qibocal import update
from qibocal.auto.operation import Parameters, Results, Routine
from qibocal.protocols.characterization import classification
from qibocal.protocols.characterization.utils import table_dict, table_html
from qibocal.protocols import classification
from qibocal.protocols.utils import table_dict, table_html

from . import frequency

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,8 @@
from qibolab.qubits import QubitId

from qibocal.auto.operation import Data, Parameters, Results, Routine
from qibocal.protocols.characterization.resonator_spectroscopy import (
resonator_spectroscopy,
)
from qibocal.protocols.characterization.utils import (
HZ_TO_GHZ,
PowerLevel,
table_dict,
table_html,
)
from qibocal.protocols.resonator_spectroscopy import resonator_spectroscopy
from qibocal.protocols.utils import HZ_TO_GHZ, PowerLevel, table_dict, table_html


@dataclass
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from qibolab.qubits import QubitId

from qibocal.auto.operation import Data, Parameters, Results, Routine
from qibocal.protocols.characterization.utils import S_TO_NS, table_dict, table_html
from qibocal.protocols.utils import S_TO_NS, table_dict, table_html


@dataclass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from qibocal import update
from qibocal.auto.operation import Data, Parameters, Results, Routine
from qibocal.config import log
from qibocal.protocols.characterization.utils import table_dict, table_html
from qibocal.protocols.utils import table_dict, table_html

from ..utils import fit_flux_amplitude, order_pair
from .utils import COLORAXIS, chevron_fit, chevron_sequence
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from qibocal import update
from qibocal.auto.operation import Data, Parameters, Results, Routine
from qibocal.config import log
from qibocal.protocols.characterization.utils import table_dict, table_html
from qibocal.protocols.utils import table_dict, table_html

from .utils import order_pair

Expand Down
File renamed without changes.
10 changes: 5 additions & 5 deletions tests/test_protocols.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
from qibocal.auto.task import PLATFORM_DIR
from qibocal.cli import utils
from qibocal.cli._base import command
from qibocal.protocols.characterization.flux_dependence.resonator_flux_dependence import (
from qibocal.protocols.flux_dependence.resonator_flux_dependence import (
ResonatorFluxParameters,
)
from qibocal.protocols.characterization.rabi.amplitude import RabiAmplitudeData
from qibocal.protocols.characterization.rabi.ef import RabiAmplitudeEFData
from qibocal.protocols.characterization.rabi.length import RabiLengthData
from qibocal.protocols.characterization.rabi.utils import (
from qibocal.protocols.rabi.amplitude import RabiAmplitudeData
from qibocal.protocols.rabi.ef import RabiAmplitudeEFData
from qibocal.protocols.rabi.length import RabiLengthData
from qibocal.protocols.rabi.utils import (
extract_rabi,
rabi_amplitude_function,
rabi_length_function,
Expand Down
7 changes: 2 additions & 5 deletions tests/test_randomized_benchmarking.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@
import pytest
import qibo

from qibocal.protocols.characterization.randomized_benchmarking import (
fitting,
noisemodels,
)
from qibocal.protocols.characterization.randomized_benchmarking.utils import (
from qibocal.protocols.randomized_benchmarking import fitting, noisemodels
from qibocal.protocols.randomized_benchmarking.utils import (
RB_Generator,
number_to_str,
random_clifford,
Expand Down
6 changes: 2 additions & 4 deletions tests/test_task_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@
from qibocal.auto.runcard import Runcard
from qibocal.auto.task import Task
from qibocal.cli.report import ExecutionMode
from qibocal.protocols.characterization.classification import (
SingleShotClassificationParameters,
)
from qibocal.protocols.characterization.readout_mitigation_matrix import (
from qibocal.protocols.classification import SingleShotClassificationParameters
from qibocal.protocols.readout_mitigation_matrix import (
ReadoutMitigationMatrixParameters,
)

Expand Down
2 changes: 1 addition & 1 deletion tests/test_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from qibolab.pulses import Drag

from qibocal import update
from qibocal.protocols.characterization.signal_experiments.calibrate_state_discrimination import (
from qibocal.protocols.signal_experiments.calibrate_state_discrimination import (
CalibrateStateDiscriminationResults,
)

Expand Down
2 changes: 1 addition & 1 deletion tests/test_utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import numpy as np

from qibocal.protocols.characterization.utils import cumulative, eval_magnitude
from qibocal.protocols.utils import cumulative, eval_magnitude


def test_cumulative():
Expand Down

0 comments on commit 37d0605

Please sign in to comment.