Giter Club home page Giter Club logo

quantummps's Introduction

QuantumMPS

To make life easier, here is a simplified notebook version of qubit saving scheme for VQE.

Matrix product state (MPS) inspired quantum circuits ansatz for variational quantum eigensolver (VQE). Physical Hamiltonian includes: 1D and 2D Heisenberg model, with or without frustration, OBC or PBC. Circuit Block includes: General, U(1) and SU(2) symmetric ansatz.

Setup Guide

Warning: This package is not maintained anymore! It has been migrated to QuantumPEPS

Clone this repository https://github.com/GiggleLiu/QuantumMPS.git to your local host.

Set up your julia environment

  • julia 1.0+
  • install required julia libraries: Yao, DelimitedFiles, FileIO, Fire, JLD2, KrylovKit and StatsBase. To access GPU, you need the extra packages: CUDAnative, CuArrays and CuYao. They can be resolved by typing
$ julia resolve_env.jl # if a GPU is available
$ julia resolve_env.jl nocuda

Run an Example

As an example, we solve the ground state of frustrated Heisenberg model with J2 = 0.5 on 4 x 4 lattice. to run

$ julia j1j2.jl train --symmetry su2 --depth 1

Here, symmetry and depth are optional parameters to specify symmetry of ansatz and depth of circuit block. The default symmetry is su2 and the default circuit depth is 5. The above training with default setting can be very very slow. With Nvidia Titan V GPU, training can be accelerated by a factor of ~35 comparing with the sequential CPU version, but still takes several hours. Decreasing the circuit depth can also accelerate the training.

You can meaure the correlation function and energy per site using pre-trained model stored in data/

$ julia j1j2.jl measure szsz --depth 1         # Sz(i)*Sz(j) correlation matrix, default depth is 5.
$ julia j1j2.jl measure energy --symmetry su2   # sample energy expectation value

To get help on input parameters, please type

$ julia j1j2.jl train --help
$ julia j1j2.jl measure --help

Documentations

  • paper: Variational Quantum Eigensolver with Fewer Qubits (pdf), arXiv:1902.02663, Jin-Guo Liu, Yihong Zhang, Yuan Wan and Lei Wang

Citation

You are welcome to use this code for your research. Please kindly cite:

@article{Liu2019,
  author = {Jin-Guo Liu, Yi-Hong Zhang, Yuan Wan and Lei Wang},
  title = {Variational Quantum Eigensolver with Fewer Qubits},
  eprint = {arXiv:1902.02663},
  url = {https://arxiv.org/abs/1902.02663}
}

quantummps's People

Contributors

giggleliu avatar roger-luo avatar wangleiphy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.