processΒΆ

Multi-process component for multimanager (qurry.qurrium.multimanager.process)

qurry.qurrium.multimanager.process.datetimedict_process(multicommons: MultiCommonparams, naming_complex: IOComplex, multiconfig_name_v5: Path, multiconfig_name_v7: Path, is_read_or_retrieve: bool, read_from_tarfile: bool, old_files: dict[str, Any])[source]ΒΆ

Process the datetime dict of multimanager.

Parameters:
  • multicommons (MultiCommonparams) – The common parameters of multimanager.

  • naming_complex (IOComplex) – The complex of IO.

  • multiconfig_name_v5 (Path) – The path of multiConfig in v5.

  • multiconfig_name_v7 (Path) – The path of multiConfig in v7.

  • is_read_or_retrieve (bool) – Whether read or retrieve.

  • read_from_tarfile (bool) – Whether read from tarfile.

  • old_files (dict[str, Any]) – The old files.

qurry.qurrium.multimanager.process.multiprocess_exporter(id_exec: str, exps_export: Export) tuple[str, dict[str, Any]][source]ΒΆ

Multiprocess exporter and writer for experiment.

Parameters:
  • id_exec (Hashable) – ID of experiment.

  • exps_export (Export) – The export of experiment.

  • mode (str, optional) – The mode of writing. Defaults to β€œw+”.

  • indent (int, optional) – The indent of writing. Defaults to 2.

  • encoding (str, optional) – The encoding of writing. Defaults to β€œutf-8”.

  • jsonable (bool, optional) – The jsonable of writing. Defaults to False.

Returns:

The ID of experiment and the files of experiment.

Return type:

tuple[Hashable, dict[str, Any]]

qurry.qurrium.multimanager.process.multiprocess_exporter_wrapper(all_arguments: tuple[str, Export]) tuple[str, dict[str, str]][source]ΒΆ

Multiprocess wrapper for exporter.

Parameters:

all_arguments (tuple[str, Export, str, int, str, bool]) – The arguments for exporter. - id_exec (str): ID of experiment. - exps_export (Export): The export of experiment.

Returns:

The ID of experiment and the files of experiment.

Return type:

tuple[str, dict[str, str]]

qurry.qurrium.multimanager.process.multiprocess_writer(id_exec: str, exps: ExperimentPrototype, save_location: Path, export_transpiled_circuit: bool = False) tuple[str, dict[str, Any]][source]ΒΆ

Multiprocess exporter and writer for experiment.

Parameters:
  • id_exec (Hashable) – ID of experiment.

  • exps (ExperimentPrototype) – The export of experiment.

  • save_location (Path) – The location of saving.

  • export_transpiled_circuit (bool, optional) – Whether to export transpiled circuit. Defaults to False.

Returns:

The ID of experiment and the files of experiment.

Return type:

tuple[Hashable, dict[str, Any]]

qurry.qurrium.multimanager.process.multiprocess_writer_wrapper(all_arguments: tuple[str, _E, Path, bool]) tuple[str, dict[str, str]][source]ΒΆ

Multiprocess wrapper for exporter.

Parameters:

all_arguments (tuple[str, ExperimentPrototype, Path, bool]) – The arguments for exporter. - id_exec (str): ID of experiment. - exps (ExperimentPrototype): The export of experiment. - save_location (Path): The location of saving. - export_transpiled_circuit (bool): Whether to export transpiled circuit.

Returns:

The ID of experiment and the files of experiment.

Return type:

tuple[str, dict[str, str]]