wavefunction_overlap_v1
ΒΆ
Post Processing - Randomized Measure - Wavefunction Overlap V1
(qurry.process.randomized_measure.wavefunction_overlap_v1
)
- 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](
)
wavefunction_overlap
ΒΆ
Post Processing - Randomized Measure - Wavefunction Overlap V1 - Wavefunction Overlap
(qurry.process.randomized_measure.wavefunction_overlap_v1.wavefunction_overlap
)
This is a deprecated version of the wavefunction overlap.
- qurry.process.randomized_measure.wavefunction_overlap_v1.wavefunction_overlap.randomized_overlap_echo_v1(shots: int, counts: list[dict[str, int]], degree: int | tuple[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 wavefunction 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](
)
- Parameters:
shots (int) β Shots of the counts.
counts (list[dict[str, int]]) β Counts from randomized measurement results.
degree (Optional[Union[tuple[int, int], int]]) β The range of partition.
measure (Optional[tuple[int, int]], optional) β The range that implemented the measuring gate. If not specified, then use all qubits. This will affect the range of partition when you not implement the measuring gate on all qubit. Defaults to None.
backend (PostProcessingBackendLabel, optional) β Backend for the post-processing. Defaults to DEFAULT_PROCESS_BACKEND.
workers_num (Optional[int], optional) β Number of multi-processing workers, it will be ignored if backend is Rust. if sets to 1, then disable to using multi-processing; if not specified, then use the number of all cpu counts by os.cpu_count(). This only works for Python and Cython backend. Defaults to None.
pbar (Optional[tqdm.tqdm], optional) β The progress bar API, you can use put a :cls:`tqdm` object here. This function will update the progress bar description. Defaults to None.
- Returns:
- A dictionary contains purity, entropy,
a list of each overlap, puritySD, degree, actual measure range, bitstring range.
- Return type:
echo_core
ΒΆ
Post Processing - Randomized Measure - Wavefunction Overlap V1 - Echo Core
(qurry.process.randomized_measure.wavefunction_overlap_v1.echo_core
)
- qurry.process.randomized_measure.wavefunction_overlap_v1.echo_core.overlap_echo_allrust(shots: int, counts: list[dict[str, int]], degree: int | tuple[int, int] | None, measure: tuple[int, int] | None = None) tuple[dict[int, float], tuple[int, int], tuple[int, int], str, float] [source]ΒΆ
The core function of entangled entropy.
- Parameters:
shots (int) β Shots of the experiment on quantum machine.
counts (list[dict[str, int]]) β Counts of the experiment on quantum machine.
degree (Optional[Union[tuple[int, int], int]]) β Degree of the subsystem.
measure (Optional[tuple[int, int]], optional) β Measuring range on quantum circuits. Defaults to None.
- Raises:
ValueError β Get degree neither βintβ nor βtuple[int, int]β.
ValueError β Measure range does not contain subsystem.
- Returns:
Purity of each cell, Partition range, Measuring range, Message, Time to calculate.
- Return type:
tuple[dict[int, float], tuple[int, int], tuple[int, int], str, float]
- qurry.process.randomized_measure.wavefunction_overlap_v1.echo_core.overlap_echo_core(shots: int, counts: list[dict[str, int]], degree: int | tuple[int, int] | None, measure: tuple[int, int] | None = None, multiprocess_pool_size: int | None = None, backend: Literal['Cython', 'Rust', 'Python'] | str = 'Rust') tuple[dict[int, float] | dict[int, float64], tuple[int, int], tuple[int, int], str, float] [source]ΒΆ
The core function of entangled entropy.
- 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.
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) β The backend of the process, βCythonβ, βRustβ or βPythonβ. Defaults to DEFAULT_PROCESS_BACKEND.
- Raises:
ValueError β Get degree neither βintβ nor βtuple[int, int]β.
ValueError β Measure range does not contain subsystem.
- Returns:
- tuple[
Union[dict[int, float], dict[int, np.float64]], tuple[int, int], tuple[int, int], str, float,
- ]:
Purity of each cell, Partition range, Measuring range, Message, Time to calculate.
- qurry.process.randomized_measure.wavefunction_overlap_v1.echo_core.overlap_echo_core_pycyrust(shots: int, counts: list[dict[str, int]], degree: int | tuple[int, int] | None = None, measure: tuple[int, int] | None = None, multiprocess_pool_size: int | None = None, backend: Literal['Cython', 'Rust', 'Python'] | str = 'Rust') tuple[dict[int, float] | dict[int, float64], tuple[int, int], tuple[int, int], str, float] [source]ΒΆ
The core function of entangled entropy.
- 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.
multiprocess_pool_size (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 by os.cpu_count(). Defaults to None.
backend (PostProcessingBackendLabel, optional) β Backend for the process. Defaults to βCythonβ.
- Raises:
ValueError β Get degree neither βintβ nor βtuple[int, int]β.
ValueError β Measure range does not contain subsystem.
- Returns:
- tuple[
Union[dict[int, float], dict[int, np.float64]], tuple[int, int], tuple[int, int], str, float
- ]:
Purity of each cell, Partition range, Measuring range, Message, Time to calculate.
echo_cell
ΒΆ
Post Processing - Randomized Measure - Wavefunction Overlap V1 - Echo Cell
(qurry.process.randomized_measure.wavefunction_overlap_v1.echo_cell
)
- qurry.process.randomized_measure.wavefunction_overlap_v1.echo_cell.echo_cell(idx: int, first_counts: dict[str, int], second_counts: dict[str, int], bitstring_range: tuple[int, int], subsystem_size: int, backend: Literal['Cython', 'Rust', 'Python'] | str = 'Rust') tuple[int, float | float64] [source]ΒΆ
Calculate the echo cell, one of overlap, of a subsystem.
- Parameters:
idx (int) β Index of the cell (counts).
first_counts (dict[str, int]) β Counts measured from the first quantum circuit.
second_counts (dict[str, int]) β Counts measured from the second quantum circuit.
bitstring_range (tuple[int, int]) β The range of the subsystem.
subsystem_size (int) β Subsystem size included.
- Returns:
Index, one of overlap purity.
- Return type:
- qurry.process.randomized_measure.wavefunction_overlap_v1.echo_cell.echo_cell_py(idx: int, first_counts: dict[str, int], second_counts: dict[str, int], bitstring_range: tuple[int, int], subsystem_size: int) tuple[int, float64] [source]ΒΆ
Calculate the echo cell, one of overlap, of a subsystem by Python.
- Parameters:
idx (int) β Index of the cell (counts).
first_counts (dict[str, int]) β Counts measured from the first quantum circuit.
second_counts (dict[str, int]) β Counts measured from the second quantum circuit.
bitstring_range (tuple[int, int]) β The range of the subsystem.
subsystem_size (int) β Subsystem size included.
- Returns:
Index, one of overlap purity.
- Return type:
- qurry.process.randomized_measure.wavefunction_overlap_v1.echo_cell.echo_cell_rust(idx: int, first_counts: dict[str, int], second_counts: dict[str, int], bitstring_range: tuple[int, int], subsystem_size: int) tuple[int, float] [source]ΒΆ
Calculate the echo cell, one of overlap, of a subsystem by Rust.
- Parameters:
idx (int) β Index of the cell (counts).
first_counts (dict[str, int]) β Counts measured from the first quantum circuit.
second_counts (dict[str, int]) β Counts measured from the second quantum circuit.
bitstring_range (tuple[int, int]) β The range of the subsystem.
subsystem_size (int) β Subsystem size included.
- Returns:
Index, one of overlap purity.
- Return type: