hadamard_test
¶
EchoListenHadamard - Wave Function Overlap by Hadamard Test
(qurry.qurrech.hadamard_test
)
arguments
¶
EchoListenHadamard - Arguments
(qurry.qurrech.randomized_measure.arguments
)
- class qurry.qurrech.hadamard_test.arguments.EchoListenHadamardAnalyzeArgs[source]¶
The input of the analyze method.
The post-processing of Hadamard test does not need any input.
- class qurry.qurrech.hadamard_test.arguments.EchoListenHadamardArguments(exp_name: str = 'exps', degree: tuple[int, int] | None = None)[source]¶
Arguments for the experiment.
- class qurry.qurrech.hadamard_test.arguments.EchoListenHadamardMeasureArgs[source]¶
Output arguments for
output()
.- wave1: QuantumCircuit | Hashable | None¶
The key or the circuit to execute.
- wave2: QuantumCircuit | Hashable | None¶
The key or the circuit to execute.
analysis
¶
EchoListenHadamard - Analysis
(qurry.qurrech.hadamard_test.analysis
)
- class qurry.qurrech.hadamard_test.analysis.ELHAnalysisContent(echo: float)[source]¶
The content of the analysis.
- class qurry.qurrech.hadamard_test.analysis.EchoListenHadamardAnalysis(*, serial: int, log: dict[str, Any] | None = None, datatime: str | None = None, **other_kwargs)[source]¶
The analysis for calculating entangled entropy with more information combined.
- classmethod content_type() Type[ELHAnalysisContent] [source]¶
The content instance type.
- classmethod input_type() Type[ELHAnalysisInput] [source]¶
The input instance type.
experiment
¶
EchoListenHadamard - Experiment
(qurry.qurrech.hadamard_test.experiment
)
- class qurry.qurrech.hadamard_test.experiment.EchoListenHadamardExperiment(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]¶
The experiment for calculating entangled entropy with more information combined.
- property analysis_instance: Type[EchoListenHadamardAnalysis]¶
The analysis instance for this experiment.
- analyze(pbar: tqdm | None = None) EchoListenHadamardAnalysis [source]¶
Calculate entangled entropy with more information combined.
- property arguments_instance: Type[EchoListenHadamardArguments]¶
The arguments instance for this experiment.
- classmethod method(targets: list[tuple[Hashable, QuantumCircuit]], arguments: EchoListenHadamardArguments, 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.
arguments (EchoListenHadamardArguments) – 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 multiprocessing. Defaults to True.
- Returns:
The circuits of the experiment and the arguments of the experiment.
- Return type:
- classmethod params_control(targets: list[tuple[Hashable, QuantumCircuit]], exp_name: str = 'exps', degree: tuple[int, int] | None = None, **custom_kwargs: Any) tuple[EchoListenHadamardArguments, Commonparams, dict[str, Any]] [source]¶
Handling all arguments and initializing a single experiment.
- Parameters:
targets (list[tuple[Hashable, QuantumCircuit]]) – The circuits of the experiment.
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’.
degree (Optional[tuple[int, int]], optional) – The degree range. Defaults to None.
custom_kwargs (Any) – The custom parameters.
- Raises:
ValueError – The number of target circuits should be 2.
ValueError – If the number of qubits in two circuits is not the same.
- Returns:
The arguments of the experiment, the common parameters, and the custom parameters.
- Return type:
tuple[EntropyMeasureHadamardArguments, Commonparams, dict[str, Any]]
qurry
¶
EchoListenHadamard - Qurrium
(qurry.qurrech.hadamard_test.qurry
)
- class qurry.qurrech.hadamard_test.qurry.EchoListenHadamard[source]¶
The experiment for calculating entangled entropy with more information combined.
- property experiment_instance: Type[EchoListenHadamardExperiment]¶
The experiment instance for this experiment.
- measure(wave1: QuantumCircuit | Hashable | None = None, wave2: QuantumCircuit | Hashable | None = None, degree: int | tuple[int, int] | None = None, 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.
- wave1 (Union[QuantumCircuit, Hashable]):
The key or the circuit to execute.
- wave2 (Union[QuantumCircuit, Hashable]):
The key or the circuit to execute.
- degree (Optional[Union[int, tuple[int, int]]], optional):
The degree of the experiment. Defaults to None.
- shots (int, optional):
Shots of the job. Defaults to 1024.
- backend (Optional[Backend], optional):
The quantum backend. 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 ‘exps’.
- 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 (PassManagerType, 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 ID of the experiment.
- Return type:
- measure_to_output(wave1: QuantumCircuit | Hashable | None = None, wave2: QuantumCircuit | Hashable | None = None, degree: int | tuple[int, int] | None = None, 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) EchoListenHadamardOutputArgs [source]¶
Trasnform
measure()
arguments form intooutput()
form.- Parameters:
wave1 (Union[QuantumCircuit, Hashable]) – The key or the circuit to execute.
wave2 (Union[QuantumCircuit, Hashable]) – The key or the circuit to execute.
degree (Optional[Union[int, tuple[int, int]]], optional) – The degree of the experiment. Defaults to None.
shots (int, optional) – Shots of the job. Defaults to 1024.
backend (Optional[Backend], optional) – The quantum backend. 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 ‘exps’.
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 (PassManagerType, 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 = 'qurrech_hadamard'¶
The short name of Qurrium.