Giter Club home page Giter Club logo

yavque's Introduction

CodeFactor

Yavque

Yet another variational quantum (eigensolver) library.

Objective

Yavque aims to provide an efficient classical simulation of various variational quantum circuits with an autograd-like interface.

Lots of variational circuits utilize the time evolution of some Hamiltonians. In the extreme case, when the Hamiltonian is diagonal in the computational basis, the corresponding time evolution is also diagonal. One can deal with such time evolution operators much efficiently. Even when the Hamiltonian is not diagonal, the time evolution operator can be much efficiently done when it consists of few-body terms. Classes (e.g. yavque::DiagonalOperator, yavque::SumLocalHam, and yavque::SumPauliString) in Yavque implement such Hamiltonians with corresponding time evolution operators (yavque::DiagonalHamEvol, yavque::SumLocalHamEvol, and yavque::SumPauliStringHamEvol).

Compile

Currently, the library depends on the Intel MKL and TBB that can be installed from here. You can build the library and examples as:

$ git clone --recursive https://github.com/chaeyeunpark/Yavque.git
$ cd Yavque
$ mkdir build && cd build
$ cmake -DBUILD_EXAMPLES=ON ..
$ make all

In the examples, you can find three different implementations of variational quantum eigensolvers (VQE) with the quantum alternating operator Ansatz for the transverse field Ising model: qaoa_tfi_diag, qaoa_tfi_pauli, and qaoa_tfi_ti, and the hardware efficient Ansatz for solving a chemical Hamiltonian solve_chem. As we included sample Hamiltonians for H2 and NH3 molecules, you can test run them.

$ ./solve_chem ../examples/H2.dat 5     # 5 is the circuit depth we want to use
$ ./solve_chem ../examples/NH3.dat 10   # It takes some initial time to load the Hamiltonian 

yavque's People

Contributors

chaeyeunpark avatar

Stargazers

Andrew avatar

Watchers

 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.