Git Product home page Git Product logo

qudiffeq.jl's Introduction

QuDiffEq

CI Codecov

Quantum algorithms for solving differential equations.

This project is part of Julia's Season of Contribution 2019.

For an introduction to the algorithms and an overview of the features, you can take a look at the blog posts: #1, #2.

Installation

QuDiffEq is a   Julia Language   package. To install QuDiffEq, please open Julia's interactive session (known as REPL) and press ] key in the REPL to use the package mode, then type the following command

pkg> add QuDiffEq

Algorithms

  • Quantum Algorithms for Linear Differential Equations,
    • Based on truncated Taylor series
    • Based on HHL.
  • Quantum Algorithms for Non Linear Differential Equations.

Built With

  • Yao - A framework for Quantum Algorithm Design
  • QuAlgorithmZoo - A repository for Quantum Algorithms

Authors

See the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

References

qudiffeq.jl's People

Contributors

dgan181 avatar github-actions[bot] avatar juliatagbot avatar olgok avatar roger-luo avatar yezhengkai 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  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  avatar

qudiffeq.jl's Issues

The solve method doe not work

It seem solve does not work independently in QuDiffEq. It required using OrdinaryDiffEq

using  QuDiffEq

# dx/dt = 3*x + 4

M = hcat(3.0)
b = [4.0]
x_0 = [2.0]
tspan = (0.0, 1.0)

qprob = QuLDEProblem(M, b, x_0, tspan)
sol = solve(qprob, QuLDE(5))
ERROR: UndefVarError: solve not defined
using  QuDiffEq
using OrdinaryDiffEq

# dx/dt = 3*x + 4

M = hcat(3.0)
b = [4.0]
x_0 = [2.0]
tspan = (0.0, 1.0)

qprob = QuLDEProblem(M, b, x_0, tspan)
sol = solve(qprob, QuLDE(5))

Prints result

1-element Vector{ComplexF64}:
 59.999999999999986 + 0.0im

register package

A few things to do before we release this:

  • finish docs
  • fix examples

[Tutorials] More examples

Hello! Thank you for your wonderful work on solving DE on quantum device.

I have never had experience with Julia, so I use Python JuliaCall. Could you please provide more examples how to submit DE to the QuDiffEq solver? I tried a really straightforward example such as dx/dt = 3x+4, but could not figure out a correct way of creating the M, b and x_initial matrices (I follow the notation dx/dt=Mx+b). What data types should I use for this matrices if M, x,b are numbers?

Why the QuDiffEq can not be precomplied?

ERROR: LoadError: Failed to precompile QuDiffEq [c02438fe-7edc-11e9-0a49-b5c5aafabe04] to C:\Users\35321.juliapro\JuliaPro_v1.4.2-1\compiled\v1.4\QuDiffEq\hei7O_TPJID.ji.
Stacktrace:
[1] error(::String) at .\error.jl:33
[2] compilecache(::Base.PkgId, ::String) at .\loading.jl:1272
[3] _require(::Base.PkgId) at .\loading.jl:1029
[4] require(::Base.PkgId) at .\loading.jl:927
[5] require(::Module, ::Symbol) at .\loading.jl:922

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Inputs for HHL-based linear differential equation solvers

At the moment, HHL based linear differential equation solvers take inputs as time dependent functions alone i.e.

# for solving M x = b

A(t) = M
b(t) = v

qprob = QuLDEProblem(A, b, x, tspan)
res = solve(qprob, QuEuler(), dt = h)  # alg is HHL based

Therefore, solve throws an error if we input constant matrices. We need to update solve to accomodate constant inputs, keeping in line with the input scheme for the other linear differential equation solver, QuLDE.

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.