qibocal package¶
qibocal: Quantum Calibration Verification and Validation using Qibo.
- class qibocal.Executor(*, history: ~qibocal.auto.history.History, targets: list[~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])]] | list[~typing.Annotated[tuple[~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], ~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])]], ~pydantic.functional_validators.BeforeValidator(func=~qibocal.calibration.calibration.<lambda>, json_schema_input_type=PydanticUndefined), ~pydantic.functional_serializers.PlainSerializer(func=~qibocal.calibration.calibration.<lambda>, return_type=PydanticUndefined, when_used=always)]] | list[tuple[~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], ...]], platform: ~qibocal.calibration.platform.CalibrationPlatform, update: bool = True, path: ~pathlib.Path, meta: ~qibocal.auto.output.Metadata, sources: list[dict[str, ~qibocal.auto.operation.Protocol]] = <factory>)[source]¶
Bases:
BaseModelExecute a tasks’ graph and tracks its history.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- targets: list[~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])]] | list[~typing.Annotated[tuple[~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], ~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])]], ~pydantic.functional_validators.BeforeValidator(func=~qibocal.calibration.calibration.<lambda>, json_schema_input_type=PydanticUndefined), ~pydantic.functional_serializers.PlainSerializer(func=~qibocal.calibration.calibration.<lambda>, return_type=PydanticUndefined, when_used=always)]] | list[tuple[~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], ...]]¶
Qubits/Qubit Pairs to be calibrated.
- platform: CalibrationPlatform¶
Qubits’ platform.
- run_protocol(protocol: ~qibocal.auto.operation.Protocol, parameters: ~qibocal.auto.task.Action, mode: ~qibocal.auto.mode.ExecutionMode = <ExecutionMode.ACQUIRE|FIT: 3>, output: ~pathlib.Path | None = None) Completed[source]¶
Run single protocol in ExecutionMode mode.
- _wrapped_protocol(protocol: Protocol, operation: str)[source]¶
Create a bound protocol.
Returns a closure, already wrapping the current Executor instance, but specific to the protocol chosen. The parameters of this wrapper function maps to protocol’s ones, in particular:
the keyword argument mode is used as the execution mode (defaults to AUTOCALIBRATION)
the keyword argument id is used as the id for the given operation (defaults to protocol identifier, the same used to import and invoke it)
then the protocol specific are resolved, with the following priority:
explicit keyword arguments have the highest priorities
items in the dictionary passed with the keyword parameters
positional arguments, which are associated to protocols parameters in the same order in which they are defined (and documented) in their respective parameters classes
Attention
Despite the priority being clear, it is advised to use only one of the former schemes to pass parameters, to avoid confusion due to unexpected overwritten arguments.
E.g. for:
resonator_spectroscopy(1e7, 1e5, freq_width=1e8)
the freq_width will be 1e8, and 1e7 will be silently overwritten and ignored (as opposed to a regular Python function, where a TypeError would be raised).
The priority defined above is strictly and silently respected, so just pay attention during invocations.
- classmethod create(path: ~os.PathLike, targets: list[~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])]] | list[~typing.Annotated[tuple[~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], ~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])]], ~pydantic.functional_validators.BeforeValidator(func=~qibocal.calibration.calibration.<lambda>, json_schema_input_type=PydanticUndefined), ~pydantic.functional_serializers.PlainSerializer(func=~qibocal.calibration.calibration.<lambda>, return_type=PydanticUndefined, when_used=always)]] | list[tuple[~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], ...]], platform: ~qibocal.calibration.platform.CalibrationPlatform | ~qibolab._core.platform.platform.Platform | str | None = None, **kwargs: ~typing.Any) Executor[source]¶
Create protocols’ executor.
This is a wrapper of the default constructor, which is only handling different platforms specification.
For the full set of arguments, cf.
Executor.
- _abc_impl = <_abc._abc_data object>¶
- _setattr_handler(name: str, value: Any) Callable[[BaseModel, str, Any], None] | None¶
Get a handler for setting an attribute on the model instance.
- Returns:
A handler for setting an attribute on the model instance. Used for memoization of the handler. Memoizing the handlers leads to a dramatic performance improvement in __setattr__ Returns None when memoization is not safe, then the attribute is set directly.
- copy(*, include: AbstractSetIntStr | MappingIntStrAny | None = None, exclude: AbstractSetIntStr | MappingIntStrAny | None = None, update: Dict[str, Any] | None = None, deep: bool = False) Self¶
Returns a copy of the model.
- !!! warning “Deprecated”
This method is now deprecated; use model_copy instead.
If you need include or exclude, use:
`python {test="skip" lint="skip"} data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `- Parameters:
include – Optional set or mapping specifying which fields to include in the copied model.
exclude – Optional set or mapping specifying which fields to exclude in the copied model.
update – Optional dictionary of field-value pairs to override field values in the copied model.
deep – If True, the values of fields that are Pydantic models will be deep-copied.
- Returns:
A copy of the model with included, excluded and updated fields as specified.
- dict(*, include: set[int] | set[str] | Mapping[int, set[int] | set[str] | Mapping[int, IncEx | bool] | Mapping[str, IncEx | bool] | bool] | Mapping[str, set[int] | set[str] | Mapping[int, IncEx | bool] | Mapping[str, IncEx | bool] | bool] | None = None, exclude: set[int] | set[str] | Mapping[int, set[int] | set[str] | Mapping[int, IncEx | bool] | Mapping[str, IncEx | bool] | bool] | Mapping[str, set[int] | set[str] | Mapping[int, IncEx | bool] | Mapping[str, IncEx | bool] | bool] | None = None, by_alias: bool = False, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False) Dict[str, Any]¶
- json(*, include: set[int] | set[str] | Mapping[int, set[int] | set[str] | Mapping[int, IncEx | bool] | Mapping[str, IncEx | bool] | bool] | Mapping[str, set[int] | set[str] | Mapping[int, IncEx | bool] | Mapping[str, IncEx | bool] | bool] | None = None, exclude: set[int] | set[str] | Mapping[int, set[int] | set[str] | Mapping[int, IncEx | bool] | Mapping[str, IncEx | bool] | bool] | Mapping[str, set[int] | set[str] | Mapping[int, IncEx | bool] | Mapping[str, IncEx | bool] | bool] | None = None, by_alias: bool = False, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, encoder: Callable[[Any], Any] | None = PydanticUndefined, models_as_dict: bool = PydanticUndefined, **dumps_kwargs: Any) str¶
- model_computed_fields = {}¶
- classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self¶
Creates a new instance of the Model class with validated data.
Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.
- !!! note
model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.
- Parameters:
_fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.
values – Trusted or pre-validated data dictionary.
- Returns:
A new instance of the Model class with validated data.
- model_copy(*, update: Mapping[str, Any] | None = None, deep: bool = False) Self¶
- !!! abstract “Usage Documentation”
[model_copy](../concepts/models.md#model-copy)
Returns a copy of the model.
- !!! note
The underlying instance’s [__dict__][object.__dict__] attribute is copied. This might have unexpected side effects if you store anything in it, on top of the model fields (e.g. the value of [cached properties][functools.cached_property]).
- Parameters:
update – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.
deep – Set to True to make a deep copy of the model.
- Returns:
New model instance.
- model_dump(*, mode: Literal['json', 'python'] | str = 'python', include: set[int] | set[str] | Mapping[int, set[int] | set[str] | Mapping[int, IncEx | bool] | Mapping[str, IncEx | bool] | bool] | Mapping[str, set[int] | set[str] | Mapping[int, IncEx | bool] | Mapping[str, IncEx | bool] | bool] | None = None, exclude: set[int] | set[str] | Mapping[int, set[int] | set[str] | Mapping[int, IncEx | bool] | Mapping[str, IncEx | bool] | bool] | Mapping[str, set[int] | set[str] | Mapping[int, IncEx | bool] | Mapping[str, IncEx | bool] | bool] | None = None, context: Any | None = None, by_alias: bool | None = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, exclude_computed_fields: bool = False, round_trip: bool = False, warnings: bool | Literal['none', 'warn', 'error'] = True, fallback: Callable[[Any], Any] | None = None, serialize_as_any: bool = False, polymorphic_serialization: bool | None = None) dict[str, Any]¶
- !!! abstract “Usage Documentation”
[model_dump](../concepts/serialization.md#python-mode)
Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
- Parameters:
mode – The mode in which to_python should run. If mode is ‘json’, the output will only contain JSON serializable types. If mode is ‘python’, the output may contain non-JSON-serializable Python objects.
include – A set of fields to include in the output.
exclude – A set of fields to exclude from the output.
context – Additional context to pass to the serializer.
by_alias – Whether to use the field’s alias in the dictionary key if defined.
exclude_unset – Whether to exclude fields that have not been explicitly set.
exclude_defaults – Whether to exclude fields that are set to their default value.
exclude_none – Whether to exclude fields that have a value of None.
exclude_computed_fields – Whether to exclude computed fields. While this can be useful for round-tripping, it is usually recommended to use the dedicated round_trip parameter instead.
round_trip – If True, dumped values should be valid as input for non-idempotent types such as Json[T].
warnings – How to handle serialization errors. False/”none” ignores them, True/”warn” logs errors, “error” raises a [PydanticSerializationError][pydantic_core.PydanticSerializationError].
fallback – A function to call when an unknown value is encountered. If not provided, a [PydanticSerializationError][pydantic_core.PydanticSerializationError] error is raised.
serialize_as_any – Whether to serialize fields with duck-typing serialization behavior.
polymorphic_serialization – Whether to use model and dataclass polymorphic serialization for this call.
- Returns:
A dictionary representation of the model.
- model_dump_json(*, indent: int | None = None, ensure_ascii: bool = False, include: set[int] | set[str] | Mapping[int, set[int] | set[str] | Mapping[int, IncEx | bool] | Mapping[str, IncEx | bool] | bool] | Mapping[str, set[int] | set[str] | Mapping[int, IncEx | bool] | Mapping[str, IncEx | bool] | bool] | None = None, exclude: set[int] | set[str] | Mapping[int, set[int] | set[str] | Mapping[int, IncEx | bool] | Mapping[str, IncEx | bool] | bool] | Mapping[str, set[int] | set[str] | Mapping[int, IncEx | bool] | Mapping[str, IncEx | bool] | bool] | None = None, context: Any | None = None, by_alias: bool | None = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, exclude_computed_fields: bool = False, round_trip: bool = False, warnings: bool | Literal['none', 'warn', 'error'] = True, fallback: Callable[[Any], Any] | None = None, serialize_as_any: bool = False, polymorphic_serialization: bool | None = None) str¶
- !!! abstract “Usage Documentation”
[model_dump_json](../concepts/serialization.md#json-mode)
Generates a JSON representation of the model using Pydantic’s to_json method.
- Parameters:
indent – Indentation to use in the JSON output. If None is passed, the output will be compact.
ensure_ascii – If True, the output is guaranteed to have all incoming non-ASCII characters escaped. If False (the default), these characters will be output as-is.
include – Field(s) to include in the JSON output.
exclude – Field(s) to exclude from the JSON output.
context – Additional context to pass to the serializer.
by_alias – Whether to serialize using field aliases.
exclude_unset – Whether to exclude fields that have not been explicitly set.
exclude_defaults – Whether to exclude fields that are set to their default value.
exclude_none – Whether to exclude fields that have a value of None.
exclude_computed_fields – Whether to exclude computed fields. While this can be useful for round-tripping, it is usually recommended to use the dedicated round_trip parameter instead.
round_trip – If True, dumped values should be valid as input for non-idempotent types such as Json[T].
warnings – How to handle serialization errors. False/”none” ignores them, True/”warn” logs errors, “error” raises a [PydanticSerializationError][pydantic_core.PydanticSerializationError].
fallback – A function to call when an unknown value is encountered. If not provided, a [PydanticSerializationError][pydantic_core.PydanticSerializationError] error is raised.
serialize_as_any – Whether to serialize fields with duck-typing serialization behavior.
polymorphic_serialization – Whether to use model and dataclass polymorphic serialization for this call.
- Returns:
A JSON string representation of the model.
- property model_extra: dict[str, Any] | None¶
Get extra fields set during validation.
- Returns:
A dictionary of extra fields, or None if config.extra is not set to “allow”.
- model_fields = {'history': FieldInfo(annotation=History, required=True), 'meta': FieldInfo(annotation=Metadata, required=True), 'path': FieldInfo(annotation=Path, required=True), 'platform': FieldInfo(annotation=CalibrationPlatform, required=True), 'sources': FieldInfo(annotation=list[dict[str, Protocol]], required=False, default_factory=list), 'targets': FieldInfo(annotation=Union[list[Annotated[Union[int, str], FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])]], list[Annotated[tuple[Annotated[Union[int, str], FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], Annotated[Union[int, str], FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])]], BeforeValidator, PlainSerializer]], list[tuple[Annotated[Union[int, str], FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], ...]]], required=True), 'update': FieldInfo(annotation=bool, required=False, default=True)}¶
- property model_fields_set: set[str]¶
Returns the set of fields that have been explicitly set on this model instance.
- Returns:
- A set of strings representing the fields that have been set,
i.e. that were not filled from defaults.
- classmethod model_json_schema(by_alias: bool = True, ref_template: str = '#/$defs/{model}', schema_generator: type[~pydantic.json_schema.GenerateJsonSchema] = <class 'pydantic.json_schema.GenerateJsonSchema'>, mode: ~typing.Literal['validation', 'serialization'] = 'validation', *, union_format: ~typing.Literal['any_of', 'primitive_type_array'] = 'any_of') dict[str, Any]¶
Generates a JSON schema for a model class.
- Parameters:
by_alias – Whether to use attribute aliases or not.
ref_template – The reference template.
union_format –
The format to use when combining schemas from unions together. Can be one of:
’any_of’: Use the [anyOf](https://json-schema.org/understanding-json-schema/reference/combining#anyOf)
keyword to combine schemas (the default). - ‘primitive_type_array’: Use the [type](https://json-schema.org/understanding-json-schema/reference/type) keyword as an array of strings, containing each type of the combination. If any of the schemas is not a primitive type (string, boolean, null, integer or number) or contains constraints/metadata, falls back to any_of.
schema_generator – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications
mode – The mode in which to generate the schema.
- Returns:
The JSON schema for the given model class.
- classmethod model_parametrized_name(params: tuple[type[Any], ...]) str¶
Compute the class name for parametrizations of generic classes.
This method can be overridden to achieve a custom naming scheme for generic BaseModels.
- Parameters:
params – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.
- Returns:
String representing the new class where params are passed to cls as type variables.
- Raises:
TypeError – Raised when trying to generate concrete names for non-generic models.
- classmethod model_rebuild(*, force: bool = False, raise_errors: bool = True, _parent_namespace_depth: int = 2, _types_namespace: MappingNamespace | None = None) bool | None¶
Try to rebuild the pydantic-core schema for the model.
This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.
- Parameters:
force – Whether to force the rebuilding of the model schema, defaults to False.
raise_errors – Whether to raise errors, defaults to True.
_parent_namespace_depth – The depth level of the parent namespace, defaults to 2.
_types_namespace – The types namespace, defaults to None.
- Returns:
Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.
- classmethod model_validate(obj: Any, *, strict: bool | None = None, extra: Literal['allow', 'ignore', 'forbid'] | None = None, from_attributes: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self¶
Validate a pydantic model instance.
- Parameters:
obj – The object to validate.
strict – Whether to enforce types strictly.
extra – Whether to ignore, allow, or forbid extra data during model validation. See the [extra configuration value][pydantic.ConfigDict.extra] for details.
from_attributes – Whether to extract data from object attributes.
context – Additional context to pass to the validator.
by_alias – Whether to use the field’s alias when validating against the provided input data.
by_name – Whether to use the field’s name when validating against the provided input data.
- Raises:
ValidationError – If the object could not be validated.
- Returns:
The validated model instance.
- classmethod model_validate_json(json_data: str | bytes | bytearray, *, strict: bool | None = None, extra: Literal['allow', 'ignore', 'forbid'] | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self¶
- !!! abstract “Usage Documentation”
[JSON Parsing](../concepts/json.md#json-parsing)
Validate the given JSON data against the Pydantic model.
- Parameters:
json_data – The JSON data to validate.
strict – Whether to enforce types strictly.
extra – Whether to ignore, allow, or forbid extra data during model validation. See the [extra configuration value][pydantic.ConfigDict.extra] for details.
context – Extra variables to pass to the validator.
by_alias – Whether to use the field’s alias when validating against the provided input data.
by_name – Whether to use the field’s name when validating against the provided input data.
- Returns:
The validated Pydantic model.
- Raises:
ValidationError – If json_data is not a JSON string or the object could not be validated.
- classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, extra: Literal['allow', 'ignore', 'forbid'] | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self¶
Validate the given object with string data against the Pydantic model.
- Parameters:
obj – The object containing string data to validate.
strict – Whether to enforce types strictly.
extra – Whether to ignore, allow, or forbid extra data during model validation. See the [extra configuration value][pydantic.ConfigDict.extra] for details.
context – Extra variables to pass to the validator.
by_alias – Whether to use the field’s alias when validating against the provided input data.
by_name – Whether to use the field’s name when validating against the provided input data.
- Returns:
The validated Pydantic model.
- classmethod parse_file(path: str | Path, *, content_type: str | None = None, encoding: str = 'utf8', proto: DeprecatedParseProtocol | None = None, allow_pickle: bool = False) Self¶
- classmethod parse_raw(b: str | bytes, *, content_type: str | None = None, encoding: str = 'utf8', proto: DeprecatedParseProtocol | None = None, allow_pickle: bool = False) Self¶
- classmethod schema_json(*, by_alias: bool = True, ref_template: str = '#/$defs/{model}', **dumps_kwargs: Any) str¶
- classmethod open(path: ~os.PathLike, targets: list[~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])]] | list[~typing.Annotated[tuple[~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], ~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])]], ~pydantic.functional_validators.BeforeValidator(func=~qibocal.calibration.calibration.<lambda>, json_schema_input_type=PydanticUndefined), ~pydantic.functional_serializers.PlainSerializer(func=~qibocal.calibration.calibration.<lambda>, return_type=PydanticUndefined, when_used=always)]] | list[tuple[~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], ...]], force: bool = False, platform: ~qibocal.calibration.platform.CalibrationPlatform | str | None = None, update: bool | None = None, **kwargs: ~typing.Any)[source]¶
Enter the execution context.
For the full set of arguments, cf.
Executor.
- qibocal.create_calibration_platform(name: str) CalibrationPlatform[source]¶
- class qibocal.Protocol(acquisition: Callable[[_ParametersT], _DataT], fit: Callable[[_DataT], _ResultsT] = None, report: Callable[[_DataT, _ResultsT], None] = None, update: Callable[[_ResultsT, Platform], None] = None, two_qubit_gates: bool | None = False)[source]¶
Bases:
Generic[_ParametersT,_DataT,_ResultsT]A wrapped calibration routine.
- two_qubit_gates: bool | None = False¶
Flag to determine whether to allocate list of Qubits or Pairs.
- property parameters_type¶
Input parameters type.
- _is_protocol = False¶
- property data_type¶
Data object type return by data acquisition.
- property results_type¶
Results object type returned by data acquisition.
- property platform_dependent¶
Check if acquisition involves platform.
- property targets_dependent¶
Check if acquisition involves qubits.
Subpackages¶
- qibocal.auto package
Protocol- Submodules
- qibocal.auto.execute module
PLATFORM_DIRExecutorExecutor.model_configExecutor.historyExecutor.targetsExecutor.platformExecutor.updateExecutor.pathExecutor.metaExecutor.sourcesExecutor.model_post_init()Executor.protocolsExecutor.run_protocol()Executor._wrapped_protocol()Executor.create()Executor._abc_implExecutor._calculate_keys()Executor._copy_and_set_values()Executor._get_value()Executor._iter()Executor._setattr_handler()Executor.construct()Executor.copy()Executor.dict()Executor.from_orm()Executor.init()Executor.json()Executor.model_computed_fieldsExecutor.model_construct()Executor.model_copy()Executor.model_dump()Executor.model_dump_json()Executor.model_extraExecutor.model_fieldsExecutor.model_fields_setExecutor.model_json_schema()Executor.model_parametrized_name()Executor.model_rebuild()Executor.model_validate()Executor.model_validate_json()Executor.model_validate_strings()Executor.parse_file()Executor.parse_obj()Executor.parse_raw()Executor.schema()Executor.schema_json()Executor.update_forward_refs()Executor.validate()Executor.close()Executor.open()
_register()
- qibocal.auto.history module
- qibocal.auto.mode module
ExecutionModeExecutionMode.ACQUIREExecutionMode.FITExecutionMode._generate_next_value_()ExecutionMode._numeric_repr_()ExecutionMode._iter_member_by_value_()ExecutionMode._iter_member_()ExecutionMode._iter_member_by_def_()ExecutionMode._missing_()ExecutionMode._get_value()ExecutionMode._boundary_ExecutionMode._flag_mask_ExecutionMode._singles_mask_ExecutionMode._all_bits_ExecutionMode._inverted_
AUTOCALIBRATION
- qibocal.auto.operation module
- qibocal.auto.output module
- qibocal.auto.runcard module
- qibocal.auto.serialize module
- qibocal.auto.status module
- qibocal.auto.task module
- qibocal.auto.transpile module
_string_to_integer_qubit_maps()_pad_circuit()_transpile_circuits()_validate_gate()_validate_sequence()_validate_measurement()_counts_with_hardware_averaging()_counts_with_singleshot()_execute_circuits()execute_circuits()_natives()_create_rule()build_native_gate_compiler()build_native_gate_transpiler()
- qibocal.calibration package
CalibrationPlatformCalibrationPlatform.calibrationCalibrationPlatform.from_platform()CalibrationPlatform.dump()CalibrationPlatform._controllerCalibrationPlatform._element()CalibrationPlatform._execute()CalibrationPlatform.channelsCalibrationPlatform.componentsCalibrationPlatform.config()CalibrationPlatform.connect()CalibrationPlatform.coupler()CalibrationPlatform.coupler_channelsCalibrationPlatform.disconnect()CalibrationPlatform.execute()CalibrationPlatform.is_connectedCalibrationPlatform.nativesCalibrationPlatform.nqubitsCalibrationPlatform.ordered_pairsCalibrationPlatform.pairsCalibrationPlatform.qubit()CalibrationPlatform.qubit_channelsCalibrationPlatform.resonator_typeCalibrationPlatform.sampling_rateCalibrationPlatform.settingsCalibrationPlatform.termination_handler()CalibrationPlatform.update()CalibrationPlatform.nameCalibrationPlatform.parametersCalibrationPlatform.instrumentsCalibrationPlatform.qubitsCalibrationPlatform.couplers
create_calibration_platform()- Submodules
- qibocal.calibration.calibration module
QubitIdQubitPairIdCALIBRATIONMeasureModelModel.model_configModel._abc_implModel._calculate_keys()Model._copy_and_set_values()Model._get_value()Model._iter()Model._setattr_handler()Model.construct()Model.copy()Model.dict()Model.from_orm()Model.json()Model.model_computed_fieldsModel.model_construct()Model.model_copy()Model.model_dump()Model.model_dump_json()Model.model_extraModel.model_fieldsModel.model_fields_setModel.model_json_schema()Model.model_parametrized_name()Model.model_post_init()Model.model_rebuild()Model.model_validate()Model.model_validate_json()Model.model_validate_strings()Model.parse_file()Model.parse_obj()Model.parse_raw()Model.schema()Model.schema_json()Model.update_forward_refs()Model.validate()
ResonatorResonator.bare_frequencyResonator.dressed_frequencyResonator.depletion_timeResonator.bare_frequency_amplitudeResonator.dispersive_shiftResonator._abc_implResonator._calculate_keys()Resonator._copy_and_set_values()Resonator._get_value()Resonator._iter()Resonator._setattr_handler()Resonator.construct()Resonator.copy()Resonator.dict()Resonator.from_orm()Resonator.json()Resonator.model_computed_fieldsResonator.model_configResonator.model_construct()Resonator.model_copy()Resonator.model_dump()Resonator.model_dump_json()Resonator.model_extraResonator.model_fieldsResonator.model_fields_setResonator.model_json_schema()Resonator.model_parametrized_name()Resonator.model_post_init()Resonator.model_rebuild()Resonator.model_validate()Resonator.model_validate_json()Resonator.model_validate_strings()Resonator.parse_file()Resonator.parse_obj()Resonator.parse_raw()Resonator.schema()Resonator.schema_json()Resonator.update_forward_refs()Resonator.validate()
QubitQubit.frequency_01Qubit.frequency_12Qubit.maximum_frequencyQubit.asymmetryQubit.sweetspotQubit.flux_coefficientsQubit.anharmonicityQubit.charging_energyQubit.josephson_energyQubit.detuning()Qubit._abc_implQubit._calculate_keys()Qubit._copy_and_set_values()Qubit._get_value()Qubit._iter()Qubit._setattr_handler()Qubit.construct()Qubit.copy()Qubit.dict()Qubit.from_orm()Qubit.json()Qubit.model_computed_fieldsQubit.model_configQubit.model_construct()Qubit.model_copy()Qubit.model_dump()Qubit.model_dump_json()Qubit.model_extraQubit.model_fieldsQubit.model_fields_setQubit.model_json_schema()Qubit.model_parametrized_name()Qubit.model_post_init()Qubit.model_rebuild()Qubit.model_validate()Qubit.model_validate_json()Qubit.model_validate_strings()Qubit.parse_file()Qubit.parse_obj()Qubit.parse_raw()Qubit.schema()Qubit.schema_json()Qubit.update_forward_refs()Qubit.validate()
ReadoutReadout.fidelityReadout.couplingReadout.effective_temperatureReadout.ground_stateReadout.excited_stateReadout.qudits_frequencyReadout.assignment_fidelityReadout._abc_implReadout._calculate_keys()Readout._copy_and_set_values()Readout._get_value()Readout._iter()Readout._setattr_handler()Readout.construct()Readout.copy()Readout.dict()Readout.from_orm()Readout.json()Readout.model_computed_fieldsReadout.model_configReadout.model_construct()Readout.model_copy()Readout.model_dump()Readout.model_dump_json()Readout.model_extraReadout.model_fieldsReadout.model_fields_setReadout.model_json_schema()Readout.model_parametrized_name()Readout.model_post_init()Readout.model_rebuild()Readout.model_validate()Readout.model_validate_json()Readout.model_validate_strings()Readout.parse_file()Readout.parse_obj()Readout.parse_raw()Readout.schema()Readout.schema_json()Readout.update_forward_refs()Readout.validate()
QubitCalibrationQubitCalibration.resonatorQubitCalibration.qubitQubitCalibration._abc_implQubitCalibration._calculate_keys()QubitCalibration._copy_and_set_values()QubitCalibration._get_value()QubitCalibration._iter()QubitCalibration._setattr_handler()QubitCalibration.construct()QubitCalibration.copy()QubitCalibration.dict()QubitCalibration.from_orm()QubitCalibration.json()QubitCalibration.model_computed_fieldsQubitCalibration.model_configQubitCalibration.model_construct()QubitCalibration.model_copy()QubitCalibration.model_dump()QubitCalibration.model_dump_json()QubitCalibration.model_extraQubitCalibration.model_fieldsQubitCalibration.model_fields_setQubitCalibration.model_json_schema()QubitCalibration.model_parametrized_name()QubitCalibration.model_post_init()QubitCalibration.model_rebuild()QubitCalibration.model_validate()QubitCalibration.model_validate_json()QubitCalibration.model_validate_strings()QubitCalibration.parse_file()QubitCalibration.parse_obj()QubitCalibration.parse_raw()QubitCalibration.schema()QubitCalibration.schema_json()QubitCalibration.update_forward_refs()QubitCalibration.validate()QubitCalibration.readoutQubitCalibration.t1QubitCalibration.t2QubitCalibration.t2_spin_echoQubitCalibration.rb_fidelity
TwoQubitCalibrationTwoQubitCalibration._abc_implTwoQubitCalibration._calculate_keys()TwoQubitCalibration._copy_and_set_values()TwoQubitCalibration._get_value()TwoQubitCalibration._iter()TwoQubitCalibration._setattr_handler()TwoQubitCalibration.construct()TwoQubitCalibration.copy()TwoQubitCalibration.dict()TwoQubitCalibration.from_orm()TwoQubitCalibration.json()TwoQubitCalibration.model_computed_fieldsTwoQubitCalibration.model_configTwoQubitCalibration.model_construct()TwoQubitCalibration.model_copy()TwoQubitCalibration.model_dump()TwoQubitCalibration.model_dump_json()TwoQubitCalibration.model_extraTwoQubitCalibration.model_fieldsTwoQubitCalibration.model_fields_setTwoQubitCalibration.model_json_schema()TwoQubitCalibration.model_parametrized_name()TwoQubitCalibration.model_post_init()TwoQubitCalibration.model_rebuild()TwoQubitCalibration.model_validate()TwoQubitCalibration.model_validate_json()TwoQubitCalibration.model_validate_strings()TwoQubitCalibration.parse_file()TwoQubitCalibration.parse_obj()TwoQubitCalibration.parse_raw()TwoQubitCalibration.schema()TwoQubitCalibration.schema_json()TwoQubitCalibration.update_forward_refs()TwoQubitCalibration.validate()TwoQubitCalibration.rb_fidelityTwoQubitCalibration.cz_fidelityTwoQubitCalibration.coupling
CalibrationCalibration._abc_implCalibration._calculate_keys()Calibration._copy_and_set_values()Calibration._get_value()Calibration._iter()Calibration._setattr_handler()Calibration.construct()Calibration.copy()Calibration.dict()Calibration.from_orm()Calibration.json()Calibration.model_computed_fieldsCalibration.model_configCalibration.model_construct()Calibration.model_copy()Calibration.model_dump()Calibration.model_dump_json()Calibration.model_extraCalibration.model_fieldsCalibration.model_fields_setCalibration.model_json_schema()Calibration.model_parametrized_name()Calibration.model_post_init()Calibration.model_rebuild()Calibration.model_validate()Calibration.model_validate_json()Calibration.model_validate_strings()Calibration.parse_file()Calibration.parse_obj()Calibration.parse_raw()Calibration.schema()Calibration.schema_json()Calibration.update_forward_refs()Calibration.validate()Calibration.single_qubitsCalibration.two_qubitsCalibration.readout_mitigation_matrixCalibration.flux_crosstalk_matrixCalibration.dump()Calibration.qubitsCalibration.nqubitsCalibration.qubit_index()Calibration.get_crosstalk_element()Calibration.set_crosstalk_element()Calibration._readout_mitigation_matrix_indices()Calibration.set_readout_mitigation_matrix_element()Calibration.get_readout_mitigation_matrix_element()
- qibocal.calibration.platform module
CalibrationPlatformCalibrationPlatform.calibrationCalibrationPlatform.from_platform()CalibrationPlatform.dump()CalibrationPlatform._controllerCalibrationPlatform._element()CalibrationPlatform._execute()CalibrationPlatform.channelsCalibrationPlatform.componentsCalibrationPlatform.config()CalibrationPlatform.connect()CalibrationPlatform.coupler()CalibrationPlatform.coupler_channelsCalibrationPlatform.disconnect()CalibrationPlatform.execute()CalibrationPlatform.is_connectedCalibrationPlatform.nativesCalibrationPlatform.nqubitsCalibrationPlatform.ordered_pairsCalibrationPlatform.pairsCalibrationPlatform.qubit()CalibrationPlatform.qubit_channelsCalibrationPlatform.resonator_typeCalibrationPlatform.sampling_rateCalibrationPlatform.settingsCalibrationPlatform.termination_handler()CalibrationPlatform.update()CalibrationPlatform.nameCalibrationPlatform.parametersCalibrationPlatform.instrumentsCalibrationPlatform.qubitsCalibrationPlatform.couplers
create_calibration_platform()
- qibocal.calibration.serialize module
- qibocal.cli package
- qibocal.protocols package
- Subpackages
- qibocal.protocols.allxy package
- qibocal.protocols.classification package
- qibocal.protocols.coherence package
- Submodules
- qibocal.protocols.coherence.cpmg module
- qibocal.protocols.coherence.spin_echo module
- qibocal.protocols.coherence.spin_echo_signal module
- qibocal.protocols.coherence.t1 module
- qibocal.protocols.coherence.t1_flux module
- qibocal.protocols.coherence.t1_signal module
- qibocal.protocols.coherence.t2 module
- qibocal.protocols.coherence.t2_flux module
- qibocal.protocols.coherence.t2_signal module
- qibocal.protocols.coherence.utils module
- qibocal.protocols.coherence.zeno module
- qibocal.protocols.dispersive_shift package
- qibocal.protocols.drag package
- qibocal.protocols.flux_dependence package
- Submodules
- qibocal.protocols.flux_dependence.cryoscope module
- qibocal.protocols.flux_dependence.flux_amplitude_frequency module
- qibocal.protocols.flux_dependence.flux_gate module
- qibocal.protocols.flux_dependence.qubit_crosstalk module
- qibocal.protocols.flux_dependence.qubit_flux_dependence module
- qibocal.protocols.flux_dependence.qubit_vz module
- qibocal.protocols.flux_dependence.resonator_flux_dependence module
- qibocal.protocols.flux_dependence.utils module
- qibocal.protocols.qubit_spectroscopies package
- qibocal.protocols.rabi package
- Submodules
- qibocal.protocols.rabi.amplitude module
- qibocal.protocols.rabi.amplitude_frequency module
- qibocal.protocols.rabi.amplitude_frequency_signal module
- qibocal.protocols.rabi.amplitude_signal module
- qibocal.protocols.rabi.ef module
- qibocal.protocols.rabi.length module
- qibocal.protocols.rabi.length_frequency module
- qibocal.protocols.rabi.length_frequency_signal module
- qibocal.protocols.rabi.length_signal module
- qibocal.protocols.rabi.utils module
- qibocal.protocols.ramsey package
- qibocal.protocols.randomized_benchmarking package
- Submodules
- qibocal.protocols.randomized_benchmarking.dict_utils module
- qibocal.protocols.randomized_benchmarking.filtered_rb module
- qibocal.protocols.randomized_benchmarking.fitting module
- qibocal.protocols.randomized_benchmarking.standard_rb module
- qibocal.protocols.randomized_benchmarking.standard_rb_2q module
- qibocal.protocols.randomized_benchmarking.standard_rb_2q_inter module
- qibocal.protocols.randomized_benchmarking.standard_rb_sweeper module
- qibocal.protocols.randomized_benchmarking.utils module
- qibocal.protocols.readout package
- qibocal.protocols.readout_optimization package
- qibocal.protocols.resonator_spectroscopies package
- qibocal.protocols.signal_experiments package
- qibocal.protocols.tomographies package
- qibocal.protocols.two_qubit_interaction package
- Subpackages
- Submodules
- qibocal.protocols.two_qubit_interaction.optimize module
- qibocal.protocols.two_qubit_interaction.snz_optimize module
- qibocal.protocols.two_qubit_interaction.snz_optimize_t_idle module
- qibocal.protocols.two_qubit_interaction.snz_optimize_t_idle_vs_t_tot module
- qibocal.protocols.two_qubit_interaction.utils module
- qibocal.protocols.two_qubit_interaction.virtual_z_phases module
- qibocal.protocols.twpa package
- Submodules
- qibocal.protocols.calibrate_mixers module
- qibocal.protocols.flipping module
- qibocal.protocols.utils module
EXTREME_CHIDELAY_FIT_PERCENTAGEMAX_PIXELSDISTANCE_XYDISTANCE_ZFeatExtractionErrorPowerLevelPowerLevel.highPowerLevel.lowPowerLevel.encode()PowerLevel.replace()PowerLevel.split()PowerLevel.rsplit()PowerLevel.join()PowerLevel.capitalize()PowerLevel.casefold()PowerLevel.title()PowerLevel.center()PowerLevel.count()PowerLevel.expandtabs()PowerLevel.find()PowerLevel.partition()PowerLevel.index()PowerLevel.ljust()PowerLevel.lower()PowerLevel.lstrip()PowerLevel.rfind()PowerLevel.rindex()PowerLevel.rjust()PowerLevel.rstrip()PowerLevel.rpartition()PowerLevel.splitlines()PowerLevel.strip()PowerLevel.swapcase()PowerLevel.translate()PowerLevel.upper()PowerLevel.startswith()PowerLevel.endswith()PowerLevel.removeprefix()PowerLevel.removesuffix()PowerLevel.isascii()PowerLevel.islower()PowerLevel.isupper()PowerLevel.istitle()PowerLevel.isspace()PowerLevel.isdecimal()PowerLevel.isdigit()PowerLevel.isnumeric()PowerLevel.isalpha()PowerLevel.isalnum()PowerLevel.isidentifier()PowerLevel.isprintable()PowerLevel.zfill()PowerLevel.format()PowerLevel.format_map()PowerLevel.maketrans()
readout_frequency()lorentzian()lorentzian_fit()effective_qubit_temperature()compute_qnd()marginalize_qubit_counts()compute_assignment_fidelity()classify()norm()cumulative()eval_magnitude()round_report()format_error_single_cell()chi2_reduced()chi2_reduced_complex()get_color_state0()get_color_state1()significant_digit()evaluate_grid()plot_results()table_dict()table_html()euclidean_metric()zca_whiten()scaling_global()scaling_slice()horizontal_diagonal()build_clustering_data()peaks_finder()merging()clustering()reshaping_raw_signal()angle_wrap()baseline_als()guess_frequency()fallback_frequency()quinn_fernandes_algorithm()guess_period()fallback_period()
- Subpackages
- qibocal.web package
Submodules¶
qibocal.config module¶
Custom logger implementation.
- qibocal.config.raise_error(exception, message=None, args=None)[source]¶
Raise exception with logging error.
- class qibocal.config.CustomHandler[source]¶
Bases:
StreamHandlerCustom handler for logging algorithm.
- _at_fork_reinit()¶
- acquire()¶
Acquire the I/O thread lock.
- addFilter(filter)¶
Add the specified filter to this handler.
- close()¶
Tidy up any resources used by the handler.
This version removes the handler from an internal map of handlers, _handlers, which is used for handler lookup by name. Subclasses should ensure that this gets called from overridden close() methods.
- createLock()¶
Acquire a thread lock for serializing access to the underlying I/O.
- emit(record)¶
Emit a record.
If a formatter is specified, it is used to format the record. The record is then written to the stream with a trailing newline. If exception information is present, it is formatted using traceback.print_exception and appended to the stream. If the stream has an ‘encoding’ attribute, it is used to determine how to do the output to the stream.
- filter(record)¶
Determine if a record is loggable by consulting all the filters.
The default is to allow the record to be logged; any filter can veto this and the record is then dropped. Returns a zero value if a record is to be dropped, else non-zero.
Changed in version 3.2: Allow filters to be just callables.
- flush()¶
Flushes the stream.
- get_name()¶
- handle(record)¶
Conditionally emit the specified logging record.
Emission depends on filters which may have been added to the handler. Wrap the actual emission of the record with acquisition/release of the I/O thread lock. Returns whether the filter passed the record for emission.
- handleError(record)¶
Handle errors which occur during an emit() call.
This method should be called from handlers when an exception is encountered during an emit() call. If raiseExceptions is false, exceptions get silently ignored. This is what is mostly wanted for a logging system - most users will not care about errors in the logging system, they are more interested in application errors. You could, however, replace this with a custom handler if you wish. The record which was being processed is passed in to this method.
- property name¶
- release()¶
Release the I/O thread lock.
- removeFilter(filter)¶
Remove the specified filter from this handler.
- setFormatter(fmt)¶
Set the formatter for this handler.
- setLevel(level)¶
Set the logging level of this handler. level must be an int or a str.
- setStream(stream)¶
Sets the StreamHandler’s stream to the specified value, if it is different.
Returns the old stream, if the stream was changed, or None if it wasn’t.
- set_name(name)¶
- terminator = '\n'¶
qibocal.result module¶
Common result operations.
- qibocal.result.IQ¶
An array of I and Q values.
It is assumed that the I and Q component are discriminated by the innermost dimension of the array.
- qibocal.result._lift(values: ndarray[tuple[Any, ...], dtype[float64]]) ndarray[tuple[Any, ...], dtype[_ScalarT]][source]¶
Transpose the innermost dimension to the outermost.
- qibocal.result._sink(values: ndarray[tuple[Any, ...], dtype[_ScalarT]]) ndarray[tuple[Any, ...], dtype[float64]][source]¶
Transpose the outermost dimension to the innermost.
Inverse of
_lift().
- qibocal.result.collect(i: ndarray[tuple[Any, ...], dtype[_ScalarT]], q: ndarray[tuple[Any, ...], dtype[_ScalarT]]) ndarray[tuple[Any, ...], dtype[float64]][source]¶
Collect I and Q components in a single array.
- qibocal.result.unpack(iq: ndarray[tuple[Any, ...], dtype[float64]]) tuple[ndarray[tuple[Any, ...], dtype[_ScalarT]], ndarray[tuple[Any, ...], dtype[_ScalarT]]][source]¶
Unpack I and Q components from single array.
Inverse of
collect().
- qibocal.result.magnitude(iq: ndarray[tuple[Any, ...], dtype[float64]])[source]¶
Signal magnitude.
It is supposed to be a tension, possibly in arbitrary units.
- qibocal.result.average(values: ndarray[tuple[Any, ...], dtype[_ScalarT]]) tuple[ndarray[tuple[Any, ...], dtype[_ScalarT]], ndarray[tuple[Any, ...], dtype[_ScalarT]]][source]¶
Perform the values average.
It returns both the average estimator itself, and its standard deviation estimator.
Use this also for I and Q values in the standard layout, cf.
IQ.
- qibocal.result.average_iq(i: ndarray[tuple[Any, ...], dtype[_ScalarT]], q: ndarray[tuple[Any, ...], dtype[_ScalarT]]) tuple[ndarray[tuple[Any, ...], dtype[_ScalarT]], ndarray[tuple[Any, ...], dtype[_ScalarT]]][source]¶
Perform the average over I and Q.
Convenience wrapper over
average()for separate i and q samples arrays.
qibocal.update module¶
Helper functions to update parameters in platform.
- qibocal.update._dump_pair(pair: ~typing.Annotated[tuple[~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], ~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])]], ~pydantic.functional_validators.BeforeValidator(func=~qibocal.calibration.calibration.<lambda>, json_schema_input_type=PydanticUndefined), ~pydantic.functional_serializers.PlainSerializer(func=~qibocal.calibration.calibration.<lambda>, return_type=PydanticUndefined, when_used=always)]) str[source]¶
Convert a QubitPairId to its string representation.
- qibocal.update.readout_frequency(freq: float, platform: Platform, qubit: Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])])[source]¶
Update readout frequency value in platform for specific qubit.
- qibocal.update.bare_resonator_frequency(freq: float, platform: Platform, qubit: Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])])[source]¶
Update rbare frequency value in platform for specific qubit.
- qibocal.update.dressed_resonator_frequency(freq: float, platform: Platform, qubit: Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])])[source]¶
Update rbare frequency value in platform for specific qubit.
- qibocal.update.readout_amplitude(amp: float, platform: Platform, qubit: Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])])[source]¶
Update readout amplitude value in platform for specific qubit.
- qibocal.update.drive_frequency(freq: float | tuple | list, platform: Platform, qubit: Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])])[source]¶
Update drive frequency value in platform for specific qubit.
- qibocal.update.drive_amplitude(amp: float | tuple | list, rx90: bool, platform: Platform, qubit: Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])])[source]¶
Update drive frequency value in platform for specific qubit.
- qibocal.update.drive_duration(duration: int | tuple | list, rx90: bool, platform: Platform, qubit: Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])])[source]¶
Update drive duration value in platform for specific qubit.
- qibocal.update.lo_frequency(freq: float, platform: Platform, qubit: Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], channel_type: Literal['probe', 'drive'] = 'probe')[source]¶
Update LO frequency value in platform for specific qubit.
- qibocal.update.lo_attenuation(attenuation: float, platform: Platform, qubit: Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], channel_type: Literal['probe', 'drive'] = 'probe')[source]¶
Update LO attenuation value in platform for specific qubit.
- qibocal.update.crosstalk_matrix(matrix_element: float, platform: Platform, qubit: Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], flux_qubit: Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])])[source]¶
Update crosstalk_matrix element.
- qibocal.update.iq_angle(angle: float, platform: Platform, qubit: Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])])[source]¶
Update iq angle value in platform for specific qubit.
- qibocal.update.threshold(threshold: float, platform: Platform, qubit: Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])])[source]¶
- qibocal.update.mean_gnd_states(ground_state: list, platform: Platform, qubit: Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])])[source]¶
Update mean ground state value in platform for specific qubit.
- qibocal.update.mean_exc_states(excited_state: list, platform: Platform, qubit: Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])])[source]¶
Update mean excited state value in platform for specific qubit.
- qibocal.update.readout_fidelity(fidelity: float, platform: Platform, qubit: Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])])[source]¶
Update fidelity of single shot classification.
- qibocal.update.virtual_phases(phases: dict[~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], float], native: str, platform: ~qibolab._core.platform.platform.Platform, pair: ~typing.Annotated[tuple[~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], ~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])]], ~pydantic.functional_validators.BeforeValidator(func=~qibocal.calibration.calibration.<lambda>, json_schema_input_type=PydanticUndefined), ~pydantic.functional_serializers.PlainSerializer(func=~qibocal.calibration.calibration.<lambda>, return_type=PydanticUndefined, when_used=always)])[source]¶
- qibocal.update.CZ_duration(duration: float, platform: ~qibolab._core.platform.platform.Platform, pair: ~typing.Annotated[tuple[~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], ~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])]], ~pydantic.functional_validators.BeforeValidator(func=~qibocal.calibration.calibration.<lambda>, json_schema_input_type=PydanticUndefined), ~pydantic.functional_serializers.PlainSerializer(func=~qibocal.calibration.calibration.<lambda>, return_type=PydanticUndefined, when_used=always)])[source]¶
Update CZ duration for specific pair.
- qibocal.update.CZ_amplitude(amp: float, platform: ~qibolab._core.platform.platform.Platform, pair: ~typing.Annotated[tuple[~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], ~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])]], ~pydantic.functional_validators.BeforeValidator(func=~qibocal.calibration.calibration.<lambda>, json_schema_input_type=PydanticUndefined), ~pydantic.functional_serializers.PlainSerializer(func=~qibocal.calibration.calibration.<lambda>, return_type=PydanticUndefined, when_used=always)])[source]¶
Update CZ amplitude for specific pair.
- qibocal.update.iSWAP_duration(duration: float, platform: ~qibolab._core.platform.platform.Platform, pair: ~typing.Annotated[tuple[~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], ~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])]], ~pydantic.functional_validators.BeforeValidator(func=~qibocal.calibration.calibration.<lambda>, json_schema_input_type=PydanticUndefined), ~pydantic.functional_serializers.PlainSerializer(func=~qibocal.calibration.calibration.<lambda>, return_type=PydanticUndefined, when_used=always)])[source]¶
Update iSWAP_duration duration for specific pair.
- qibocal.update.iSWAP_amplitude(amp: float, platform: ~qibolab._core.platform.platform.Platform, pair: ~typing.Annotated[tuple[~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], ~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])]], ~pydantic.functional_validators.BeforeValidator(func=~qibocal.calibration.calibration.<lambda>, json_schema_input_type=PydanticUndefined), ~pydantic.functional_serializers.PlainSerializer(func=~qibocal.calibration.calibration.<lambda>, return_type=PydanticUndefined, when_used=always)])[source]¶
Update iSWAP_duration amplitude for specific pair.
- qibocal.update.cnot_sequence(cr_sequence: ~qibolab._core.sequence.PulseSequence, platform: ~qibolab._core.platform.platform.Platform, pair: ~typing.Annotated[tuple[~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], ~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])]], ~pydantic.functional_validators.BeforeValidator(func=~qibocal.calibration.calibration.<lambda>, json_schema_input_type=PydanticUndefined), ~pydantic.functional_serializers.PlainSerializer(func=~qibocal.calibration.calibration.<lambda>, return_type=PydanticUndefined, when_used=always)])[source]¶
Update CNOT gate for specific pair.
- qibocal.update.t1(t1: int, platform: Platform, qubit: Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])])[source]¶
Update t1 value in platform for specific qubit.
- qibocal.update.t2(t2: float, platform: Platform, qubit: Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])])[source]¶
Update t2 value in platform for specific qubit.
- qibocal.update.t2_spin_echo(t2_spin_echo: float, platform: Platform, qubit: Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])])[source]¶
Update t2 echo value in platform for specific qubit.
- qibocal.update.drag_pulse_beta(beta: float, platform: Platform, qubit: Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])])[source]¶
Update beta parameter value in platform for specific qubit.
- qibocal.update.sweetspot(sweetspot: float, platform: Platform, qubit: Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])])[source]¶
Update sweetspot parameter in platform for specific qubit.
- qibocal.update.flux_offset(offset: float, platform: Platform, qubit: Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])])[source]¶
Update flux offset parameter in platform for specific qubit.
- qibocal.update.frequency_12_transition(frequency: float, platform: Platform, qubit: Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])])[source]¶
- qibocal.update.drive_12_amplitude(amplitude: float, platform: Platform, qubit: Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])])[source]¶
- qibocal.update.drive_12_duration(duration: int | tuple | list, platform: Platform, qubit: Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])])[source]¶
Update drive duration value in platform for specific qubit.
- qibocal.update.readout_coupling(g: float, platform: Platform, qubit: Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])])[source]¶
- qibocal.update.pair_coupling(g: list[float], platform: ~qibolab._core.platform.platform.Platform, pair: ~typing.Annotated[tuple[~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], ~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])]], ~pydantic.functional_validators.BeforeValidator(func=~qibocal.calibration.calibration.<lambda>, json_schema_input_type=PydanticUndefined), ~pydantic.functional_serializers.PlainSerializer(func=~qibocal.calibration.calibration.<lambda>, return_type=PydanticUndefined, when_used=always)])[source]¶
- qibocal.update.kernel(kernel: ndarray, platform: Platform, qubit: Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])])[source]¶
qibocal.version module¶
Package version.