arguments
¶
The Arguments of Experiment (qurry.qurrium.experiment.arguments
)
- class qurry.qurrium.experiment.arguments.ArgumentsPrototype(exp_name: str)[source]¶
Construct the experiment’s parameters for specific options, which is overwritable by the inherition class.
- class qurry.qurrium.experiment.arguments.Commonparams(exp_id: str, target_keys: list[Hashable], shots: int, backend: Backend | str, run_args: BaseRunArgs | dict[str, Any], transpile_args: TranspileArgs, tags: tuple[str, ...], save_location: Path | str, serial: int | None, summoner_id: str | None, summoner_name: str | None, datetimes: DatetimeDict)[source]¶
Construct the experiment’s parameters for system running.
- datetimes: DatetimeDict¶
The datetime of experiment.
- static default_value() CommonparamsDict [source]¶
The default value of each field.
- export() CommonparamsDict [source]¶
Export the experiment’s common parameters.
- Returns:
The common parameters of experiment.
- Return type:
- classmethod read_with_arguments(exp_id: str, file_index: dict[str, str], save_location: Path) CommonparamsReadReturn [source]¶
Read the exported experiment file.
- Parameters:
- Returns:
- CommonparamsReadReturn
The experiment’s arguments, the experiment’s common parameters, and the experiment’s side product.
- run_args: BaseRunArgs | dict[str, Any]¶
Arguments of execute.
- save_location: Path | str¶
Location of saving experiment. If this experiment is called by :cls:`QurryMultiManager`, then adventure, legacy, tales, and reports will be exported to their dedicated folders in this location respectively. This location is the default location for it’s not specific where to save when call
write()
, if does, then will be overwriten and update.
- summoner_id: str | None¶
ID of experiment of :cls:`MultiManager`.
- summoner_name: str | None¶
Name of experiment of :cls:`MultiManager`.
- transpile_args: TranspileArgs¶
Arguments of
transpile()
fromqiskit.compiler.transpiler
.
- class qurry.qurrium.experiment.arguments.CommonparamsDict[source]¶
The export dictionary of :cls:`Commonparams`.
- class qurry.qurrium.experiment.arguments.CommonparamsReadReturn[source]¶
The return type of
Commonparams.read_with_arguments()
.
- qurry.qurrium.experiment.arguments.REQUIRED_FOLDER = ['args', 'advent', 'legacy', 'tales', 'reports']¶
The required folder for exporting experiment.
- qurry.qurrium.experiment.arguments.commons_dealing(commons_dict: dict[str, Any]) dict[str, Any] [source]¶
Dealing some special commons arguments.
- qurry.qurrium.experiment.arguments.create_exp_args(arguments: _A | dict[str, Any], arguments_instance: type[_A]) tuple[_A, dict[str, Any]] [source]¶
Create experiment arguments from the given arguments.
- Parameters:
- Returns:
- A tuple containing the parsed arguments instance and
a dictionary of deprecated fields.
- Return type:
- Raises:
TypeError – If the arguments is not an instance of the arguments class or a dictionary.
- qurry.qurrium.experiment.arguments.create_exp_commons(commons: Commonparams | dict[str, Any]) tuple[Commonparams, dict[str, Any]] [source]¶
Create experiment commons from the given commons.
- Parameters:
commons (Union[Commonparams, dict[str, Any]]) – The commons to be parsed.
- Returns:
- A tuple containing the parsed commons instance and
a dictionary of deprecated fields.
- Return type:
tuple[Commonparams, dict[str, Any]]
- Raises:
TypeError – If the commons is not an instance of the commons class or a dictionary.
- qurry.qurrium.experiment.arguments.create_exp_outfields(outfields: dict[str, Any] | None) dict[str, Any] [source]¶
Create experiment outfields from the given outfields.
- qurry.qurrium.experiment.arguments.filter_deprecated_args(arguments_or_commons_input: dict[str, Any], container_fields: tuple[str, ...] | set[str]) tuple[dict[str, Any], dict[str, Any]] [source]¶
Filter deprecated arguments from the given arguments or commons.
- Parameters:
- Returns:
- A tuple containing the filtered arguments or commons
and a dictionary of deprecated fields.
- Return type:
- Raises:
TypeError – If the arguments_or_commons_input is not a dictionary.
- qurry.qurrium.experiment.arguments.v5_to_v7_field_transpose(data_args: dict[str, dict[str, Any]]) dict[str, dict[str, Any]] [source]¶
The field name of v5 to v7.