qem-zne

Research project implementing zero-noise extrapolation

https://github.com/oanikienko/qem-zne

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README
  • Academic publication links
    Links to: arxiv.org, aps.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.7%) to scientific vocabulary
Last synced: 9 months ago · JSON representation ·

Repository

Research project implementing zero-noise extrapolation

Basic Info
  • Host: GitHub
  • Owner: oanikienko
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 9.9 MB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created over 2 years ago · Last pushed almost 2 years ago
Metadata Files
Readme Citation

README.md

Zero-noise extrapolation on NISQ devices: benchmarking and some new results

This project performs the benchmarking of zero-noise extrapolation (ZNE) ([Cai et al, 2023], [Li and Benjamin, 2017], [Temme et al, 2017], [Majumdar et al, 2023]) on simulators, snapshots and real devices. The main objectives are: - Finding the best performance-complexity trade-off for ZNE. - Determining the best implementation of ZNE on NISQ devices.

To achieve these objectives, this project has led to an implementation of zero-noise extrapolation, named customZNE. Its main features are the following: - Global and local folding to boost the noise in the initial circuit. - Polynomial and exponential extrapolations to compute the noise-free expectation value.

This implementation uses Python 3.9 and higher, under GNU/Linux.

This project also includes experiments using qiskitZNE, the ZNE provided by Qiskit from IBM.

This documentation explains how to create the virtual environment required for this implementation and how to process the data obtained during the project.

How to create the virtual environment

Steps: 1. Clone this GitHub repository in your working directory, here in ~/virenv/: bash git clone https://github.com/oanikienko/qem-zne.git

  1. Create the virtual environment in ~/virenv/: bash python3 -m venv ~/virenv/qem-zne/

  2. Go in the directory qem-zne and activate the newly created environment, while exporting the path variables: bash source ~/virenv/qem-zne/bin/activate && export PYTHONPATH="${PYTHONPATH}:~/virenv/qem-zne/src:~/virenv/qem-zne/src/customZNE" Path variables must be exported in order to import customZNE modules correctly.

  3. Upgrade pip and install the necessary libraries: bash pip install -U pip pip install numpy matplotlib

For the next times, only the activation of the environment is needed, using the following command: bash source ~/virenv/qem-zne/bin/activate && export PYTHONPATH="${PYTHONPATH}:~/virenv/qem-zne/src:~/virenv/qem-zne/src/customZNE" Once the environment has been created and activated, data can be processed.

How to process data

[!IMPORTANT] Please note that Qiskit 1.0.0 has been released since March 31st, 2024. As a consequence, the results cannot be reproduced anymore because this new release is not backwards compatible. From now on, only data processing can be performed, using the experiment files from this repository. The following section has been rewritten accordingly.

The data obtained after running the script is stored in src/data/, under the name <experiment_filename>_results.yaml.

Steps: 1. Activate the environment if you have not already done so: bash source ~/virenv/qem-zne/bin/activate && export PYTHONPATH="${PYTHONPATH}:~/virenv/qem-zne/src:~/virenv/qem-zne/src/customZNE"

  1. Go into the directory src where all the scripts are stored: bash cd src/

  2. Process the data created with zne_performing.py. Two scripts are available:

    1. To plot with linear scale on both axes, run data_processing.py: bash python3 data_processing.py data/chosen_ZNE/<experiment_filename>_results.yaml results/path/to/storage/directory/
    2. To plot figures using logarithm scale on the x-axis, run logarithm_data_processing.py instead, with the same parameters: bash python3 logarithm_data_processing.py data/chosen_ZNE/<experiment_filename>_results.yaml results/path/to/storage/directory/ Please note that:
    3. chosen_ZNEis either customZNE or qiskitZNE.
    4. <experiment_filename>_results.yamlis one of the files in data/chosen_ZNE/.
    5. results/path/to/storage/directory/ is the directory where the figures will be stored after executing the script.

References

Owner

  • Login: oanikienko
  • Kind: user

Citation (CITATION.bib)

@misc{anikienko_customZNE,
  author        = {Anikienko, Ouliana},
  title         = {{customZNE} - {An} implementation of {Zero}-noise extrapolation},
  year          = {2024},
  publisher     = {Zenodo},
  version       = {1.0.0},
  doi           = {},
  url           = {https://github.com/oanikienko/qem-zne},
}

GitHub Events

Total
Last Year