hadamard
ยถ
Post-processing for hadamard test
purity_echo_core
ยถ
Post Processing - Hadamard Test - Purity/Echo
(qurry.process.hadamard_test.purity_echo_core
)
- qurry.process.hadamard_test.purity_echo_core.purity_echo_core(shots: int, counts: list[dict[str, int]], backend: Literal['Cython', 'Rust', 'Python'] | str = 'Rust') float [source]ยถ
Calculate entangled entropy with more information combined. The entropy we compute is the Second Order Rรฉnyi Entropy.
- Parameters:
- Raises:
Warning โ Expected โ0โ and โ1โ, but there is no such keys
ValueError โ The length of counts is not 1.
ValueError โ shots does not match sample_shots.
- Returns:
Quantity of the experiment.
- Return type:
- qurry.process.hadamard_test.purity_echo_core.purity_echo_core_allrust(shots: int, counts: list[dict[str, int]]) float [source]ยถ
The core function of entangled entropy by Rust.
- Parameters:
- Raises:
ValueError โ Get degree neither โintโ nor โtuple[int, int]โ.
ValueError โ Measure range does not contain subsystem.
- Returns:
Purity or Echo of the experiment.
- Return type:
wavefunction_overlap
ยถ
Post Processing - Hadamard Test - Wavefunction Overlap
(qurry.process.hadamard_test.wavefunction_overlap
)
- qurry.process.hadamard_test.wavefunction_overlap.hadamard_overlap_echo(shots: int, counts: list[dict[str, int]], backend: Literal['Cython', 'Rust', 'Python'] | str = 'Rust', pbar: tqdm | None = None) dict[str, float] [source]ยถ
Calculate overlap echo with more information combined. The echo we compute is the Loschmidt Echo.
- Parameters:
shots (int) โ Shots of the experiment on quantum machine.
counts (list[dict[str, int]]) โ Counts of the experiment on quantum machine.
backend (PostProcessingBackendLabel, optional) โ Backend of the postprocessing. Defaults to DEFAULT_PROCESS_BACKEND.
pbar (Optional[tqdm.tqdm], optional) โ Progress bar. Defaults to None.
- Raises:
ValueError โ Get degree neither โintโ nor โtuple[int, int]โ.
ValueError โ Measure range does not contain subsystem.
- Returns:
Quantity of the experiment.
- Return type:
entangled_entropy
ยถ
Post Processing - Hadamard Test - Entangled Entropy
(qurry.process.hadamard_test.entangled_entropy
)
- qurry.process.hadamard_test.entangled_entropy.hadamard_entangled_entropy(shots: int, counts: list[dict[str, int]], backend: Literal['Cython', 'Rust', 'Python'] | str = 'Rust', pbar: tqdm | None = None) dict[str, float] [source]ยถ
Calculate entangled entropy with more information combined. The entropy we compute is the Second Order Rรฉnyi Entropy.
- Parameters:
shots (int) โ Shots of the experiment on quantum machine.
counts (list[dict[str, int]]) โ Counts of the experiment on quantum machine.
backend (PostProcessingBackendLabel, optional) โ Backend of the postprocessing. Defaults to DEFAULT_PROCESS_BACKEND.
pbar (Optional[tqdm.tqdm], optional) โ Progress bar. Defaults to None.
- Raises:
ValueError โ Get degree neither โintโ nor โtuple[int, int]โ.
ValueError โ Measure range does not contain subsystem.
- Returns:
Quantity of the experiment.
- Return type: