{"id":32158258,"url":"https://github.com/sciml/quantumnldiffeq.jl","last_synced_at":"2026-02-19T07:01:58.291Z","repository":{"id":37482772,"uuid":"474171276","full_name":"SciML/QuantumNLDiffEq.jl","owner":"SciML","description":null,"archived":false,"fork":false,"pushed_at":"2026-01-11T16:08:41.000Z","size":82,"stargazers_count":18,"open_issues_count":5,"forks_count":5,"subscribers_count":7,"default_branch":"main","last_synced_at":"2026-01-11T18:43:24.457Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SciML.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"SciML"}},"created_at":"2022-03-25T21:41:10.000Z","updated_at":"2026-01-11T15:23:12.000Z","dependencies_parsed_at":"2022-08-31T19:21:58.133Z","dependency_job_id":"d1f86eb7-d820-4872-a627-3ae3c90e4b00","html_url":"https://github.com/SciML/QuantumNLDiffEq.jl","commit_stats":{"total_commits":47,"total_committers":9,"mean_commits":5.222222222222222,"dds":0.7021276595744681,"last_synced_commit":"69fd97fe7252216b108d79a37deafedbb7975e83"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/SciML/QuantumNLDiffEq.jl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SciML%2FQuantumNLDiffEq.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SciML%2FQuantumNLDiffEq.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SciML%2FQuantumNLDiffEq.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SciML%2FQuantumNLDiffEq.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SciML","download_url":"https://codeload.github.com/SciML/QuantumNLDiffEq.jl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SciML%2FQuantumNLDiffEq.jl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29605799,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T06:47:36.664Z","status":"ssl_error","status_checked_at":"2026-02-19T06:45:47.551Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-21T12:59:34.828Z","updated_at":"2026-02-19T07:01:58.285Z","avatar_url":"https://github.com/SciML.png","language":"Julia","funding_links":["https://github.com/sponsors/SciML"],"categories":[],"sub_categories":[],"readme":"# QuantumNLDiffEq.jl\n\nQuantumNLDiffEq.jl is a package for solving nonlinear differential equations using Differential Quantum Circuits (DQCs). It integrates with the SciML ecosystem to leverage quantum computing approaches for differential equation solving.\n\n## Installation\n\n```julia\n]add https://github.com/SciML/QuantumNLDiffEq.jl\n```\n\n## Quick Start\n\n```julia\nusing DifferentialEquations, Yao, QuantumNLDiffEq\n\n# Define the ODE problem\nfunction f(u, p, t)\n    λ, κ = p\n    return -1*λ*u*(κ + tan(λ*t))\nend\nprob = ODEProblem(f, [1.0], (0.0, 0.9), [8.0, 0.1])\n\n# Define the loss function for training\nfunction loss_func(a, b)\n    return (a - b)^2\nend\n\n# Create the Differential Quantum Circuit\nDQC = [QuantumNLDiffEq.DQCType(\n    afm = QuantumNLDiffEq.ChebyshevSparse(2),  # Chebyshev polynomial feature mapping\n    fm = chain(6, [put(i=\u003eRy(0)) for i in 1:6]),  # Feature map circuit\n    cost = [Add([put(6, i=\u003eZ) for i in 1:6])],  # Cost function (observable)\n    var = dispatch(EasyBuild.variational_circuit(6, 5), :random),  # Variational circuit\n    N = 6  # Number of qubits\n)]\n\n# Configure the training\nconfig = DQCConfig(abh = QuantumNLDiffEq.Floating(), loss = loss_func)\nM = range(start=0, stop=0.9, length=20)  # Mesh points for training\nparams = [Yao.parameters(DQC[1].var)]\n\n# Train the quantum circuit to solve the ODE\nQuantumNLDiffEq.train!(DQC, prob, config, M, params)\n\n# Evaluate and plot the solution\nevalue(M) = [QuantumNLDiffEq.calculate_evalue(DQC[1], DQC[1].cost, prob.u0[1],\n                                               config.abh, params[1], M[x], M[1])\n             for x in 1:length(M)]\n\nusing Plots\nnew_M = range(start=0, stop=0.9, length=100)\nplot(new_M, reduce(vcat, real.(evalue(new_M))), xlabel=\"x\", ylabel=\"f(x)\", legend=false)\n```\n\n![example1](https://user-images.githubusercontent.com/51269425/180599519-4e29b5c0-36e9-497b-b63c-db97d14a1050.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsciml%2Fquantumnldiffeq.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsciml%2Fquantumnldiffeq.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsciml%2Fquantumnldiffeq.jl/lists"}