Code Monkey home page Code Monkey logo

adiacomput.jl's Introduction

AdiaComput.jl

Quantum Adiabatic Computing simulator

Build Status

AdiaComput.jl is a package for simulating quantum adiabatic computing implemented in Julia. The design of AdiaComput.jl is aimed to implementing an efficient, pluggable simulator which allows users create their own adiabatic computing routine. Current AdiaComput.jl only supports CPU computing in the simulation. GPU branch of the simulator is old and needs to be further developed.

Installation

Dependencies

Use the following commands in Julia to install dependencies.

Pkg.clone("https://github.com/Roger-luo/QuComputStates.jl")
Pkg.clone("https://github.com/JuliaQuantum/QuDynamics.jl")
Pkg.add("JuMP")
Pkg.clone("https://github.com/Roger-luo/QuSAT.jl")
Pkg.clone("https://github.com/JuliaQuantum/QuBase.jl")
Pkg.add("Ipopt")

The package has not been submitted into METADATA.jl, therefore, if you want to use this package, you need to use Pkg.clone

Pkg.clone("https://github.com/Roger-luo/AdiaComput.jl")

User Guide

For adiabatic computing, you need to generate your own problem Hamiltonian, denoted as HP in following codes.

For example, we could use the build-in QuSAT.jl interface to generate a 4-qubit Hamiltonian for exact cover problem.

using QuDynamics
using AdiaComput
using QuSAT
using QuBase
using QuComputStates

ins,ans = generate(4)
pH = QuArray(pHamiltonian(ins,4),(comput_basis(4),comput_basis(4)))

Then you will need to create an AQC obeject, there are few key words that you could tweak at the beginning.

  • maxtime max evolution time.
  • method method for Shrodinger equation solver. All the method in QuDynamics.jl is allowed.
    • ODE solvers QuODE45,QuODE23s,QuODE78
    • Expm solvers QuExpokit,QuExpmV
aqc = AQC(pH,4;maxtime=100)

use |> operator to insert routines into your simulated quantum adiabatic computer. In this example, we simply simulate the normal routine of an adiabatic computing.

(0.0:1e-2:100,QuODE45())|>aqc
for (t,psi) in aqc end

The tuple on the left of |> consist of two parts

  • time list for your propagator (evolution)
  • your propagator/evolution routine

The AQC's states is stored in aqc.state, you could check the success probability of your evolution.

p = norm(aqc.state[ans[1]+1])^2

Custom routines

To custome the routines, a subtype of QuDynamics.QuPropagatorMethod will need to be defined. And you will need to define your own propagate function, which returns an QuArray as next state.

adiacomput.jl's People

Contributors

roger-luo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

adiacomput.jl's Issues

Add to QuDynamic?

@amitjamadagni

I wrote a simple simulator for adiabatic quantum computation.And do not have any dependencies. But I'm not sure it would be a solver for QuDynamic or just become a new repo for quantum computation simulators.

as far as I know,Julia does not have any package about quantum computation simulator.What about a new repo for simulators in quantum computation?

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.