entangled_entropy
¶
Post Processing - Randomized Measure - Entangled Entropy
(qurry.process.randomized_measure.entangled_entropy
)
This version introduces another way to process subsystems.
- Reference:
Randomized Measure - Entangled Entropy
Note
Probing Rényi entanglement entropy via randomized measurements -
Tiff Brydges, Andreas Elben, Petar Jurcevic, Benoît Vermersch, Christine Maier, Ben P. Lanyon, Peter Zoller, Rainer Blatt ,and Christian F. Roos , [doi:10.1126/science.aau4963](
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](
)
Error Mitigation
Note
Simple mitigation of global depolarizing errors in quantum simulations -
Vovrosh, Joseph and Khosla, Kiran E. and Greenaway, Sean and Self, Christopher and Kim, M. S. and Knolle, Johannes, [PhysRevE.104.035309](
entangled_entropy_2
¶
Post Processing - Randomized Measure - Entangled Entropy - Entangled Entropy 2
(qurry.process.randomized_measure.entangled_entropy.entangled_entropy_2
)
- qurry.process.randomized_measure.entangled_entropy.entangled_entropy_2.preparing_all_system(existed_all_system: ExistedAllSystemInfo | None, shots: int, counts: list[dict[str, int]], backend: Literal['Cython', 'Rust', 'Python'] | str, pbar: tqdm | None = None) ExistedAllSystemInfo [source]¶
Prepare all system for the entangled entropy calculation.
- Parameters:
existed_all_system (Optional[ExistedAllSystemInfo]) – Existing all system source. If there is known all system result, then you can put it here to save a lot of time on calculating all system for no matter what partition you are using, their all system result is the same. This can save a lot of time Defaults to None.
shots (int) – Shots of the counts.
counts (list[dict[str, int]]) – Counts from randomized measurement results.
backend (PostProcessingBackendLabel) – Backend for the process.
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:
The all system information.
- Return type:
- qurry.process.randomized_measure.entangled_entropy.entangled_entropy_2.randomized_entangled_entropy(shots: int, counts: list[dict[str, int]], selected_classical_registers: Iterable[int] | None = None, backend: Literal['Cython', 'Rust', 'Python'] | str = 'Rust', pbar: tqdm | None = None) EntangledEntropyResult [source]¶
Calculate entangled entropy. The entropy we compute is the Second Order Rényi Entropy.
Note
Probing Rényi entanglement entropy via randomized measurements -
Tiff Brydges, Andreas Elben, Petar Jurcevic, Benoît Vermersch, Christine Maier, Ben P. Lanyon, Peter Zoller, Rainer Blatt ,and Christian F. Roos , [doi:10.1126/science.aau4963](
@article{doi:10.1126/science.aau4963, author = {Tiff Brydges and Andreas Elben and Petar Jurcevic and Benoît Vermersch and Christine Maier and Ben P. Lanyon and Peter Zoller and Rainer Blatt and Christian F. Roos }, title = {Probing Rényi entanglement entropy via randomized measurements}, journal = {Science}, volume = {364}, number = {6437}, pages = {260-263}, year = {2019}, doi = {10.1126/science.aau4963}, URL = {https://www.science.org/doi/abs/10.1126/science.aau4963}, eprint = {https://www.science.org/doi/pdf/10.1126/science.aau4963}, abstract = {Quantum systems are predicted to be better at information processing than their classical counterparts, and quantum entanglement is key to this superior performance. But how does one gauge the degree of entanglement in a system? Brydges et al. monitored the build-up of the so-called Rényi entropy in a chain of up to 10 trapped calcium ions, each of which encoded a qubit. As the system evolved, interactions caused entanglement between the chain and the rest of the system to grow, which was reflected in the growth of the Rényi entropy. Science, this issue p. 260 The buildup of entropy in an ion chain reflects a growing entanglement between the chain and its complement. Entanglement is a key feature of many-body quantum systems. Measuring the entropy of different partitions of a quantum system provides a way to probe its entanglement structure. Here, we present and experimentally demonstrate a protocol for measuring the second-order Rényi entropy based on statistical correlations between randomized measurements. Our experiments, carried out with a trapped-ion quantum simulator with partition sizes of up to 10 qubits, prove the overall coherent character of the system dynamics and reveal the growth of entanglement between its parts, in both the absence and presence of disorder. Our protocol represents a universal tool for probing and characterizing engineered quantum systems in the laboratory, which is applicable to arbitrary quantum states of up to several tens of qubits.} }
- Parameters:
shots (int) – Shots of the experiment on quantum machine.
counts (list[dict[str, int]]) – Counts of the experiment on quantum machine.
selected_classical_registers (Optional[Iterable[int]], optional) – The list of the index of the selected_classical_registers.
backend (ExistingProcessBackendLabel, optional) – Backend for the process. Defaults to DEFAULT_PROCESS_BACKEND.
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 dictionary of each purity cell, entropySD, puritySD, num_classical_registers, classical_registers, classical_registers_actually, counts_num, taking_time.
- Return type:
EntangledEntropyReturn
- qurry.process.randomized_measure.entangled_entropy.entangled_entropy_2.randomized_entangled_entropy_mitigated(shots: int, counts: list[dict[str, int]], selected_classical_registers: Iterable[int] | None = None, backend: Literal['Cython', 'Rust', 'Python'] | str = 'Rust', existed_all_system: ExistedAllSystemInfo | None = None, pbar: tqdm | None = None) EntangledEntropyResultMitigated [source]¶
Calculate entangled entropy with depolarizing error mitigation. The entropy we compute is the Second Order Rényi Entropy.
Note
Probing Rényi entanglement entropy via randomized measurements -
Tiff Brydges, Andreas Elben, Petar Jurcevic, Benoît Vermersch, Christine Maier, Ben P. Lanyon, Peter Zoller, Rainer Blatt ,and Christian F. Roos , [doi:10.1126/science.aau4963](
Simple mitigation of global depolarizing errors in quantum simulations -
Vovrosh, Joseph and Khosla, Kiran E. and Greenaway, Sean and Self, Christopher and Kim, M. S. and Knolle, Johannes, [PhysRevE.104.035309](
@article{doi:10.1126/science.aau4963, author = {Tiff Brydges and Andreas Elben and Petar Jurcevic and Benoît Vermersch and Christine Maier and Ben P. Lanyon and Peter Zoller and Rainer Blatt and Christian F. Roos }, title = {Probing Rényi entanglement entropy via randomized measurements}, journal = {Science}, volume = {364}, number = {6437}, pages = {260-263}, year = {2019}, doi = {10.1126/science.aau4963}, URL = {https://www.science.org/doi/abs/10.1126/science.aau4963}, eprint = {https://www.science.org/doi/pdf/10.1126/science.aau4963}, abstract = {Quantum systems are predicted to be better at information processing than their classical counterparts, and quantum entanglement is key to this superior performance. But how does one gauge the degree of entanglement in a system? Brydges et al. monitored the build-up of the so-called Rényi entropy in a chain of up to 10 trapped calcium ions, each of which encoded a qubit. As the system evolved, interactions caused entanglement between the chain and the rest of the system to grow, which was reflected in the growth of the Rényi entropy. Science, this issue p. 260 The buildup of entropy in an ion chain reflects a growing entanglement between the chain and its complement. Entanglement is a key feature of many-body quantum systems. Measuring the entropy of different partitions of a quantum system provides a way to probe its entanglement structure. Here, we present and experimentally demonstrate a protocol for measuring the second-order Rényi entropy based on statistical correlations between randomized measurements. Our experiments, carried out with a trapped-ion quantum simulator with partition sizes of up to 10 qubits, prove the overall coherent character of the system dynamics and reveal the growth of entanglement between its parts, in both the absence and presence of disorder. Our protocol represents a universal tool for probing and characterizing engineered quantum systems in the laboratory, which is applicable to arbitrary quantum states of up to several tens of qubits.} } @article{PhysRevE.104.035309, title = {Simple mitigation of global depolarizing errors in quantum simulations}, author = {Vovrosh, Joseph and Khosla, Kiran E. and Greenaway, Sean and Self, Christopher and Kim, M. S. and Knolle, Johannes}, journal = {Phys. Rev. E}, volume = {104}, issue = {3}, pages = {035309}, numpages = {8}, year = {2021}, month = {Sep}, publisher = {American Physical Society}, doi = {10.1103/PhysRevE.104.035309}, url = {https://link.aps.org/doi/10.1103/PhysRevE.104.035309} }
- Parameters:
shots (int) – Shots of the counts.
counts (list[dict[str, int]]) – Counts from randomized measurement results.
selected_classical_registers (Optional[Iterable[int]], optional) – The list of the index of the selected_classical_registers.
backend (ExistingProcessBackendLabel, optional) – Backend for the process. Defaults to DEFAULT_PROCESS_BACKEND.
existed_all_system (Optional[ExistedAllSystemInfo], optional) – Existing all system source. If there is known all system result, then you can put it here to save a lot of time on calculating all system for no matter what partition you are using, their all system result is the same. This can save a lot of time 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 dictionary of each purity cell, entropySD, puritySD, num_classical_registers, classical_registers, classical_registers_actually, counts_num, taking_time, purityAllSys, entropyAllSys, puritySDAllSys, entropySDAllSys, num_classical_registers_all_sys, classical_registers_all_sys, classical_registers_actually_all_sys, errorRate, mitigatedPurity, mitigatedEntropy.
- Return type:
entropy_core_2
¶
Post Processing - Randomized Measure - Entangled Entropy - Core 2
(qurry.process.randomized_measure.entangled_entropy.entropy_core_2
)
This version introduces another way to process subsystems.
- qurry.process.randomized_measure.entangled_entropy.entropy_core_2.entangled_entropy_core_2(shots: int, counts: list[dict[str, int]], selected_classical_registers: Iterable[int] | None = None, backend: Literal['Cython', 'Rust', 'Python'] | str = 'Rust') tuple[dict[int, float64], list[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.
selected_classical_registers (Optional[Iterable[int]], optional) – The list of the index of the selected_classical_registers.
backend (ExistingProcessBackendLabel, optional) – Backend for the process. Defaults to DEFAULT_PROCESS_BACKEND.
- Returns:
Purity of each cell, Selected qubits, Message, Time to calculate.
- Return type:
- qurry.process.randomized_measure.entangled_entropy.entropy_core_2.entangled_entropy_core_2_allrust(shots: int, counts: list[dict[str, int]], selected_classical_registers: Iterable[int] | None = None) tuple[dict[int, float64], list[int], str, float] [source]¶
The core function of entangled entropy by Rust for just purity cell part.
- Parameters:
- Returns:
Purity of each cell, Selected qubits, Message, Time to calculate.
- Return type:
- qurry.process.randomized_measure.entangled_entropy.entropy_core_2.entangled_entropy_core_2_pyrust(shots: int, counts: list[dict[str, int]], selected_classical_registers: Iterable[int] | None = None, backend: Literal['Cython', 'Rust', 'Python'] | str = 'Rust') tuple[dict[int, float64], list[int], str, float] [source]¶
The core function of entangled entropy by Python or Rust for just purity cell part.
- Parameters:
shots (int) – Shots of the experiment on quantum machine.
counts (list[dict[str, int]]) – Counts of the experiment on quantum machine.
selected_classical_registers (Optional[Iterable[int]], optional) – The list of the index of the selected_classical_registers.
backend (ExistingProcessBackendLabel, optional) – Backend for the process. Defaults to DEFAULT_PROCESS_BACKEND.
- Returns:
Purity of each cell, Selected classical registers, Message, Time to calculate.
- Return type:
error_mitigation
¶
Post Processing - Randomized Measure - Entangled Entropy - Error Mitigation
(qurry.process.randomized_measure.entangled_entropy.error_mitigation
)
- qurry.process.randomized_measure.entangled_entropy.error_mitigation.depolarizing_error_mitgation(meas_system: _InputT, all_system: _InputT, n_a: int, system_size: int) dict[str, _InputT] [source]¶
Depolarizing error mitigation.
- Parameters:
- Returns:
Error rate, mitigated purity, mitigated entropy.
- Return type:
- qurry.process.randomized_measure.entangled_entropy.error_mitigation.mitigation_equation(pser: _InputT, meas_series: _InputT, n_a: int) _InputT [source]¶
Calculate the mitigation equation.
purity_cell_2
¶
Post Processing - Randomized Measure - Entangled Entropy - Purity Cell 2
(qurry.process.randomized_measure.entangled_entropy.purity_cell_2
)
This version introduces another way to process subsystems.
- qurry.process.randomized_measure.entangled_entropy.purity_cell_2.purity_cell_2(idx: int, single_counts: dict[str, int], selected_classical_registers: list[int], backend: Literal['Cython', 'Rust', 'Python'] | str = 'Rust') tuple[int, float | float64, list[int]] [source]¶
Calculate the purity cell, one of overlap, of a subsystem.
- Parameters:
idx (int) – Index of the cell (counts).
single_counts (dict[str, int]) – Counts measured from the single quantum circuit.
selected_bitstrings (list[int]) – The list of the index of the selected classical registers.
backend (ExistingProcessBackendLabel, optional) – Backend for the process. Defaults to DEFAULT_PROCESS_BACKEND.
- Returns:
Index, one of overlap purity, The list of the index of the selected classical registers.
- Return type:
- qurry.process.randomized_measure.entangled_entropy.purity_cell_2.purity_cell_2_py(idx: int, single_counts: dict[str, int], selected_classical_registers: list[int]) tuple[int, float64, list[int]] [source]¶
Calculate the purity cell, one of overlap, of a subsystem by Python.
- Parameters:
- Returns:
Index, one of overlap purity, The list of the index of the selected classical registers.
- Return type:
- qurry.process.randomized_measure.entangled_entropy.purity_cell_2.purity_cell_2_rust(idx: int, single_counts: dict[str, int], selected_classical_registers: list[int]) tuple[int, float64, list[int]] [source]¶
Calculate the purity cell, one of overlap, of a subsystem by Rust.
- Parameters:
- Returns:
Index, one of overlap purity, The list of the index of the selected classical registers.
- Return type:
container
¶
Post Processing - Randomized Measure - Entangled Entropy - Container
(qurry.process.randomized_measure.entangled_entropy.container
)
- class qurry.process.randomized_measure.entangled_entropy.container.EntangledEntropyResult[source]¶
The return type of the post-processing for entangled entropy.
- class qurry.process.randomized_measure.entangled_entropy.container.EntangledEntropyResultMitigated[source]¶
The return type of the post-processing for entangled entropy with error mitigation.
- all_system_source: str | Literal['independent', 'null_counts']¶
The name of source of all system.
independent: The all system is calculated independently.
null_counts: No counts exist.
- classical_registers_actually_all_sys: list[int]¶
The list of the index of the selected classical registers which is actually used.
- classical_registers_all_sys: list[int] | None¶
The list of the index of the selected classical registers.
- class qurry.process.randomized_measure.entangled_entropy.container.ExistedAllSystemInfo(source: str, purityAllSys: float64 | float, entropyAllSys: float64 | float, puritySDAllSys: float64 | float, entropySDAllSys: float64 | float, purityCellsAllSys: dict[int, float64] | dict[int, float], num_classical_registers_all_sys: int, classical_registers_all_sys: list[int] | None, classical_registers_actually_all_sys: list[int], taking_time_all_sys: float64 | float)[source]¶
Existed all system information
- classical_registers_actually_all_sys: list[int]¶
The list of the index of the selected classical registers which is actually used.
- class qurry.process.randomized_measure.entangled_entropy.container.ExistedAllSystemInfoInput[source]¶
Existed all system information
- classical_registers_actually_all_sys: list[int]¶
The list of the index of the selected classical registers which is actually used.