Skip to main content

Qurry 🍛 - The Measuring Tool for Renyi Entropy, Loschmidt Echo, and Magnetization Squared, The Library of Some Common Cases

Project description

Qurry 🍛 - The python package for measuring quantum entanglement entropy and wave function overlap.

The python package that makes the randomized measurement easy.

The major function includes the measurement of quantum Renyi Entropy and Wave Function Overlap based on the randomized measurement protocol. When interfaced with IBM Qiskit, the package automates the workflow from creating experiment objects, job submission and recall and postprocessing.
There are several additional features, such as measurement of magnetization and error mitigation. Please check them out!

Available Python Version Downloads Available System Available System Available System Available System

Documentation

More infomation can be found in the documentation of Qurry 🍛.

Installation

By PyPI - Stable Release

  • The package can be found in pip list as qurrium-x.y.z
  • Pip downloads the most stable release, but not necessarily the latest version.
pip install qurrium

By TestPyPI - Nightly Release

  • This package can be found in pip list as qurry-x.y.z.devW
  • This version includes new features and minor bug fixes, but may not be stable.
pip install qiskit tqdm requests
# the installation from testPyPI can' t find these dependencies
pip install -i https://test.pypi.org/simple/ qurry

Maually by Git

Qurry can be installed from source. Since this package relies on Cython and Rust, it requires "C complier" and "Rust complier" which you need to install first.

To install rust, run the following command:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Then install qurry by the following command:

git clone https://github.com/harui2019/qurry-preview.git --recursive
cd qurry
pip install -e .

Test Installation

pytest is used for testing. Simply run the following command after the installation:

pytest

Environment

Qurry currently SUPPORT qiskit 0.46.0+ and qiskit 1.0.0+, other lower versions are no longer available. The package has been tested on the following systems.

  • Ubuntu 18.04+ LTS (All ManyLinux 2014 compatible distro)

    • on x86_64 (recommended)
    • on x86_64 Windows 10/11 WSL2 (recommended)
    • on aarch64
    • We strongly recommend to use Linux based systems because Python multiprocessing may exist issues on Windows and the NVIDIA CUDA acceleration of Qiskit, qiskit-aer-gpu are supported only on Linux.
  • Windows 10/11

    • on x86_64
  • MacOS 11+

    • on aarch64 (Apple Silicon, M1/M2/M3/M4 chips)
    • on x86_64 (Intel chips)
    • The depedent modules are as follows.
  • with required modules:

  • with optional modules:

    • qiskit-aer: The complete simulator package of qiskit
    • qiskit-aer-gpu: The gpu acceleration of qiskit-aer on Linux with Nvidia GPU
      • qiskit-aer-gpu-cu11: A package for CUDA 11
    • qiskit-ibm-runtime: The API to access IBM Quantum Device
    • qiskit-ibm-provider: The API to access IBM Quantum Device, but will be deprecated soon.
    • qiskit-ibmq-provider: The API to access IBM Quantum Device, which has been deprecated.

Measurement -- made randomized measurement easy.

qurrent - The Quantum Renyi Entropy Measurement

The major function of this module is to measure the quantum Renyi entropy to quantify entanglement.

qurrech - The Wave Function Overlap Measurement

This module evaluates the overlap between any two given quantum states.

In each of the modules, two methods are implemented to perform the measurements:

  • Hadamard Test

    • Ref: Entanglement spectroscopy on a quantum computer - Sonika Johri, Damian S. Steiger, and Matthias Troyer, PhysRevB.96.195136
  • Haar Randomized Measure

    • Ref: 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

Citation

If you use this tool in your research, please cite the following paper in your publication:

@article{PhysRevResearch.7.013043,
  title     = {Probing entanglement dynamics and topological transitions on noisy intermediate-scale quantum computers},
  author    = {Chang, Huai-Chun and Hsu, Hsiu-Chuan and Lin, Yu-Cheng},
  journal   = {Phys. Rev. Res.},
  volume    = {7},
  issue     = {1},
  pages     = {013043},
  numpages  = {12},
  year      = {2025},
  month     = {Jan},
  publisher = {American Physical Society},
  doi       = {10.1103/PhysRevResearch.7.013043},
  url       = {https://link.aps.org/doi/10.1103/PhysRevResearch.7.013043}
}
@mastersthesis{Chang2024,
  title      = {Probing Entanglement Entropy on Near-term Quantum Computers},
  author     = {Huai-Chun Chang},
  year       = {2024},
  school     = {National Chengchi University},
  department = {Graduate Institute of Applied Physics},
  advisor    = {Hsiu-Chuan Hsu},
  committee  = {Yu-Cheng Lin, Ying-Jer Kao, Chiao-Hsuan Wang},
  degree     = {Master's},
  abstract   = {In this thesis, we explore the quench dynamics of the Su–Schrieffer–Heeger (SSH) model and quantum entanglement using Noisy Intermediate-Scale Quantum (NISQ) computers, specifically on the IBM Quantum platform. We investigate the second-order Renyi entropy through randomized measurements to characterize the entanglement of quantum states. To simulate partial-dimerized quench Hamiltonians, we employ Trotter decomposition with an adaptive step size to reduce circuit depth. In the fully dimerized limit, the time evolution operator is exactly mapped to quantum gates, which minimizes noise. After applying error mitigation techniques, we find that the entanglement entropy oscillations align with theoretical predictions. Additionally, we developed a Python package called Qurry to manage workflows and facilitate parallel post-processing. Finally, we analyze the error scaling of Renyi entropy measurements and discuss the challenges encountered when simulating larger systems.},
  keywords   = {Noisy Intermediate-Scale Quantum Device, IBM Quantum, Quench dynamics, Su–Schrieffer–Heeger model, Renyi entropy, Randomized measurement, Error mitigation},
  language   = {zh-TW},
  pages      = {134},
  url        = {https://hdl.handle.net/11296/828e7d}
}

Acknowledgments

The authors acknowledge the support from National Chengchi University, NSTC-Quantum Virtual Machine project, National Center for Theoretical Sciences (NCTS). and IBM Quantum Hub at National Taiwan University (NTU).

Special thank to IBM Quantum Hub at NTU for providing the access right of IBM Quantum that allows us to fully test the tool and execute our experiments.

The author @harui2019 is grateful to the NTU hub of NCTS that supported him as a Research Assistiant in the early stage of the development.

National Chengchi University

NSTC

National Center for Theoretical Sciences, Physics Division

IBM Quantum Hub at National Taiwan University


Stay connected. More features coming soon...

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

qurrium-0.12.0-cp39-abi3-win_arm64.whl (348.3 kB view details)

Uploaded CPython 3.9+Windows ARM64

qurrium-0.12.0-cp39-abi3-win_amd64.whl (615.1 kB view details)

Uploaded CPython 3.9+Windows x86-64

qurrium-0.12.0-cp39-abi3-win32.whl (348.3 kB view details)

Uploaded CPython 3.9+Windows x86

qurrium-0.12.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (785.3 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ x86-64

qurrium-0.12.0-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl (819.5 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ i686

qurrium-0.12.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (780.2 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARM64

qurrium-0.12.0-cp39-abi3-macosx_11_0_arm64.whl (750.7 kB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

qurrium-0.12.0-cp39-abi3-macosx_10_12_universal2.whl (1.2 MB view details)

Uploaded CPython 3.9+macOS 10.12+ universal2 (ARM64, x86-64)

File details

Details for the file qurrium-0.12.0-cp39-abi3-win_arm64.whl.

File metadata

  • Download URL: qurrium-0.12.0-cp39-abi3-win_arm64.whl
  • Upload date:
  • Size: 348.3 kB
  • Tags: CPython 3.9+, Windows ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for qurrium-0.12.0-cp39-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 b9f2bf00f065009754f745951320c818fe07fb7d9598abb18d4a6a85226e77e6
MD5 18cce6a5680ec72f3d1675f03b4f536a
BLAKE2b-256 e959321b6c626e93e04bd5d03e2028cce25034c66c44453db9030bfda5ad1475

See more details on using hashes here.

Provenance

The following attestation bundles were made for qurrium-0.12.0-cp39-abi3-win_arm64.whl:

Publisher: upload-wheel.yml on qurrium/qurry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qurrium-0.12.0-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: qurrium-0.12.0-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 615.1 kB
  • Tags: CPython 3.9+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for qurrium-0.12.0-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 a8d0e959c6811b5ba0bf956c2a69c89879ae800345a770b85f9510a4c7ababb5
MD5 8d9e2500b37c99346ac4d3e28b2e7bd3
BLAKE2b-256 011bf8b5be04795b352101801ccbd75bbd002b74db620c9323f9b0adf50803a4

See more details on using hashes here.

Provenance

The following attestation bundles were made for qurrium-0.12.0-cp39-abi3-win_amd64.whl:

Publisher: upload-wheel.yml on qurrium/qurry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qurrium-0.12.0-cp39-abi3-win32.whl.

File metadata

  • Download URL: qurrium-0.12.0-cp39-abi3-win32.whl
  • Upload date:
  • Size: 348.3 kB
  • Tags: CPython 3.9+, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for qurrium-0.12.0-cp39-abi3-win32.whl
Algorithm Hash digest
SHA256 c16f25c5af91546969861a7d8f036db06fa68b7650f37a0bd5d70c14120c1e55
MD5 f470fffa6568ae28ed44c97caa70c03c
BLAKE2b-256 33ffe0f7707d93088df40405e5cfeae5475f04406a3caad8ecdb0d1fd550faf7

See more details on using hashes here.

Provenance

The following attestation bundles were made for qurrium-0.12.0-cp39-abi3-win32.whl:

Publisher: upload-wheel.yml on qurrium/qurry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qurrium-0.12.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for qurrium-0.12.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5ccf13e5551170c336f7d14af4cbf06091c7fe56f1ed1b8249c596270666cfe4
MD5 3e7f837e4c6a3f433b465c3d61e9428e
BLAKE2b-256 bbc9ff0a87faaeacb7f8988c1142b72aa2a6e17035f69a64a326aadb2dd0314d

See more details on using hashes here.

Provenance

The following attestation bundles were made for qurrium-0.12.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheel-stable.yml on qurrium/qurry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qurrium-0.12.0-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for qurrium-0.12.0-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 44c1963b2807fde7a0179b48cc01f8be4b2eeb5947a6b8a81b712ffe15f3f8f6
MD5 e2c49ef3b5930dc7ae83b1214a1c1b7e
BLAKE2b-256 a171b4a8c8f6e81e9df79bde8ce16c5afe834dd1e7a7878a666336977bc958c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for qurrium-0.12.0-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl:

Publisher: wheel-stable.yml on qurrium/qurry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qurrium-0.12.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for qurrium-0.12.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 ee5ecb43788b62f3cc1691241b84b161b1ca0d14ac13069134c0e1d381b01a63
MD5 8cafb3eeda733051c40f0aeeda8265b1
BLAKE2b-256 cd92e3858b15ff0688cd38b6f01ebcc16fe45671cf514e0fdc81320640d49e6a

See more details on using hashes here.

Provenance

The following attestation bundles were made for qurrium-0.12.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: upload-wheel.yml on qurrium/qurry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qurrium-0.12.0-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for qurrium-0.12.0-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ef08a623408541de1c0fa2b67374d67025e260599259e8e065fef491b0fa3e22
MD5 43bd4dfc9e0f76ff93926f81ebb1dfe5
BLAKE2b-256 3cf34d8f88fa705161a4c50ff801a695d89dbda51bf7deea2db3a4369237f718

See more details on using hashes here.

Provenance

The following attestation bundles were made for qurrium-0.12.0-cp39-abi3-macosx_11_0_arm64.whl:

Publisher: upload-wheel.yml on qurrium/qurry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qurrium-0.12.0-cp39-abi3-macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for qurrium-0.12.0-cp39-abi3-macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 09f3c4ae19cd483d65ee42cd64ee720afcde00662afbee34e56ee05e96575bef
MD5 7992e5f841ab3bc8d49846ce335b563d
BLAKE2b-256 2e9fb0f8a41645472d0137d926975cf40ae32acef692d5529ca1b16879a349c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for qurrium-0.12.0-cp39-abi3-macosx_10_12_universal2.whl:

Publisher: upload-wheel.yml on qurrium/qurry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page