randomized_measure_v1
ยถ
EchoListenRandomizedV1 - Wave Function Overlap by Randomized Measure
(qurry.qurrech.randomized_measure_v1
)
arguments
ยถ
EchoListenRandomizedV1 - Arguments
(qurry.qurrech.randomized_measure_v1.arguments
)
This is a deprecated version of the randomized measure module.
- class qurry.qurrech.randomized_measure_v1.arguments.EchoListenRandomizedV1AnalyzeArgs[source]ยถ
The input of the analyze method.
- class qurry.qurrech.randomized_measure_v1.arguments.EchoListenRandomizedV1Arguments(exp_name: str = 'exps', times: int = 100, measure: tuple[int, int] | None = None, unitary_loc: tuple[int, int] | None = None, random_unitary_seeds: dict[int, dict[int, int]] | None = None, workers_num: int = 16)[source]ยถ
Arguments for the experiment.
- exp_name: str = 'exps'ยถ
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โ.
- random_unitary_seeds: dict[int, dict[int, int]] | None = Noneยถ
The seeds for all random unitary operator. This argument only takes input as type of dict[int, dict[int, int]]. The first key is the index for the random unitary operator. The second key is the index for the qubit.
If you want to generate the seeds for all random unitary operator, you can use the function generate_random_unitary_seeds in qurry.qurrium.utils.random_unitary.
- class qurry.qurrech.randomized_measure_v1.arguments.EchoListenRandomizedV1MeasureArgs[source]ยถ
Output arguments for
output()
.- random_unitary_seeds: dict[int, dict[int, int]] | Noneยถ
The seeds for all random unitary operator. This argument only takes input as type of dict[int, dict[int, int]]. The first key is the index for the random unitary operator. The second key is the index for the qubit.
If you want to generate the seeds for all random unitary operator, you can use the function generate_random_unitary_seeds in qurry.qurrium.utils.random_unitary.
- wave1: QuantumCircuit | Hashable | Noneยถ
The key or the circuit to execute.
- wave2: QuantumCircuit | Hashable | Noneยถ
The key or the circuit to execute.
- class qurry.qurrech.randomized_measure_v1.arguments.EchoListenRandomizedV1OutputArgs[source]ยถ
Output arguments for
output()
.- random_unitary_seeds: dict[int, dict[int, int]] | Noneยถ
The seeds for all random unitary operator. This argument only takes input as type of dict[int, dict[int, int]]. The first key is the index for the random unitary operator. The second key is the index for the qubit.
If you want to generate the seeds for all random unitary operator, you can use the function generate_random_unitary_seeds in qurry.qurrium.utils.random_unitary.
analysis
ยถ
EchoListenRandomizedV1 - Analysis
(qurry.qurrech.randomized_measure_v1.analysis
)
- class qurry.qurrech.randomized_measure_v1.analysis.ELRV1AnalysisContent(echo: float, echoSD: float, echoCells: dict[int, float], bitStringRange: tuple[int, int], measureActually: tuple[int, int] | None = None, countsNum: int | None = None, takingTime: float | None = None, counts_used: Iterable[int] | None = None)[source]ยถ
The content of the analysis.
- class qurry.qurrech.randomized_measure_v1.analysis.ELRV1AnalysisInput(degree: tuple[int, int], shots: int, unitary_loc: tuple[int, int] | None = None)[source]ยถ
To set the analysis.
- class qurry.qurrech.randomized_measure_v1.analysis.EchoListenRandomizedV1Analysis(*, serial: int, log: dict[str, Any] | None = None, datatime: str | None = None, **other_kwargs)[source]ยถ
The analysis of loschmidt echo.
- classmethod content_type() Type[ELRV1AnalysisContent] [source]ยถ
The content instance type.
- classmethod input_type() Type[ELRV1AnalysisInput] [source]ยถ
The input instance type.
experiment
ยถ
EchoListenRandomizedV1 - Experiment (qurry.qurrech.randomized_measure_v1.experiment
)
The deprecated version of the randomized measure experiment.
- class qurry.qurrech.randomized_measure_v1.experiment.EchoListenRandomizedV1Experiment(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 instance of experiment.
- property analysis_instance: Type[EchoListenRandomizedV1Analysis]ยถ
The analysis instance for this experiment.
- analyze(degree: tuple[int, int] | int | None = None, counts_used: Iterable[int] | None = None, workers_num: int | None = None, backend: Literal['Cython', 'Rust', 'Python'] | str = 'Rust', pbar: tqdm | None = None) EchoListenRandomizedV1Analysis [source]ยถ
Calculate entangled entropy with more information combined.
- Parameters:
degree (Union[tuple[int, int], int]) โ Degree of the subsystem.
counts_used (Optional[Iterable[int]], optional) โ The index of the counts used. If not specified, then use all counts. Defaults to None.
workers_num (Optional[int], optional) โ Number of multi-processing workers, if sets to 1, then disable to using multi-processing; if not specified, then use the number of all cpu counts - 2 by cpu_count() - 2. Defaults to None.
backend (PostProcessingBackendLabel, optional) โ Backend for the process. Defaults to DEFAULT_PROCESS_BACKEND.
pbar (Optional[tqdm.tqdm], optional) โ Progress bar. Defaults to None.
- Returns:
- A dictionary contains
purity, entropy, a list of each overlap, puritySD, purity of all system, entropy of all system, a list of each overlap in all system, puritySD of all system, degree, actual measure range, actual measure range in all system, bitstring range.
- Return type:
- property arguments_instance: Type[EchoListenRandomizedV1Arguments]ยถ
The arguments instance for this experiment.
- classmethod method(targets: list[tuple[Hashable, QuantumCircuit]], arguments: EchoListenRandomizedV1Arguments, 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 (EchoListenRandomizedArguments) โ 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 side products.
- Return type:
- classmethod params_control(targets: list[tuple[Hashable, QuantumCircuit]], exp_name: str = 'exps', times: int = 100, measure: tuple[int, int] | int | None = None, unitary_loc: tuple[int, int] | int | None = None, random_unitary_seeds: dict[int, dict[int, int]] | None = None, **custom_kwargs: Any) tuple[EchoListenRandomizedV1Arguments, 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โ.
times (int) โ The number of random unitary operator. Defaults to 100. It will denote as N_U in the experiment name.
measure (Optional[Union[tuple[int, int], int]]) โ The measure range. Defaults to None.
unitary_loc (Optional[Union[tuple[int, int], int]]) โ The range of the unitary operator. Defaults to None.
random_unitary_seeds (Optional[dict[int, dict[int, int]]], optional) โ
The seeds for all random unitary operator. This argument only takes input as type of dict[int, dict[int, int]]. The first key is the index for the random unitary operator. The second key is the index for the qubit.
If you want to generate the seeds for all random unitary operator, you can use the function generate_random_unitary_seeds in qurry.qurrium.utils.random_unitary.
custom_kwargs (Any) โ The custom parameters.
- Raises:
ValueError โ If the number of target circuits is not two.
TypeError โ If times is not an integer.
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[EntropyMeasureRandomizedArguments, Commonparams, dict[str, Any]]
- classmethod quantities(shots: int | None = None, counts: list[dict[str, int]] | None = None, degree: tuple[int, int] | int | None = None, measure: tuple[int, int] | None = None, backend: Literal['Cython', 'Rust', 'Python'] | str = 'Rust', workers_num: int | None = None, pbar: tqdm | None = None) dict[str, float] [source]ยถ
Calculate entangled entropy with more information combined.
- Parameters:
shots (int) โ Shots of the experiment on quantum machine.
counts (list[dict[str, int]]) โ Counts of the experiment on quantum machine.
degree (Union[tuple[int, int], int]) โ Degree of the subsystem.
measure (tuple[int, int], optional) โ Measuring range on quantum circuits. Defaults to None.
backend (PostProcessingBackendLabel, optional) โ Backend for the process. Defaults to DEFAULT_PROCESS_BACKEND.
workers_num (Optional[int], optional) โ Number of multi-processing workers, if sets to 1, then disable to using multi-processing; if not specified, then use the number of all cpu counts - 2 by cpu_count() - 2. Defaults to None.
pbar (Optional[tqdm.tqdm], optional) โ Progress bar. Defaults to None.
- Returns:
- A dictionary contains
purity, entropy, a list of each overlap, puritySD, purity of all system, entropy of all system, a list of each overlap in all system, puritySD of all system, degree, actual measure range, actual measure range in all system, bitstring range.
- Return type:
qurry
ยถ
EchoListenRandomizedV1 - Qurrium
(qurry.qurrech.randomized_measure_v1.qurry
)
This is a deprecated version of the randomized measure module.
- class qurry.qurrech.randomized_measure_v1.qurry.EchoListenRandomizedV1[source]ยถ
Randomized Measure for wave function overlap. a.k.a. loschmidt echo when processes time evolution system.
- Reference:
Note
Statistical correlations between locally randomized measurements:
A toolbox for probing entanglement in many-body quantum states - A. Elben, B. Vermersch, C. F. Roos, and P. Zoller, [PhysRevA.99.052323](
)
- property experiment_instance: Type[EchoListenRandomizedV1Experiment]ยถ
The container class responding to this Qurrium class.
- measure(wave1: QuantumCircuit | Hashable | None = None, wave2: QuantumCircuit | Hashable | None = None, times: int = 100, measure: int | tuple[int, int] | None = None, unitary_loc: int | tuple[int, int] | None = None, random_unitary_seeds: dict[int, dict[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.
- Parameters:
wave1 (Union[QuantumCircuit, Hashable]) โ The key or the circuit to execute.
wave2 (Union[QuantumCircuit, Hashable]) โ The key or the circuit to execute.
times (int, optional) โ The number of random unitary operator. It will denote as N_U in the experiment name. Defaults to 100.
measure (Union[int, tuple[int, int], None], optional) โ The measure range. Defaults to None.
unitary_loc (Union[int, tuple[int, int], None], optional) โ The range of the unitary operator. Defaults to None.
random_unitary_seeds (Optional[dict[int, dict[int, int]]], optional) โ
The seeds for all random unitary operator. This argument only takes input as type of dict[int, dict[int, int]]. The first key is the index for the random unitary operator. The second key is the index for the qubit.
If you want to generate the seeds for all random unitary operator, you can use the function generate_random_unitary_seeds in qurry.qurrium.utils.random_unitary.
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, times: int = 100, measure: int | tuple[int, int] | None = None, unitary_loc: int | tuple[int, int] | None = None, random_unitary_seeds: dict[int, dict[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) EchoListenRandomizedV1OutputArgs [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.
times (int, optional) โ The number of random unitary operator. It will denote as N_U in the experiment name. Defaults to 100.
measure (Union[int, tuple[int, int], None], optional) โ The measure range. Defaults to None.
unitary_loc (Union[int, tuple[int, int], None], optional) โ The range of the unitary operator. Defaults to None.
random_unitary_seeds (Optional[dict[int, dict[int, int]]], optional) โ
The seeds for all random unitary operator. This argument only takes input as type of dict[int, dict[int, int]]. The first key is the index for the random unitary operator. The second key is the index for the qubit.
If you want to generate the seeds for all random unitary operator, you can use the function generate_random_unitary_seeds in qurry.qurrium.utils.random_unitary.
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:
- multiAnalysis(summoner_id: str, *, analysis_name: str = 'report', no_serialize: bool = False, specific_analysis_args: dict[Hashable, EchoListenRandomizedV1AnalyzeArgs | dict[str, Any] | bool] | None = None, skip_write: bool = False, multiprocess_write: bool = False, degree: tuple[int, int] | int | None = None, counts_used: Iterable[int] | None = None, workers_num: int | None = None, backend: Literal['Cython', 'Rust', 'Python'] | str = 'Rust', **analysis_args) str [source]ยถ
Run the analysis for multiple experiments.
- Parameters:
summoner_id (str) โ The summoner_id of multimanager.
analysis_name (str, optional) โ The name of analysis. Defaults to โreportโ.
no_serialize (bool, optional) โ Whether to serialize the analysis. Defaults to False.
( (specific_analysis_args) โ SpecificAnalsisArgs[EchoListenRandomizedV1AnalyzeArgs], optional
) โ The specific arguments for analysis. Defaults to None.
compress (bool, optional) โ Whether to compress the export file. Defaults to False.
skip_write (bool, optional) โ Whether to skip the file writing during the analysis. Defaults to False.
multiprocess_write (bool, optional) โ Whether use multiprocess for writing. Defaults to False.
degree (Union[tuple[int, int], int]) โ Degree of the subsystem.
counts_used (Optional[Iterable[int]], optional) โ The index of the counts used. If not specified, then use all counts. Defaults to None.
workers_num (Optional[int], optional) โ Number of multi-processing workers, if sets to 1, then disable to using multi-processing; if not specified, then use the number of all cpu counts - 2 by cpu_count() - 2. Defaults to None.
backend (PostProcessingBackendLabel, optional) โ Backend for the process. Defaults to DEFAULT_PROCESS_BACKEND.
- Returns:
The summoner_id of multimanager.
- Return type:
- short_name = 'qurrech_randomized_v1'ยถ
The short name of Qurrium.