https://github.com/gscriva/cvar-opt

Evaluate Variational Quantum Algorithms in presence of shot noise

https://github.com/gscriva/cvar-opt

Science Score: 36.0%

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

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

Repository

Evaluate Variational Quantum Algorithms in presence of shot noise

Basic Info
  • Host: GitHub
  • Owner: gscriva
  • License: mit
  • Language: Jupyter Notebook
  • Default Branch: main
  • Homepage:
  • Size: 28.9 MB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created over 3 years ago · Last pushed over 1 year ago
Metadata Files
Readme License

README.md

# Challenges of variational quantum optimization with measurement shot noise Giuseppe Scriva, Nikita Astrakhantsev, Sebastiano Pilati, and Guglielmo Mazzola ----- [![Paper](http://img.shields.io/badge/Paper-arXiv%202308.00044-B31B1B.svg)](https://arxiv.org/abs/2308.00044) [![Data](https://zenodo.org/badge/DOI/10.5281/zenodo.8223528.svg)](https://doi.org/10.5281/zenodo.8223528)

Abstract

Quantum enhanced optimization of classical cost functions is a central theme of quantum computing due to its high potential value in science and technology. The variational quantum eigensolver (VQE) and the quantum approximate optimization algorithm (QAOA) are popular variational approaches that are considered the most viable solutions in the noisy-intermediate scale quantum (NISQ) era. Here, we study the scaling of the quantum resources, defined as the required number of circuit repetitions, to reach a fixed success probability as the problem size increases, focusing on the role played by measurement shot noise, which is unavoidable in realistic implementations. Simple and reproducible problem instances are addressed, namely, the ferromagnetic and disordered Ising chains. Our results show that: 1. VQE with the standard heuristic ansatz scales comparably to direct brute-force search when energy-based optimizers are employed. The performance improves at most quadratically using a gradient-based optimizer; 2. When the parameters are optimized from random guesses, also the scaling of QAOA implies problematically long absolute runtimes for large problem sizes; 3. QAOA becomes practical when supplemented with a physically-inspired initialization of the parameters.

Our results suggest that hybrid quantum-classical algorithms should possibly avoid a brute force classical outer loop, but focus on smart parameters initialization.


Going deeper

In our article, we consider optimization problems with VQE and QAOA (eventually enhanced with CVaR) for Ising ferromagnetic 1D instances $$H = \sum{i=1}^{L-1} J{i,i+1} \sigmai \sigma{i+1} + \sum{i=1}^L hi \sigmai$$ where $L$ is the total number of spins $\mathbf{\sigma} = (\sigma1, \cdots, \sigmaL)$, $J{i,i+1}$ is the couplings between the $i$-th spin and the spin $i+1$, $h_i$ is the external field for the $i$-th spins.


How to run

Install dependencies ```bash # clone project git clone https://github.com/gscriva/cvar-opt cd cvar-opt # [OPTIONAL] create conda environment conda create -n myenv python=3.10 conda activate myenv # install requirements pip install -r requirements.txt ```


Run with default parameters bash python run.py --qubits 6 -vv

For the others parameters, take a look to the help bash python run.py --help


Data Availability

We release all the data considered in our study in a Zenodo repository. To run the notebook paper-figure.ipynb you first need to download the data cited above.

Owner

  • Name: Giuseppe Scriva
  • Login: gscriva
  • Kind: user
  • Location: Zurich
  • Company: University of Camerino

Just another infinite monkey trying to write his Divine Comedy.

GitHub Events

Total
  • Push event: 1
Last Year
  • Push event: 1

Dependencies

requirements.txt pypi
  • black *
  • matplotlib *
  • qiskit ==0.39.3
  • qiskit-ibm-runtime ==0.8.0
  • scipy ==1.10