Coder Social home page Coder Social logo

abduliqc / spvqe Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rodolfocarobene/spvqe

0.0 0.0 0.0 2.25 MB

VQE is a promising quantum algorithm, but it presents problems dealing with ions or excited states. For this reason it is possible to modify the algorithm with constrains. In this repo we implemented a practical working version of vqe that is able to perform well even in noisy environments.

License: MIT License

Python 80.50% Jupyter Notebook 19.50%

spvqe's Introduction

Code Quality Score License: MIT

Sequence of penalties method to study excited states using VQE

Abstract

We propose an extension of the Variational Quantum Eigensolver (VQE) that leads to more accurate energy estimations and can be used to study excited states. The method is based on the introduction of a sequence of increasing penalties in the cost function. This approach does not require circuit modifications and thus can be applied with no additional depth cost.

Through numerical simulations, we show that we are able to produce variational states with desired physical properties, such as total spin and charge. We assess its performance both on classical simulators and on currently available quantum devices, calculating the potential energy curves of small molecular systems in different physical configurations. Finally, we compare our method to the original VQE and to another extension, obtaining a better agreement with exact simulations for both energy and targeted physical quantities.

Installation and usage

Download the repository and install the requirements (better to do so in a python virtual environment.

foo@bar:~$ python -m venv spvqe && cd spvqe
foo@bar:~$ source bin/activate
foo@bar:~$ git clone https://github.com/rodolfocarobene/SPVQE.git && cd SPVQE
foo@bar:~$ pip install .  # eventually, for developer mode, `pip install -e .`
foo@bar:~$ python script/main.py  # execute main program

GUI

The main program controls the simulation using a graphical interface.

It's possible to chose different options at the same time, the program will automatically simulate the current system with all the different options permutations. The options include:

  • Molecule to simulate
  • Basis to use in simulation
  • Variational Ansatz
  • Backend
  • Number of shots
  • Noise model
  • Error correction mechanism
  • Optimizer
  • Bond distances to simulate
  • Addition of penalty terms or series of penalties
  • Details on the penalty terms to add, constrained operator, steps

Each option will be given a unique 'name'. It's possible to bypass the GUI by calling the main program with python script/main.py fast: the default values (written in src/spvqe/gui.py) will be loaded.

Files

. project folder
├── src/spvqe             # Source files (alternatively `lib` or `app`)
├── scripts
| ├── main                # Main script to launch gui and simulations
| └── graphs              # Routines to draw results of simulation
├── notebooks             # Some Jupyter-Notebooks to use as examples
├── data
├── LICENSE
├── README.md
├── requirements.txt
└── setup.py

Citation policy

If you found SPVQE useful, please consider citing it in your publications, we appreciate it greatly:

R. Carobene, S. Barison, A. Giachero, Sequence of penalties method to study excited states using VQE, 2023 Quantum Sci. Technol. 8 035014, https://dx.doi.org/10.1088/2058-9565/acd1a9 , arXiv:2304.05262 [quant-ph]

@article{spvqe,
  author    = "Rodolfo Carobene and Stefano Barison and Andrea Giachero",
  title     = "Sequence of penalties method to study excited states using VQE",
  journal   = "Quantum Science and Technology",
  year      = 2023,
  doi       = {10.1088/2058-9565/acd1a9},
  url       = {https://doi.org/10.1088/2058-9565/acd1a9},
  publisher = {{IOP} Publishing},
  volume    = {8},
  number    = {3},
  pages     = {035014},
}

spvqe's People

Contributors

rodolfocarobene avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.