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.10.2-cp39-abi3-win_arm64.whl (312.0 kB view details)

Uploaded CPython 3.9+Windows ARM64

qurrium-0.10.2-cp39-abi3-win_amd64.whl (582.6 kB view details)

Uploaded CPython 3.9+Windows x86-64

qurrium-0.10.2-cp39-abi3-win32.whl (312.0 kB view details)

Uploaded CPython 3.9+Windows x86

qurrium-0.10.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (760.3 kB view details)

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

qurrium-0.10.2-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl (790.5 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ i686

qurrium-0.10.2-cp39-abi3-macosx_11_0_arm64.whl (726.9 kB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

qurrium-0.10.2-cp39-abi3-macosx_10_12_x86_64.whl (738.6 kB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

qurrium-0.10.2-cp39-abi3-macosx_10_12_universal2.whl (1.1 MB view details)

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

File details

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

File metadata

  • Download URL: qurrium-0.10.2-cp39-abi3-win_arm64.whl
  • Upload date:
  • Size: 312.0 kB
  • Tags: CPython 3.9+, Windows ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for qurrium-0.10.2-cp39-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 c08b459c78dac081085aa3721b036e4170198e4a005f95ba162be30a6c940b9d
MD5 78e4440a0ddbfb3ab465df5928ca35da
BLAKE2b-256 cfbaa45003570f2cf5c91de240774e53dd25f0ec68abf183246ea55a834dd6ea

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for qurrium-0.10.2-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 04c5551fbb2dcc5345801db29919ead34ec8ad525922e898b7791f9e34289d12
MD5 4b972b0b982f8087bfc71389e0e32b03
BLAKE2b-256 6e9f1d611aee52b1f762258c790229e779da42298fccc6e87b074a40f37e2fd9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qurrium-0.10.2-cp39-abi3-win32.whl
  • Upload date:
  • Size: 312.0 kB
  • Tags: CPython 3.9+, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for qurrium-0.10.2-cp39-abi3-win32.whl
Algorithm Hash digest
SHA256 c003c0a70765d13f966db107ac77f7ad0ce211243ecd11de4101af13378d32bd
MD5 0a1fff801de5e001efd15b588775272c
BLAKE2b-256 75c81cb527ae3bac1e7a1806141712e1814280d4d72272ae9f1e9163bb70338e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qurrium-0.10.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 000ea7d5aa9b88996b4c1ffbd7a55e0c4fd637f9cc7b1def946604802e7e074e
MD5 181b1691f5437606a108621437b6421b
BLAKE2b-256 5343619f70150a61703e4bb4eae1b26e82584832fa983c3ce2ae4352327519c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for qurrium-0.10.2-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.10.2-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for qurrium-0.10.2-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 4b7d960f227c344c8571daa88ab5e11114bae314268b2ef68212e5f38539a92b
MD5 d722d3b64cdf3a1695159f05c36882a8
BLAKE2b-256 3dd34c6460b8d78df12b55a155de1931186ce36344e8bc2f73744efd9a75f842

See more details on using hashes here.

Provenance

The following attestation bundles were made for qurrium-0.10.2-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.10.2-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for qurrium-0.10.2-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 601d66fbb7a5fe1adc8ff24b609182793865e67a40004ef14d84018c4ddf078a
MD5 027ab7051029537328ba838b64cc8b0d
BLAKE2b-256 df9f678842d5cd05c72cc736ec2f1a34d29c141f8aa9fabb375d12be835f34db

See more details on using hashes here.

File details

Details for the file qurrium-0.10.2-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for qurrium-0.10.2-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 ee60c1580333587847f3054a5af73522aa2223507c06959ca0d2bab994a12a3f
MD5 3c92aa197e8d240db446dadcfa09b133
BLAKE2b-256 fad53b5bb9e59e740d9e3e0379694c98ab2d80310f4244bba0444788e9fad334

See more details on using hashes here.

Provenance

The following attestation bundles were made for qurrium-0.10.2-cp39-abi3-macosx_10_12_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.10.2-cp39-abi3-macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for qurrium-0.10.2-cp39-abi3-macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 af0469816aa0b9063d7276b8f0029d380eeb261c37fcc0b34bdc34b01311cf1e
MD5 629828530013764243903ca9326bc9a9
BLAKE2b-256 daac89c41104ee4b283f2eb8581e62d9d79ded8934ac2e9ec9674fdc0fb98798

See more details on using hashes here.

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