Giter Site home page Giter Site logo

ibmq-trotter-adaptive-vqa's Introduction

Time evolution of quantum states via adaptive variational quantum algorithm

An Adaptive Variational Quantum Dynamics Simulation (AVQDS)[1][2]automatically generates a variational ansatz and adaptively expands it along the time evolution path. The ansatz closely matches that from exact diagonalization time evolution and the circuits require less number of gates than Trotter simulations up to the final time given (More details). Using this method, we got 93% fidelity in the IBM Quantum’s Open Science Prize 2021 competition.

Requirement

Before executing the AVQDS code, one should install h5py, qiskit, qutip, numpy and the latest version of scipy.

Files in AVQDS_heis

There are two types of files, python and ipython (Jupyter notebook)

ipython file (Jupyter notebook)

Mini_Heisenberg_model_best_basis_gate_57.ipynb is the notebook using the best Heisenberg trotter decomposition using only 3-cnot gates for a one trotter step. The best result is 57 %.

Mini_Heisenberg_model_variational_gate_93__U.ipynb is the notebook using UAVQDS (π). The best result is 93 %.

Mini_Heisenberg_model_variational_gate_U4_70.ipynb is the notebook using UAVQDS (π/4). The best result is 70 %.

python file

ansatz.py Finds the variational wave-function using a pool of operators that construct the Hamiltonian and corresponding variational parameters that minimize the McLachlan distance.

avaridyn.py Stores records of desired quantities.

model.py The Heisenberg model Hamiltonian with open boundary conditions is defined in this module.

plot.py To plot quantities of interest like the Loschmidt echo.

run.py Used to run the AVQDS simulation to find the optimal parameters and operators for the time evovled variational ansatz. Since the process of searching the optimized parameters requires bunch of circuits, we use the classical simulation help us to calculate McLachlan distance directly.

timing.py Used to count the execution time of the program.

Files in Results

In the results folder, there are 4 files. params_trace_pi.dat and ansatz_pi.h5 denote the parameters and operator sequence of UAVQDS (π). params_trace_pi4.dat and ansatz_pi4.h5 denote the parameters and operator sequence of UAVQDS (π/4).

ibmq-trotter-adaptive-vqa's People

Contributors

ichen17 avatar jsaroni avatar

Stargazers

YANG JIANFEI 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.