samplingqurry
¶
SamplingExecuter (qurry.qurrium.samplingqurry
)
It is only for pendings and retrieve to remote backend.
arguments
¶
SamplingExecuter - Arguments (qurry.qurrium.samplingqurry.arguments
)
It is only for pendings and retrieve to remote backend.
- class qurry.qurries.samplingqurry.arguments.QurryAnalyzeArgs[source]¶
The input of the analyze method.
- class qurry.qurries.samplingqurry.arguments.QurryArguments(exp_name: str, sampling: int = 1)[source]¶
Construct the experiment’s parameters for specific options, which is overwritable by the inherition class.
- class qurry.qurries.samplingqurry.arguments.QurryMeasureArgs[source]¶
Output arguments for
output()
.- wave: QuantumCircuit | Hashable | None¶
The key or the circuit to execute.
- qurry.qurries.samplingqurry.arguments.SHORT_NAME = 'sampling_executer'¶
The short name for this qurry instance.
analysis
¶
SamplingExecuter - Analysis (qurry.qurrium.samplingqurry.analysis
)
It is only for pendings and retrieve to remote backend.
- class qurry.qurries.samplingqurry.analysis.QurryAnalysis(*, serial: int, log: dict[str, Any] | None = None, datatime: str | None = None, **other_kwargs)[source]¶
Example of QurryAnalysis.
experiment
¶
SamplingExecuter - Experiment (qurry.qurrium.samplingqurry.experiment
)
It is only for pendings and retrieve to remote backend.
- class qurry.qurries.samplingqurry.experiment.QurryExperiment(arguments: _A | dict[str, Any], commonparams: Commonparams | dict[str, Any], outfields: dict[str, Any], beforewards: Before | None = None, afterwards: After | None = None, reports: AnalysesContainer | None = None)[source]¶
Experiment instance for QurryV9.
- property analysis_instance: Type[QurryAnalysis]¶
The analysis instance for this experiment.
- analyze(ultimate_question: str = '', shots: int | None = None, pbar: tqdm | None = None) QurryAnalysis [source]¶
Analysis of the experiment.
- Parameters:
- Returns:
The analysis of the experiment.
- Return type:
- property arguments_instance: Type[QurryArguments]¶
The arguments instance for this experiment.
- classmethod method(targets: list[tuple[Hashable, QuantumCircuit]], arguments: QurryArguments, pbar: tqdm | None = None, multiprocess: bool = True) tuple[list[QuantumCircuit], dict[str, Any]] [source]¶
The method to construct circuit.
- Parameters:
targets (list[tuple[Hashable, QuantumCircuit]]) – The circuits of the experiment.
arugments (ArgumentsPrototype) – The arguments of the experiment.
pbar (Optional[tqdm.tqdm], optional) – The progress bar for showing the progress of the experiment. Defaults to None.
multiprocess (bool, optional) – Whether to use multiprocess. Defaults to True.
- Returns:
The circuits of the experiment and the side products.
- Return type:
- classmethod params_control(targets: list[tuple[Hashable, QuantumCircuit]], exp_name: str = 'exps', sampling: int = 1, **custom_kwargs: Any) tuple[QurryArguments, Commonparams, dict[str, Any]] [source]¶
Control the experiment’s parameters.
- Parameters:
- Raises:
ValueError – The number of target circuits should be only one.
- Returns:
The arguments of the experiment, the common parameters, and the custom parameters
- Return type:
tuple[QurryArguments, Commonparams, dict[str, Any]]
qurry
¶
QurryV9 (qurry.qurrium.samplingqurry.qurry
)
It is only for pendings and retrieve to remote backend.
- class qurry.qurries.samplingqurry.qurry.QurryV9[source]¶
Executing one quantum circuit in multiple times.
- property experiment_instance: Type[QurryExperiment]¶
The container class responding to this QurryV9 class.
- measure(wave: QuantumCircuit | Hashable | None = None, sampling: int = 1, shots: int = 1024, backend: Backend | None = None, exp_name: str = 'experiment', run_args: BaseRunArgs | dict[str, Any] | None = None, transpile_args: TranspileArgs | None = None, passmanager: str | PassManager | tuple[str, PassManager] | None = None, tags: tuple[str, ...] | None = None, qasm_version: Literal['qasm2', 'qasm3'] = 'qasm3', export: bool = False, save_location: Path | str | None = None, pbar: tqdm | None = None) str [source]¶
Execute the experiment.
- Parameters:
wave (Union[QuantumCircuit, Hashable]) – The key or the circuit to execute.
sampling (int, optional) – The number of sampling. Defaults to 1.
shots (int, optional) – Shots of the job. Defaults to 1024.
backend (Optional[Backend], optional) – Arguments for
Backend.run()
. Defaults to None.exp_name (str, optional) – The name of the experiment. Naming this experiment to recognize it when the jobs are pending to IBMQ Service. This name is also used for creating a folder to store the exports. Defaults to ‘experiment’.
run_args (RunArgsType, optional) – Arguments for
Backend.run()
. Defaults to None.transpile_args (Optional[TranspileArgs], optional) – Arguments of
transpile()
fromqiskit.compiler.transpiler
. Defaults to None.passmanager (Optional[Union[str, PassManager, tuple[str, PassManager]], optional) – The passmanager. Defaults to None.
tags (Optional[tuple[str, ...]], optional) – The tags of the experiment. Defaults to None.
qasm_version (Literal["qasm2", "qasm3"], optional) – The version of OpenQASM. Defaults to “qasm3”.
export (bool, optional) – Whether to export the experiment. Defaults to False.
save_location (Optional[Union[Path, str]], optional) – The location to save the experiment. Defaults to None.
pbar (Optional[tqdm.tqdm], optional) – The progress bar for showing the progress of the experiment. Defaults to None.
- Returns:
The experiment ID.
- Return type:
- measure_to_output(wave: QuantumCircuit | Hashable | None = None, sampling: int = 1, shots: int = 1024, backend: Backend | None = None, exp_name: str = 'experiment', run_args: BaseRunArgs | dict[str, Any] | None = None, transpile_args: TranspileArgs | None = None, passmanager: str | PassManager | tuple[str, PassManager] | None = None, tags: tuple[str, ...] | None = None, qasm_version: Literal['qasm2', 'qasm3'] = 'qasm3', export: bool = False, save_location: Path | str | None = None, pbar: tqdm | None = None) QurryOutputArgs [source]¶
Trasnform
measure()
arguments form intooutput()
form.- Parameters:
wave (Union[QuantumCircuit, Hashable]) – The key or The key or the circuit to execute.
sampling (int, optional) – The number of sampling. Defaults to 1.
shots (int, optional) – Shots of the job. Defaults to 1024.
backend (Optional[Backend], optional) – Arguments for
Backend.run()
. Defaults to None.exp_name (str, optional) – The name of the experiment. Naming this experiment to recognize it when the jobs are pending to IBMQ Service. This name is also used for creating a folder to store the exports. Defaults to ‘experiment’.
run_args (RunArgsType, optional) – Arguments for
Backend.run()
. Defaults to None.transpile_args (Optional[TranspileArgs], optional) – Arguments of
transpile()
fromqiskit.compiler.transpiler
. Defaults to None.passmanager (Optional[Union[str, PassManager, tuple[str, PassManager]], optional) – The passmanager. Defaults to None.
tags (Optional[tuple[str, ...]], optional) – The tags of the experiment. Defaults to None.
qasm_version (Literal["qasm2", "qasm3"], optional) – The version of OpenQASM. Defaults to “qasm3”.
export (bool, optional) – Whether to export the experiment. Defaults to False.
save_location (Optional[Union[Path, str]], optional) – The location to save the experiment. Defaults to None.
pbar (Optional[tqdm.tqdm], optional) – The progress bar for showing the progress of the experiment. Defaults to None.
- Returns:
The output arguments.
- Return type:
- short_name = 'sampling_executer'¶
The short name of Qurrium.