Giter Club home page Giter Club logo

openquantumtools.jl's People

Contributors

dlidar avatar github-actions[bot] avatar neversakura 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  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

openquantumtools.jl's Issues

Reuse the ensemble problem

The EnsembleProblem returned by a build_ensemble function contains internal variables which are not reset after solve is called. A convenient reset! function may be provided to for those objects to be reused again with solve.

Add support for `Evolution`

We use Annealing as a holder for an arbitrary open system evolution. The name might be misleading to people outside QA community. May an equivalent object Evolution should be added.

Integrating GPU acceleration support in OpenQuantumTools

Just as a first-case test, we implemented a GPU solver as a separate function,

function solve_schrodinger_gpu(A::Annealing, tf::Real; tspan = (0, tf), kwargs...)
u0 = cu(build_u0(A.u0, :v))
p = ODEParams(A.H, float(tf), A.annealing_parameter)
update_func = function (C, u, p, t)
update_cache!(C, p.L, p, p(t))
end
cache = cu(get_cache(A.H))
diff_op = DiffEqArrayOperator(cache, update_func = update_func)
jac_cache = cu(similar(cache))
jac_op = DiffEqArrayOperator(jac_cache, update_func = update_func)
ff = ODEFunction(diff_op, jac_prototype = jac_op)
prob = ODEProblem{true}(ff, u0, Float32.(tspan), p)
solve(prob; alg_hints = [:nonstiff], kwargs...)
end

Ideally, we would integrate better. How we do this is effectively solved by solving the issue raised in OpenQuantumBase.jl: USCqserver/OpenQuantumBase.jl#40 (comment)

I raised here simply because we'd need to make changes here as well after resolving the issue in Base.

Change from DiffEqBase to SciMLBase

DiffEqBase is the lowest common denominator for the DiffEq packages, not necessarily the whole SciML ecosystem, and so it has a lot DiffEq dependencies. These are generally not required by downstream packages. If what you're looking for is a way to define problems without having most dependencies, we recommend you use SciMLBase as the dependency since everything like ODEProblem, SteadyStateProblem, etc. is defined there. We basically recommend depending on SciMLBase for problem definitions, and solver packages for specific solvers, but generally most non-SciML packages should not be depending on DiffEqBase directly (given the split of SciMLBase in 2021)

For more details see: https://diffeq.sciml.ai/stable/features/low_dep/ and https://discourse.julialang.org/t/psa-the-right-dependency-to-reduce-from-differentialequations-jl/72757

Let me know if you need any help updating this, though for almost all dependents here it should be a trivial name change as you're actually using pieces from SciMLBase.

Add EIGS to other Hamiltonian type

Right now, only DenseHamiltonian and SparseHamiltonian supports user defined EIGS and eigen_decomp. The can be extended to other AbstractHamiltonian types.

Benchmarking time with CPU/GPU solvers for comparison

We've added a GPU solver

function solve_schrodinger_gpu(A::Annealing, tf::Real; tspan = (0, tf), kwargs...)
u0 = cu(build_u0(A.u0, :v))
p = ODEParams(A.H, float(tf), A.annealing_parameter)
update_func = function (C, u, p, t)
update_cache!(C, p.L, p, p(t))
end
cache = cu(get_cache(A.H))
diff_op = DiffEqArrayOperator(cache, update_func = update_func)
jac_cache = cu(similar(cache))
jac_op = DiffEqArrayOperator(jac_cache, update_func = update_func)
ff = ODEFunction(diff_op, jac_prototype = jac_op)
prob = ODEProblem{true}(ff, u0, Float32.(tspan), p)
solve(prob; alg_hints = [:nonstiff], kwargs...)
end

which will get integrated better soon. We've shown informally that for n = 10 qubits and tf = 10ns anneal, the GPU version takes around 1 second and the CPU version 8 seconds. We'd like to get more systematic benchmarking/ run data on these to show when you get and improvement and by how much.

The informal timing was done with the following test code:
https://github.com/naezzell/accelqat/blob/b617c423daaa4cb0ab2f4c1a4d8f2536fb9f7bb3/cuda/try_gpu_accel.jl#L1-L66
with 2 CPUs and 1 GPU on USC Discovery cluster.

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!

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.