From 5b2ba89010551d8da25833c353bbab499e78267b Mon Sep 17 00:00:00 2001 From: mabuni1998 Date: Thu, 25 May 2023 18:33:28 -0400 Subject: [PATCH 1/5] Updated julia version --- Examples/qo_singlephoton-DESKTOP-O66V958.jl | 85 ++++++++ Examples/qo_singlephoton.jl | 5 +- Examples/qo_twophoton.jl | 1 + Manifest.toml | 190 +++++++++++++----- Project.toml | 7 +- docs/Manifest.toml | 209 +++++++++++++++++--- docs/Project.toml | 1 + docs/src/detection.md | 8 +- docs/src/example_lodahl.md | 4 +- docs/src/index.md | 15 +- docs/src/multiplewaveguides.md | 10 +- docs/src/theoreticalbackground.md | 18 +- docs/src/tutorial.md | 2 +- src/CavityWaveguideOperator.jl | 64 ++++-- src/WaveguideInteraction.jl | 65 +++++- src/WaveguideOperator.jl | 135 +++++++++---- src/WaveguideQED.jl | 4 +- src/basis.jl | 133 +++++++------ src/detection.jl | 4 +- src/plotting.jl | 24 +-- src/precompile.jl | 12 +- src/should_upstream.jl | 12 +- src/solver.jl | 21 +- test/helper_functions.jl | 6 +- 24 files changed, 772 insertions(+), 263 deletions(-) create mode 100644 Examples/qo_singlephoton-DESKTOP-O66V958.jl diff --git a/Examples/qo_singlephoton-DESKTOP-O66V958.jl b/Examples/qo_singlephoton-DESKTOP-O66V958.jl new file mode 100644 index 0000000..be07d87 --- /dev/null +++ b/Examples/qo_singlephoton-DESKTOP-O66V958.jl @@ -0,0 +1,85 @@ +using QuantumOptics +using WaveguideQED +using LinearAlgebra +using PyPlot +pygui(false) +pygui(true) +include("singlecavity_simulations.jl") +#Parameter structure imported from singlecavity_simulations (bit overkill for now, but can prove usefull) +param = parameters() + +#Set detuning: +param.δ = 0 +#Set non linearity: +param.x3 = 0 + +param.times = 0:0.1:10 + +dt = param.times[2] - param.times[1] + +#Create operators for two photons interacting with cavity +bc = FockBasis(1) +bw = WaveguideBasis(1,param.times) +a = destroy(bc) +ad = create(bc); +n = ad*a ⊗ identityoperator(bw) +#$w†a and a†w efficient implementation$ +wda = emission(bc,bw) +adw = absorption(bc,bw) +H = param.δ*n + im*sqrt(param.γ/dt)*(adw-wda) + param.x3/4*(n*n+n) + + +#Define input onephoton state shape +ξfun(t,σ,t0) = complex(sqrt(2/σ)* (log(2)/pi)^(1/4)*exp(-2*log(2)*(t-t0)^2/σ^2)) +ξvec = ξfun.(param.times,param.σ,param.t0) + +ψ_cw = onephoton(bw,ξvec) +psi = fockstate(bc,0) ⊗ ψ_cw + +#Solve +@btime ψ = waveguide_evolution(param.times, psi, H) + +#REFERENCE SOLUTION +sol1 = solve_differentialeq(param,ξfun) +ref_sol = ξfun.(sol1.t,param.σ,param.t0)-sqrt(param.γ)*sol1 + +#Plot single photon waveguide state +ψ_single = OnePhotonView(ψ)/sqrt(dt) + +fig,ax = subplots(1,1,figsize=(9,4.5)) +ax.plot(param.times,abs.(ξvec).^2,"g-",label="Input pulse") +ax.plot(param.times,abs.(ψ_single).^2,"ro",label="δ = 0",fillstyle="none") +ax.plot(sol1.t,abs.(ref_sol).^2,"r-") +ax.set_xlabel("time [1/γ]") +ax.set_ylabel(L"$\xi_{out}^{(1)}$") +ax.legend() +plt.tight_layout() + +using DifferentialEquations +using LinearAlgebra +using PyPlot +function dpsi!(dpsi,psi,p,t) + y,d,nsteps,dt = p + timeindex = round(Int,t/dt,RoundDown) + 1 + dpsi .= 0 + dpsi[2+nsteps] = -sqrt(y/dt)*psi[1+timeindex] + dpsi[1+timeindex] = sqrt(y/dt)*psi[2+nsteps] +end + +#Define parameters +y,d,dt = 1,0,0.1 +times = 0:dt:10 +N = length(times) +p = (y,d,N,dt) + +#Define input gaussian state with width s = 1 and arrivial time t0=5 +xi(t,s,t0) = complex(sqrt(2/s)* (log(2)/pi)^(1/4)*exp(-2*log(2)*(t-t0)^2/s^2)) +psi = zeros(ComplexF64,2*(N+1)) +psi[2:N+1] .= sqrt(dt)*xi.(times,1,5) +prob = ODEProblem(dpsi!, psi, (times[1], times[end]+dt), p) +sol = solve(prob, OrdinaryDiffEq.DP5();reltol = 1.0e-8,abstol = 1.0e-10); +psi_out = sol[end][2:N+1] + +#Plot the output +fig,ax = subplots(1,1,figsize=(9,4.5)) +ax.plot(times,abs.(psi_out).^2,"r-",label="Input pulse") \ No newline at end of file diff --git a/Examples/qo_singlephoton.jl b/Examples/qo_singlephoton.jl index caa3df0..16b65a2 100644 --- a/Examples/qo_singlephoton.jl +++ b/Examples/qo_singlephoton.jl @@ -9,7 +9,7 @@ include("singlecavity_simulations.jl") param = parameters() #Set detuning: -param.δ = 0 +param.δ = 2 #Set non linearity: param.x3 = 0 @@ -53,4 +53,5 @@ ax.plot(sol1.t,abs.(ref_sol).^2,"r-") ax.set_xlabel("time [1/γ]") ax.set_ylabel(L"$\xi_{out}^{(1)}$") ax.legend() -plt.tight_layout() \ No newline at end of file +plt.tight_layout() + diff --git a/Examples/qo_twophoton.jl b/Examples/qo_twophoton.jl index c931d47..7ecaa7d 100644 --- a/Examples/qo_twophoton.jl +++ b/Examples/qo_twophoton.jl @@ -41,6 +41,7 @@ psi = fockstate(bc,0) ⊗ ψ_cw ψ_double = TwoPhotonView(ψ) + fig,ax = subplots(1,1,figsize=(4.5,4.5)) xgrid = repeat(param.times',length(param.times),1) ygrid = repeat(param.times,1,length(param.times)) diff --git a/Manifest.toml b/Manifest.toml index ff41b8a..9a2c712 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -1,20 +1,28 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.8.5" +julia_version = "1.9.0" manifest_format = "2.0" -project_hash = "17108abd943556615807072c82e1cef39046804b" +project_hash = "4a1d97bef8afef670719ac1ef9afa5593983a635" [[deps.AbstractFFTs]] -deps = ["ChainRulesCore", "LinearAlgebra"] +deps = ["LinearAlgebra"] git-tree-sha1 = "16b6dbc4cf7caee4e1e75c49485ec67b667098a0" uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" version = "1.3.1" +weakdeps = ["ChainRulesCore"] + + [deps.AbstractFFTs.extensions] + AbstractFFTsChainRulesCoreExt = "ChainRulesCore" [[deps.Adapt]] deps = ["LinearAlgebra", "Requires"] git-tree-sha1 = "cc37d689f599e8df4f464b2fa3870ff7db7492ef" uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" version = "3.6.1" +weakdeps = ["StaticArrays"] + + [deps.Adapt.extensions] + AdaptStaticArraysExt = "StaticArrays" [[deps.ArgTools]] uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" @@ -104,12 +112,6 @@ git-tree-sha1 = "c6d890a52d2c4d55d326439580c3b8d0875a77d9" uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" version = "1.15.7" -[[deps.ChangesOfVariables]] -deps = ["ChainRulesCore", "LinearAlgebra", "Test"] -git-tree-sha1 = "485193efd2176b88e6622a39a246f8c5b600e74e" -uuid = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" -version = "0.1.6" - [[deps.CloseOpenIntervals]] deps = ["ArrayInterface", "Static"] git-tree-sha1 = "d61300b9895f129f4bd684b2aff97cf319b6c493" @@ -128,15 +130,19 @@ uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" version = "0.3.0" [[deps.Compat]] -deps = ["Dates", "LinearAlgebra", "UUIDs"] +deps = ["UUIDs"] git-tree-sha1 = "7a60c856b9fa189eb34f5f8a6f6b5529b7942957" uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" version = "4.6.1" +weakdeps = ["Dates", "LinearAlgebra"] + + [deps.Compat.extensions] + CompatLinearAlgebraExt = "LinearAlgebra" [[deps.CompilerSupportLibraries_jll]] deps = ["Artifacts", "Libdl"] uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.0.1+0" +version = "1.0.2+0" [[deps.ConstructionBase]] deps = ["LinearAlgebra"] @@ -144,6 +150,14 @@ git-tree-sha1 = "89a9db8d28102b094992472d333674bd1a83ce2a" uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" version = "1.5.1" + [deps.ConstructionBase.extensions] + IntervalSetsExt = "IntervalSets" + StaticArraysExt = "StaticArrays" + + [deps.ConstructionBase.weakdeps] + IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + [[deps.CpuId]] deps = ["Markdown"] git-tree-sha1 = "fcbb72b032692610bfbdb15018ac16a36cf2e406" @@ -170,18 +184,34 @@ version = "1.0.0" deps = ["Printf"] uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" -[[deps.DensityInterface]] -deps = ["InverseFunctions", "Test"] -git-tree-sha1 = "80c3e8639e3353e5d2912fb3a1916b8455e2494b" -uuid = "b429d917-457f-4dbc-8f4c-0cc954292b1d" -version = "0.4.0" - [[deps.DiffEqBase]] -deps = ["ArrayInterfaceCore", "ChainRulesCore", "DataStructures", "Distributions", "DocStringExtensions", "EnumX", "FastBroadcast", "ForwardDiff", "FunctionWrappers", "FunctionWrappersWrappers", "LinearAlgebra", "Logging", "Markdown", "MuladdMacro", "Parameters", "PreallocationTools", "Printf", "RecursiveArrayTools", "Reexport", "Requires", "SciMLBase", "Setfield", "SparseArrays", "Static", "StaticArraysCore", "Statistics", "Tricks", "ZygoteRules"] +deps = ["ArrayInterfaceCore", "ChainRulesCore", "DataStructures", "DocStringExtensions", "EnumX", "FastBroadcast", "ForwardDiff", "FunctionWrappers", "FunctionWrappersWrappers", "LinearAlgebra", "Logging", "Markdown", "MuladdMacro", "Parameters", "PreallocationTools", "Printf", "RecursiveArrayTools", "Reexport", "Requires", "SciMLBase", "Setfield", "SparseArrays", "Static", "StaticArraysCore", "Statistics", "Tricks", "ZygoteRules"] git-tree-sha1 = "81470904b958f3f24173fa013d4a54198842cb8d" uuid = "2b5f629d-d688-5b77-993f-72d75c75574e" version = "6.119.0" + [deps.DiffEqBase.extensions] + DiffEqBaseDistributionsExt = "Distributions" + DiffEqBaseGeneralizedGeneratedExt = "GeneralizedGenerated" + DiffEqBaseMPIExt = "MPI" + DiffEqBaseMeasurementsExt = "Measurements" + DiffEqBaseMonteCarloMeasurementsExt = "MonteCarloMeasurements" + DiffEqBaseReverseDiffExt = "ReverseDiff" + DiffEqBaseTrackerExt = "Tracker" + DiffEqBaseUnitfulExt = "Unitful" + DiffEqBaseZygoteExt = "Zygote" + + [deps.DiffEqBase.weakdeps] + Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" + GeneralizedGenerated = "6b9d7cbe-bcb9-11e9-073f-15a7a543e2eb" + MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" + Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" + MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" + Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" + [[deps.DiffEqCallbacks]] deps = ["DataStructures", "DiffEqBase", "ForwardDiff", "LinearAlgebra", "Markdown", "NLsolve", "Parameters", "RecipesBase", "RecursiveArrayTools", "SciMLBase", "StaticArraysCore"] git-tree-sha1 = "b497f63a13fe37e03ed7ac72d71b72aad17b46c4" @@ -194,6 +224,12 @@ git-tree-sha1 = "2c4ed3eedb87579bfe9f20ecc2440de06b9f3b89" uuid = "77a26b50-5914-5dd7-bc55-306e6241c503" version = "5.16.0" + [deps.DiffEqNoiseProcess.extensions] + DiffEqNoiseProcessReverseDiffExt = "ReverseDiff" + + [deps.DiffEqNoiseProcess.weakdeps] + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + [[deps.DiffResults]] deps = ["StaticArraysCore"] git-tree-sha1 = "782dd5f4561f5d267313f23853baaaa4c52ea621" @@ -217,11 +253,19 @@ deps = ["Random", "Serialization", "Sockets"] uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" [[deps.Distributions]] -deps = ["ChainRulesCore", "DensityInterface", "FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns", "Test"] +deps = ["FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns", "Test"] git-tree-sha1 = "da9e1a9058f8d3eec3a8c9fe4faacfb89180066b" uuid = "31c24e10-a181-5473-b8eb-7969acd0382f" version = "0.25.86" + [deps.Distributions.extensions] + DistributionsChainRulesCoreExt = "ChainRulesCore" + DistributionsDensityInterfaceExt = "DensityInterface" + + [deps.Distributions.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + DensityInterface = "b429d917-457f-4dbc-8f4c-0cc954292b1d" + [[deps.DocStringExtensions]] deps = ["LibGit2"] git-tree-sha1 = "2fb1e02f2b635d0845df5d7c167fec4dd739b00d" @@ -300,10 +344,14 @@ uuid = "6a86dc24-6348-571c-b903-95158fe2bd41" version = "2.17.0" [[deps.ForwardDiff]] -deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions", "StaticArrays"] +deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] git-tree-sha1 = "00e252f4d706b3d55a8863432e742bf5717b498d" uuid = "f6369f11-7733-5829-9624-2563aa707210" version = "0.10.35" +weakdeps = ["StaticArrays"] + + [deps.ForwardDiff.extensions] + ForwardDiffStaticArraysExt = "StaticArrays" [[deps.FunctionWrappers]] git-tree-sha1 = "d62485945ce5ae9c0c48f124a84998d755bae00e" @@ -380,12 +428,6 @@ version = "2018.0.3+2" deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" -[[deps.InverseFunctions]] -deps = ["Test"] -git-tree-sha1 = "49510dfcb407e572524ba94aeae2fced1f3feb0f" -uuid = "3587e190-3f89-42d0-90ee-14403ec27112" -version = "0.1.8" - [[deps.IrrationalConstants]] git-tree-sha1 = "630b497eafcc20001bba38a4651b327dcfc491d2" uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" @@ -488,7 +530,7 @@ uuid = "d3d80556-e9d4-5f37-9878-2ab0fcc64255" version = "7.2.0" [[deps.LinearAlgebra]] -deps = ["Libdl", "libblastrampoline_jll"] +deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" [[deps.LinearMaps]] @@ -503,20 +545,41 @@ git-tree-sha1 = "d1fce810e9a4213607f0182cf25ffd6ce13e19b6" uuid = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" version = "1.37.0" + [deps.LinearSolve.extensions] + LinearSolveHYPRE = "HYPRE" + + [deps.LinearSolve.weakdeps] + HYPRE = "b5ffcf37-a2bd-41ab-a3da-4bd9bc8ad771" + [[deps.LogExpFunctions]] -deps = ["ChainRulesCore", "ChangesOfVariables", "DocStringExtensions", "InverseFunctions", "IrrationalConstants", "LinearAlgebra"] +deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] git-tree-sha1 = "0a1b7c2863e44523180fdb3146534e265a91870b" uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" version = "0.3.23" + [deps.LogExpFunctions.extensions] + LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" + LogExpFunctionsChangesOfVariablesExt = "ChangesOfVariables" + LogExpFunctionsInverseFunctionsExt = "InverseFunctions" + + [deps.LogExpFunctions.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + ChangesOfVariables = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" + InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" + [[deps.Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" [[deps.LoopVectorization]] -deps = ["ArrayInterface", "ArrayInterfaceCore", "ArrayInterfaceOffsetArrays", "ArrayInterfaceStaticArrays", "CPUSummary", "ChainRulesCore", "CloseOpenIntervals", "DocStringExtensions", "ForwardDiff", "HostCPUFeatures", "IfElse", "LayoutPointers", "LinearAlgebra", "OffsetArrays", "PolyesterWeave", "SIMDTypes", "SLEEFPirates", "SnoopPrecompile", "SpecialFunctions", "Static", "ThreadingUtilities", "UnPack", "VectorizationBase"] +deps = ["ArrayInterface", "ArrayInterfaceCore", "ArrayInterfaceOffsetArrays", "ArrayInterfaceStaticArrays", "CPUSummary", "CloseOpenIntervals", "DocStringExtensions", "HostCPUFeatures", "IfElse", "LayoutPointers", "LinearAlgebra", "OffsetArrays", "PolyesterWeave", "SIMDTypes", "SLEEFPirates", "SnoopPrecompile", "Static", "ThreadingUtilities", "UnPack", "VectorizationBase"] git-tree-sha1 = "9696a80c21a56b937e3fd89e972f8db5db3186e2" uuid = "bdcacae8-1622-11e9-2a5c-532679323890" version = "0.12.150" +weakdeps = ["ChainRulesCore", "ForwardDiff", "SpecialFunctions"] + + [deps.LoopVectorization.extensions] + ForwardDiffExt = ["ChainRulesCore", "ForwardDiff"] + SpecialFunctionsExt = "SpecialFunctions" [[deps.MKL_jll]] deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "Pkg"] @@ -542,7 +605,7 @@ uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" [[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.0+0" +version = "2.28.2+0" [[deps.Missings]] deps = ["DataAPI"] @@ -555,7 +618,7 @@ uuid = "a63ad114-7e13-5084-954f-fe012c677804" [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2022.2.1" +version = "2022.10.11" [[deps.MuladdMacro]] git-tree-sha1 = "cac9cc5499c25554cba55cd3c30543cff5ca4fab" @@ -599,7 +662,7 @@ version = "1.12.9" [[deps.OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.20+0" +version = "0.3.21+4" [[deps.OpenLibm_jll]] deps = ["Artifacts", "Libdl"] @@ -642,9 +705,9 @@ uuid = "d96e819e-fc66-5662-9728-84c9c7592b0a" version = "0.12.3" [[deps.Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] +deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.8.0" +version = "1.9.0" [[deps.PoissonRandom]] deps = ["Random"] @@ -676,6 +739,18 @@ git-tree-sha1 = "2c7658dd593e3adc118b00429e1048829f1abb8c" uuid = "d236fae5-4411-538c-8e31-a6e3d9e00b46" version = "0.4.11" + [deps.PreallocationTools.extensions] + PreallocationToolsReverseDiffExt = "ReverseDiff" + + [deps.PreallocationTools.weakdeps] + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + +[[deps.PrecompileTools]] +deps = ["Preferences"] +git-tree-sha1 = "259e206946c293698122f63e2b513a7c99a244e8" +uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" +version = "1.1.1" + [[deps.Preferences]] deps = ["TOML"] git-tree-sha1 = "47e5f437cc0e7ef2ce8406ce1e7e24d44915f88d" @@ -711,9 +786,9 @@ version = "1.0.9" [[deps.QuantumOpticsBase]] deps = ["Adapt", "FFTW", "LRUCache", "LinearAlgebra", "QuantumInterface", "Random", "SparseArrays", "Strided", "UnsafeArrays"] -git-tree-sha1 = "fd7c7704d09c2ab619b04634fade1e33bfce8602" +git-tree-sha1 = "c0fe25d57ffe78ec8a56f831e1631d448e5973d0" uuid = "4f57444f-1401-5e15-980d-4471b28d5678" -version = "0.3.9" +version = "0.3.12" [[deps.REPL]] deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] @@ -752,6 +827,12 @@ git-tree-sha1 = "54e055256bbd41fd10566880bc4baa5316bca6fe" uuid = "731186ca-8d62-57ce-b412-fbd966d074cd" version = "2.37.0" + [deps.RecursiveArrayTools.extensions] + RecursiveArrayToolsTrackerExt = "Tracker" + + [deps.RecursiveArrayTools.weakdeps] + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + [[deps.RecursiveFactorization]] deps = ["LinearAlgebra", "LoopVectorization", "Polyester", "SnoopPrecompile", "StrideArraysCore", "TriangularSolve"] git-tree-sha1 = "9088515ad915c99026beb5436d0a09cd8c18163e" @@ -845,6 +926,12 @@ git-tree-sha1 = "54c78ac3cc0343a16785adabe5bbf4063c737967" uuid = "727e6d20-b764-4bd8-a329-72de5adea6c7" version = "0.1.14" + [deps.SimpleNonlinearSolve.extensions] + SimpleBatchedNonlinearSolveExt = "NNlib" + + [deps.SimpleNonlinearSolve.weakdeps] + NNlib = "872c559c-99b0-510c-b3b7-b6c96a88d5cd" + [[deps.SimpleTraits]] deps = ["InteractiveUtils", "MacroTools"] git-tree-sha1 = "5d7e3f4e11935503d3ecaf7186eac40602e7d231" @@ -867,7 +954,7 @@ uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" version = "1.1.0" [[deps.SparseArrays]] -deps = ["LinearAlgebra", "Random"] +deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" [[deps.SparseDiffTools]] @@ -883,10 +970,14 @@ uuid = "e56a9233-b9d6-4f03-8d0f-1825330902ac" version = "0.3.9" [[deps.SpecialFunctions]] -deps = ["ChainRulesCore", "IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] +deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] git-tree-sha1 = "ef28127915f4229c971eb43f3fc075dd3fe91880" uuid = "276daf66-3868-5448-9aa4-cd146d93841b" version = "2.2.0" +weakdeps = ["ChainRulesCore"] + + [deps.SpecialFunctions.extensions] + SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" [[deps.Static]] deps = ["IfElse"] @@ -908,6 +999,7 @@ version = "1.4.0" [[deps.Statistics]] deps = ["LinearAlgebra", "SparseArrays"] uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" +version = "1.9.0" [[deps.StatsAPI]] deps = ["LinearAlgebra"] @@ -922,11 +1014,19 @@ uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" version = "0.33.21" [[deps.StatsFuns]] -deps = ["ChainRulesCore", "HypergeometricFunctions", "InverseFunctions", "IrrationalConstants", "LogExpFunctions", "Reexport", "Rmath", "SpecialFunctions"] +deps = ["HypergeometricFunctions", "IrrationalConstants", "LogExpFunctions", "Reexport", "Rmath", "SpecialFunctions"] git-tree-sha1 = "f625d686d5a88bcd2b15cd81f18f98186fdc0c9a" uuid = "4c63d2b9-4356-54db-8cca-17b64c39e42c" version = "1.3.0" + [deps.StatsFuns.extensions] + StatsFunsChainRulesCoreExt = "ChainRulesCore" + StatsFunsInverseFunctionsExt = "InverseFunctions" + + [deps.StatsFuns.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" + [[deps.StochasticDiffEq]] deps = ["Adapt", "ArrayInterface", "DataStructures", "DiffEqBase", "DiffEqNoiseProcess", "DocStringExtensions", "FillArrays", "FiniteDiff", "ForwardDiff", "JumpProcesses", "LevyArea", "LinearAlgebra", "Logging", "MuladdMacro", "NLsolve", "OrdinaryDiffEq", "Random", "RandomNumbers", "RecursiveArrayTools", "Reexport", "SciMLBase", "SparseArrays", "SparseDiffTools", "StaticArrays", "UnPack"] git-tree-sha1 = "c6b4b802d4d830e0e958f5f2098d8dea0a935f4b" @@ -952,7 +1052,7 @@ uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" [[deps.SuiteSparse_jll]] deps = ["Artifacts", "Libdl", "Pkg", "libblastrampoline_jll"] uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "5.10.1+0" +version = "5.10.1+6" [[deps.SymbolicIndexingInterface]] deps = ["DocStringExtensions"] @@ -963,7 +1063,7 @@ version = "0.2.2" [[deps.TOML]] deps = ["Dates"] uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -version = "1.0.0" +version = "1.0.3" [[deps.TableTraits]] deps = ["IteratorInterfaceExtensions"] @@ -980,7 +1080,7 @@ version = "1.10.1" [[deps.Tar]] deps = ["ArgTools", "SHA"] uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" -version = "1.10.1" +version = "1.10.0" [[deps.Test]] deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] @@ -1052,7 +1152,7 @@ version = "2.0.0" [[deps.Zlib_jll]] deps = ["Libdl"] uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.2.12+3" +version = "1.2.13+0" [[deps.ZygoteRules]] deps = ["ChainRulesCore", "MacroTools"] @@ -1061,9 +1161,9 @@ uuid = "700de1a5-db45-46bc-99cf-38207098b444" version = "0.2.3" [[deps.libblastrampoline_jll]] -deps = ["Artifacts", "Libdl", "OpenBLAS_jll"] +deps = ["Artifacts", "Libdl"] uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.1.1+0" +version = "5.7.0+0" [[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] diff --git a/Project.toml b/Project.toml index 9ca6809..6638a9e 100644 --- a/Project.toml +++ b/Project.toml @@ -6,8 +6,9 @@ version = "0.1.0" [deps] LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" Parameters = "d96e819e-fc66-5662-9728-84c9c7592b0a" +PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a" QuantumOptics = "6e0679c1-51ea-5a7c-ac74-d61b76210b0c" -SnoopPrecompile = "66db9d55-30c0-4569-8b51-7e840670fc0c" +QuantumOpticsBase = "4f57444f-1401-5e15-980d-4471b28d5678" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" Strided = "5e0ebb24-38b0-5f93-81fe-25c709ecae67" UnsafeArrays = "c4a57d5a-5b31-53a6-b365-19f8c011fbd6" @@ -15,7 +16,7 @@ UnsafeArrays = "c4a57d5a-5b31-53a6-b365-19f8c011fbd6" [compat] Parameters = "0.12" QuantumOptics = "1" -SnoopPrecompile = "1" +QuantumOpticsBase = "0.3.9" Strided = "1.2" UnsafeArrays = "1" -julia = "1.8" \ No newline at end of file +julia = "1.8" diff --git a/docs/Manifest.toml b/docs/Manifest.toml index 0f3d902..27e2bc4 100644 --- a/docs/Manifest.toml +++ b/docs/Manifest.toml @@ -1,8 +1,8 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.8.5" +julia_version = "1.9.0" manifest_format = "2.0" -project_hash = "7dff462257cbbec9dfee017dc62a921b33e39405" +project_hash = "d6a5993505edb88a10fbee1b0a4d47aa45a4e462" [[deps.ANSIColoredPrinters]] git-tree-sha1 = "574baf8110975760d391c710b6341da1afa48d8c" @@ -10,16 +10,24 @@ uuid = "a4c015fc-c6ff-483c-b24f-f7ea428134e9" version = "0.0.1" [[deps.AbstractFFTs]] -deps = ["ChainRulesCore", "LinearAlgebra"] +deps = ["LinearAlgebra"] git-tree-sha1 = "16b6dbc4cf7caee4e1e75c49485ec67b667098a0" uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" version = "1.3.1" +weakdeps = ["ChainRulesCore"] + + [deps.AbstractFFTs.extensions] + AbstractFFTsChainRulesCoreExt = "ChainRulesCore" [[deps.Adapt]] deps = ["LinearAlgebra", "Requires"] git-tree-sha1 = "cc37d689f599e8df4f464b2fa3870ff7db7492ef" uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" version = "3.6.1" +weakdeps = ["StaticArrays"] + + [deps.Adapt.extensions] + AdaptStaticArraysExt = "StaticArrays" [[deps.ArgTools]] uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" @@ -49,6 +57,22 @@ git-tree-sha1 = "38911c7737e123b28182d89027f4216cfc8a9da7" uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" version = "7.4.3" + [deps.ArrayInterface.extensions] + ArrayInterfaceBandedMatricesExt = "BandedMatrices" + ArrayInterfaceBlockBandedMatricesExt = "BlockBandedMatrices" + ArrayInterfaceCUDAExt = "CUDA" + ArrayInterfaceGPUArraysCoreExt = "GPUArraysCore" + ArrayInterfaceStaticArraysCoreExt = "StaticArraysCore" + ArrayInterfaceTrackerExt = "Tracker" + + [deps.ArrayInterface.weakdeps] + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" + StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + [[deps.ArrayInterfaceCore]] deps = ["LinearAlgebra", "SnoopPrecompile", "SparseArrays", "SuiteSparse"] git-tree-sha1 = "e5f08b5689b1aad068e01751889f2f615c7db36d" @@ -108,10 +132,14 @@ uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" version = "1.15.7" [[deps.ChangesOfVariables]] -deps = ["ChainRulesCore", "LinearAlgebra", "Test"] +deps = ["LinearAlgebra", "Test"] git-tree-sha1 = "485193efd2176b88e6622a39a246f8c5b600e74e" uuid = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" version = "0.1.6" +weakdeps = ["ChainRulesCore"] + + [deps.ChangesOfVariables.extensions] + ChangesOfVariablesChainRulesCoreExt = "ChainRulesCore" [[deps.CloseOpenIntervals]] deps = ["Static", "StaticArrayInterface"] @@ -119,6 +147,12 @@ git-tree-sha1 = "70232f82ffaab9dc52585e0dd043b5e0c6b714f1" uuid = "fb6a15b2-703c-40df-9091-08a04967cfa9" version = "0.1.12" +[[deps.CodeTracking]] +deps = ["InteractiveUtils", "UUIDs"] +git-tree-sha1 = "d730914ef30a06732bdd9f763f6cc32e92ffbff1" +uuid = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2" +version = "1.3.1" + [[deps.CodecZlib]] deps = ["TranscodingStreams", "Zlib_jll"] git-tree-sha1 = "ded953804d019afa9a3f98981d99b33e3db7b6da" @@ -157,7 +191,7 @@ version = "4.5.0" [[deps.CompilerSupportLibraries_jll]] deps = ["Artifacts", "Libdl"] uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.0.1+0" +version = "1.0.2+0" [[deps.Conda]] deps = ["Downloads", "JSON", "VersionParsing"] @@ -171,6 +205,14 @@ git-tree-sha1 = "89a9db8d28102b094992472d333674bd1a83ce2a" uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" version = "1.5.1" + [deps.ConstructionBase.extensions] + IntervalSetsExt = "IntervalSets" + StaticArraysExt = "StaticArrays" + + [deps.ConstructionBase.weakdeps] + IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + [[deps.CpuId]] deps = ["Markdown"] git-tree-sha1 = "fcbb72b032692610bfbdb15018ac16a36cf2e406" @@ -204,11 +246,33 @@ uuid = "b429d917-457f-4dbc-8f4c-0cc954292b1d" version = "0.4.0" [[deps.DiffEqBase]] -deps = ["ArrayInterface", "ChainRulesCore", "DataStructures", "Distributions", "DocStringExtensions", "EnumX", "FastBroadcast", "ForwardDiff", "FunctionWrappers", "FunctionWrappersWrappers", "LinearAlgebra", "Logging", "Markdown", "MuladdMacro", "Parameters", "PreallocationTools", "Printf", "RecursiveArrayTools", "Reexport", "Requires", "SciMLBase", "Setfield", "SparseArrays", "Static", "StaticArraysCore", "Statistics", "Tricks", "TruncatedStacktraces", "ZygoteRules"] +deps = ["ArrayInterface", "ChainRulesCore", "DataStructures", "DocStringExtensions", "EnumX", "FastBroadcast", "ForwardDiff", "FunctionWrappers", "FunctionWrappersWrappers", "LinearAlgebra", "Logging", "Markdown", "MuladdMacro", "Parameters", "PreallocationTools", "Printf", "RecursiveArrayTools", "Reexport", "Requires", "SciMLBase", "Setfield", "SparseArrays", "Static", "StaticArraysCore", "Statistics", "Tricks", "TruncatedStacktraces", "ZygoteRules"] git-tree-sha1 = "117b2d02e737aeefd58cd4a4803abecadd37c8cc" uuid = "2b5f629d-d688-5b77-993f-72d75c75574e" version = "6.122.2" + [deps.DiffEqBase.extensions] + DiffEqBaseDistributionsExt = "Distributions" + DiffEqBaseGeneralizedGeneratedExt = "GeneralizedGenerated" + DiffEqBaseMPIExt = "MPI" + DiffEqBaseMeasurementsExt = "Measurements" + DiffEqBaseMonteCarloMeasurementsExt = "MonteCarloMeasurements" + DiffEqBaseReverseDiffExt = "ReverseDiff" + DiffEqBaseTrackerExt = "Tracker" + DiffEqBaseUnitfulExt = "Unitful" + DiffEqBaseZygoteExt = "Zygote" + + [deps.DiffEqBase.weakdeps] + Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" + GeneralizedGenerated = "6b9d7cbe-bcb9-11e9-073f-15a7a543e2eb" + MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" + Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" + MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" + Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" + [[deps.DiffEqCallbacks]] deps = ["DataStructures", "DiffEqBase", "ForwardDiff", "LinearAlgebra", "Markdown", "NLsolve", "Parameters", "RecipesBase", "RecursiveArrayTools", "SciMLBase", "StaticArraysCore"] git-tree-sha1 = "63b6be7b396ad395825f3cc48c56b53bfaf7e69d" @@ -221,6 +285,12 @@ git-tree-sha1 = "2c4ed3eedb87579bfe9f20ecc2440de06b9f3b89" uuid = "77a26b50-5914-5dd7-bc55-306e6241c503" version = "5.16.0" + [deps.DiffEqNoiseProcess.extensions] + DiffEqNoiseProcessReverseDiffExt = "ReverseDiff" + + [deps.DiffEqNoiseProcess.weakdeps] + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + [[deps.DiffResults]] deps = ["StaticArraysCore"] git-tree-sha1 = "782dd5f4561f5d267313f23853baaaa4c52ea621" @@ -244,10 +314,15 @@ deps = ["Random", "Serialization", "Sockets"] uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" [[deps.Distributions]] -deps = ["ChainRulesCore", "DensityInterface", "FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns", "Test"] +deps = ["FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns", "Test"] git-tree-sha1 = "da9e1a9058f8d3eec3a8c9fe4faacfb89180066b" uuid = "31c24e10-a181-5473-b8eb-7969acd0382f" version = "0.25.86" +weakdeps = ["ChainRulesCore", "DensityInterface"] + + [deps.Distributions.extensions] + DistributionsChainRulesCoreExt = "ChainRulesCore" + DistributionsDensityInterfaceExt = "DensityInterface" [[deps.DocStringExtensions]] deps = ["LibGit2"] @@ -351,10 +426,14 @@ uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" version = "0.8.4" [[deps.ForwardDiff]] -deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions", "StaticArrays"] +deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] git-tree-sha1 = "00e252f4d706b3d55a8863432e742bf5717b498d" uuid = "f6369f11-7733-5829-9624-2563aa707210" version = "0.10.35" +weakdeps = ["StaticArrays"] + + [deps.ForwardDiff.extensions] + ForwardDiffStaticArraysExt = "StaticArrays" [[deps.FunctionWrappers]] git-tree-sha1 = "d62485945ce5ae9c0c48f124a84998d755bae00e" @@ -488,6 +567,12 @@ git-tree-sha1 = "8d928db71efdc942f10e751564e6bbea1e600dfe" uuid = "7d188eb4-7ad8-530c-ae41-71a32a6d4692" version = "1.0.1" +[[deps.JuliaInterpreter]] +deps = ["CodeTracking", "InteractiveUtils", "Random", "UUIDs"] +git-tree-sha1 = "6a125e6a4cb391e0b9adbd1afa9e771c2179f8ef" +uuid = "aa1ae85d-cabe-5617-a682-6adf51b2e16a" +version = "0.9.23" + [[deps.JumpProcesses]] deps = ["ArrayInterface", "DataStructures", "DiffEqBase", "DocStringExtensions", "FunctionWrappers", "Graphs", "LinearAlgebra", "Markdown", "PoissonRandom", "Random", "RandomNumbers", "RecursiveArrayTools", "Reexport", "SciMLBase", "StaticArrays", "TreeViews", "UnPack"] git-tree-sha1 = "740c685ba3d7f218663436b2152041563c19db6e" @@ -579,7 +664,7 @@ uuid = "d3d80556-e9d4-5f37-9878-2ab0fcc64255" version = "7.2.0" [[deps.LinearAlgebra]] -deps = ["Libdl", "libblastrampoline_jll"] +deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" [[deps.LinearMaps]] @@ -594,11 +679,23 @@ git-tree-sha1 = "1d3e720d603557d697fedc036bd1af43fe7b3474" uuid = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" version = "1.41.1" + [deps.LinearSolve.extensions] + LinearSolveHYPRE = "HYPRE" + + [deps.LinearSolve.weakdeps] + HYPRE = "b5ffcf37-a2bd-41ab-a3da-4bd9bc8ad771" + [[deps.LogExpFunctions]] -deps = ["ChainRulesCore", "ChangesOfVariables", "DocStringExtensions", "InverseFunctions", "IrrationalConstants", "LinearAlgebra"] +deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] git-tree-sha1 = "0a1b7c2863e44523180fdb3146534e265a91870b" uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" version = "0.3.23" +weakdeps = ["ChainRulesCore", "ChangesOfVariables", "InverseFunctions"] + + [deps.LogExpFunctions.extensions] + LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" + LogExpFunctionsChangesOfVariablesExt = "ChangesOfVariables" + LogExpFunctionsInverseFunctionsExt = "InverseFunctions" [[deps.Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" @@ -610,10 +707,21 @@ uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" version = "1.0.0" [[deps.LoopVectorization]] -deps = ["ArrayInterface", "ArrayInterfaceCore", "CPUSummary", "ChainRulesCore", "CloseOpenIntervals", "DocStringExtensions", "ForwardDiff", "HostCPUFeatures", "IfElse", "LayoutPointers", "LinearAlgebra", "OffsetArrays", "PolyesterWeave", "SIMDTypes", "SLEEFPirates", "SnoopPrecompile", "SpecialFunctions", "Static", "StaticArrayInterface", "ThreadingUtilities", "UnPack", "VectorizationBase"] +deps = ["ArrayInterface", "ArrayInterfaceCore", "CPUSummary", "CloseOpenIntervals", "DocStringExtensions", "HostCPUFeatures", "IfElse", "LayoutPointers", "LinearAlgebra", "OffsetArrays", "PolyesterWeave", "SIMDTypes", "SLEEFPirates", "SnoopPrecompile", "Static", "StaticArrayInterface", "ThreadingUtilities", "UnPack", "VectorizationBase"] git-tree-sha1 = "a282dbdbc2860134d6809acd951543ce359bcf15" uuid = "bdcacae8-1622-11e9-2a5c-532679323890" version = "0.12.155" +weakdeps = ["ChainRulesCore", "ForwardDiff", "SpecialFunctions"] + + [deps.LoopVectorization.extensions] + ForwardDiffExt = ["ChainRulesCore", "ForwardDiff"] + SpecialFunctionsExt = "SpecialFunctions" + +[[deps.LoweredCodeUtils]] +deps = ["JuliaInterpreter"] +git-tree-sha1 = "60168780555f3e663c536500aa790b6368adc02a" +uuid = "6f1432cf-f94c-5a45-995e-cdbf5db27b0b" +version = "2.3.0" [[deps.MKL_jll]] deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "Pkg"] @@ -645,7 +753,7 @@ version = "1.1.7" [[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.0+0" +version = "2.28.2+0" [[deps.Missings]] deps = ["DataAPI"] @@ -658,7 +766,7 @@ uuid = "a63ad114-7e13-5084-954f-fe012c677804" [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2022.2.1" +version = "2022.10.11" [[deps.MuladdMacro]] git-tree-sha1 = "cac9cc5499c25554cba55cd3c30543cff5ca4fab" @@ -702,7 +810,7 @@ version = "1.12.9" [[deps.OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.20+0" +version = "0.3.21+4" [[deps.OpenLibm_jll]] deps = ["Artifacts", "Libdl"] @@ -763,9 +871,9 @@ uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" version = "2.5.3" [[deps.Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] +deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.8.0" +version = "1.9.0" [[deps.PoissonRandom]] deps = ["Random"] @@ -797,6 +905,18 @@ git-tree-sha1 = "f739b1b3cc7b9949af3b35089931f2b58c289163" uuid = "d236fae5-4411-538c-8e31-a6e3d9e00b46" version = "0.4.12" + [deps.PreallocationTools.extensions] + PreallocationToolsReverseDiffExt = "ReverseDiff" + + [deps.PreallocationTools.weakdeps] + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + +[[deps.PrecompileTools]] +deps = ["Preferences"] +git-tree-sha1 = "259e206946c293698122f63e2b513a7c99a244e8" +uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" +version = "1.1.1" + [[deps.Preferences]] deps = ["TOML"] git-tree-sha1 = "47e5f437cc0e7ef2ce8406ce1e7e24d44915f88d" @@ -885,6 +1005,16 @@ git-tree-sha1 = "140cddd2c457e4ebb0cdc7c2fd14a7fbfbdf206e" uuid = "731186ca-8d62-57ce-b412-fbd966d074cd" version = "2.38.3" + [deps.RecursiveArrayTools.extensions] + RecursiveArrayToolsMeasurementsExt = "Measurements" + RecursiveArrayToolsTrackerExt = "Tracker" + RecursiveArrayToolsZygoteExt = "Zygote" + + [deps.RecursiveArrayTools.weakdeps] + Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" + [[deps.RecursiveFactorization]] deps = ["LinearAlgebra", "LoopVectorization", "Polyester", "SnoopPrecompile", "StrideArraysCore", "TriangularSolve"] git-tree-sha1 = "9088515ad915c99026beb5436d0a09cd8c18163e" @@ -908,6 +1038,12 @@ git-tree-sha1 = "256eeeec186fa7f26f2801732774ccf277f05db9" uuid = "ae5879a3-cd67-5da8-be7f-38c6eb64a37b" version = "1.1.1" +[[deps.Revise]] +deps = ["CodeTracking", "Distributed", "FileWatching", "JuliaInterpreter", "LibGit2", "LoweredCodeUtils", "OrderedCollections", "Pkg", "REPL", "Requires", "UUIDs", "Unicode"] +git-tree-sha1 = "feafdc70b2e6684314e188d95fe66d116de834a7" +uuid = "295af30f-e4ad-537b-8983-00126c2a3abe" +version = "3.5.2" + [[deps.Rmath]] deps = ["Random", "Rmath_jll"] git-tree-sha1 = "f65dcb5fa46aee0cf9ed6274ccbd597adc49aa7b" @@ -983,6 +1119,12 @@ git-tree-sha1 = "54c78ac3cc0343a16785adabe5bbf4063c737967" uuid = "727e6d20-b764-4bd8-a329-72de5adea6c7" version = "0.1.14" + [deps.SimpleNonlinearSolve.extensions] + SimpleBatchedNonlinearSolveExt = "NNlib" + + [deps.SimpleNonlinearSolve.weakdeps] + NNlib = "872c559c-99b0-510c-b3b7-b6c96a88d5cd" + [[deps.SimpleTraits]] deps = ["InteractiveUtils", "MacroTools"] git-tree-sha1 = "5d7e3f4e11935503d3ecaf7186eac40602e7d231" @@ -1010,7 +1152,7 @@ uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" version = "1.1.0" [[deps.SparseArrays]] -deps = ["LinearAlgebra", "Random"] +deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" [[deps.SparseDiffTools]] @@ -1026,10 +1168,14 @@ uuid = "e56a9233-b9d6-4f03-8d0f-1825330902ac" version = "0.3.9" [[deps.SpecialFunctions]] -deps = ["ChainRulesCore", "IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] +deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] git-tree-sha1 = "ef28127915f4229c971eb43f3fc075dd3fe91880" uuid = "276daf66-3868-5448-9aa4-cd146d93841b" version = "2.2.0" +weakdeps = ["ChainRulesCore"] + + [deps.SpecialFunctions.extensions] + SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" [[deps.StableRNGs]] deps = ["Random", "Test"] @@ -1048,6 +1194,11 @@ deps = ["ArrayInterface", "Compat", "IfElse", "LinearAlgebra", "Requires", "Snoo git-tree-sha1 = "fd5f417fd7e103c121b0a0b4a6902f03991111f4" uuid = "0d7ed370-da01-4f52-bd93-41d350b8b718" version = "1.3.0" +weakdeps = ["OffsetArrays", "StaticArrays"] + + [deps.StaticArrayInterface.extensions] + StaticArrayInterfaceOffsetArraysExt = "OffsetArrays" + StaticArrayInterfaceStaticArraysExt = "StaticArrays" [[deps.StaticArrays]] deps = ["LinearAlgebra", "Random", "StaticArraysCore", "Statistics"] @@ -1063,6 +1214,7 @@ version = "1.4.0" [[deps.Statistics]] deps = ["LinearAlgebra", "SparseArrays"] uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" +version = "1.9.0" [[deps.StatsAPI]] deps = ["LinearAlgebra"] @@ -1077,10 +1229,15 @@ uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" version = "0.33.21" [[deps.StatsFuns]] -deps = ["ChainRulesCore", "HypergeometricFunctions", "InverseFunctions", "IrrationalConstants", "LogExpFunctions", "Reexport", "Rmath", "SpecialFunctions"] +deps = ["HypergeometricFunctions", "IrrationalConstants", "LogExpFunctions", "Reexport", "Rmath", "SpecialFunctions"] git-tree-sha1 = "f625d686d5a88bcd2b15cd81f18f98186fdc0c9a" uuid = "4c63d2b9-4356-54db-8cca-17b64c39e42c" version = "1.3.0" +weakdeps = ["ChainRulesCore", "InverseFunctions"] + + [deps.StatsFuns.extensions] + StatsFunsChainRulesCoreExt = "ChainRulesCore" + StatsFunsInverseFunctionsExt = "InverseFunctions" [[deps.StochasticDiffEq]] deps = ["Adapt", "ArrayInterface", "DataStructures", "DiffEqBase", "DiffEqNoiseProcess", "DocStringExtensions", "FillArrays", "FiniteDiff", "ForwardDiff", "JumpProcesses", "LevyArea", "LinearAlgebra", "Logging", "MuladdMacro", "NLsolve", "OrdinaryDiffEq", "Random", "RandomNumbers", "RecursiveArrayTools", "Reexport", "SciMLBase", "SparseArrays", "SparseDiffTools", "StaticArrays", "UnPack"] @@ -1113,7 +1270,7 @@ uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" [[deps.SuiteSparse_jll]] deps = ["Artifacts", "Libdl", "Pkg", "libblastrampoline_jll"] uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "5.10.1+0" +version = "5.10.1+6" [[deps.SymbolicIndexingInterface]] deps = ["DocStringExtensions"] @@ -1124,7 +1281,7 @@ version = "0.2.2" [[deps.TOML]] deps = ["Dates"] uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -version = "1.0.0" +version = "1.0.3" [[deps.TableTraits]] deps = ["IteratorInterfaceExtensions"] @@ -1141,7 +1298,7 @@ version = "1.10.1" [[deps.Tar]] deps = ["ArgTools", "SHA"] uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" -version = "1.10.1" +version = "1.10.0" [[deps.Test]] deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] @@ -1227,7 +1384,7 @@ uuid = "19fa3120-7c27-5ec5-8db8-b0b0aa330d6f" version = "0.2.0" [[deps.WaveguideQED]] -deps = ["LinearAlgebra", "Parameters", "QuantumOptics", "SnoopPrecompile", "SparseArrays", "Strided", "UnsafeArrays"] +deps = ["LinearAlgebra", "Parameters", "PrecompileTools", "QuantumOptics", "QuantumOpticsBase", "SparseArrays", "Strided", "UnsafeArrays"] path = ".." uuid = "c4555495-0e8d-488d-8e6a-965ecefe9055" version = "0.1.0" @@ -1247,7 +1404,7 @@ version = "0.4.8" [[deps.Zlib_jll]] deps = ["Libdl"] uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.2.12+3" +version = "1.2.13+0" [[deps.ZygoteRules]] deps = ["ChainRulesCore", "MacroTools"] @@ -1256,9 +1413,9 @@ uuid = "700de1a5-db45-46bc-99cf-38207098b444" version = "0.2.3" [[deps.libblastrampoline_jll]] -deps = ["Artifacts", "Libdl", "OpenBLAS_jll"] +deps = ["Artifacts", "Libdl"] uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.1.1+0" +version = "5.7.0+0" [[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] diff --git a/docs/Project.toml b/docs/Project.toml index c150958..727a775 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -3,5 +3,6 @@ Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244" PyPlot = "d330b81b-6aea-500a-939a-2ce795aea3ee" QuantumOptics = "6e0679c1-51ea-5a7c-ac74-d61b76210b0c" +Revise = "295af30f-e4ad-537b-8983-00126c2a3abe" StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3" WaveguideQED = "c4555495-0e8d-488d-8e6a-965ecefe9055" diff --git a/docs/src/detection.md b/docs/src/detection.md index a13a692..3006d62 100644 --- a/docs/src/detection.md +++ b/docs/src/detection.md @@ -38,8 +38,8 @@ using QuantumOptics #hide times = 0:0.1:20 bw = WaveguideBasis(1,times) ξfun(t,σ,t0) = complex(sqrt(2/σ)* (log(2)/pi)^(1/4)*exp(-2*log(2)*(t-t0)^2/σ^2)) -waveguide_a = onephoton(bw,ξfun,times,1,10) -waveguide_b = onephoton(bw,ξfun,times,1,10) +waveguide_a = onephoton(bw,ξfun,1,10) +waveguide_b = onephoton(bw,ξfun,1,10) wa = destroy(bw) wb = destroy(bw) nothing #hide @@ -84,8 +84,8 @@ p_minus_plus = Dminus * Dplus * ψ_total As expected, the resulting probabilities are zero. If we instead displace the photons in time so that one is centered around $t = 5$ and another around $t = 15$ we get: ```@repl detection -waveguide_a = onephoton(bw,ξfun,times,1,5); -waveguide_b = onephoton(bw,ξfun,times,1,15); +waveguide_a = onephoton(bw,ξfun,1,5); +waveguide_b = onephoton(bw,ξfun,1,15); ψ_total = LazyTensorKet(waveguide_a,waveguide_b); p_plus_plus = Dplus * Dplus * ψ_total p_minus_minus = Dminus * Dminus * ψ_total diff --git a/docs/src/example_lodahl.md b/docs/src/example_lodahl.md index 18da5d6..72625d4 100644 --- a/docs/src/example_lodahl.md +++ b/docs/src/example_lodahl.md @@ -58,8 +58,8 @@ We can now study how single or two-photon states scatter on the atom. We define ξ₂(t1,t2,σ1,σ2,t0) = ξ₁(t1,σ1,t0) * ξ₁(t2,σ2,t0) w = 1 t0 = 5 -ψ1 = onephoton(bw,1,ξ₁,times,w,t0) ⊗ fockstate(be,0) -ψ2 = twophoton(bw,1,ξ₂,times,w,w,t0) ⊗ fockstate(be,0) +ψ1 = onephoton(bw,1,ξ₁,w,t0) ⊗ fockstate(be,0) +ψ2 = twophoton(bw,1,ξ₂,w,w,t0) ⊗ fockstate(be,0) ψScat1 = waveguide_evolution(times,ψ1,H) ψScat2 = waveguide_evolution(times,ψ2,H) nothing #hide diff --git a/docs/src/index.md b/docs/src/index.md index 532bf36..4525218 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -2,7 +2,20 @@ WaveguideQED.jl is a package for simulating continuous fockstates in waveguides. It expands on [`QuantumOptics.jl`](https://qojulia.org/) by adding a custom basis, operators, and routines for doing detection. -### Dev docs +## Suggested readings + +The following is a list of relevant papers that provide background to the numerical method implemented in the repository. +* Heuck, M., Jacobs, K.,&; Englund, D. R. (2020). Photon-photon interactions in dynamically coupled cavities. *Physical Review A*, *101*(4). https://doi.org/10.1103/PhysRevA.101.042322 +* Heuck, M., Jacobs, K., &; Englund, D. R. (2020). Controlled-Phase Gate Using Dynamically Coupled Cavities and Optical Nonlinearities. *Physical Review Letters*, *124*(16). https://doi.org/10.1103/PhysRevLett.124.160501 +* Krastanov, S., Jacobs, K., Gilbert, G., Englund, D. R., &; Heuck, M. (2022). Controlled-phase gate by dynamic coupling of photons to a two-level emitter. *Npj Quantum Information*, *8*(1), 103. https://doi.org/10.1038/s41534-022-00604-5 + +The following papers attack similar types of problems that can be solved with `WaveguideQED.jl` and serve as additional context. +* Kiilerich, A. H., &; Mølmer, K. (2019). Input-Output Theory with Quantum Pulses. *Physical Review Letters*, *123*(12), 123604. https://doi.org/10.1103/PhysRevLett.123.123604 +* Kiilerich, A. H., &; Mølmer, K. (2020). Quantum interactions with pulses of radiation. *Physical Review A*, *102*(2), 023717. https://doi.org/10.1103/PhysRevA.102.023717 +* Arranz Regidor, S., Crowder, G., Carmichael, H., &; Hughes, S. (2021). Modeling quantum light-matter interactions in waveguide QED with retardation, nonlinear interactions, and a time-delayed feedback: Matrix product states versus a space-discretized waveguide model. *Physical Review Research*, *3*(2). https://doi.org/10.1103/PhysRevResearch.3.023030 + + +## Dev docs Added functionalities: * [`WaveguideBasis`](@ref) for representing the waveguide space and the related generator functions: [`zerophoton`](@ref), [`onephoton`](@ref), and [`twophoton`](@ref). Also see [`OnePhotonView`](@ref), [`TwoPhotonView`](@ref), and [`plot_twophoton!`](@ref) for viewing the waveguide data for plotting. Note that [`WaveguideBasis`](@ref) can contain multiple waveguides. * [`WaveguideOperator`](@ref) which are specialized operators allowing efficient annihilation and creation operators at each time-bin in the waveguide. They are created by giving a basis to [`WaveguideQED.destroy`](@ref) and [`WaveguideQED.create`](@ref) diff --git a/docs/src/multiplewaveguides.md b/docs/src/multiplewaveguides.md index aa6020c..9e7b9fc 100644 --- a/docs/src/multiplewaveguides.md +++ b/docs/src/multiplewaveguides.md @@ -34,17 +34,17 @@ Similarly, initializing one or two-photon states in the first or second waveguid ```@example multiple ξ(t,σ,t0) = sqrt(2/σ)* (log(2)/pi)^(1/4)*exp(-2*log(2)*(t-t0)^2/σ^2) ξ2(t1,t2,σ,t0) = ξ(t1,σ,t0)*ξ(t2,σ,t0) -ψ_single_1 = onephoton(bw,1,ξ,times,2,5) -ψ_double_1 = twophoton(bw,1,ξ2,times,2,5) -ψ_single_2 = onephoton(bw,2,ξ,times,2,5) -ψ_double_2 = twophoton(bw,2,ξ2,times,2,5) +ψ_single_1 = onephoton(bw,1,ξ,2,5) +ψ_double_1 = twophoton(bw,1,ξ2,2,5) +ψ_single_2 = onephoton(bw,2,ξ,2,5) +ψ_double_2 = twophoton(bw,2,ξ2,2,5) nothing #hide ``` If we want to describe a simultaneous excitation in both waveguides (states like $\ket{1_i}_\mathrm{1}\ket{1_j }_\mathrm{2}$ where the subscript $$\ket{1_i}_\mathrm{i}$ means waveguide i) we specify both indices of the waveguides: ```@example multiple -ψ_single_1_and_2 = twophoton(bw,[1,2],ξ2,times,2,5) +ψ_single_1_and_2 = twophoton(bw,[1,2],ξ2,2,5) nothing #hide ``` diff --git a/docs/src/theoreticalbackground.md b/docs/src/theoreticalbackground.md index 4a4d0b2..ef9b876 100644 --- a/docs/src/theoreticalbackground.md +++ b/docs/src/theoreticalbackground.md @@ -2,7 +2,7 @@ In this section, we go over the necessary theory to work with continuous fockstates in the **WaveguideQED.jl** -## continuous Fock States +## Continuous Fock States The single photon continuous fock state can be defined as: @@ -18,14 +18,14 @@ $$\begin{equation*} w(t_k) = w(k \Delta t) \rightarrow \frac{w_k}{\sqrt{\Delta t}} \ \ \ \text{with} \ \left[ w_j, w_k^\dagger \right ] = \delta_{jk} \end{equation*}$$ -where $w_k$ is the descritized operator and the factor of $1/\sqrt{\Delta t}$ assures the commutator relation in the limit of $\Delta t \rightarrow 0$. We denote the action of the discretized creation operator as: $w_k\dagger \ket{\emptyset} = \ket{1_k}$ meaning a single photon in time-bin $k$. This means that the single photon continuous fock state becomes: +where $w_k$ is the descritized operator and the factor of $1/\sqrt{\Delta t}$ assures the commutator relation in the limit of $\Delta t \rightarrow 0$. We denote the action of the discretized creation operator as: $w_k^\dagger \ket{\emptyset} = \ket{1_k}$ meaning a single photon in time-bin $k$. This means that the single photon continuous fock state becomes: $$\begin{equation*} \ket{\psi} = \int_{t_0}^{t_{end}} \mathrm{d}t \ \xi(t) w^\dagger(t) \ket{\emptyset} \rightarrow \sum_{k=1}^N \sqrt{\Delta t} \xi(t_k) w_k^\dagger \ket{\emptyset} \end{equation*}$$ -In `WaveguideQED.jl, the time-bins above are represented as elements in arrays corresponding to each time-bin: +In `WaveguideQED.jl`, the time-bins above are represented as elements in arrays corresponding to each time-bin: ![Alt text](./illustrations/onephoton_array.png) @@ -38,12 +38,12 @@ bw = WaveguideBasis(1,times) nothing #hide ``` -Notice that the input for WaveguideBasis is `1` and `times`. `1` denotes the maximum excitation number of fockstates (currently can only be 1 or 2), and `times` the is the time interval over which the continuous fock state is defined. To define the continuous fockstate, we need to define a wavefunction $\xi$. In the following, we define a Gaussian wavefunction located around $t=5$ with a width of $\sigma = 1$: +Notice that the input for WaveguideBasis is `1` and `times`. `1` denotes the maximum excitation number of fockstates (currently can only be 1 or 2), and `times` the is the time interval over which the continuous fockstate is defined. To define the continuous fockstate, we need to define a wavefunction $\xi$. In the following, we define a Gaussian wavefunction located around $t=5$ with a width of $\sigma = 1$: ```@example theory ξ(t,σ,t0) = sqrt(2/σ)* (log(2)/pi)^(1/4)*exp(-2*log(2)*(t-t0)^2/σ^2) σ,t0 = 1,5 -ψ = onephoton(bw,ξ,times,σ,t0) +ψ = onephoton(bw,ξ,σ,t0) nothing #hide ``` @@ -99,7 +99,7 @@ This is also seen if we plot the creation operator acting on the vacuum: ψ = wd*zerophoton(bw) viewed_state = OnePhotonView(ψ) fig,ax = subplots(1,1,figsize=(9,4.5)) -ax.plot(times,viewed_state,"r-"); +ax.plot(times,real.(viewed_state),"r-"); ax.set_xlabel("Time [a.u]") ax.set_ylabel(L"$\xi(t)$") plt.tight_layout() @@ -145,15 +145,15 @@ We can define a two-photon basis and corresponding operator by: ```@example theory bw = WaveguideBasis(2,times) +w = destroy(bw) wd = create(bw) -println(pwd()) nothing #hide ``` The creation operator can then be visualized by acting on [`onephoton`](@ref) filled with ones. This is seen in the following. Note that the state is visualized as a contour plot mirrored around the diagonal. ```@example theory set_waveguidetimeindex!(wd,50) -psi_plot = wd*onephoton(bw,x->1,times) +psi_plot = wd*onephoton(bw,x->1) fig,ax = subplots(1,1,figsize=(4.5,4.5)) plot_twophoton!(ax,psi_plot,times) plt.savefig("twophoton_created.svg") #hide @@ -168,7 +168,7 @@ If we want to create a two-photon Gaussian state, we instead do: ξ(t,σ,t0) = sqrt(2/σ)* (log(2)/pi)^(1/4)*exp(-2*log(2)*(t-t0)^2/σ^2) ξ2(t1,t2,σ,t0) = ξ(t1,σ,t0)*ξ(t2,σ,t0) σ,t0 = 1,5 -ψ = twophoton(bw,ξ2,times,σ,t0) +ψ = twophoton(bw,ξ2,σ,t0) nothing #hide ``` diff --git a/docs/src/tutorial.md b/docs/src/tutorial.md index a5932cc..0bf8f0f 100644 --- a/docs/src/tutorial.md +++ b/docs/src/tutorial.md @@ -36,7 +36,7 @@ With this, we can now simulate the scattering of a single photon with a Gaussian ```@example tutorial ξ(t,σ,t0) = sqrt(2/σ)* (log(2)/pi)^(1/4)*exp(-2*log(2)*(t-t0)^2/σ^2) σ,t0 = 1,5 -ψ_waveguide = onephoton(bw,ξ,times,σ,t0) +ψ_waveguide = onephoton(bw,ξ,σ,t0) nothing #hide ``` diff --git a/src/CavityWaveguideOperator.jl b/src/CavityWaveguideOperator.jl index a81968f..1fa7571 100644 --- a/src/CavityWaveguideOperator.jl +++ b/src/CavityWaveguideOperator.jl @@ -18,6 +18,7 @@ struct WaveguideIndexing{N} end end + function WaveguideIndexing(b::Basis,loc) dims = b.shape alldims = [1:length(dims)...] @@ -109,14 +110,18 @@ end function QuantumOpticsBase.:+(a::CavityWaveguideOperator,b::CavityWaveguideOperator) @assert a.basis_l == b.basis_l @assert a.basis_r == b.basis_r - LazySum(a,b) + LazySum(a) +LazySum(b) end function QuantumOpticsBase.:-(a::CavityWaveguideOperator,b::CavityWaveguideOperator) @assert a.basis_l == b.basis_l @assert a.basis_r == b.basis_r - LazySum([1,-1],[a,b]) + LazySum(a) - LazySum(b) +end +function QuantumOpticsBase.:-(a::CavityWaveguideOperator) + out = copy(a) + out.factor = -a.factor + return out end - """ absorption(b1::WaveguideBasis{T},b2::FockBasis) where T @@ -225,10 +230,10 @@ end Return identityoperator(a.basis_l). """ -function QuantumOptics.identityoperator(a::CavityWaveguideOperator) +function QuantumOpticsBase.identityoperator(a::CavityWaveguideOperator) identityoperator(a.basis_l) end -function QuantumOptics.identityoperator(::Type{T}, b1::Basis, b2::Basis) where {T<:CavityWaveguideOperator} +function QuantumOpticsBase.identityoperator(::Type{T}, b1::Basis, b2::Basis) where {T<:CavityWaveguideOperator} @assert b1==b2 identityoperator(b1) end @@ -339,7 +344,7 @@ function is_destroy(data,basis::CompositeBasis) for k = 1:N ind .= 0 ind[k] = 1 - if isequal(data,tensor([i == 0 ? identityoperator(basis.bases[j]) : destroy(basis.bases[j]) for (j,i) in enumerate(ind)]...).data) + if isequal(data,tensor([ (i==0 || !isa(basis.bases[j],FockBasis)) ? identityoperator(basis.bases[j]) : destroy(basis.bases[j]) for (j,i) in enumerate(ind)]...).data) return k end end @@ -351,7 +356,7 @@ function is_create(data,basis::CompositeBasis) for k = 1:N ind .= 0 ind[k] = 1 - if isequal(data,tensor([i == 0 ? identityoperator(basis.bases[j]) : create(basis.bases[j]) for (j,i) in enumerate(ind)]...).data) + if isequal(data,tensor([(i==0 || !isa(basis.bases[j],FockBasis)) ? identityoperator(basis.bases[j]) : create(basis.bases[j]) for (j,i) in enumerate(ind)]...).data) return k end end @@ -416,41 +421,62 @@ end Fast in-place multiplication of operators/state vectors. Updates `result` as `result = alpha*a*b + beta*result`. `a` is a [`CavityWaveguideOperator`](@ref). """ + function mul!(result::Ket{B1}, a::CavityWaveguideEmission, b::Ket{B2}, alpha, beta) where {B1<:Basis,B2<:Basis} dims = basis(result).shape i,j = a.loc[1],a.loc[2] + beta1 = beta + if iszero(beta) + fill!(result.data,beta) + beta1 = one(beta) + end if length(dims) == 2 - loop_destroy_ax!(result.data,a,b.data,alpha,beta,a.indexing) + loop_destroy_ax!(result.data,a,b.data,alpha,beta1,a.indexing) + #= a.indexing.idx_vec1[j] = dims[j] li1 = linear_index(a.indexing.ndims,a.indexing.idx_vec1,a.indexing.strides) - rmul!(view(result.data,li1:a.indexing.strides[a.loc[1]]:li1+(a.indexing.end_idx-1)*a.indexing.strides[a.loc[1]]),beta) + if iszero(beta) + fill!(view(result.data,li1:a.indexing.strides[a.loc[1]]:li1+(a.indexing.end_idx-1)*a.indexing.strides[a.loc[1]]),beta) + elseif !isone(beta) + rmul!(view(result.data,li1:a.indexing.strides[a.loc[1]]:li1+(a.indexing.end_idx-1)*a.indexing.strides[a.loc[1]]),beta) + end=# elseif length(dims) == 3 - loop_destroy_third_axis!(result.data,a,b.data,alpha,beta,a.indexing,1) + loop_destroy_third_axis!(result.data,a,b.data,alpha,beta1,a.indexing,1) a.indexing.idx_vec1[j] = dims[j] - loop_rmul_axis!(result.data,a,b.data,alpha,beta,a.indexing,1) + loop_rmul_axis!(result.data,a,b.data,alpha,beta1,a.indexing,1) else - iterate_over_iter!(result.data,a,b.data,alpha,beta,a.indexing,1,loop_destroy_third_axis!) + iterate_over_iter!(result.data,a,b.data,alpha,beta1,a.indexing,1,loop_destroy_third_axis!) a.indexing.idx_vec1[j] = dims[j] - iterate_over_iter!(result.data,a,b.data,alpha,beta,a.indexing,1,loop_rmul_axis!) + iterate_over_iter!(result.data,a,b.data,alpha,beta1,a.indexing,1,loop_rmul_axis!) end return result end function mul!(result::Ket{B1}, a::CavityWaveguideAbsorption, b::Ket{B2}, alpha, beta) where {B1<:Basis,B2<:Basis} dims = basis(result).shape i,j = a.loc[1],a.loc[2] + beta1 = beta + if iszero(beta) + fill!(result.data,beta) + beta1 = one(beta) + end if length(dims) == 2 - loop_create_ax!(result.data,a,b.data,alpha,beta,a.indexing) + loop_create_ax!(result.data,a,b.data,alpha,beta1,a.indexing) + #= a.indexing.idx_vec1[j] = 1 li1 = linear_index(a.indexing.ndims,a.indexing.idx_vec1,a.indexing.strides) - rmul!(view(result.data,li1:a.indexing.strides[a.loc[1]]:li1+(a.indexing.end_idx-1)*a.indexing.strides[a.loc[1]]),beta) + if iszero(beta) + fill!(view(result.data,li1:a.indexing.strides[a.loc[1]]:li1+(a.indexing.end_idx-1)*a.indexing.strides[a.loc[1]]),beta) + elseif !isone(beta) + rmul!(view(result.data,li1:a.indexing.strides[a.loc[1]]:li1+(a.indexing.end_idx-1)*a.indexing.strides[a.loc[1]]),beta) + end=# elseif length(dims) == 3 - loop_create_third_axis!(result.data,a,b.data,alpha,beta,a.indexing,1) + loop_create_third_axis!(result.data,a,b.data,alpha,beta1,a.indexing,1) a.indexing.idx_vec1[j] = 1 - loop_rmul_axis!(result.data,a,b.data,alpha,beta,a.indexing,1) + #loop_rmul_axis!(result.data,a,b.data,alpha,beta,a.indexing,1) else - iterate_over_iter!(result.data,a,b.data,alpha,beta,a.indexing,1,loop_create_third_axis!) + iterate_over_iter!(result.data,a,b.data,alpha,beta1,a.indexing,1,loop_create_third_axis!) a.indexing.idx_vec1[j] = 1 - iterate_over_iter!(result.data,a,b.data,alpha,beta,a.indexing,1,loop_rmul_axis!) + iterate_over_iter!(result.data,a,b.data,alpha,beta1,a.indexing,1,loop_rmul_axis!) end return result end diff --git a/src/WaveguideInteraction.jl b/src/WaveguideInteraction.jl index 700399b..9c95a59 100644 --- a/src/WaveguideInteraction.jl +++ b/src/WaveguideInteraction.jl @@ -1,3 +1,38 @@ +#= +#Indexing structure used to loop over state. Needs cleanup and can possible be removed with the addition of eachslice(a,dims=(1,3,...)) in julia 1.9 +struct WaveguideStride + looplength::Int + arraylength::Int + s1::Int + s2::Int +end + +function WaveguideStride(b::Basis,loc) + dims = b.shape + alldims = [1:length(dims)...] + i = loc[1] + exclude_dims = [i] + otherdims = setdiff(alldims, exclude_dims) + looplength = prod(dims[otherdims]) + arraylength = dims[i] + + s1 = 1 + s2 = 1 + for k in 1:i-1 + s1 *= dims[k] + end + for k in 1:i + s2 *= dims[k] + end + return WaveguideStride(looplength,arraylength,s1,s2) +end + st::WaveguideStride + function WaveguideInteraction(basis_l::B1,basis_r::B2,factor::ComplexF64,op1::AbstractOperator,op2::AbstractOperator,loc) where{B1,B2} + new{B1,B2}(basis_l,basis_r,factor,op1,op2,loc,WaveguideStride(basis_l,loc)) + end + +=# + mutable struct WaveguideInteraction{B1,B2} <: AbstractOperator{B1,B2} basis_l::B1 basis_r::B2 @@ -30,12 +65,12 @@ Base.:*(b::WaveguideInteraction,a::Number)=*(a,b) function QuantumOpticsBase.:+(a::WaveguideInteraction,b::WaveguideInteraction) @assert a.basis_l == b.basis_l @assert a.basis_r == b.basis_r - LazySum(a,b) + LazySum(a) + LazySum(b) end function QuantumOpticsBase.:-(a::WaveguideInteraction,b::WaveguideInteraction) @assert a.basis_l == b.basis_l @assert a.basis_r == b.basis_r - LazySum([1,-1],[a,b]) + LazySum(a) - LazySum(b) end function set_waveguidetimeindex!(op::WaveguideInteraction,timeindex) @@ -67,7 +102,6 @@ end function mul!(result::Ket{B1}, a::WaveguideInteraction{B1,B2}, b::Ket{B2}, alpha, beta) where {B1<:Basis,B2<:Basis} dims = basis(result).shape - alldims = [1:length(dims)...] i = a.loc[1] exclude_dims = [i] @@ -89,9 +123,22 @@ function mul!(result::Ket{B1}, a::WaveguideInteraction{B1,B2}, b::Ket{B2}, alpha end_idx = dims[i] waveguide_interaction_mul!(view(result.data,li1:stride:li1+(end_idx-1)*stride),a.op1,a.op2,view(b.data,li1:stride:li1+(end_idx-1)*stride),alpha,beta) else - iterate_over_interaction!(result.data,b.data,a,a.factor*alpha,beta,iter,idx_vec1,range_idx,1,stride,dims[i],dims) + iterate_over_interaction!(result.data,b.data,a,alpha,beta,iter,idx_vec1,range_idx,1,stride,dims[i],dims) end + #= + #println(a.st.looplength) + #println(a.st.arraylength) + #println(a.st.s1) + #println(a.st.s2) + for i in 1:a.st.looplength + idx = 1+(i-1)*a.st.s2 + println(idx) + #println(idx+(a.st.arraylength-1)*a.st.s2) + #println(length(view(result.data,idx:a.st.s1:idx+(a.st.arraylength)*a.st.s1-1))) + waveguide_interaction_mul!(view(result.data,idx:a.st.s1:idx+(a.st.arraylength-1)*a.st.s1),a.op1,a.op2,view(b.data,idx:a.st.s1:idx+(a.st.arraylength-1)*a.st.s1),alpha*a.factor,beta) + end + =# return result end @@ -101,7 +148,7 @@ function iterate_over_interaction!(result,b,a,alpha,beta,iter::Tuple,idx_vec1,ra @inbounds idx_vec1[range_idx[idx]] = i li1 = linear_index(dims,idx_vec1) @uviews result b begin - waveguide_interaction_mul!(view(result,li1:stride:li1+(end_idx-1)*stride),a.op1,a.op2,view(b,li1:stride:li1+(end_idx-1)*stride),alpha,beta) + waveguide_interaction_mul!(view(result,li1:stride:li1+(end_idx-1)*stride),a.op1,a.op2,view(b,li1:stride:li1+(end_idx-1)*stride),alpha*a.factor,beta) end end else @@ -116,10 +163,12 @@ function waveguide_interaction_mul!(result,a::WaveguideCreate{B1,B2,1,idx1},bop: if !isone(beta) rmul!(result,beta) end - timeindex = a.timeindex + timeindex_a = a.timeindex + timeindex_b = bop.timeindex nsteps = a.basis_l.nsteps - - @inbounds result[1+(idx1-1)*nsteps+timeindex] += alpha*a.factor*bop.factor*b[1+(idx2-1)*nsteps+timeindex] + if timeindex_a>0 && timeindex_b>0 + @inbounds result[1+(idx1-1)*nsteps+timeindex_a] += alpha*a.factor*bop.factor*b[1+(idx2-1)*nsteps+timeindex_b] + end result end diff --git a/src/WaveguideOperator.jl b/src/WaveguideOperator.jl index 34832ef..7453da7 100644 --- a/src/WaveguideOperator.jl +++ b/src/WaveguideOperator.jl @@ -153,10 +153,10 @@ end Return identityoperator(a.basis_l). """ -function QuantumOptics.identityoperator(a::WaveguideOperator) +function QuantumOpticsBase.identityoperator(a::WaveguideOperator) identityoperator(a.basis_l) end -function QuantumOptics.identityoperator(::Type{T}, b1::Basis, b2::Basis) where {T<:WaveguideOperator} +function QuantumOpticsBase.identityoperator(::Type{T}, b1::Basis, b2::Basis) where {T<:WaveguideOperator} @assert b1==b2 identityoperator(b1) end @@ -283,40 +283,49 @@ end #Destroy 1 waveguide photon function waveguide_mul!(result,a::WaveguideDestroy{B,B,1,idx},b,alpha,beta) where {B,idx} - if !isone(beta) - rmul!(result,beta) + if iszero(beta) + fill!(result, beta) + elseif !isone(beta) + rmul!(result, beta) end - add_zerophoton_onephoton!(result,b,alpha*a.factor,a.timeindex+(idx-1)*a.basis_l.nsteps) + @inbounds result[1] += alpha*a.factor*b[a.timeindex+(idx-1)*a.basis_l.nsteps+1] return end #Destroy 2 waveguide photon function waveguide_mul!(result,a::WaveguideDestroy{B,B,2,1},b,alpha,beta) where {B<:SingleWaveguideBasis} - if !isone(beta) - rmul!(result,beta) + if iszero(beta) + fill!(result, beta) + elseif !isone(beta) + rmul!(result, beta) end timeindex = a.timeindex nsteps = a.basis_l.nsteps - add_zerophoton_onephoton!(result,b,alpha*a.factor,timeindex) - twophotonview = TwoPhotonTimestepView(b,timeindex,nsteps,nsteps+1) - axpy!(alpha*a.factor,twophotonview,view(result,2:1:nsteps+1)) + @inbounds result[1] += alpha*a.factor*b[timeindex+1] + #twophotonview = TwoPhotonTimestepView(b,timeindex,nsteps,nsteps+1) + #axpy!(alpha*a.factor,twophotonview,view(result,2:1:nsteps+1)) + twophoton_destroy!(view(result,2:1:nsteps+1),b,alpha*a.factor,timeindex,nsteps,nsteps+1) return end #Destroy 2 waveguide photon function waveguide_mul!(result,a::WaveguideDestroy{B,B,2,idx},b,alpha,beta) where {B<:MultipleWaveguideBasis,idx} - if !isone(beta) - rmul!(result,beta) + if iszero(beta) + fill!(result, beta) + elseif !isone(beta) + rmul!(result, beta) end timeindex = a.timeindex nsteps = a.basis_l.nsteps Nw = get_number_of_waveguides(a.basis_l) - add_zerophoton_onephoton!(result,b,alpha*a.factor,timeindex+(idx-1)*nsteps) - twophotonview = TwoPhotonTimestepView(b,timeindex,nsteps,Nw*nsteps+1+(idx-1)*(nsteps*(nsteps+1))÷2) - axpy!(alpha*a.factor,twophotonview,view(result,2+(idx-1)*nsteps:1:idx*nsteps+1)) - @simd for k in filter(x -> x != idx, 1:Nw) + @inbounds result[1] += alpha*a.factor*b[timeindex+(idx-1)*a.basis_l.nsteps+1] + #twophotonview = TwoPhotonTimestepView(b,timeindex,nsteps,Nw*nsteps+1+(idx-1)*(nsteps*(nsteps+1))÷2) + #axpy!(alpha*a.factor,twophotonview,view(result,2+(idx-1)*nsteps:1:idx*nsteps+1)) + twophoton_destroy!(view(result,2+(idx-1)*nsteps:1:idx*nsteps+1),b,alpha*a.factor,timeindex,nsteps,Nw*nsteps+1+(idx-1)*(nsteps*(nsteps+1))÷2) + for k in filter(x -> x != idx, 1:Nw) i,j = min(k,idx),max(k,idx) index = (i-1)*Nw + j - (i*(i+1))÷2 - twophotonview = TwoWaveguideTimestepView(b,timeindex,nsteps,1+Nw*nsteps+Nw*(nsteps*(nsteps+1))÷2+(index-1)*nsteps^2,i==idx) - axpy!(alpha*a.factor,twophotonview,view(result,2+(k-1)*nsteps:1:k*nsteps+1)) + #twophotonview = TwoWaveguideTimestepView(b,timeindex,nsteps,1+Nw*nsteps+Nw*(nsteps*(nsteps+1))÷2+(index-1)*nsteps^2,i==idx) + #axpy!(alpha*a.factor,twophotonview,view(result,2+(k-1)*nsteps:1:k*nsteps+1)) + twowaveguide_destroy!(view(result,2+(k-1)*nsteps:1:k*nsteps+1),b,alpha*a.factor,timeindex,nsteps,1+Nw*nsteps+Nw*(nsteps*(nsteps+1))÷2+(index-1)*nsteps^2,i==idx) end return end @@ -324,53 +333,105 @@ end #Create 1 waveguide photon function waveguide_mul!(result,a::WaveguideCreate{B,B,1,idx},b,alpha,beta) where {B,idx} - if !isone(beta) - rmul!(result,beta) + if iszero(beta) + fill!(result, beta) + elseif !isone(beta) + rmul!(result, beta) end - add_onephoton_zerophoton!(result,b,alpha*a.factor,a.timeindex+(idx-1)*a.basis_l.nsteps) + @inbounds result[a.timeindex+(idx-1)*a.basis_l.nsteps+1] += alpha*a.factor*b[1] return end #Create 2 waveguide photon function waveguide_mul!(result,a::WaveguideCreate{B,B,2,1},b,alpha,beta) where {B<:SingleWaveguideBasis} - if !isone(beta) - rmul!(result,beta) + if iszero(beta) + fill!(result, beta) + elseif !isone(beta) + rmul!(result, beta) end timeindex = a.timeindex nsteps = a.basis_l.nsteps - add_onephoton_zerophoton!(result,b,alpha*a.factor,timeindex) - twophotonview = TwoPhotonTimestepView(result,timeindex,nsteps,nsteps+1) - axpy!(alpha*a.factor,view(b,2:1:nsteps+1),twophotonview) + @inbounds result[timeindex+1] += alpha*a.factor*b[1] + #twophotonview = TwoPhotonTimestepView(result,timeindex,nsteps,nsteps+1) + #axpy!(alpha*a.factor,view(b,2:1:nsteps+1),twophotonview) + twophoton_create!(result,view(b,2:1:nsteps+1),alpha*a.factor,timeindex,nsteps,nsteps+1) return end #Create 2 waveguide photon function waveguide_mul!(result,a::WaveguideCreate{B,B,2,idx},b,alpha,beta) where {B<:MultipleWaveguideBasis,idx} - if !isone(beta) - rmul!(result,beta) + if iszero(beta) + fill!(result, beta) + elseif !isone(beta) + rmul!(result, beta) end timeindex = a.timeindex nsteps = a.basis_l.nsteps Nw = get_number_of_waveguides(a.basis_l) - add_onephoton_zerophoton!(result,b,alpha*a.factor,timeindex+(idx-1)*nsteps) - twophotonview = TwoPhotonTimestepView(result,timeindex,nsteps,Nw*nsteps+1+(idx-1)*(nsteps*(nsteps+1))÷2) - axpy!(alpha*a.factor,view(b,2+(idx-1)*nsteps:1:idx*nsteps+1),twophotonview) + @inbounds result[timeindex+(idx-1)*a.basis_l.nsteps+1] += alpha*a.factor*b[1] + #twophotonview = TwoPhotonTimestepView(result,timeindex,nsteps,Nw*nsteps+1+(idx-1)*(nsteps*(nsteps+1))÷2) + #axpy!(alpha*a.factor,view(b,2+(idx-1)*nsteps:1:idx*nsteps+1),twophotonview) + twophoton_create!(result,view(b,2+(idx-1)*nsteps:1:idx*nsteps+1),alpha*a.factor,timeindex,nsteps,Nw*nsteps+1+(idx-1)*(nsteps*(nsteps+1))÷2) @simd for k in filter(x -> x != idx, 1:Nw) i,j = min(k,idx),max(k,idx) index = (i-1)*Nw + j - (i*(i+1))÷2 - twophotonview = TwoWaveguideTimestepView(result,timeindex,nsteps,1+Nw*nsteps+Nw*(nsteps*(nsteps+1))÷2+(index-1)*nsteps^2,i==idx) - axpy!(alpha*a.factor,view(b,2+(k-1)*nsteps:1:k*nsteps+1),twophotonview) + #twophotonview = TwoWaveguideTimestepView(result,timeindex,nsteps,1+Nw*nsteps+Nw*(nsteps*(nsteps+1))÷2+(index-1)*nsteps^2,i==idx) + #axpy!(alpha*a.factor,view(b,2+(k-1)*nsteps:1:k*nsteps+1),twophotonview) + twowaveguide_create!(result,view(b,2+(k-1)*nsteps:1:k*nsteps+1),alpha*a.factor,timeindex,nsteps,1+Nw*nsteps+Nw*(nsteps*(nsteps+1))÷2+(index-1)*nsteps^2,i==idx) end return end +function twophoton_create!(result,b,alpha,timeindex,nsteps,offset) + @simd for i in 1:timeindex-1 + @inbounds result[offset + twophoton_index(i,nsteps,timeindex)] += alpha*b[i] + end + @simd for i in timeindex+1:lastindex(b) + @inbounds result[offset + twophoton_index(timeindex,nsteps,i)] += alpha*b[i] + end + @inbounds result[offset + twophoton_index(timeindex,nsteps,timeindex)] += sqrt(2)*alpha*b[timeindex] +end +function twophoton_destroy!(result,b,alpha,timeindex,nsteps,offset) + @simd for i in 1:timeindex-1 + @inbounds result[i] += alpha*b[offset + twophoton_index(i,nsteps,timeindex)] + end + @simd for i in timeindex+1:lastindex(result) + @inbounds result[i] += alpha*b[offset + twophoton_index(timeindex,nsteps,i)] + end + @inbounds result[timeindex] += sqrt(2)*alpha*b[offset + twophoton_index(timeindex,nsteps,timeindex)] +end + +function twowaveguide_create!(result,b,alpha,timeindex,nsteps,offset,order) + if order + @simd for i in eachindex(b) + @inbounds result[offset + (i-1)*nsteps + timeindex] += alpha*b[i] + end + else + @simd for i in eachindex(b) + @inbounds result[offset + (timeindex-1)*nsteps + i] += alpha*b[i] + end + end +end +function twowaveguide_destroy!(result,b,alpha,timeindex,nsteps,offset,order) + if order + @simd for i in eachindex(result) + @inbounds result[i] += alpha*b[offset + (i-1)*nsteps + timeindex] + end + else + @simd for i in eachindex(result) + @inbounds result[i] += alpha*b[offset + (timeindex-1)*nsteps + i] + end + end +end + + -function add_zerophoton_onephoton!(a,b,alpha,timeindex::Int) - a[1] += alpha*b[timeindex+1] +@inline function add_zerophoton_onephoton!(a,b,alpha,timeindex::Int) + @inbounds a[1] += alpha*b[timeindex+1] end -function add_onephoton_zerophoton!(a,b,alpha,timeindex::Int) - a[1+timeindex] += alpha*b[1] +@inline function add_onephoton_zerophoton!(a,b,alpha,timeindex::Int) + @inbounds a[1+timeindex] += alpha*b[1] end function add_twophoton_onephoton!(a,b,alpha) diff --git a/src/WaveguideQED.jl b/src/WaveguideQED.jl index 7da28b4..ba4d8ca 100644 --- a/src/WaveguideQED.jl +++ b/src/WaveguideQED.jl @@ -4,10 +4,10 @@ using QuantumOptics using Strided using UnsafeArrays import LinearAlgebra: axpy!, dot, mul!, rmul! -import QuantumOptics: create, dagger, destroy, expect, identityoperator, tensor +import QuantumOpticsBase: create, dagger, destroy, expect, identityoperator, tensor export TwoPhotonTimestepView,TwoWaveguideTimestepView,OnePhotonView,TwoPhotonView,TwoWaveguideView, - WaveguideBasis,zerophoton,onephoton,twophoton,view_waveguide,get_waveguidetimeindex,set_waveguidetimeindex!,get_nsteps,get_waveguide_location,get_waveguide_basis,get_number_of_waveguides,get_waveguide_operators, + WaveguideBasis,zerophoton,onephoton,twophoton,view_waveguide,get_waveguidetimeindex,set_waveguidetimeindex!,get_dt,get_nsteps,get_waveguide_location,get_waveguide_basis,get_number_of_waveguides,get_waveguide_operators, WaveguideOperator,WaveguideDestroy,WaveguideCreate, CavityWaveguideAbsorption,CavityWaveguideEmission,emission,absorption, WaveguideInteraction, diff --git a/src/basis.jl b/src/basis.jl index 348816a..7e7c6dd 100644 --- a/src/basis.jl +++ b/src/basis.jl @@ -5,24 +5,25 @@ Basis for time binned Waveguide where `Np` is the number of photons in the waveguide and `Nw` the number of waveguides (default is 1). Currently number of photons is restricted to either 1 or 2. Times is timeinterval over which the photon state should be binned. """ -mutable struct WaveguideBasis{Np,Nw} <: QuantumOptics.Basis +mutable struct WaveguideBasis{Np,Nw} <: QuantumOpticsBase.Basis shape::Vector{Int} N::Int offset::Int nsteps::Int + dt::Float64 function WaveguideBasis(Np::Int,Nw::Int,times) dim = 0 N = length(times) if Np == 1 - dim = 1 + N*Nw + dim = N*Nw elseif Np == 2 #Number of combinations of waveguides ([1,2],[1,3],[2,3] and so on) combinations = Nw*(Nw-1)/2 - dim = 1 + Nw*N + Nw*(N*(N+1))÷2 + N^2*combinations + dim = Nw*N + Nw*(N*(N+1))÷2 + N^2*combinations else error("Currently no more than two simultanoues photons are allowed") end - new{Np,Nw}([dim+1], dim, 0,N) + new{Np,Nw}([dim+1], dim, 0,N,times[2]-times[1]) end end function WaveguideBasis(Np::Int,times) @@ -32,9 +33,9 @@ end Base.:(==)(b1::WaveguideBasis,b2::WaveguideBasis) = (b1.N==b2.N && b1.offset==b2.offset && b1.nsteps==b2.nsteps) #Type unions to dispatch on. -const SingleWaveguideBasis{Np} = Union{CompositeBasis{Vector{Int64}, T},WaveguideBasis{Np,1}} where {T<:Tuple{Vararg{Union{FockBasis,WaveguideBasis{Np,1}}}},Np} +const SingleWaveguideBasis{Np} = Union{CompositeBasis{Vector{Int64}, T},WaveguideBasis{Np,1}} where {T<:Tuple{Vararg{Union{NLevelBasis,FockBasis,WaveguideBasis{Np,1}}}},Np} const SingleWaveguideKet = Ket{T, Vector{ComplexF64}} where T<:SingleWaveguideBasis -const MultipleWaveguideBasis{Np,Nw} = Union{CompositeBasis{Vector{Int64},T},WaveguideBasis{Np,Nw},WaveguideBasis{Np,Nw}} where {T<:Tuple{Vararg{Union{FockBasis,WaveguideBasis{Np,Nw}}}},Np,Nw} +const MultipleWaveguideBasis{Np,Nw} = Union{CompositeBasis{Vector{Int64},T},WaveguideBasis{Np,Nw},WaveguideBasis{Np,Nw}} where {T<:Tuple{Vararg{Union{NLevelBasis,FockBasis,WaveguideBasis{Np,Nw}}}},Np,Nw} const MultipleWaveguideKet = Ket{T, Vector{ComplexF64}} where T<:MultipleWaveguideBasis @@ -50,7 +51,7 @@ using QuantumOptics; times=0:1:10; bw = WaveguideBasis(1,times); bc = FockBasis(2); -ψ_waveguide = Ket(bw,ones(length(times)+1)); +ψ_waveguide = Ket(bw,ones(length(times))); ψ_total = ψ_waveguide ⊗ fockstate(bc,0) ⊗ fockstate(bc,0); ψ_view = view_waveguide(ψ_total); ψ_view_index = view_waveguide(ψ_total,[:,1,1]); @@ -95,7 +96,7 @@ See [`onephoton`](@ref) on how to create onephoton wavepackets and [`view_wavegu using QuantumOptics; times = 0:1:10; bw = WaveguideBasis(1,times); -ψ1 = onephoton(bw,x->1,times,norm=false) +ψ1 = onephoton(bw,x->1,norm=false); OnePhotonView(ψ1) == ones(length(times)) ``` @@ -107,7 +108,7 @@ OnePhotonView(ψCavity,[3,:]) == ones(length(times)) ```@example onephotonview bw = WaveguideBasis(1,3,times); -ψ2 = onephoton(bw,2,x->1,times,norm=false) +ψ2 = onephoton(bw,2,x->1,norm=false) OnePhotonView(ψ,2) == ones(length(times)) ``` @@ -184,14 +185,15 @@ OnePhotonView(ψ::T,index::I) where {T<:MultipleWaveguideKet,I<:Union{Vector{An """ -Create a onephoton wavepacket in waveguide of the form ``W^\\dagger(\\xi) |0 \\rangle = \\int_{t_0}^{t_{end}} dt \\xi(t) w_{\\mathrm{i}}^\\dagger(t) |\\emptyset \\rangle`` where ``i`` is the index of the waveguide and return it as a `Ket`. +Create a onephoton wavepacket in waveguide of the form ``W^\\dagger(\\xi) |0 \\rangle = \\int_{t_0}^{t_{end}} dt \\xi(t) w_{\\mathrm{i}}^\\dagger(t) |\\emptyset \\rangle = \\sum_{k} `` where ``i`` is the index of the waveguide and return it as a `Ket`. See also [`WaveguideBasis`](@ref) and [`OnePhotonView`](@ref) for how to view the state. # Examples ```@example onewaveguide -times = 1:1:10; +dt = 1 +times = 1:dt:10; bw = WaveguideBasis(1,times); -ψ = onephoton(bw,x->1,times,norm=false); +ψ = onephoton(bw,x->dt,norm=false); OnePhotonView(ψ) == ones(length(times)) ``` ```@example onewaveguide @@ -201,25 +203,24 @@ OnePhotonView(ψ) == vec ``` ```@example onewaveguide bw = WaveguideBasis(1,3,times); -ψ = onephoton(bw,2,x->1,times); +ψ = onephoton(bw,2,x->dt); OnePhotonView(ψ,2) == ones(length(times)) ``` """ function onephoton end """ - onephoton(b::WaveguideBasis{T,1},ξ::Function,times,args...,norm=True) where {T} + onephoton(b::WaveguideBasis{T,1},ξ::Function,args...,norm=True) where {T} * Since `b` only contains a single waveguide, the index of the waveguide is not needed. -* `ξ` should be broadcastable as ξ.(times,args...). -* `times`: A vector or range of times where the wavefunction is evaluated. +* `ξ` should be broadcastable as ξ.(times,args...), where `times = 0:b.dt:(b.nsteps-1)*b.dt` (the times used to define the waveguidebasis) * `args...`: additional arguments to be passed to ξ if it is a function. * `norm::Bool=true`: If true normalize the resulting wavepacket. """ -function onephoton(b::WaveguideBasis{T,1},ξ::Function,times,args...; norm=true) where {T} +function onephoton(b::WaveguideBasis{T,1},ξ::Function,args...;norm=true) where {T} state = Ket(b) view = OnePhotonView(state) - view .= ξ.(times,args...) + view .= ξ.(0:b.dt:(b.nsteps-1)*b.dt,args...)*sqrt(b.dt) if norm normalize!(state) end @@ -230,13 +231,13 @@ end onephoton(b::WaveguideBasis{T,1},ξ::AbstractArray;norm=true) where {T} * Since `b` only contains a single waveguide, the index of the waveguide is not needed. -* `ξ` should be `AbstractArray` with length(ξ) == length(b.times) +* `ξ` should be `AbstractArray` with length(ξ) == b.nsteps * `norm::Bool=true`: If true normalize the resulting wavepacket. """ function onephoton(b::WaveguideBasis{T,1},ξ::AbstractArray;norm=true) where {T} state = Ket(b) view = OnePhotonView(state) - view .= ξ + view .= ξ*sqrt(b.dt) if norm normalize!(state) end @@ -244,19 +245,18 @@ function onephoton(b::WaveguideBasis{T,1},ξ::AbstractArray;norm=true) where {T} end """ - onephoton(b::WaveguideBasis{T,Nw},i::Int,ξ::Function,times,args...; norm=true) where {T,Nw} + onephoton(b::WaveguideBasis{T,Nw},i::Int,ξ::Function,args...; norm=true) where {T,Nw} * Since `b` contains `Nw` waveguides, the index of the waveguide needed. * `i` is the index of the waveguide at which the onephoton wavepacket is created in -* `ξ` should be broadcastable as ξ.(times,args...). -* `times`: A vector or range of times where the wavefunction is evaluated. +* `ξ` should be broadcastable as ξ.(times,args...), where `times = 0:b.dt:(b.nsteps-1)*b.dt` (the times used to define the waveguidebasis) * `args...`: additional arguments to be passed to ξ if it is a function. * `norm::Bool=true`: If true normalize the resulting wavepacket. """ -function onephoton(b::WaveguideBasis{T,Nw},i::Int,ξ::Function,times,args...; norm=true) where {T,Nw} +function onephoton(b::WaveguideBasis{T,Nw},i::Int,ξ::Function,args...; norm=true) where {T,Nw} state = Ket(b) view = OnePhotonView(state,i) - view .= ξ.(times,args...) + view .= ξ.(0:b.dt:(b.nsteps-1)*b.dt,args...)*sqrt(b.dt) if norm normalize!(state) end @@ -268,19 +268,19 @@ end * Since `b` contains a `Nw` waveguides, the index of the waveguide needed. * `i` is the index of the waveguide at which the onephoton wavepacket is created in -* `ξ` should be `AbstractArray` with length(ξ) == length(b.times) +* `ξ` should be `AbstractArray` with length(ξ) == b.nsteps * `norm::Bool=true`: If true normalize the resulting wavepacket. """ function onephoton(b::WaveguideBasis{T,Nw},i::Int,ξ::AbstractArray;norm=true) where {T,Nw} state = Ket(b) view = OnePhotonView(state,i) - view .= ξ + view .= ξ*sqrt(b.dt) if norm normalize!(state) end return state end -onephoton(b::WaveguideBasis{T,Nw},ξ::Function,times,args...;norm=true) where {T,Nw} = throw(ArgumentError("WaveguideBasis contains multiple waveguides. Please provide the index of the waveguide in which the excitation should be created.")) +onephoton(b::WaveguideBasis{T,Nw},ξ::Function,args...;norm=true) where {T,Nw} = throw(ArgumentError("WaveguideBasis contains multiple waveguides. Please provide the index of the waveguide in which the excitation should be created.")) onephoton(b::WaveguideBasis{T,Nw},ξ::AbstractArray;norm=true) where {T,Nw} = throw(ArgumentError("WaveguideBasis contains multiple waveguides. Please provide the index of the waveguide in which the excitation should be created.")) @@ -298,7 +298,7 @@ Basic viewing: using LinearAlgebra; #hide times = 1:1:10; bw = WaveguideBasis(2,times); -ψ = twophoton(bw,(t1,t2)->1,times,norm=false); +ψ = twophoton(bw,(t1,t2)->1,norm=false); ψview = TwoPhotonView(ψ); ψview == ones((length(times),length(times))) ``` @@ -315,7 +315,7 @@ bc = FockBasis(2); Viewing twophoton state in waveguide 2 with multiple waveguides ```@example twophotview bw = WaveguideBasis(2,3,times) -ψ = twophoton(bw,2,(t1,t2)->1,times,norm=false); +ψ = twophoton(bw,2,(t1,t2)->1,norm=false); ψview = TwoPhotonView(ψ,2); ψview == ones((length(times),length(times))) ``` @@ -330,7 +330,7 @@ Viewing twophoton state in waveguide 2 with multiple waveguides combined with ot Viewing twophotons across waveguide 1 and 2 ```@example twophotview bw = WaveguideBasis(2,3,times) -ψ = twophoton(bw,1,2,(t1,t2)->1,times,norm=false); +ψ = twophoton(bw,1,2,(t1,t2)->1,norm=false); ψview = TwoPhotonView(ψ,1,2); ψview == ones((length(times),length(times))) ``` @@ -358,15 +358,14 @@ function Base.getindex(x::TwoPhotonView,i::Int,j::Int) 1/sqrt(2)*x.data[x.offset + twophoton_index(j,x.nsteps,i)] end end -function Base.setindex!(x::TwoPhotonView,Left,i::Int,j::Int) +function Base.setindex!(x::TwoPhotonView,input,i::Int,j::Int) if ij") - x.data[x.offset + twophoton_index(j,x.nsteps,i)] = sqrt(2)*Left + x.data[x.offset + twophoton_index(j,x.nsteps,i)] = sqrt(2)*input end end function twophoton_index(j,nsteps,timeindex) @@ -536,11 +535,11 @@ Creating twophoton state with only one waveguide (using a function): using LinearAlgebra; #hide times = 1:1:10; bw = WaveguideBasis(2,times); -ψ = twophoton(bw,(t1,t2)->1,times,norm=false); +ψ = twophoton(bw,(t1,t2)->1,norm=false); ψview = TwoPhotonView(ψ); ψview == ones((length(times),length(times))) -ψ = twophoton(bw,(t1,t2,arg1)->arg1,times,123,norm=false); +ψ = twophoton(bw,(t1,t2,arg1)->arg1,123,norm=false); ψview = TwoPhotonView(ψ); ψview == 123*ones((length(times),length(times))) @@ -556,35 +555,34 @@ Creating twophoton state with only one waveguide (using a matrix): Creating twophoton state in waveguide 2 with multiple waveguides ```@example twophotview bw = WaveguideBasis(2,3,times) -ψ = twophoton(bw,2,(t1,t2)->1,times,norm=false); +ψ = twophoton(bw,2,(t1,t2)->1,norm=false); ``` Creating twophoton state across waveguide 1 and 2 ```@example twophotview bw = WaveguideBasis(2,3,times) -ψ = twophoton(bw,1,2,(t1,t2)->1,times,norm=false); +ψ = twophoton(bw,1,2,(t1,t2)->1,norm=false); ``` """ function twophoton end """ - twophoton(b::WaveguideBasis{T,1},ξ::Function,times,args...,norm=True) where {T} + twophoton(b::WaveguideBasis{T,1},ξ::Function,args...,norm=True) where {T} # Arguments - `b::WaveguideBasis{T,Nw}` contains only one waveguide and no index needed. -- ξ given as a function should follow `ξ(times[l],times[m],args...)`. -- `times`: A vector or range of length(times) = b.nsteps. +- ξ given as a function should follow `ξ(t1,t2,args...)`, where `t1` and `t2` are the input times. - `args...`: additional arguments to be passed to ξ if it is a function. - `norm::Bool=true`: normalize the resulting wavepacket. """ -function twophoton(b::WaveguideBasis{T,1},ξ::Function,times,args...;norm=true) where {T} +function twophoton(b::WaveguideBasis{T,1},ξ::Function,args...;norm=true) where {T} state = Ket(b) nsteps = get_nsteps(b) viewed_data = TwoPhotonView(state.data,nsteps,nsteps+1) for l in 1:nsteps for m in l:nsteps - viewed_data[l,m] = ξ(times[l],times[m],args...) + viewed_data[l,m] = ξ((l-1)*b.dt,(m-1)*b.dt,args...)*b.dt end end if norm @@ -607,7 +605,7 @@ function twophoton(b::WaveguideBasis{T,1},ξ::Matrix;norm=true) where {T} viewed_data = TwoPhotonView(state.data,nsteps,nsteps+1) for l in 1:nsteps for m in l:nsteps - viewed_data[l,m] = ξ[l,m] + viewed_data[l,m] = ξ[l,m]*b.dt end end if norm @@ -617,23 +615,22 @@ function twophoton(b::WaveguideBasis{T,1},ξ::Matrix;norm=true) where {T} end """ - twophoton(b::WaveguideBasis{T,Nw},i::Int,ξ::Function,times,args...;norm=true) where {T,Nw} + twophoton(b::WaveguideBasis{T,Nw},i::Int,ξ::Function,args...;norm=true) where {T,Nw} # Arguments - `b::WaveguideBasis{T,Nw}` contains multiple waveguides and index i is need. - `i` denotes the index of the waveguide in the twophoton state: ``\\int_{t_0}^{t_{end}} dt' \\int_{t_0}^{t_{end}} dt \\xi(t,t') w_{\\mathrm{i}}^\\dagger(t)w_{\\mathrm{i}}^\\dagger(t') |\\emptyset \\rangle``. -- ξ given as a function should follow `ξ(times[l],times[m],args...)`. -- `times`: A vector or range of length(times) = b.nsteps. +- ξ given as a function should follow `ξ(t1,t2,args...)` where `t1` and `t2` are the input times. - `args...`: additional arguments to be passed to ξ. - `norm::Bool=true`: normalize the resulting wavepacket. """ -function twophoton(b::WaveguideBasis{T,Nw},i::Int,ξ::Function,times,args...;norm=true) where {T,Nw} +function twophoton(b::WaveguideBasis{T,Nw},i::Int,ξ::Function,args...;norm=true) where {T,Nw} state = Ket(b) nsteps = get_nsteps(b) viewed_data = TwoPhotonView(state,i) for l in 1:nsteps for m in l:nsteps - viewed_data[l,m] = ξ(times[l],times[m],args...) + viewed_data[l,m] = ξ((l-1)*b.dt,(m-1)*b.dt,args...)*b.dt end end if norm @@ -657,7 +654,7 @@ function twophoton(b::WaveguideBasis{T,Nw},i::Int,ξ::Matrix;norm=true) where {T viewed_data = TwoPhotonView(state,i) for l in 1:nsteps for m in l:nsteps - viewed_data[l,m] = ξ[l,m] + viewed_data[l,m] = ξ[l,m]*b.dt end end if norm @@ -667,24 +664,23 @@ function twophoton(b::WaveguideBasis{T,Nw},i::Int,ξ::Matrix;norm=true) where {T end """ - twophoton(b::WaveguideBasis{T,Nw},i::Int,j::Int,ξ::Function,times,args...;norm=true) where {T,Nw} + twophoton(b::WaveguideBasis{T,Nw},i::Int,j::Int,ξ::Function,args...;norm=true) where {T,Nw} # Arguments - `b::WaveguideBasis{T,Nw}` contains multiple waveguides and index i is need. - `i` denotes the index of the waveguide in the twophoton state: ``\\int_{t_0}^{t_{end}} dt' \\int_{t_0}^{t_{end}} dt \\xi(t,t') w_{\\mathrm{i}}^\\dagger(t)w_{\\mathrm{j}}^\\dagger(t') |\\emptyset \\rangle``. - `j` denotes the index of the waveguide in the twophoton state: ``\\int_{t_0}^{t_{end}} dt' \\int_{t_0}^{t_{end}} dt \\xi(t,t') w_{\\mathrm{i}}^\\dagger(t)w_{\\mathrm{j}}^\\dagger(t') |\\emptyset \\rangle``. -- ξ given as a function should follow `ξ(times[l],times[m],args...)`. -- `times`: A vector or range of length(times) = b.nsteps. +- ξ given as a function should follow `ξ(t1,t2,args...)` where `t1` and `t2` are the input times. - `args...`: additional arguments to be passed to ξ. - `norm::Bool=true`: normalize the resulting wavepacket. """ -function twophoton(b::WaveguideBasis{T,Nw},i::Int,j::Int,ξ::Function,times,args...;norm=true) where {T,Nw} +function twophoton(b::WaveguideBasis{T,Nw},i::Int,j::Int,ξ::Function,args...;norm=true) where {T,Nw} state = Ket(b) nsteps = get_nsteps(b) viewed_data = TwoPhotonView(state,i,j) for l in 1:nsteps for m in 1:nsteps - viewed_data[l,m] = ξ(times[l],times[m],args...) + viewed_data[l,m] = ξ((l-1)*b.dt,(m-1)*b.dt,args...)*b.dt end end if norm @@ -709,7 +705,7 @@ function twophoton(b::WaveguideBasis{T,Nw},i::Int,j::Int,ξ::Matrix;norm=true) w viewed_data = TwoPhotonView(state,i,j) for l in 1:nsteps for m in 1:nsteps - viewed_data[l,m] = ξ[l,m] + viewed_data[l,m] = ξ[l,m]*b.dt end end if norm @@ -780,6 +776,27 @@ function get_nsteps(basis::CompositeBasis) end end +""" + get_dt(basis::WaveguideBasis) + get_dt(basis::Basis) + get_dt(basis::CompositeBasis) + +Return nsteps of [`WaveguideBasis`](@ref) given either a [`WaveguideBasis`](@ref) or a `CompositeBasis` containing a [`WaveguideBasis`](@ref) +""" +function get_dt(basis::WaveguideBasis) + basis.dt +end +function get_dt(basis::Basis) + 0 +end +function get_dt(basis::CompositeBasis) + for b in basis.bases + if get_dt(b) != 0 + return get_dt(b) + end + end +end + """ get_number_of_waveguides(basis::WaveguideBasis) get_number_of_waveguides(basis::Basis) diff --git a/src/detection.jl b/src/detection.jl index 2f39d04..facfe98 100644 --- a/src/detection.jl +++ b/src/detection.jl @@ -134,12 +134,12 @@ set_waveguidetimeindex!(detector::Detector,index) = set_waveguidetimeindex!(dete function mul!(result::LazyTensorKet{B},detector::Detector{B},input::LazyTensorKet{B},alpha,beta) where {B} for i in eachindex(detector.operators) - mul!(result.kets[i],detector.operators[i],input.kets[i],alpha,beta) + mul!(result.kets[i],detector.operators[i],input.factor*input.kets[i],alpha,beta) end end function mul!(result::LazySumKet{B,F},detector::Detector{B},input::LazySumKet{B,F},alpha,beta) where {B,F} for i in eachindex(result.kets) - mul!(result.kets[i],detector,input.kets[i],alpha,beta) + mul!(result.kets[i],detector,input.kets[i],input.factors[i]*alpha,beta) end end function get_waveguide_operators(x::Detector) diff --git a/src/plotting.jl b/src/plotting.jl index 88513f5..fca9b7f 100644 --- a/src/plotting.jl +++ b/src/plotting.jl @@ -1,8 +1,8 @@ """ - plot_twophoton!(ax,twophotonstate::TwophotonView,times) - plot_twophoton!(ax,twophotonstate::TwoWaveguideView,times) - plot_twophoton!(ax,state::Ket,times) - plot_twophoton!(ax,twophotonstate,times) + plot_twophoton!(ax,twophotonstate::TwophotonView,times;kwargs...) + plot_twophoton!(ax,twophotonstate::TwoWaveguideView,times;kwargs...) + plot_twophoton!(ax,state::Ket,times;kwargs...) + plot_twophoton!(ax,twophotonstate,times;kwargs...) Plots the twophoton state in the given ax. # Arguments @@ -12,41 +12,41 @@ Plots the twophoton state in the given ax. #Return ax.contour object with the plotted state. """ -function plot_twophoton!(ax,twophotonstate::TwoPhotonView,times) +function plot_twophoton!(ax,twophotonstate::TwoPhotonView,times;kwargs...) xgrid = repeat(times',length(times),1) ygrid = repeat(times,1,length(times)) - cnt1= ax.contourf(xgrid,ygrid,abs.(twophotonstate).^2,100) + cnt1= ax.contourf(xgrid,ygrid,abs.(twophotonstate).^2,100;kwargs...) for c in cnt1.collections c.set_edgecolor("face") end ax.set_aspect("equal", "box") cnt1 end -function plot_twophoton!(ax,twophotonstate::TwoWaveguideView,times) +function plot_twophoton!(ax,twophotonstate::TwoWaveguideView,times;kwargs...) xgrid = repeat(times',length(times),1) ygrid = repeat(times,1,length(times)) - cnt1= ax.contourf(xgrid,ygrid,abs.(twophotonstate).^2,100) + cnt1= ax.contourf(xgrid,ygrid,abs.(twophotonstate).^2,100;kwargs...) for c in cnt1.collections c.set_edgecolor("face") end ax.set_aspect("equal", "box") cnt1 end -function plot_twophoton!(ax,state::Ket,times) +function plot_twophoton!(ax,state::Ket,times;kwargs...) twophotonstate = TwoPhotonView(state) xgrid = repeat(times',length(times),1) ygrid = repeat(times,1,length(times)) - cnt1= ax.contourf(xgrid,ygrid,abs.(twophotonstate).^2,100) + cnt1= ax.contourf(xgrid,ygrid,abs.(twophotonstate).^2,100;kwargs...) for c in cnt1.collections c.set_edgecolor("face") end ax.set_aspect("equal", "box") cnt1 end -function plot_twophoton!(ax,twophotonstate,times) +function plot_twophoton!(ax,twophotonstate,times;kwargs...) xgrid = repeat(times',length(times),1) ygrid = repeat(times,1,length(times)) - cnt1= ax.contourf(xgrid,ygrid,abs.(twophotonstate).^2,100) + cnt1= ax.contourf(xgrid,ygrid,abs.(twophotonstate).^2,100;kwargs...) for c in cnt1.collections c.set_edgecolor("face") end diff --git a/src/precompile.jl b/src/precompile.jl index 6a76831..6687197 100644 --- a/src/precompile.jl +++ b/src/precompile.jl @@ -22,6 +22,7 @@ function _precompile_() ξvec = ξfun.(times,1,5) ψ_cw = onephoton(bw,ξvec) + ψ_cw = onephoton(bw,ξfun,1,5) psi = fockstate(bc,0) ⊗ ψ_cw #Run solvers. @@ -67,15 +68,10 @@ function apply_all_op(oplist) end end -using SnoopPrecompile +using PrecompileTools -# precompilation causes allocation performance bugs for v"1.8" && @precompile_setup begin - # Putting some things in `setup` can reduce the size of the - # precompile file and potentially make loading faster. - @precompile_all_calls begin - # all calls in this block will be precompiled, regardless of whether - # they belong to your package or not (on Julia 1.8 and higher) +@setup_workload begin + @compile_workload begin _precompile_() end end \ No newline at end of file diff --git a/src/should_upstream.jl b/src/should_upstream.jl index a8c485a..9b4b949 100644 --- a/src/should_upstream.jl +++ b/src/should_upstream.jl @@ -67,16 +67,12 @@ end function QuantumOpticsBase.:⊗(a::Operator,b::LazyProduct) - btotal_l = a.basis_l ⊗ b.basis_l - btotal_r = a.basis_r ⊗ b.basis_r - ops = ([a ⊗ op op in b.operators]...,) - LazyProduct(btotal_l,btotal_r,b.factor,ops) + ops = ([a ⊗ op for op in b.operators]...,) + LazyProduct(ops,b.factor) end function QuantumOpticsBase.:⊗(a::LazyProduct,b::Operator) - btotal_l = a.basis_l ⊗ b.basis_l - btotal_r = a.basis_r ⊗ b.basis_r - ops = ([op ⊗ b op in a.operators]...,) - LazyProduct(btotal_l,btotal_r,a.factor,ops) + ops = ([op ⊗ b for op in a.operators]...,) + LazyProduct(ops,a.factor) end function QuantumOpticsBase.:⊗(a::AbstractOperator,b::LazyTensor) diff --git a/src/solver.jl b/src/solver.jl index 51b389e..a1ea99f 100644 --- a/src/solver.jl +++ b/src/solver.jl @@ -23,26 +23,29 @@ Integrate time-dependent Schroedinger equation to evolve states or compute propa """ function waveguide_evolution(times,psi,H;fout=nothing) ops = get_waveguide_operators(H) - dt = times[2] - times[1] - tend = times[end] - nsteps = length(times) + dt = get_dt(H.basis_l) + nsteps = get_nsteps(H.basis_l) + #Note that dt is added to the last input time to ensure that + tend = min(times[end],(nsteps)*dt)+dt + times_sim = 0:dt:tend + function get_hamiltonian(time,psi) - tidx = min(round(Int,time/dt,RoundUp)+1,nsteps) + tidx = min(round(Int,time/dt,RoundDown) + 1,nsteps) set_waveguidetimeindex!(ops,tidx) return H end function eval_last_element(time,psi) - if time == tend + if time >= tend return psi else return 0 end end if fout === nothing - tout, ψ = timeevolution.schroedinger_dynamic(times, psi, get_hamiltonian,fout=eval_last_element) + tout, ψ = timeevolution.schroedinger_dynamic(times_sim, psi, get_hamiltonian,fout=eval_last_element;d_discontinuities=times_sim) return ψ[end] elseif fout == 1 - tout, ψ = timeevolution.schroedinger_dynamic(times, psi, get_hamiltonian) + tout, ψ = timeevolution.schroedinger_dynamic(times_sim, psi, get_hamiltonian;d_discontinuities=times_sim) return ψ else function feval(time,psi) @@ -52,8 +55,8 @@ function waveguide_evolution(times,psi,H;fout=nothing) return (0,fout(time,psi)...) end end - tout, ψ = timeevolution.schroedinger_dynamic(times, psi, get_hamiltonian,fout=feval) - return (ψ[end][1], [[ψ[i][j] for i in 1:length(times)] for j in 2:length(ψ[1])]...) + tout, ψ = timeevolution.schroedinger_dynamic(times_sim, psi, get_hamiltonian,fout=feval;d_discontinuities=times_sim) + return (ψ[end][1], [[ψ[i][j] for i in 1:length(times_sim)-1] for j in 2:length(ψ[1])]...) end end diff --git a/test/helper_functions.jl b/test/helper_functions.jl index a012c28..9ff153d 100644 --- a/test/helper_functions.jl +++ b/test/helper_functions.jl @@ -140,7 +140,9 @@ function test_multiplewaveguides(b,Nw,idx,order,wda1,adw1) ξfun(t1) = 1 psi = tensor([i == bw_idx ? onephoton(b.bases[i],idx,ξfun,times) : i==bc_idx ? fockstate(b.bases[i],1) : fockstate(b.bases[i],0) for i in 1:3]...) tmp = copy(psi) + tmp2 = copy(psi) + testvec1 = ones(nsteps) .* 1/sqrt(get_nsteps(psi.basis)) @@ -155,8 +157,8 @@ function test_multiplewaveguides(b,Nw,idx,order,wda1,adw1) return false end - mul!(tmp,adw1,tmp,1,0) - one = OnePhotonView(tmp,idx,first_idx) + mul!(tmp2,adw1,tmp,1,0) + one = OnePhotonView(tmp2,idx,first_idx) if !isapprox(one,testvec2) return false end From 352113164c893f83708ca9578da80194a667da07 Mon Sep 17 00:00:00 2001 From: mabuni1998 Date: Fri, 26 May 2023 00:06:15 -0400 Subject: [PATCH 2/5] Added refferences to suggested reading --- Manifest.toml | 14 +- Project.toml | 3 +- docs/src/index.md | 13 - docs/src/references.bib | 65 ++ docs/src/references.md | 16 +- src/CavityWaveguideOperator.jl | 28 +- test/Manifest.toml | 1335 ++++++++++++++++++++++++++++++++ test/helper_functions.jl | 8 +- test/test_detection_double.jl | 8 +- test/test_detection_single.jl | 4 +- test/test_operators.jl | 8 +- 11 files changed, 1446 insertions(+), 56 deletions(-) create mode 100644 test/Manifest.toml diff --git a/Manifest.toml b/Manifest.toml index 9a2c712..ce8bb54 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -2,7 +2,7 @@ julia_version = "1.9.0" manifest_format = "2.0" -project_hash = "4a1d97bef8afef670719ac1ef9afa5593983a635" +project_hash = "223688a101f8a9d7186d2b2c1de1b4a7a04b14df" [[deps.AbstractFFTs]] deps = ["LinearAlgebra"] @@ -1040,10 +1040,16 @@ uuid = "7792a7ef-975c-4747-a70f-980b88e8d1da" version = "0.4.7" [[deps.Strided]] -deps = ["LinearAlgebra", "TupleTools"] -git-tree-sha1 = "a7a664c91104329c88222aa20264e1a05b6ad138" +deps = ["LinearAlgebra", "StridedViews", "TupleTools"] +git-tree-sha1 = "b32eadf6ac726a790567fdc872b63117712e16a8" uuid = "5e0ebb24-38b0-5f93-81fe-25c709ecae67" -version = "1.2.3" +version = "2.0.1" + +[[deps.StridedViews]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "59cc024139c20d1ed8400c419c6fe608637d583d" +uuid = "4db3bf67-4bd7-4b4e-b153-31dc3fb37143" +version = "0.1.2" [[deps.SuiteSparse]] deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] diff --git a/Project.toml b/Project.toml index 6638a9e..eaa92ff 100644 --- a/Project.toml +++ b/Project.toml @@ -15,8 +15,9 @@ UnsafeArrays = "c4a57d5a-5b31-53a6-b365-19f8c011fbd6" [compat] Parameters = "0.12" +PrecompileTools = "1" QuantumOptics = "1" QuantumOpticsBase = "0.3.9" -Strided = "1.2" +Strided = "1,2" UnsafeArrays = "1" julia = "1.8" diff --git a/docs/src/index.md b/docs/src/index.md index 4525218..9fb8ac7 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -2,19 +2,6 @@ WaveguideQED.jl is a package for simulating continuous fockstates in waveguides. It expands on [`QuantumOptics.jl`](https://qojulia.org/) by adding a custom basis, operators, and routines for doing detection. -## Suggested readings - -The following is a list of relevant papers that provide background to the numerical method implemented in the repository. -* Heuck, M., Jacobs, K.,&; Englund, D. R. (2020). Photon-photon interactions in dynamically coupled cavities. *Physical Review A*, *101*(4). https://doi.org/10.1103/PhysRevA.101.042322 -* Heuck, M., Jacobs, K., &; Englund, D. R. (2020). Controlled-Phase Gate Using Dynamically Coupled Cavities and Optical Nonlinearities. *Physical Review Letters*, *124*(16). https://doi.org/10.1103/PhysRevLett.124.160501 -* Krastanov, S., Jacobs, K., Gilbert, G., Englund, D. R., &; Heuck, M. (2022). Controlled-phase gate by dynamic coupling of photons to a two-level emitter. *Npj Quantum Information*, *8*(1), 103. https://doi.org/10.1038/s41534-022-00604-5 - -The following papers attack similar types of problems that can be solved with `WaveguideQED.jl` and serve as additional context. -* Kiilerich, A. H., &; Mølmer, K. (2019). Input-Output Theory with Quantum Pulses. *Physical Review Letters*, *123*(12), 123604. https://doi.org/10.1103/PhysRevLett.123.123604 -* Kiilerich, A. H., &; Mølmer, K. (2020). Quantum interactions with pulses of radiation. *Physical Review A*, *102*(2), 023717. https://doi.org/10.1103/PhysRevA.102.023717 -* Arranz Regidor, S., Crowder, G., Carmichael, H., &; Hughes, S. (2021). Modeling quantum light-matter interactions in waveguide QED with retardation, nonlinear interactions, and a time-delayed feedback: Matrix product states versus a space-discretized waveguide model. *Physical Review Research*, *3*(2). https://doi.org/10.1103/PhysRevResearch.3.023030 - - ## Dev docs Added functionalities: * [`WaveguideBasis`](@ref) for representing the waveguide space and the related generator functions: [`zerophoton`](@ref), [`onephoton`](@ref), and [`twophoton`](@ref). Also see [`OnePhotonView`](@ref), [`TwoPhotonView`](@ref), and [`plot_twophoton!`](@ref) for viewing the waveguide data for plotting. Note that [`WaveguideBasis`](@ref) can contain multiple waveguides. diff --git a/docs/src/references.bib b/docs/src/references.bib index 9a10ad9..27a63d3 100644 --- a/docs/src/references.bib +++ b/docs/src/references.bib @@ -27,6 +27,71 @@ @article{Heuck2020Photon-photonCavities arxivId = {1905.02134} } +@article{Heuck2020, + abstract = {We show that relatively simple integrated photonic circuits have the potential to realize a high fidelity deterministic controlled-phase gate between photonic qubits using bulk optical nonlinearities. The gate is enabled by converting travelling continuous-mode photons into stationary cavity modes using strong classical control fields that dynamically change the effective cavity-waveguide coupling rate. This architecture succeeds because it reduces the wave packet distortions that otherwise accompany the action of optical nonlinearities [J. Shapiro, Phys. Rev. A 73, 062305 (2006)PLRAAN1050-294710.1103/PhysRevA.73.062305; J. Gea-Banacloche, Phys. Rev. A 81, 043823 (2010)PLRAAN1050-294710.1103/PhysRevA.81.043823]. We show that high-fidelity gates can be achieved with self-phase modulation in χ(3) materials as well as second-harmonic generation in χ(2) materials. The gate fidelity asymptotically approaches unity with increasing storage time for an incident photon wave packet with fixed duration. We also show that dynamically coupled cavities enable a trade-off between errors due to loss and wave packet distortion. Our proposed architecture represents a new approach to practical implementation of quantum gates that is roomerature compatible and only relies on components that have been individually demonstrated.}, + author = {Mikkel Heuck and Kurt Jacobs and Dirk R. Englund}, + doi = {10.1103/PhysRevLett.124.160501}, + issn = {10797114}, + issue = {16}, + journal = {Physical Review Letters}, + month = {4}, + pmid = {32383940}, + publisher = {American Physical Society}, + title = {Controlled-Phase Gate Using Dynamically Coupled Cavities and Optical Nonlinearities}, + volume = {124}, + year = {2020}, +} + +@article{Krastanov2022, + abstract = {

We propose an architecture for achieving high-fidelity deterministic quantum logic gates on dual-rail encoded photonic qubits by letting photons interact with a two-level emitter (TLE) inside an optical cavity. The photon wave packets that define the qubit are preserved after the interaction due to a quantum control process that actively loads and unloads the photons from the cavity and dynamically alters their effective coupling to the TLE. The controls rely on nonlinear wave mixing between cavity modes enhanced by strong externally modulated electromagnetic fields or on AC Stark shifts of the TLE transition energy. We numerically investigate the effect of imperfections in terms of loss and dephasing of the TLE as well as control field miscalibration. Our results suggest that III-V quantum dots in GaAs membranes is a promising platform for photonic quantum information processing.

}, + author = {Stefan Krastanov and Kurt Jacobs and Gerald Gilbert and Dirk R. Englund and Mikkel Heuck}, + doi = {10.1038/s41534-022-00604-5}, + issn = {2056-6387}, + issue = {1}, + journal = {npj Quantum Information}, + month = {9}, + pages = {103}, + title = {Controlled-phase gate by dynamic coupling of photons to a two-level emitter}, + volume = {8}, + url = {https://www.nature.com/articles/s41534-022-00604-5}, + year = {2022}, +} + +@article{Ciccarello2018, + abstract = {Quantum collision models (CMs) provide advantageous case studies for investigating major issues in open quantum systems theory, and especially quantum non-Markovianity. After reviewing their general definition and distinctive features, we illustrate the emergence of a CM in a familiar quantum optics scenario. This task is carried out by highlighting the close connection between the well-known input-output formalism and CMs. Within this quantum optics framework, usual assumptions in the CMs’ literature - such as considering a bath of noninteracting yet initially correlated ancillas - have a clear physical origin.}, + author = {Francesco Ciccarello}, + doi = {10.1515/qmetro-2017-0007}, + issue = {1}, + journal = {Quantum Measurements and Quantum Metrology}, + month = {1}, + publisher = {Portico}, + title = {Collision models in quantum optics}, + volume = {4}, + year = {2018}, +} + +@article{HughesWQEDMPP2021, + abstract = {We present two different methods for modeling non-Markovian quantum light-matter interactions in waveguide QED systems, using matrix product states (MPSs) and a space-discretized waveguide (SDW) model. After describing the general theory and implementation of both approaches, we compare and contrast these methods directly on three topical problems of interest in waveguide-QED, including (i) a two-level system (TLS) coupled to an infinite (one-dimensional) waveguide, (ii) a TLS coupled to a terminated waveguide with a time-delayed coherent feedback, and (iii) two spatially separated TLSs coupled within an infinite waveguide. Both approaches are shown to efficiently describe multiphoton nonlinear dynamics in highly non-Markovian regimes, and we highlight the advantages and disadvantages of these methods for modeling waveguide QED interactions, including their implementation in python, computational run times, and ease of conceptual understanding. We explore both vacuum dynamics as well as regimes of strong optical pumping, where a weak excitation approximation cannot be applied. The MPS approach scales better when modeling multiphoton dynamics and long delay times and explicitly includes non-Markovian memory effects. In contrast, the SDW model accounts for non-Markovian effects through space discretization and solves Markovian equations of motion, yet rigorously includes the effects of retardation. The SDW model, based on an extension of recent collisional pictures in quantum optics, is solved through quantum trajectory techniques and can more easily add in additional dissipation processes, including off-chip decay and TLS pure dephasing. The impact of these processes is shown directly on feedback-induced population trapping and TLS entanglement between spatially separated TLSs.}, + author = {Sofia Arranz Regidor and Gavin Crowder and Howard Carmichael and Stephen Hughes}, + doi = {10.1103/PhysRevResearch.3.023030}, + issn = {2643-1564}, + issue = {2}, + journal = {Physical Review Research}, + month = {4}, + pages = {023030}, + publisher = {American Physical Society}, + title = {Modeling quantum light-matter interactions in waveguide QED with retardation, nonlinear interactions, and a time-delayed feedback: Matrix product states versus a space-discretized waveguide model}, + volume = {3}, + url = {https://link.aps.org/doi/10.1103/PhysRevResearch.3.023030}, + year = {2021}, +} + + + + + + + @book{Gerry2004, author = {Christopher Gerry and Peter Knight}, doi = {10.1017/CBO9780511791239}, diff --git a/docs/src/references.md b/docs/src/references.md index 78f29bc..9b5d992 100644 --- a/docs/src/references.md +++ b/docs/src/references.md @@ -1,4 +1,18 @@ -# References +# Suggested readings and references + +## Theory and background +The theory of time-bin continuous fockstates is introduced in [Heuck2020Photon-photonCavities](@cite) where it is used to derive the equations of motion for Waveguide QED systems. The numerical method in this library is heavily based on this approach, where instead of deriving the equations, the systems are solved by applying the operators themselves. The time-bin method is also used in [Heuck2020](@cite) and [Krastanov2022](@cite). + +## Similar or other approaches + +The following is a list of approaches or methods that are trying to solve similar problems that can be treated with this library. +* [HughesWQEDMPP2021](@cite) considers feedback in waveguide systems and uses a space-discretized waveguide picture with Monte Carlo trajectories +* [Fischer2018](@cite) relates many approaches to solving WaveguideQED problems with each other and also introduces a framework that aims to deal with similar problems through master equations, photon counting and tracing. +* The SLH formalism introduced in [Kielerich2019](@cite) and [Kielerich2020](@cite) uses cascaded cavities to simulate quantum pulses. Further work also includes: [Yang2022](@cite) [Christiansen2023](@cite) + +## Papers where we reproduce results from +* The theoretical results in [DynamicalPhotonLodahl2022](@cite) are reproduced in [Scattering on a two-level system](https://qojulia.github.io/WaveguideQED.jl/dev/example_lodahl/) + ```@bibliography ``` diff --git a/src/CavityWaveguideOperator.jl b/src/CavityWaveguideOperator.jl index 1fa7571..368f68b 100644 --- a/src/CavityWaveguideOperator.jl +++ b/src/CavityWaveguideOperator.jl @@ -3,6 +3,7 @@ Abstract type used for operators on acting on a combined [`WaveguideBasis`](@ref """ abstract type CavityWaveguideOperator{BL,BR} <: AbstractOperator{BL,BR} end +#TO DO: CLEAN UP #Indexing structure used to loop over state. Needs cleanup and can possible be removed with the addition of eachslice(a,dims=(1,3,...)) in julia 1.9 struct WaveguideIndexing{N} ndims::Int @@ -17,8 +18,6 @@ struct WaveguideIndexing{N} new{length(iter)}(length(strides),k_idx,end_idx,strides,idx_vec1,idx_vec2,range_idx,iter) end end - - function WaveguideIndexing(b::Basis,loc) dims = b.shape alldims = [1:length(dims)...] @@ -414,14 +413,14 @@ function tensor(a::Operator,b::T) where {T<:WaveguideOperator} end - +#TO DO: CLEAN UP +#Currently indexing is very complicated using the CavityIndexing structure and could possible be done smoother and faster. """ mul!(result::Ket{B1}, a::CavityWaveguideEmission, b::Ket{B2}, alpha, beta) where {B1<:Basis,B2<:Basis} mul!(result::Ket{B1}, a::CavityWaveguideAbsorption, b::Ket{B2}, alpha, beta) where {B1<:Basis,B2<:Basis} Fast in-place multiplication of operators/state vectors. Updates `result` as `result = alpha*a*b + beta*result`. `a` is a [`CavityWaveguideOperator`](@ref). """ - function mul!(result::Ket{B1}, a::CavityWaveguideEmission, b::Ket{B2}, alpha, beta) where {B1<:Basis,B2<:Basis} dims = basis(result).shape i,j = a.loc[1],a.loc[2] @@ -431,15 +430,7 @@ function mul!(result::Ket{B1}, a::CavityWaveguideEmission, b::Ket{B2}, alpha, be beta1 = one(beta) end if length(dims) == 2 - loop_destroy_ax!(result.data,a,b.data,alpha,beta1,a.indexing) - #= - a.indexing.idx_vec1[j] = dims[j] - li1 = linear_index(a.indexing.ndims,a.indexing.idx_vec1,a.indexing.strides) - if iszero(beta) - fill!(view(result.data,li1:a.indexing.strides[a.loc[1]]:li1+(a.indexing.end_idx-1)*a.indexing.strides[a.loc[1]]),beta) - elseif !isone(beta) - rmul!(view(result.data,li1:a.indexing.strides[a.loc[1]]:li1+(a.indexing.end_idx-1)*a.indexing.strides[a.loc[1]]),beta) - end=# + loop_destroy_ax!(result.data,a,b.data,alpha,beta1,a.indexing) elseif length(dims) == 3 loop_destroy_third_axis!(result.data,a,b.data,alpha,beta1,a.indexing,1) a.indexing.idx_vec1[j] = dims[j] @@ -460,19 +451,10 @@ function mul!(result::Ket{B1}, a::CavityWaveguideAbsorption, b::Ket{B2}, alpha, beta1 = one(beta) end if length(dims) == 2 - loop_create_ax!(result.data,a,b.data,alpha,beta1,a.indexing) - #= - a.indexing.idx_vec1[j] = 1 - li1 = linear_index(a.indexing.ndims,a.indexing.idx_vec1,a.indexing.strides) - if iszero(beta) - fill!(view(result.data,li1:a.indexing.strides[a.loc[1]]:li1+(a.indexing.end_idx-1)*a.indexing.strides[a.loc[1]]),beta) - elseif !isone(beta) - rmul!(view(result.data,li1:a.indexing.strides[a.loc[1]]:li1+(a.indexing.end_idx-1)*a.indexing.strides[a.loc[1]]),beta) - end=# + loop_create_ax!(result.data,a,b.data,alpha,beta1,a.indexing) elseif length(dims) == 3 loop_create_third_axis!(result.data,a,b.data,alpha,beta1,a.indexing,1) a.indexing.idx_vec1[j] = 1 - #loop_rmul_axis!(result.data,a,b.data,alpha,beta,a.indexing,1) else iterate_over_iter!(result.data,a,b.data,alpha,beta1,a.indexing,1,loop_create_third_axis!) a.indexing.idx_vec1[j] = 1 diff --git a/test/Manifest.toml b/test/Manifest.toml new file mode 100644 index 0000000..727ef09 --- /dev/null +++ b/test/Manifest.toml @@ -0,0 +1,1335 @@ +# This file is machine-generated - editing it directly is not advised + +julia_version = "1.9.0" +manifest_format = "2.0" +project_hash = "c3b9a79e67e2bd65c8f292a001a2c7ae4daba5e5" + +[[deps.ADTypes]] +git-tree-sha1 = "dcfdf328328f2645531c4ddebf841228aef74130" +uuid = "47edcb42-4c32-4615-8424-f2b9edc5f35b" +version = "0.1.3" + +[[deps.ANSIColoredPrinters]] +git-tree-sha1 = "574baf8110975760d391c710b6341da1afa48d8c" +uuid = "a4c015fc-c6ff-483c-b24f-f7ea428134e9" +version = "0.0.1" + +[[deps.AbstractFFTs]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "16b6dbc4cf7caee4e1e75c49485ec67b667098a0" +uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" +version = "1.3.1" +weakdeps = ["ChainRulesCore"] + + [deps.AbstractFFTs.extensions] + AbstractFFTsChainRulesCoreExt = "ChainRulesCore" + +[[deps.Adapt]] +deps = ["LinearAlgebra", "Requires"] +git-tree-sha1 = "76289dc51920fdc6e0013c872ba9551d54961c24" +uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" +version = "3.6.2" +weakdeps = ["StaticArrays"] + + [deps.Adapt.extensions] + AdaptStaticArraysExt = "StaticArrays" + +[[deps.Aqua]] +deps = ["Compat", "Pkg", "Test"] +git-tree-sha1 = "337075e61bde7ba9d6e7322ab1d58c9362b297ea" +uuid = "4c88cf16-eb10-579e-8560-4a9242c79595" +version = "0.6.1" + +[[deps.ArgTools]] +uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" +version = "1.1.1" + +[[deps.ArnoldiMethod]] +deps = ["LinearAlgebra", "Random", "StaticArrays"] +git-tree-sha1 = "62e51b39331de8911e4a7ff6f5aaf38a5f4cc0ae" +uuid = "ec485272-7323-5ecc-a04f-4719b315124d" +version = "0.2.0" + +[[deps.Arpack]] +deps = ["Arpack_jll", "Libdl", "LinearAlgebra", "Logging"] +git-tree-sha1 = "91ca22c4b8437da89b030f08d71db55a379ce958" +uuid = "7d9fca2a-8960-54d3-9f78-7d1dccf2cb97" +version = "0.5.3" + +[[deps.Arpack_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "OpenBLAS_jll", "Pkg"] +git-tree-sha1 = "5ba6c757e8feccf03a1554dfaf3e26b3cfc7fd5e" +uuid = "68821587-b530-5797-8361-c406ea357684" +version = "3.5.1+1" + +[[deps.ArrayInterface]] +deps = ["Adapt", "LinearAlgebra", "Requires", "SparseArrays", "SuiteSparse"] +git-tree-sha1 = "917286faa2abb288796e75b88ca67edc016f3219" +uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" +version = "7.4.5" + + [deps.ArrayInterface.extensions] + ArrayInterfaceBandedMatricesExt = "BandedMatrices" + ArrayInterfaceBlockBandedMatricesExt = "BlockBandedMatrices" + ArrayInterfaceCUDAExt = "CUDA" + ArrayInterfaceGPUArraysCoreExt = "GPUArraysCore" + ArrayInterfaceStaticArraysCoreExt = "StaticArraysCore" + ArrayInterfaceTrackerExt = "Tracker" + + [deps.ArrayInterface.weakdeps] + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" + StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + +[[deps.ArrayInterfaceCore]] +deps = ["LinearAlgebra", "SnoopPrecompile", "SparseArrays", "SuiteSparse"] +git-tree-sha1 = "e5f08b5689b1aad068e01751889f2f615c7db36d" +uuid = "30b0a656-2188-435a-8636-2ec0e6a096e2" +version = "0.1.29" + +[[deps.ArrayLayouts]] +deps = ["FillArrays", "LinearAlgebra", "SparseArrays"] +git-tree-sha1 = "4aff5fa660eb95c2e0deb6bcdabe4d9a96bc4667" +uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" +version = "0.8.18" + +[[deps.Artifacts]] +uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" + +[[deps.BandedMatrices]] +deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra", "SnoopPrecompile", "SparseArrays"] +git-tree-sha1 = "6ef8fc1d77b60f41041d59ce61ef9eb41ed97a83" +uuid = "aae01518-5342-5314-be14-df237901396f" +version = "0.17.18" + +[[deps.Base64]] +uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" + +[[deps.BitTwiddlingConvenienceFunctions]] +deps = ["Static"] +git-tree-sha1 = "0c5f81f47bbbcf4aea7b2959135713459170798b" +uuid = "62783981-4cbd-42fc-bca8-16325de8dc4b" +version = "0.1.5" + +[[deps.BoundaryValueDiffEq]] +deps = ["BandedMatrices", "DiffEqBase", "FiniteDiff", "ForwardDiff", "LinearAlgebra", "NLsolve", "Reexport", "SciMLBase", "SparseArrays"] +git-tree-sha1 = "ed8e837bfb3d1e3157022c9636ec1c722b637318" +uuid = "764a87c0-6b3e-53db-9096-fe964310641d" +version = "2.11.0" + +[[deps.CEnum]] +git-tree-sha1 = "eb4cb44a499229b3b8426dcfb5dd85333951ff90" +uuid = "fa961155-64e5-5f13-b03f-caf6b980ea82" +version = "0.4.2" + +[[deps.CPUSummary]] +deps = ["CpuId", "IfElse", "Static"] +git-tree-sha1 = "2c144ddb46b552f72d7eafe7cc2f50746e41ea21" +uuid = "2a0fbf3d-bb9c-48f3-b0a9-814d99fd7ab9" +version = "0.2.2" + +[[deps.Calculus]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "f641eb0a4f00c343bbc32346e1217b86f3ce9dad" +uuid = "49dc2e85-a5d0-5ad3-a950-438e2897f1b9" +version = "0.5.1" + +[[deps.ChainRulesCore]] +deps = ["Compat", "LinearAlgebra", "SparseArrays"] +git-tree-sha1 = "e30f2f4e20f7f186dc36529910beaedc60cfa644" +uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" +version = "1.16.0" + +[[deps.CloseOpenIntervals]] +deps = ["Static", "StaticArrayInterface"] +git-tree-sha1 = "70232f82ffaab9dc52585e0dd043b5e0c6b714f1" +uuid = "fb6a15b2-703c-40df-9091-08a04967cfa9" +version = "0.1.12" + +[[deps.CodeTracking]] +deps = ["InteractiveUtils", "UUIDs"] +git-tree-sha1 = "d730914ef30a06732bdd9f763f6cc32e92ffbff1" +uuid = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2" +version = "1.3.1" + +[[deps.CommonSolve]] +git-tree-sha1 = "9441451ee712d1aec22edad62db1a9af3dc8d852" +uuid = "38540f10-b2f7-11e9-35d8-d573e4eb0ff2" +version = "0.2.3" + +[[deps.CommonSubexpressions]] +deps = ["MacroTools", "Test"] +git-tree-sha1 = "7b8a93dba8af7e3b42fecabf646260105ac373f7" +uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" +version = "0.3.0" + +[[deps.Compat]] +deps = ["UUIDs"] +git-tree-sha1 = "7a60c856b9fa189eb34f5f8a6f6b5529b7942957" +uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" +version = "4.6.1" +weakdeps = ["Dates", "LinearAlgebra"] + + [deps.Compat.extensions] + CompatLinearAlgebraExt = "LinearAlgebra" + +[[deps.CompilerSupportLibraries_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" +version = "1.0.2+0" + +[[deps.ConstructionBase]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "738fec4d684a9a6ee9598a8bfee305b26831f28c" +uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" +version = "1.5.2" + + [deps.ConstructionBase.extensions] + ConstructionBaseIntervalSetsExt = "IntervalSets" + ConstructionBaseStaticArraysExt = "StaticArrays" + + [deps.ConstructionBase.weakdeps] + IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + +[[deps.CpuId]] +deps = ["Markdown"] +git-tree-sha1 = "fcbb72b032692610bfbdb15018ac16a36cf2e406" +uuid = "adafc99b-e345-5852-983c-f28acb93d879" +version = "0.3.1" + +[[deps.DataAPI]] +git-tree-sha1 = "8da84edb865b0b5b0100c0666a9bc9a0b71c553c" +uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" +version = "1.15.0" + +[[deps.DataStructures]] +deps = ["Compat", "InteractiveUtils", "OrderedCollections"] +git-tree-sha1 = "d1fff3a548102f48987a52a2e0d114fa97d730f0" +uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" +version = "0.18.13" + +[[deps.DataValueInterfaces]] +git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" +uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464" +version = "1.0.0" + +[[deps.Dates]] +deps = ["Printf"] +uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" + +[[deps.DelayDiffEq]] +deps = ["ArrayInterface", "DataStructures", "DiffEqBase", "LinearAlgebra", "Logging", "OrdinaryDiffEq", "Printf", "RecursiveArrayTools", "Reexport", "SciMLBase", "SimpleNonlinearSolve", "SimpleUnPack"] +git-tree-sha1 = "89f3fbfe78f9d116d1ed0721d65b0b2cf9b36169" +uuid = "bcd4f6db-9728-5f36-b5f7-82caef46ccdb" +version = "5.42.0" + +[[deps.DiffEqBase]] +deps = ["ArrayInterface", "ChainRulesCore", "DataStructures", "DocStringExtensions", "EnumX", "FastBroadcast", "ForwardDiff", "FunctionWrappers", "FunctionWrappersWrappers", "LinearAlgebra", "Logging", "Markdown", "MuladdMacro", "Parameters", "PreallocationTools", "Printf", "RecursiveArrayTools", "Reexport", "Requires", "SciMLBase", "SciMLOperators", "Setfield", "SparseArrays", "Static", "StaticArraysCore", "Statistics", "Tricks", "TruncatedStacktraces", "ZygoteRules"] +git-tree-sha1 = "1c03e389a28be70cd9049f98ff0b84cf7539d959" +uuid = "2b5f629d-d688-5b77-993f-72d75c75574e" +version = "6.125.0" + + [deps.DiffEqBase.extensions] + DiffEqBaseDistributionsExt = "Distributions" + DiffEqBaseGeneralizedGeneratedExt = "GeneralizedGenerated" + DiffEqBaseMPIExt = "MPI" + DiffEqBaseMeasurementsExt = "Measurements" + DiffEqBaseMonteCarloMeasurementsExt = "MonteCarloMeasurements" + DiffEqBaseReverseDiffExt = "ReverseDiff" + DiffEqBaseTrackerExt = "Tracker" + DiffEqBaseUnitfulExt = "Unitful" + DiffEqBaseZygoteExt = "Zygote" + + [deps.DiffEqBase.weakdeps] + Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" + GeneralizedGenerated = "6b9d7cbe-bcb9-11e9-073f-15a7a543e2eb" + MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" + Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" + MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" + Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" + +[[deps.DiffEqCallbacks]] +deps = ["DataStructures", "DiffEqBase", "ForwardDiff", "LinearAlgebra", "Markdown", "NLsolve", "Parameters", "RecipesBase", "RecursiveArrayTools", "SciMLBase", "StaticArraysCore"] +git-tree-sha1 = "63b6be7b396ad395825f3cc48c56b53bfaf7e69d" +uuid = "459566f4-90b8-5000-8ac3-15dfb0a30def" +version = "2.26.1" + +[[deps.DiffEqNoiseProcess]] +deps = ["DiffEqBase", "Distributions", "GPUArraysCore", "LinearAlgebra", "Markdown", "Optim", "PoissonRandom", "QuadGK", "Random", "Random123", "RandomNumbers", "RecipesBase", "RecursiveArrayTools", "Requires", "ResettableStacks", "SciMLBase", "StaticArrays", "Statistics"] +git-tree-sha1 = "2c4ed3eedb87579bfe9f20ecc2440de06b9f3b89" +uuid = "77a26b50-5914-5dd7-bc55-306e6241c503" +version = "5.16.0" + + [deps.DiffEqNoiseProcess.extensions] + DiffEqNoiseProcessReverseDiffExt = "ReverseDiff" + + [deps.DiffEqNoiseProcess.weakdeps] + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + +[[deps.DiffResults]] +deps = ["StaticArraysCore"] +git-tree-sha1 = "782dd5f4561f5d267313f23853baaaa4c52ea621" +uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" +version = "1.1.0" + +[[deps.DiffRules]] +deps = ["IrrationalConstants", "LogExpFunctions", "NaNMath", "Random", "SpecialFunctions"] +git-tree-sha1 = "a4ad7ef19d2cdc2eff57abbbe68032b1cd0bd8f8" +uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" +version = "1.13.0" + +[[deps.DifferentialEquations]] +deps = ["BoundaryValueDiffEq", "DelayDiffEq", "DiffEqBase", "DiffEqCallbacks", "DiffEqNoiseProcess", "JumpProcesses", "LinearAlgebra", "LinearSolve", "NonlinearSolve", "OrdinaryDiffEq", "Random", "RecursiveArrayTools", "Reexport", "SciMLBase", "SteadyStateDiffEq", "StochasticDiffEq", "Sundials"] +git-tree-sha1 = "ac145e3d718157c679fc4febf2fcef73ec77b067" +uuid = "0c46a032-eb83-5123-abaf-570d42b7fbaa" +version = "7.7.0" + +[[deps.Distances]] +deps = ["LinearAlgebra", "SparseArrays", "Statistics", "StatsAPI"] +git-tree-sha1 = "49eba9ad9f7ead780bfb7ee319f962c811c6d3b2" +uuid = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" +version = "0.10.8" + +[[deps.Distributed]] +deps = ["Random", "Serialization", "Sockets"] +uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" + +[[deps.Distributions]] +deps = ["FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "StatsAPI", "StatsBase", "StatsFuns", "Test"] +git-tree-sha1 = "c72970914c8a21b36bbc244e9df0ed1834a0360b" +uuid = "31c24e10-a181-5473-b8eb-7969acd0382f" +version = "0.25.95" + + [deps.Distributions.extensions] + DistributionsChainRulesCoreExt = "ChainRulesCore" + DistributionsDensityInterfaceExt = "DensityInterface" + + [deps.Distributions.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + DensityInterface = "b429d917-457f-4dbc-8f4c-0cc954292b1d" + +[[deps.DocStringExtensions]] +deps = ["LibGit2"] +git-tree-sha1 = "2fb1e02f2b635d0845df5d7c167fec4dd739b00d" +uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" +version = "0.9.3" + +[[deps.Documenter]] +deps = ["ANSIColoredPrinters", "Base64", "Dates", "DocStringExtensions", "IOCapture", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "REPL", "Test", "Unicode"] +git-tree-sha1 = "58fea7c536acd71f3eef6be3b21c0df5f3df88fd" +uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4" +version = "0.27.24" + +[[deps.Downloads]] +deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] +uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" +version = "1.6.0" + +[[deps.DualNumbers]] +deps = ["Calculus", "NaNMath", "SpecialFunctions"] +git-tree-sha1 = "5837a837389fccf076445fce071c8ddaea35a566" +uuid = "fa6b7ba4-c1ee-5f82-b5fc-ecf0adba8f74" +version = "0.6.8" + +[[deps.EnumX]] +git-tree-sha1 = "bdb1942cd4c45e3c678fd11569d5cccd80976237" +uuid = "4e289a0a-7415-4d19-859d-a7e5c4648b56" +version = "1.0.4" + +[[deps.ExponentialUtilities]] +deps = ["Adapt", "ArrayInterface", "GPUArraysCore", "GenericSchur", "LinearAlgebra", "Printf", "SnoopPrecompile", "SparseArrays", "libblastrampoline_jll"] +git-tree-sha1 = "fb7dbef7d2631e2d02c49e2750f7447648b0ec9b" +uuid = "d4d017d3-3776-5f7e-afef-a10c40355c18" +version = "1.24.0" + +[[deps.ExprTools]] +git-tree-sha1 = "c1d06d129da9f55715c6c212866f5b1bddc5fa00" +uuid = "e2ba6199-217a-4e67-a87a-7c52f15ade04" +version = "0.1.9" + +[[deps.FFTW]] +deps = ["AbstractFFTs", "FFTW_jll", "LinearAlgebra", "MKL_jll", "Preferences", "Reexport"] +git-tree-sha1 = "f9818144ce7c8c41edf5c4c179c684d92aa4d9fe" +uuid = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341" +version = "1.6.0" + +[[deps.FFTW_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "c6033cc3892d0ef5bb9cd29b7f2f0331ea5184ea" +uuid = "f5851436-0d7a-5f13-b9de-f02708fd171a" +version = "3.3.10+0" + +[[deps.FastBroadcast]] +deps = ["ArrayInterface", "LinearAlgebra", "Polyester", "Static", "StaticArrayInterface", "StrideArraysCore"] +git-tree-sha1 = "d1248fceea0b26493fd33e8e9e8c553270da03bd" +uuid = "7034ab61-46d4-4ed7-9d0f-46aef9175898" +version = "0.2.5" + +[[deps.FastClosures]] +git-tree-sha1 = "acebe244d53ee1b461970f8910c235b259e772ef" +uuid = "9aa1b823-49e4-5ca5-8b0f-3971ec8bab6a" +version = "0.3.2" + +[[deps.FastLapackInterface]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "c1293a93193f0ae94be7cf338d33e162c39d8788" +uuid = "29a986be-02c6-4525-aec4-84b980013641" +version = "1.2.9" + +[[deps.FileWatching]] +uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" + +[[deps.FillArrays]] +deps = ["LinearAlgebra", "Random", "SparseArrays", "Statistics"] +git-tree-sha1 = "7072f1e3e5a8be51d525d64f63d3ec1287ff2790" +uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" +version = "0.13.11" + +[[deps.FiniteDiff]] +deps = ["ArrayInterface", "LinearAlgebra", "Requires", "Setfield", "SparseArrays", "StaticArrays"] +git-tree-sha1 = "6604e18a0220650dbbea7854938768f15955dd8e" +uuid = "6a86dc24-6348-571c-b903-95158fe2bd41" +version = "2.20.0" + +[[deps.ForwardDiff]] +deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] +git-tree-sha1 = "00e252f4d706b3d55a8863432e742bf5717b498d" +uuid = "f6369f11-7733-5829-9624-2563aa707210" +version = "0.10.35" +weakdeps = ["StaticArrays"] + + [deps.ForwardDiff.extensions] + ForwardDiffStaticArraysExt = "StaticArrays" + +[[deps.FunctionWrappers]] +git-tree-sha1 = "d62485945ce5ae9c0c48f124a84998d755bae00e" +uuid = "069b7b12-0de2-55c6-9aab-29f3d0a68a2e" +version = "1.1.3" + +[[deps.FunctionWrappersWrappers]] +deps = ["FunctionWrappers"] +git-tree-sha1 = "b104d487b34566608f8b4e1c39fb0b10aa279ff8" +uuid = "77dc65aa-8811-40c2-897b-53d922fa7daf" +version = "0.1.3" + +[[deps.Future]] +deps = ["Random"] +uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" + +[[deps.GPUArraysCore]] +deps = ["Adapt"] +git-tree-sha1 = "2d6ca471a6c7b536127afccfa7564b5b39227fe0" +uuid = "46192b85-c4d5-4398-a991-12ede77f4527" +version = "0.1.5" + +[[deps.GenericSchur]] +deps = ["LinearAlgebra", "Printf"] +git-tree-sha1 = "fb69b2a645fa69ba5f474af09221b9308b160ce6" +uuid = "c145ed77-6b09-5dd9-b285-bf645a82121e" +version = "0.5.3" + +[[deps.Graphs]] +deps = ["ArnoldiMethod", "Compat", "DataStructures", "Distributed", "Inflate", "LinearAlgebra", "Random", "SharedArrays", "SimpleTraits", "SparseArrays", "Statistics"] +git-tree-sha1 = "1cf1d7dcb4bc32d7b4a5add4232db3750c27ecb4" +uuid = "86223c79-3864-5bf0-83f7-82e725a168b6" +version = "1.8.0" + +[[deps.HalfIntegers]] +git-tree-sha1 = "d654a64bf8861db5fd95204a4955f0f28e791c62" +uuid = "f0d1745a-41c9-11e9-1dd9-e5d34d218721" +version = "1.5.0" + +[[deps.HostCPUFeatures]] +deps = ["BitTwiddlingConvenienceFunctions", "IfElse", "Libdl", "Static"] +git-tree-sha1 = "734fd90dd2f920a2f1921d5388dcebe805b262dc" +uuid = "3e5b6fbb-0976-4d2c-9146-d79de83f2fb0" +version = "0.1.14" + +[[deps.HypergeometricFunctions]] +deps = ["DualNumbers", "LinearAlgebra", "OpenLibm_jll", "SpecialFunctions"] +git-tree-sha1 = "84204eae2dd237500835990bcade263e27674a93" +uuid = "34004b35-14d8-5ef3-9330-4cdb6864b03a" +version = "0.3.16" + +[[deps.IOCapture]] +deps = ["Logging", "Random"] +git-tree-sha1 = "d75853a0bdbfb1ac815478bacd89cd27b550ace6" +uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89" +version = "0.2.3" + +[[deps.IfElse]] +git-tree-sha1 = "debdd00ffef04665ccbb3e150747a77560e8fad1" +uuid = "615f187c-cbe4-4ef1-ba3b-2fcf58d6d173" +version = "0.1.1" + +[[deps.Inflate]] +git-tree-sha1 = "5cd07aab533df5170988219191dfad0519391428" +uuid = "d25df0c9-e2be-5dd7-82c8-3ad0b3e990b9" +version = "0.1.3" + +[[deps.IntegerMathUtils]] +git-tree-sha1 = "f366daebdfb079fd1fe4e3d560f99a0c892e15bc" +uuid = "18e54dd8-cb9d-406c-a71d-865a43cbb235" +version = "0.1.0" + +[[deps.IntelOpenMP_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "0cb9352ef2e01574eeebdb102948a58740dcaf83" +uuid = "1d5cc7b8-4909-519e-a0f8-d0f5ad9712d0" +version = "2023.1.0+0" + +[[deps.InteractiveUtils]] +deps = ["Markdown"] +uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" + +[[deps.IrrationalConstants]] +git-tree-sha1 = "630b497eafcc20001bba38a4651b327dcfc491d2" +uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" +version = "0.2.2" + +[[deps.IterativeSolvers]] +deps = ["LinearAlgebra", "Printf", "Random", "RecipesBase", "SparseArrays"] +git-tree-sha1 = "1169632f425f79429f245113b775a0e3d121457c" +uuid = "42fd0dbc-a981-5370-80f2-aaf504508153" +version = "0.9.2" + +[[deps.IteratorInterfaceExtensions]] +git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" +uuid = "82899510-4779-5014-852e-03e436cf321d" +version = "1.0.0" + +[[deps.JET]] +deps = ["InteractiveUtils", "JuliaInterpreter", "LoweredCodeUtils", "MacroTools", "Pkg", "PrecompileTools", "Preferences", "Revise", "Test"] +git-tree-sha1 = "d23bf4f90d1e869236b3d701fc3c45f63eae2454" +uuid = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b" +version = "0.7.15" + +[[deps.JLLWrappers]] +deps = ["Preferences"] +git-tree-sha1 = "abc9885a7ca2052a736a600f7fa66209f96506e1" +uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" +version = "1.4.1" + +[[deps.JSON]] +deps = ["Dates", "Mmap", "Parsers", "Unicode"] +git-tree-sha1 = "31e996f0a15c7b280ba9f76636b3ff9e2ae58c9a" +uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" +version = "0.21.4" + +[[deps.JuliaInterpreter]] +deps = ["CodeTracking", "InteractiveUtils", "Random", "UUIDs"] +git-tree-sha1 = "6a125e6a4cb391e0b9adbd1afa9e771c2179f8ef" +uuid = "aa1ae85d-cabe-5617-a682-6adf51b2e16a" +version = "0.9.23" + +[[deps.JumpProcesses]] +deps = ["ArrayInterface", "DataStructures", "DiffEqBase", "DocStringExtensions", "FunctionWrappers", "Graphs", "LinearAlgebra", "Markdown", "PoissonRandom", "Random", "RandomNumbers", "RecursiveArrayTools", "Reexport", "SciMLBase", "StaticArrays", "TreeViews", "UnPack"] +git-tree-sha1 = "50bd271af7f6cc23be7d24c8c4804809bb5d05ae" +uuid = "ccbc3e58-028d-4f4c-8cd5-9ae44345cda5" +version = "9.6.3" + +[[deps.KLU]] +deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse_jll"] +git-tree-sha1 = "764164ed65c30738750965d55652db9c94c59bfe" +uuid = "ef3ab10e-7fda-4108-b977-705223b18434" +version = "0.4.0" + +[[deps.Krylov]] +deps = ["LinearAlgebra", "Printf", "SparseArrays"] +git-tree-sha1 = "0356a64062656b0cbb43c504ad5de338251f4bda" +uuid = "ba0b0d4f-ebba-5204-a429-3ac8c609bfb7" +version = "0.9.1" + +[[deps.KrylovKit]] +deps = ["ChainRulesCore", "GPUArraysCore", "LinearAlgebra", "Printf"] +git-tree-sha1 = "1a5e1d9941c783b0119897d29f2eb665d876ecf3" +uuid = "0b1a1467-8014-51b9-945f-bf0ae24f4b77" +version = "0.6.0" + +[[deps.LRUCache]] +git-tree-sha1 = "48c10e3cc27e30de82463c27bef0b8bdbd1dc634" +uuid = "8ac3fa9e-de4c-5943-b1dc-09c6b5f20637" +version = "1.4.1" + +[[deps.LayoutPointers]] +deps = ["ArrayInterface", "LinearAlgebra", "ManualMemory", "SIMDTypes", "Static", "StaticArrayInterface"] +git-tree-sha1 = "88b8f66b604da079a627b6fb2860d3704a6729a1" +uuid = "10f19ff3-798f-405d-979b-55457f8fc047" +version = "0.1.14" + +[[deps.Lazy]] +deps = ["MacroTools"] +git-tree-sha1 = "1370f8202dac30758f3c345f9909b97f53d87d3f" +uuid = "50d2b5c4-7a5e-59d5-8109-a42b560f39c0" +version = "0.15.1" + +[[deps.LazyArtifacts]] +deps = ["Artifacts", "Pkg"] +uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" + +[[deps.LevyArea]] +deps = ["LinearAlgebra", "Random", "SpecialFunctions"] +git-tree-sha1 = "56513a09b8e0ae6485f34401ea9e2f31357958ec" +uuid = "2d8b4e74-eb68-11e8-0fb9-d5eb67b50637" +version = "1.0.0" + +[[deps.LibCURL]] +deps = ["LibCURL_jll", "MozillaCACerts_jll"] +uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" +version = "0.6.3" + +[[deps.LibCURL_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] +uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" +version = "7.84.0+0" + +[[deps.LibGit2]] +deps = ["Base64", "NetworkOptions", "Printf", "SHA"] +uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" + +[[deps.LibSSH2_jll]] +deps = ["Artifacts", "Libdl", "MbedTLS_jll"] +uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" +version = "1.10.2+0" + +[[deps.Libdl]] +uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" + +[[deps.LineSearches]] +deps = ["LinearAlgebra", "NLSolversBase", "NaNMath", "Parameters", "Printf"] +git-tree-sha1 = "7bbea35cec17305fc70a0e5b4641477dc0789d9d" +uuid = "d3d80556-e9d4-5f37-9878-2ab0fcc64255" +version = "7.2.0" + +[[deps.LinearAlgebra]] +deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] +uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + +[[deps.LinearMaps]] +deps = ["ChainRulesCore", "LinearAlgebra", "SparseArrays", "Statistics"] +git-tree-sha1 = "4af48c3585177561e9f0d24eb9619ad3abf77cc7" +uuid = "7a12625a-238d-50fd-b39a-03d52299707e" +version = "3.10.0" + +[[deps.LinearSolve]] +deps = ["ArrayInterface", "DocStringExtensions", "EnumX", "FastLapackInterface", "GPUArraysCore", "IterativeSolvers", "KLU", "Krylov", "KrylovKit", "LinearAlgebra", "Preferences", "RecursiveFactorization", "Reexport", "SciMLBase", "SciMLOperators", "Setfield", "SnoopPrecompile", "SparseArrays", "Sparspak", "SuiteSparse", "UnPack"] +git-tree-sha1 = "4a4f8cc7a59fadbb02d1852d1e0cef5dca3a9460" +uuid = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" +version = "1.42.0" + + [deps.LinearSolve.extensions] + LinearSolveHYPRE = "HYPRE" + + [deps.LinearSolve.weakdeps] + HYPRE = "b5ffcf37-a2bd-41ab-a3da-4bd9bc8ad771" + +[[deps.LogExpFunctions]] +deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] +git-tree-sha1 = "0a1b7c2863e44523180fdb3146534e265a91870b" +uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" +version = "0.3.23" + + [deps.LogExpFunctions.extensions] + LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" + LogExpFunctionsChangesOfVariablesExt = "ChangesOfVariables" + LogExpFunctionsInverseFunctionsExt = "InverseFunctions" + + [deps.LogExpFunctions.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + ChangesOfVariables = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" + InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" + +[[deps.Logging]] +uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" + +[[deps.LoopVectorization]] +deps = ["ArrayInterface", "ArrayInterfaceCore", "CPUSummary", "CloseOpenIntervals", "DocStringExtensions", "HostCPUFeatures", "IfElse", "LayoutPointers", "LinearAlgebra", "OffsetArrays", "PolyesterWeave", "PrecompileTools", "SIMDTypes", "SLEEFPirates", "Static", "StaticArrayInterface", "ThreadingUtilities", "UnPack", "VectorizationBase"] +git-tree-sha1 = "3bb62b5003bc7d2d49f26663484267dc49fa1bf5" +uuid = "bdcacae8-1622-11e9-2a5c-532679323890" +version = "0.12.159" +weakdeps = ["ChainRulesCore", "ForwardDiff", "SpecialFunctions"] + + [deps.LoopVectorization.extensions] + ForwardDiffExt = ["ChainRulesCore", "ForwardDiff"] + SpecialFunctionsExt = "SpecialFunctions" + +[[deps.LoweredCodeUtils]] +deps = ["JuliaInterpreter"] +git-tree-sha1 = "60168780555f3e663c536500aa790b6368adc02a" +uuid = "6f1432cf-f94c-5a45-995e-cdbf5db27b0b" +version = "2.3.0" + +[[deps.MKL_jll]] +deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "Pkg"] +git-tree-sha1 = "2ce8695e1e699b68702c03402672a69f54b8aca9" +uuid = "856f044c-d86e-5d09-b602-aeab76dc8ba7" +version = "2022.2.0+0" + +[[deps.MacroTools]] +deps = ["Markdown", "Random"] +git-tree-sha1 = "42324d08725e200c23d4dfb549e0d5d89dede2d2" +uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" +version = "0.5.10" + +[[deps.ManualMemory]] +git-tree-sha1 = "bcaef4fc7a0cfe2cba636d84cda54b5e4e4ca3cd" +uuid = "d125e4d3-2237-4719-b19c-fa641b8a4667" +version = "0.1.8" + +[[deps.Markdown]] +deps = ["Base64"] +uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" + +[[deps.MbedTLS_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" +version = "2.28.2+0" + +[[deps.Missings]] +deps = ["DataAPI"] +git-tree-sha1 = "f66bdc5de519e8f8ae43bdc598782d35a25b1272" +uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28" +version = "1.1.0" + +[[deps.Mmap]] +uuid = "a63ad114-7e13-5084-954f-fe012c677804" + +[[deps.MozillaCACerts_jll]] +uuid = "14a3606d-f60d-562e-9121-12d972cd8159" +version = "2022.10.11" + +[[deps.MuladdMacro]] +git-tree-sha1 = "cac9cc5499c25554cba55cd3c30543cff5ca4fab" +uuid = "46d2c3a1-f734-5fdb-9937-b9b9aeba4221" +version = "0.2.4" + +[[deps.NLSolversBase]] +deps = ["DiffResults", "Distributed", "FiniteDiff", "ForwardDiff"] +git-tree-sha1 = "a0b464d183da839699f4c79e7606d9d186ec172c" +uuid = "d41bc354-129a-5804-8e4c-c37616107c6c" +version = "7.8.3" + +[[deps.NLsolve]] +deps = ["Distances", "LineSearches", "LinearAlgebra", "NLSolversBase", "Printf", "Reexport"] +git-tree-sha1 = "019f12e9a1a7880459d0173c182e6a99365d7ac1" +uuid = "2774e3e8-f4cf-5e23-947b-6d7e65073b56" +version = "4.5.1" + +[[deps.NaNMath]] +deps = ["OpenLibm_jll"] +git-tree-sha1 = "0877504529a3e5c3343c6f8b4c0381e57e4387e4" +uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" +version = "1.0.2" + +[[deps.NetworkOptions]] +uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" +version = "1.2.0" + +[[deps.NonlinearSolve]] +deps = ["ArrayInterface", "DiffEqBase", "EnumX", "FiniteDiff", "ForwardDiff", "LinearAlgebra", "LinearSolve", "RecursiveArrayTools", "Reexport", "SciMLBase", "SimpleNonlinearSolve", "SnoopPrecompile", "SparseArrays", "SparseDiffTools", "StaticArraysCore", "UnPack"] +git-tree-sha1 = "a6000c813371cd3cd9cbbdf8a356fc3a97138d92" +uuid = "8913a72c-1f9b-4ce2-8d82-65094dcecaec" +version = "1.6.0" + +[[deps.OffsetArrays]] +deps = ["Adapt"] +git-tree-sha1 = "82d7c9e310fe55aa54996e6f7f94674e2a38fcb4" +uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" +version = "1.12.9" + +[[deps.OpenBLAS_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] +uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" +version = "0.3.21+4" + +[[deps.OpenLibm_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "05823500-19ac-5b8b-9628-191a04bc5112" +version = "0.8.1+0" + +[[deps.OpenSpecFun_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "13652491f6856acfd2db29360e1bbcd4565d04f1" +uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" +version = "0.5.5+0" + +[[deps.Optim]] +deps = ["Compat", "FillArrays", "ForwardDiff", "LineSearches", "LinearAlgebra", "NLSolversBase", "NaNMath", "Parameters", "PositiveFactorizations", "Printf", "SparseArrays", "StatsBase"] +git-tree-sha1 = "a89b11f0f354f06099e4001c151dffad7ebab015" +uuid = "429524aa-4258-5aef-a3af-852621145aeb" +version = "1.7.5" + +[[deps.OrderedCollections]] +git-tree-sha1 = "d321bf2de576bf25ec4d3e4360faca399afca282" +uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" +version = "1.6.0" + +[[deps.OrdinaryDiffEq]] +deps = ["Adapt", "ArrayInterface", "DataStructures", "DiffEqBase", "DocStringExtensions", "ExponentialUtilities", "FastBroadcast", "FastClosures", "FiniteDiff", "ForwardDiff", "FunctionWrappersWrappers", "IfElse", "LineSearches", "LinearAlgebra", "LinearSolve", "Logging", "LoopVectorization", "MacroTools", "MuladdMacro", "NLsolve", "NonlinearSolve", "Polyester", "PreallocationTools", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLNLSolve", "SimpleNonlinearSolve", "SimpleUnPack", "SparseArrays", "SparseDiffTools", "StaticArrayInterface", "StaticArrays", "TruncatedStacktraces"] +git-tree-sha1 = "6ffebfa8971546bace3fc312f9a703795f79f5b9" +uuid = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" +version = "6.51.2" + +[[deps.PDMats]] +deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] +git-tree-sha1 = "67eae2738d63117a196f497d7db789821bce61d1" +uuid = "90014a1f-27ba-587c-ab20-58faa44d9150" +version = "0.11.17" + +[[deps.Parameters]] +deps = ["OrderedCollections", "UnPack"] +git-tree-sha1 = "34c0e9ad262e5f7fc75b10a9952ca7692cfc5fbe" +uuid = "d96e819e-fc66-5662-9728-84c9c7592b0a" +version = "0.12.3" + +[[deps.Parsers]] +deps = ["Dates", "PrecompileTools", "UUIDs"] +git-tree-sha1 = "a5aef8d4a6e8d81f171b2bd4be5265b01384c74c" +uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" +version = "2.5.10" + +[[deps.Pkg]] +deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] +uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" +version = "1.9.0" + +[[deps.PoissonRandom]] +deps = ["Random"] +git-tree-sha1 = "a0f1159c33f846aa77c3f30ebbc69795e5327152" +uuid = "e409e4f3-bfea-5376-8464-e040bb5c01ab" +version = "0.4.4" + +[[deps.Polyester]] +deps = ["ArrayInterface", "BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "ManualMemory", "PolyesterWeave", "Requires", "Static", "StaticArrayInterface", "StrideArraysCore", "ThreadingUtilities"] +git-tree-sha1 = "0fe4e7c4d8ff4c70bfa507f0dd96fa161b115777" +uuid = "f517fe37-dbe3-4b94-8317-1923a5111588" +version = "0.7.3" + +[[deps.PolyesterWeave]] +deps = ["BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "Static", "ThreadingUtilities"] +git-tree-sha1 = "240d7170f5ffdb285f9427b92333c3463bf65bf6" +uuid = "1d0040c9-8b98-4ee7-8388-3f51789ca0ad" +version = "0.2.1" + +[[deps.PositiveFactorizations]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "17275485f373e6673f7e7f97051f703ed5b15b20" +uuid = "85a6dd25-e78a-55b7-8502-1745935b8125" +version = "0.2.4" + +[[deps.PreallocationTools]] +deps = ["Adapt", "ArrayInterface", "ForwardDiff", "Requires"] +git-tree-sha1 = "f739b1b3cc7b9949af3b35089931f2b58c289163" +uuid = "d236fae5-4411-538c-8e31-a6e3d9e00b46" +version = "0.4.12" + + [deps.PreallocationTools.extensions] + PreallocationToolsReverseDiffExt = "ReverseDiff" + + [deps.PreallocationTools.weakdeps] + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + +[[deps.PrecompileTools]] +deps = ["Preferences"] +git-tree-sha1 = "259e206946c293698122f63e2b513a7c99a244e8" +uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" +version = "1.1.1" + +[[deps.Preferences]] +deps = ["TOML"] +git-tree-sha1 = "7eb1686b4f04b82f96ed7a4ea5890a4f0c7a09f1" +uuid = "21216c6a-2e73-6563-6e65-726566657250" +version = "1.4.0" + +[[deps.Primes]] +deps = ["IntegerMathUtils"] +git-tree-sha1 = "311a2aa90a64076ea0fac2ad7492e914e6feeb81" +uuid = "27ebfcd6-29c5-5fa9-bf4b-fb8fc14df3ae" +version = "0.5.3" + +[[deps.Printf]] +deps = ["Unicode"] +uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" + +[[deps.QuadGK]] +deps = ["DataStructures", "LinearAlgebra"] +git-tree-sha1 = "6ec7ac8412e83d57e313393220879ede1740f9ee" +uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" +version = "2.8.2" + +[[deps.QuantumInterface]] +git-tree-sha1 = "cb2b768c0c9fb7bf8cee52b9ac5a6be7fa5f6276" +uuid = "5717a53b-5d69-4fa3-b976-0bf2f97ca1e5" +version = "0.1.0" + +[[deps.QuantumOptics]] +deps = ["Arpack", "DiffEqBase", "DiffEqCallbacks", "FFTW", "ForwardDiff", "IterativeSolvers", "LinearAlgebra", "LinearMaps", "OrdinaryDiffEq", "QuantumOpticsBase", "Random", "RecursiveArrayTools", "Reexport", "SparseArrays", "StochasticDiffEq", "WignerSymbols"] +git-tree-sha1 = "81d7cf56eddb8b7c6b65c9da638d10bf2f10d7c2" +uuid = "6e0679c1-51ea-5a7c-ac74-d61b76210b0c" +version = "1.0.9" + +[[deps.QuantumOpticsBase]] +deps = ["Adapt", "FFTW", "LRUCache", "LinearAlgebra", "QuantumInterface", "Random", "SparseArrays", "Strided", "UnsafeArrays"] +git-tree-sha1 = "c0fe25d57ffe78ec8a56f831e1631d448e5973d0" +uuid = "4f57444f-1401-5e15-980d-4471b28d5678" +version = "0.3.12" + +[[deps.REPL]] +deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] +uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" + +[[deps.Random]] +deps = ["SHA", "Serialization"] +uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" + +[[deps.Random123]] +deps = ["Random", "RandomNumbers"] +git-tree-sha1 = "552f30e847641591ba3f39fd1bed559b9deb0ef3" +uuid = "74087812-796a-5b5d-8853-05524746bad3" +version = "1.6.1" + +[[deps.RandomNumbers]] +deps = ["Random", "Requires"] +git-tree-sha1 = "043da614cc7e95c703498a491e2c21f58a2b8111" +uuid = "e6cf234a-135c-5ec9-84dd-332b85af5143" +version = "1.5.3" + +[[deps.RationalRoots]] +git-tree-sha1 = "52315cf3098691c1416a356925027af5ab5bf548" +uuid = "308eb6b3-cc68-5ff3-9e97-c3c4da4fa681" +version = "0.2.0" + +[[deps.RecipesBase]] +deps = ["PrecompileTools"] +git-tree-sha1 = "5c3d09cc4f31f5fc6af001c250bf1278733100ff" +uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" +version = "1.3.4" + +[[deps.RecursiveArrayTools]] +deps = ["Adapt", "ArrayInterface", "DocStringExtensions", "GPUArraysCore", "IteratorInterfaceExtensions", "LinearAlgebra", "RecipesBase", "Requires", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables"] +git-tree-sha1 = "02ef02926f30d53b94be443bfaea010c47f6b556" +uuid = "731186ca-8d62-57ce-b412-fbd966d074cd" +version = "2.38.5" + + [deps.RecursiveArrayTools.extensions] + RecursiveArrayToolsMeasurementsExt = "Measurements" + RecursiveArrayToolsTrackerExt = "Tracker" + RecursiveArrayToolsZygoteExt = "Zygote" + + [deps.RecursiveArrayTools.weakdeps] + Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" + +[[deps.RecursiveFactorization]] +deps = ["LinearAlgebra", "LoopVectorization", "Polyester", "SnoopPrecompile", "StrideArraysCore", "TriangularSolve"] +git-tree-sha1 = "9088515ad915c99026beb5436d0a09cd8c18163e" +uuid = "f2c3362d-daeb-58d1-803e-2bc74f2840b4" +version = "0.2.18" + +[[deps.Reexport]] +git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" +uuid = "189a3867-3050-52da-a836-e630ba90ab69" +version = "1.2.2" + +[[deps.Requires]] +deps = ["UUIDs"] +git-tree-sha1 = "838a3a4188e2ded87a4f9f184b4b0d78a1e91cb7" +uuid = "ae029012-a4dd-5104-9daa-d747884805df" +version = "1.3.0" + +[[deps.ResettableStacks]] +deps = ["StaticArrays"] +git-tree-sha1 = "256eeeec186fa7f26f2801732774ccf277f05db9" +uuid = "ae5879a3-cd67-5da8-be7f-38c6eb64a37b" +version = "1.1.1" + +[[deps.Revise]] +deps = ["CodeTracking", "Distributed", "FileWatching", "JuliaInterpreter", "LibGit2", "LoweredCodeUtils", "OrderedCollections", "Pkg", "REPL", "Requires", "UUIDs", "Unicode"] +git-tree-sha1 = "feafdc70b2e6684314e188d95fe66d116de834a7" +uuid = "295af30f-e4ad-537b-8983-00126c2a3abe" +version = "3.5.2" + +[[deps.Rmath]] +deps = ["Random", "Rmath_jll"] +git-tree-sha1 = "f65dcb5fa46aee0cf9ed6274ccbd597adc49aa7b" +uuid = "79098fc4-a85e-5d69-aa6a-4863f24498fa" +version = "0.7.1" + +[[deps.Rmath_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "6ed52fdd3382cf21947b15e8870ac0ddbff736da" +uuid = "f50d1b31-88e8-58de-be2c-1cc44531875f" +version = "0.4.0+0" + +[[deps.RuntimeGeneratedFunctions]] +deps = ["ExprTools", "SHA", "Serialization"] +git-tree-sha1 = "d7d9ebe28062161c1e314ed643097b0c6fe657d9" +uuid = "7e49a35a-f44a-4d26-94aa-eba1b4ca6b47" +version = "0.5.7" + +[[deps.SHA]] +uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" +version = "0.7.0" + +[[deps.SIMDTypes]] +git-tree-sha1 = "330289636fb8107c5f32088d2741e9fd7a061a5c" +uuid = "94e857df-77ce-4151-89e5-788b33177be4" +version = "0.1.0" + +[[deps.SLEEFPirates]] +deps = ["IfElse", "Static", "VectorizationBase"] +git-tree-sha1 = "4b8586aece42bee682399c4c4aee95446aa5cd19" +uuid = "476501e8-09a2-5ece-8869-fb82de89a1fa" +version = "0.6.39" + +[[deps.SafeTestsets]] +deps = ["Test"] +git-tree-sha1 = "36ebc5622c82eb9324005cc75e7e2cc51181d181" +uuid = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" +version = "0.0.1" + +[[deps.SciMLBase]] +deps = ["ADTypes", "ArrayInterface", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "PrecompileTools", "Preferences", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLOperators", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables", "TruncatedStacktraces"] +git-tree-sha1 = "75552338dda481baeb9b9e171f73ecd0171e8f34" +uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462" +version = "1.92.2" + +[[deps.SciMLNLSolve]] +deps = ["DiffEqBase", "LineSearches", "NLsolve", "Reexport", "SciMLBase"] +git-tree-sha1 = "a8eb97c56cac50c21096582afb2a0110784dc36e" +uuid = "e9a6253c-8580-4d32-9898-8661bb511710" +version = "0.1.6" + +[[deps.SciMLOperators]] +deps = ["ArrayInterface", "DocStringExtensions", "Lazy", "LinearAlgebra", "Setfield", "SparseArrays", "StaticArraysCore", "Tricks"] +git-tree-sha1 = "d9f0f6ce9bb899a657c4d218a846533910e9dea9" +uuid = "c0aeaf25-5076-4817-a8d5-81caf7dfa961" +version = "0.2.9" + +[[deps.Serialization]] +uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" + +[[deps.Setfield]] +deps = ["ConstructionBase", "Future", "MacroTools", "StaticArraysCore"] +git-tree-sha1 = "e2cc6d8c88613c05e1defb55170bf5ff211fbeac" +uuid = "efcf1570-3423-57d1-acb7-fd33fddbac46" +version = "1.1.1" + +[[deps.SharedArrays]] +deps = ["Distributed", "Mmap", "Random", "Serialization"] +uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" + +[[deps.SimpleNonlinearSolve]] +deps = ["ArrayInterface", "DiffEqBase", "FiniteDiff", "ForwardDiff", "LinearAlgebra", "Reexport", "Requires", "SciMLBase", "SnoopPrecompile", "StaticArraysCore"] +git-tree-sha1 = "54c78ac3cc0343a16785adabe5bbf4063c737967" +uuid = "727e6d20-b764-4bd8-a329-72de5adea6c7" +version = "0.1.14" + + [deps.SimpleNonlinearSolve.extensions] + SimpleBatchedNonlinearSolveExt = "NNlib" + + [deps.SimpleNonlinearSolve.weakdeps] + NNlib = "872c559c-99b0-510c-b3b7-b6c96a88d5cd" + +[[deps.SimpleTraits]] +deps = ["InteractiveUtils", "MacroTools"] +git-tree-sha1 = "5d7e3f4e11935503d3ecaf7186eac40602e7d231" +uuid = "699a6c99-e7fa-54fc-8d76-47d257e15c1d" +version = "0.9.4" + +[[deps.SimpleUnPack]] +git-tree-sha1 = "58e6353e72cde29b90a69527e56df1b5c3d8c437" +uuid = "ce78b400-467f-4804-87d8-8f486da07d0a" +version = "1.1.0" + +[[deps.SnoopPrecompile]] +deps = ["Preferences"] +git-tree-sha1 = "e760a70afdcd461cf01a575947738d359234665c" +uuid = "66db9d55-30c0-4569-8b51-7e840670fc0c" +version = "1.0.3" + +[[deps.Sockets]] +uuid = "6462fe0b-24de-5631-8697-dd941f90decc" + +[[deps.SortingAlgorithms]] +deps = ["DataStructures"] +git-tree-sha1 = "a4ada03f999bd01b3a25dcaa30b2d929fe537e00" +uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" +version = "1.1.0" + +[[deps.SparseArrays]] +deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] +uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + +[[deps.SparseDiffTools]] +deps = ["Adapt", "ArrayInterface", "Compat", "DataStructures", "FiniteDiff", "ForwardDiff", "Graphs", "LinearAlgebra", "Requires", "SparseArrays", "StaticArrays", "VertexSafeGraphs"] +git-tree-sha1 = "e19ac47477c9a8fcca06dab5e5471417d5d9d723" +uuid = "47a9eef4-7e08-11e9-0b38-333d64bd3804" +version = "1.31.0" + +[[deps.Sparspak]] +deps = ["Libdl", "LinearAlgebra", "Logging", "OffsetArrays", "Printf", "SparseArrays", "Test"] +git-tree-sha1 = "342cf4b449c299d8d1ceaf00b7a49f4fbc7940e7" +uuid = "e56a9233-b9d6-4f03-8d0f-1825330902ac" +version = "0.3.9" + +[[deps.SpecialFunctions]] +deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] +git-tree-sha1 = "ef28127915f4229c971eb43f3fc075dd3fe91880" +uuid = "276daf66-3868-5448-9aa4-cd146d93841b" +version = "2.2.0" +weakdeps = ["ChainRulesCore"] + + [deps.SpecialFunctions.extensions] + SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" + +[[deps.StableRNGs]] +deps = ["Random", "Test"] +git-tree-sha1 = "3be7d49667040add7ee151fefaf1f8c04c8c8276" +uuid = "860ef19b-820b-49d6-a774-d7a799459cd3" +version = "1.0.0" + +[[deps.Static]] +deps = ["IfElse"] +git-tree-sha1 = "dbde6766fc677423598138a5951269432b0fcc90" +uuid = "aedffcd0-7271-4cad-89d0-dc628f76c6d3" +version = "0.8.7" + +[[deps.StaticArrayInterface]] +deps = ["ArrayInterface", "Compat", "IfElse", "LinearAlgebra", "Requires", "SnoopPrecompile", "SparseArrays", "Static", "SuiteSparse"] +git-tree-sha1 = "33040351d2403b84afce74dae2e22d3f5b18edcb" +uuid = "0d7ed370-da01-4f52-bd93-41d350b8b718" +version = "1.4.0" +weakdeps = ["OffsetArrays", "StaticArrays"] + + [deps.StaticArrayInterface.extensions] + StaticArrayInterfaceOffsetArraysExt = "OffsetArrays" + StaticArrayInterfaceStaticArraysExt = "StaticArrays" + +[[deps.StaticArrays]] +deps = ["LinearAlgebra", "Random", "StaticArraysCore", "Statistics"] +git-tree-sha1 = "8982b3607a212b070a5e46eea83eb62b4744ae12" +uuid = "90137ffa-7385-5640-81b9-e52037218182" +version = "1.5.25" + +[[deps.StaticArraysCore]] +git-tree-sha1 = "6b7ba252635a5eff6a0b0664a41ee140a1c9e72a" +uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" +version = "1.4.0" + +[[deps.Statistics]] +deps = ["LinearAlgebra", "SparseArrays"] +uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" +version = "1.9.0" + +[[deps.StatsAPI]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "45a7769a04a3cf80da1c1c7c60caf932e6f4c9f7" +uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0" +version = "1.6.0" + +[[deps.StatsBase]] +deps = ["DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"] +git-tree-sha1 = "d1bf48bfcc554a3761a133fe3a9bb01488e06916" +uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" +version = "0.33.21" + +[[deps.StatsFuns]] +deps = ["HypergeometricFunctions", "IrrationalConstants", "LogExpFunctions", "Reexport", "Rmath", "SpecialFunctions"] +git-tree-sha1 = "f625d686d5a88bcd2b15cd81f18f98186fdc0c9a" +uuid = "4c63d2b9-4356-54db-8cca-17b64c39e42c" +version = "1.3.0" + + [deps.StatsFuns.extensions] + StatsFunsChainRulesCoreExt = "ChainRulesCore" + StatsFunsInverseFunctionsExt = "InverseFunctions" + + [deps.StatsFuns.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" + +[[deps.SteadyStateDiffEq]] +deps = ["DiffEqBase", "DiffEqCallbacks", "LinearAlgebra", "NLsolve", "Reexport", "SciMLBase"] +git-tree-sha1 = "564451a262696334a3bab19108a99dd90d5a22c8" +uuid = "9672c7b4-1e72-59bd-8a11-6ac3964bc41f" +version = "1.15.0" + +[[deps.StochasticDiffEq]] +deps = ["Adapt", "ArrayInterface", "DataStructures", "DiffEqBase", "DiffEqNoiseProcess", "DocStringExtensions", "FillArrays", "FiniteDiff", "ForwardDiff", "JumpProcesses", "LevyArea", "LinearAlgebra", "Logging", "MuladdMacro", "NLsolve", "OrdinaryDiffEq", "Random", "RandomNumbers", "RecursiveArrayTools", "Reexport", "SciMLBase", "SparseArrays", "SparseDiffTools", "StaticArrays", "UnPack"] +git-tree-sha1 = "073da86200349ddf4ef8bc3e3f3acd62e1d554f7" +uuid = "789caeaf-c7a9-5a7d-9973-96adeb23e2a0" +version = "6.60.0" + +[[deps.StrideArraysCore]] +deps = ["ArrayInterface", "CloseOpenIntervals", "IfElse", "LayoutPointers", "ManualMemory", "SIMDTypes", "Static", "StaticArrayInterface", "ThreadingUtilities"] +git-tree-sha1 = "5ffcee1813efc849f188dce82ca1553bd5f3a476" +uuid = "7792a7ef-975c-4747-a70f-980b88e8d1da" +version = "0.4.14" + +[[deps.Strided]] +deps = ["LinearAlgebra", "StridedViews", "TupleTools"] +git-tree-sha1 = "b32eadf6ac726a790567fdc872b63117712e16a8" +uuid = "5e0ebb24-38b0-5f93-81fe-25c709ecae67" +version = "2.0.1" + +[[deps.StridedViews]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "59cc024139c20d1ed8400c419c6fe608637d583d" +uuid = "4db3bf67-4bd7-4b4e-b153-31dc3fb37143" +version = "0.1.2" + +[[deps.SuiteSparse]] +deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] +uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" + +[[deps.SuiteSparse_jll]] +deps = ["Artifacts", "Libdl", "Pkg", "libblastrampoline_jll"] +uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" +version = "5.10.1+6" + +[[deps.Sundials]] +deps = ["CEnum", "DataStructures", "DiffEqBase", "Libdl", "LinearAlgebra", "Logging", "PrecompileTools", "Reexport", "SciMLBase", "SparseArrays", "Sundials_jll"] +git-tree-sha1 = "4289695031d663252f38fd114d3e0020d1461cee" +uuid = "c3572dad-4567-51f8-b174-8c6c989267f4" +version = "4.18.0" + +[[deps.Sundials_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "OpenBLAS_jll", "Pkg", "SuiteSparse_jll"] +git-tree-sha1 = "04777432d74ec5bc91ca047c9e0e0fd7f81acdb6" +uuid = "fb77eaff-e24c-56d4-86b1-d163f2edb164" +version = "5.2.1+0" + +[[deps.SymbolicIndexingInterface]] +deps = ["DocStringExtensions"] +git-tree-sha1 = "f8ab052bfcbdb9b48fad2c80c873aa0d0344dfe5" +uuid = "2efcf032-c050-4f8e-a9bb-153293bab1f5" +version = "0.2.2" + +[[deps.TOML]] +deps = ["Dates"] +uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" +version = "1.0.3" + +[[deps.TableTraits]] +deps = ["IteratorInterfaceExtensions"] +git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39" +uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" +version = "1.0.1" + +[[deps.Tables]] +deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "LinearAlgebra", "OrderedCollections", "TableTraits", "Test"] +git-tree-sha1 = "1544b926975372da01227b382066ab70e574a3ec" +uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" +version = "1.10.1" + +[[deps.Tar]] +deps = ["ArgTools", "SHA"] +uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" +version = "1.10.0" + +[[deps.Test]] +deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] +uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[[deps.ThreadingUtilities]] +deps = ["ManualMemory"] +git-tree-sha1 = "c97f60dd4f2331e1a495527f80d242501d2f9865" +uuid = "8290d209-cae3-49c0-8002-c8c24d57dab5" +version = "0.5.1" + +[[deps.TreeViews]] +deps = ["Test"] +git-tree-sha1 = "8d0d7a3fe2f30d6a7f833a5f19f7c7a5b396eae6" +uuid = "a2a6695c-b41b-5b7d-aed9-dbfdeacea5d7" +version = "0.3.0" + +[[deps.TriangularSolve]] +deps = ["CloseOpenIntervals", "IfElse", "LayoutPointers", "LinearAlgebra", "LoopVectorization", "Polyester", "Static", "VectorizationBase"] +git-tree-sha1 = "31eedbc0b6d07c08a700e26d31298ac27ef330eb" +uuid = "d5829a12-d9aa-46ab-831f-fb7c9ab06edf" +version = "0.1.19" + +[[deps.Tricks]] +git-tree-sha1 = "aadb748be58b492045b4f56166b5188aa63ce549" +uuid = "410a4b4d-49e4-4fbc-ab6d-cb71b17b3775" +version = "0.1.7" + +[[deps.TruncatedStacktraces]] +deps = ["InteractiveUtils", "MacroTools", "Preferences"] +git-tree-sha1 = "7bc1632a4eafbe9bd94cf1a784a9a4eb5e040a91" +uuid = "781d530d-4396-4725-bb49-402e4bee1e77" +version = "1.3.0" + +[[deps.TupleTools]] +git-tree-sha1 = "3c712976c47707ff893cf6ba4354aa14db1d8938" +uuid = "9d95972d-f1c8-5527-a6e0-b4b365fa01f6" +version = "1.3.0" + +[[deps.UUIDs]] +deps = ["Random", "SHA"] +uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" + +[[deps.UnPack]] +git-tree-sha1 = "387c1f73762231e86e0c9c5443ce3b4a0a9a0c2b" +uuid = "3a884ed6-31ef-47d7-9d2a-63182c4928ed" +version = "1.0.2" + +[[deps.Unicode]] +uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" + +[[deps.UnsafeArrays]] +git-tree-sha1 = "3350f94f6caa02f324a23645bf524fc9334c7488" +uuid = "c4a57d5a-5b31-53a6-b365-19f8c011fbd6" +version = "1.0.4" + +[[deps.VectorizationBase]] +deps = ["ArrayInterface", "CPUSummary", "HostCPUFeatures", "IfElse", "LayoutPointers", "Libdl", "LinearAlgebra", "SIMDTypes", "Static", "StaticArrayInterface"] +git-tree-sha1 = "b182207d4af54ac64cbc71797765068fdeff475d" +uuid = "3d5dd08c-fd9d-11e8-17fa-ed2836048c2f" +version = "0.21.64" + +[[deps.VertexSafeGraphs]] +deps = ["Graphs"] +git-tree-sha1 = "8351f8d73d7e880bfc042a8b6922684ebeafb35c" +uuid = "19fa3120-7c27-5ec5-8db8-b0b0aa330d6f" +version = "0.2.0" + +[[deps.WignerSymbols]] +deps = ["HalfIntegers", "LRUCache", "Primes", "RationalRoots"] +git-tree-sha1 = "960e5f708871c1d9a28a7f1dbcaf4e0ee34ee960" +uuid = "9f57e263-0b3d-5e2e-b1be-24f2bb48858b" +version = "2.0.0" + +[[deps.Zlib_jll]] +deps = ["Libdl"] +uuid = "83775a58-1f1d-513f-b197-d71354ab007a" +version = "1.2.13+0" + +[[deps.ZygoteRules]] +deps = ["ChainRulesCore", "MacroTools"] +git-tree-sha1 = "977aed5d006b840e2e40c0b48984f7463109046d" +uuid = "700de1a5-db45-46bc-99cf-38207098b444" +version = "0.2.3" + +[[deps.libblastrampoline_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" +version = "5.7.0+0" + +[[deps.nghttp2_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" +version = "1.48.0+0" + +[[deps.p7zip_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" +version = "17.4.0+0" diff --git a/test/helper_functions.jl b/test/helper_functions.jl index 9ff153d..d2a8a8f 100644 --- a/test/helper_functions.jl +++ b/test/helper_functions.jl @@ -138,7 +138,7 @@ function test_multiplewaveguides(b,Nw,idx,order,wda1,adw1) nsteps = length(times) dt = times[2] - times[1] ξfun(t1) = 1 - psi = tensor([i == bw_idx ? onephoton(b.bases[i],idx,ξfun,times) : i==bc_idx ? fockstate(b.bases[i],1) : fockstate(b.bases[i],0) for i in 1:3]...) + psi = tensor([i == bw_idx ? onephoton(b.bases[i],idx,ξfun) : i==bc_idx ? fockstate(b.bases[i],1) : fockstate(b.bases[i],0) for i in 1:3]...) tmp = copy(psi) tmp2 = copy(psi) @@ -172,7 +172,7 @@ function test_multiplewaveguides(b,Nw,idx,order,wda1,adw1) psi_view = view_waveguide(tmp,ground_idx) for k in filter(x -> x != idx, 1:Nw) - psi = tensor([i == bw_idx ? onephoton(b.bases[i],k,ξfun,times) : i==bc_idx ? fockstate(b.bases[i],1) : fockstate(b.bases[i],0) for i in 1:3]...) + psi = tensor([i == bw_idx ? onephoton(b.bases[i],k,ξfun) : i==bc_idx ? fockstate(b.bases[i],1) : fockstate(b.bases[i],0) for i in 1:3]...) mul!(tmp,wda1,psi,1,0) i,j = min(k,idx),max(k,idx) index = (i-1)*Nw + j - (i*(i+1))÷2 @@ -199,7 +199,7 @@ function test_interaction(b,Nw,idx1,idx2,order,wd2w1) nsteps = length(times) dt = times[2] - times[1] ξfun(t1) = 1 - psi = tensor([i == bw_idx ? onephoton(b.bases[i],idx1,ξfun,times) : fockstate(b.bases[i],0) for i in 1:3]...) + psi = tensor([i == bw_idx ? onephoton(b.bases[i],idx1,ξfun) : fockstate(b.bases[i],0) for i in 1:3]...) tmp = copy(psi) testvec2 = ones(nsteps) .* sqrt(2)/get_nsteps(psi.basis) @@ -212,7 +212,7 @@ function test_interaction(b,Nw,idx1,idx2,order,wd2w1) end ξfun(t1,t2) = 1 - psi = tensor([i == bw_idx ? twophoton(b.bases[i],idx1,ξfun,times) : fockstate(b.bases[i],0) for i in 1:3]...) + psi = tensor([i == bw_idx ? twophoton(b.bases[i],idx1,ξfun) : fockstate(b.bases[i],0) for i in 1:3]...) tmp = copy(psi) mul!(tmp,wd2w1,psi,1,0) diff --git a/test/test_detection_double.jl b/test/test_detection_double.jl index dc7ce41..e206e39 100644 --- a/test/test_detection_double.jl +++ b/test/test_detection_double.jl @@ -15,10 +15,10 @@ Detector_plus = Detector(sys.wa/sqrt(2),sys.wb/sqrt(2)) Detector_minus = Detector(sys.wa/sqrt(2),-sys.wb/sqrt(2)) ξfun(t,σ,t0) = complex(sqrt(2/σ)* (log(2)/pi)^(1/4)*exp(-2*log(2)*(t-t0)^2/σ^2)) -psi_a_1 = onephoton(bw,ξfun,param.times,1,15) ⊗ fockstate(bc,0) ⊗ nlevelstate(be,1) +psi_a_1 = onephoton(bw,ξfun,1,15) ⊗ fockstate(bc,0) ⊗ nlevelstate(be,1) psi_b_1 = zerophoton(bw) ⊗ fockstate(bc,0) ⊗ nlevelstate(be,2) psi_a_2 = zerophoton(bw) ⊗ fockstate(bc,0) ⊗ nlevelstate(be,2) -psi_b_2 = onephoton(bw,ξfun,param.times,1,15) ⊗ fockstate(bc,0) ⊗ nlevelstate(be,1) +psi_b_2 = onephoton(bw,ξfun,1,15) ⊗ fockstate(bc,0) ⊗ nlevelstate(be,1) proj_up = zerophoton(bw) ⊗ fockstate(bc,0) ⊗ nlevelstate(be,2) proj_down = zerophoton(bw) ⊗ fockstate(bc,0) ⊗ nlevelstate(be,1) @@ -48,8 +48,8 @@ p = detect_double_click(psi_two_photons,Detector_plus,Detector_plus) @test isapprox(p,0.5) -psi_1_up = onephoton(bw,ξfun,param.times,1,15) ⊗ fockstate(bc,0) ⊗ nlevelstate(be,2) -psi_1_down = onephoton(bw,ξfun,param.times,1,15) ⊗ fockstate(bc,0) ⊗ nlevelstate(be,1) +psi_1_up = onephoton(bw,ξfun,1,15) ⊗ fockstate(bc,0) ⊗ nlevelstate(be,2) +psi_1_down = onephoton(bw,ξfun,1,15) ⊗ fockstate(bc,0) ⊗ nlevelstate(be,1) psi_two_photons_entangled = LazySumKet(LazyTensorKet(psi_1_up,psi_1_down),LazyTensorKet(psi_1_down,psi_1_up))/sqrt(2) _,p = detect_double_click(psi_two_photons_entangled,Detector_minus,Detector_minus,projector_plus) diff --git a/test/test_detection_single.jl b/test/test_detection_single.jl index b2b294b..f13fb15 100644 --- a/test/test_detection_single.jl +++ b/test/test_detection_single.jl @@ -12,10 +12,10 @@ bw = sys.bw be = sys.be ξfun(t,σ,t0) = complex(sqrt(2/σ)* (log(2)/pi)^(1/4)*exp(-2*log(2)*(t-t0)^2/σ^2)) -psi_a_1 = onephoton(bw,ξfun,param.times,1,15) ⊗ fockstate(bc,0) ⊗ nlevelstate(be,1) +psi_a_1 = onephoton(bw,ξfun,1,15) ⊗ fockstate(bc,0) ⊗ nlevelstate(be,1) psi_b_1 = zerophoton(bw) ⊗ fockstate(bc,0) ⊗ nlevelstate(be,2) psi_a_2 = zerophoton(bw) ⊗ fockstate(bc,0) ⊗ nlevelstate(be,2) -psi_b_2 = onephoton(bw,ξfun,param.times,1,15) ⊗ fockstate(bc,0) ⊗ nlevelstate(be,1) +psi_b_2 = onephoton(bw,ξfun,1,15) ⊗ fockstate(bc,0) ⊗ nlevelstate(be,1) proj_up = zerophoton(bw) ⊗ fockstate(bc,0) ⊗ nlevelstate(be,2) proj_down = zerophoton(bw) ⊗ fockstate(bc,0) ⊗ nlevelstate(be,1) diff --git a/test/test_operators.jl b/test/test_operators.jl index b04240d..db7feaa 100644 --- a/test/test_operators.jl +++ b/test/test_operators.jl @@ -18,7 +18,7 @@ include("helper_functions.jl") adw = ad ⊗ w ξfun(t1,t2) = 1 - input = twophoton(bw,ξfun,times) + input = twophoton(bw,ξfun) psi = fockstate(bc,0) ⊗ input psi_out = copy(psi) @@ -42,7 +42,7 @@ end adw = ad ⊗ w ξfun(t1) = 1 - input = onephoton(bw,ξfun,times) + input = onephoton(bw,ξfun) psi = fockstate(bc,1) ⊗ input psi_out = copy(psi) mul!(psi_out,wda,psi,1,0.0) @@ -67,7 +67,7 @@ end adw = ad ⊗ w ξfun(t1) = 1 - input = onephoton(bw,ξfun,times) + input = onephoton(bw,ξfun) psi = fockstate(bc,0) ⊗ input wda_out_2 = copy(psi) adw_out_2 = copy(psi) @@ -84,7 +84,7 @@ end wda = a ⊗ wd adw = ad ⊗ w - input = onephoton(bw,ξfun,times) + input = onephoton(bw,ξfun) psi = fockstate(bc,0) ⊗ input adw_out_1 = copy(psi) wda_out_1 = copy(psi) From c2447c1dd2e3b212103a48fcc735fa25058a8b28 Mon Sep 17 00:00:00 2001 From: mabuni1998 Date: Fri, 26 May 2023 00:10:59 -0400 Subject: [PATCH 3/5] Updated documentation --- docs/make.jl | 2 +- docs/src/references.bib | 76 +++++++++++++++++++++++++++++++++++++++++ docs/src/references.md | 6 ++-- 3 files changed, 80 insertions(+), 4 deletions(-) diff --git a/docs/make.jl b/docs/make.jl index 1937b03..d37a38c 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -24,7 +24,7 @@ pages = [ "multiplewaveguides.md", "Examples" => ["Scattering on two level system" => "example_lodahl.md"], "API" => "API.md", -"References" => "references.md", +"References and suggested readings" => "references.md", ] ) diff --git a/docs/src/references.bib b/docs/src/references.bib index 27a63d3..e03a997 100644 --- a/docs/src/references.bib +++ b/docs/src/references.bib @@ -57,6 +57,21 @@ @article{Krastanov2022 year = {2022}, } +@article{Fischer2018, + abstract = {In this work, we discuss connections between different theoretical physics communities and their works, all related to systems that act as sources of particles such as photons, phonons, or electrons. Our interest is to understand how a low-dimensional quantum system driven by coherent fields, e.g., a two-level system, a Jaynes-Cummings system, or a photon pair source driven by a laser pulse, emits photons into a waveguide. Of particular relevance to solid-state sources is that we provide a way to include dissipation into the formalism for temporal-mode quantum optics. We will discuss the connections between temporal-mode quantum optics, scattering matrices, quantum stochastic calculus, continuous matrix product states and operators, and very traditional quantum optical concepts such as the Mandel photon counting formula and the Lindblad form of the quantum-optical master equation. We close with an example of how our formalism relates to single-photon sources with dephasing.}, + author = {Kevin A. Fischer and Rahul Trivedi and Daniil Lukin}, + doi = {10.1103/PhysRevA.98.023853}, + issn = {24699934}, + issue = {2}, + journal = {Physical Review A}, + month = {8}, + publisher = {American Physical Society}, + title = {Particle emission from open quantum systems}, + volume = {98}, + year = {2018}, +} + + @article{Ciccarello2018, abstract = {Quantum collision models (CMs) provide advantageous case studies for investigating major issues in open quantum systems theory, and especially quantum non-Markovianity. After reviewing their general definition and distinctive features, we illustrate the emergence of a CM in a familiar quantum optics scenario. This task is carried out by highlighting the close connection between the well-known input-output formalism and CMs. Within this quantum optics framework, usual assumptions in the CMs’ literature - such as considering a bath of noninteracting yet initially correlated ancillas - have a clear physical origin.}, author = {Francesco Ciccarello}, @@ -87,8 +102,69 @@ @article{HughesWQEDMPP2021 } +@article{Kiilerich2020, + abstract = {This paper presents a general master equation formalism for the interaction between traveling pulses of quantum radiation and localized quantum systems. Traveling fields populate a continuum of free-space radiation modes and the Jaynes-Cummings model, valid for a discrete eigenmode of a cavity, does not apply. We develop a complete input-output theory to describe the driving of quantum systems by arbitrary incident pulses of radiation and the quantum state of the field emitted into any desired outgoing temporal mode. Our theory is applicable to the transformation and interaction of pulses of radiation by their coupling to a wide class of material quantum systems. We discuss the most essential differences between quantum interactions with pulses and with discrete radiative eigenmodes and present examples relevant to quantum information protocols with optical, microwave, and acoustic waves.}, + author = {Alexander Holm Kiilerich and Klaus Mølmer}, + doi = {10.1103/PhysRevA.102.023717}, + issn = {2469-9926}, + issue = {2}, + journal = {Physical Review A}, + month = {8}, + pages = {023717}, + publisher = {American Physical Society}, + title = {Quantum interactions with pulses of radiation}, + volume = {102}, + url = {https://link.aps.org/doi/10.1103/PhysRevA.102.023717}, + year = {2020}, +} +@article{Kiilerich2019, + abstract = {We present a formalism that accounts for the interaction of a local quantum system, such as an atom or a cavity, with traveling pulses of quantized radiation. We assume Markovian coupling of the stationary system to the input and output fields and nondispersive asymptotic propagation of the pulses before and after the interaction. This permits derivation of a master equation where the input and output pulses are treated as single oscillator modes that both couple to the local system in a cascaded manner. As examples of our theory, we analyze reflection by an empty cavity with phase noise, stimulated atomic emission by a quantum light pulse, and formation of a Schrödinger-cat state by the dispersive interaction of a coherent pulse and a single atom in a cavity.}, + author = {Alexander Holm Kiilerich and Klaus Mølmer}, + doi = {10.1103/PhysRevLett.123.123604}, + issn = {0031-9007}, + issue = {12}, + journal = {Physical Review Letters}, + month = {9}, + pages = {123604}, + publisher = {American Physical Society}, + title = {Input-Output Theory with Quantum Pulses}, + volume = {123}, + url = {https://link.aps.org/doi/10.1103/PhysRevLett.123.123604}, + year = {2019}, +} + + +@article{Yang2022, + abstract = {Sorting quantum fields into different modes according to their Fock-space quantum numbers is a highly desirable quantum operation. In this Letter, we show that a pair of two-level emitters, chirally coupled to a waveguide, may scatter single- and two-photon components of an input pulse into orthogonal temporal modes with a fidelity ≳0.9997. We develop a general theory to characterize and optimize this process and reveal that such a high fidelity is enabled by an interesting two-photon scattering dynamics: while the first emitter gives rise to a complex multimode field, the second emitter recombines the field amplitudes, and the net two-photon scattering induces a self-time reversal of the input pulse mode. The presented scheme can be employed to construct logic elements for propagating photons, such as a deterministic nonlinear-sign gate with a fidelity ≳0.9995.}, + author = {Fan Yang and Mads M. Lund and Thomas Pohl and Peter Lodahl and Klaus Mølmer}, + doi = {10.1103/PhysRevLett.128.213603}, + issn = {10797114}, + issue = {21}, + journal = {Physical Review Letters}, + month = {5}, + pmid = {35687472}, + publisher = {American Physical Society}, + title = {Deterministic Photon Sorting in Waveguide QED Systems}, + volume = {128}, + year = {2022}, +} +@article{Christiansen2023, + abstract = {The interaction of a propagating pulse of quantum radiation with a localized quantum system can be described by a cascaded master equation with a distinct initially populated input and a finally populated output field mode [Kiilerich and Mølmer, Phys. Rev. Lett. 123, 123604 (2019)0031-900710.1103/PhysRevLett.123.123604]. By transformation to an appropriate interaction picture, we break the cascaded nature of the master equation and recover an effective time-dependent interaction with a lossless single mode and a supplementary lossy mode. The former closely represents the traveling pulse, while the latter constitutes a non-Markovian component in the exchange of quanta between the scatterer and the quantized field. The transformed master equation offers important insights into the system dynamics, and it permits numerically efficient solutions.}, + author = {Victor Rueskov Christiansen and Alexander Holm Kiilerich and Klaus Mølmer}, + doi = {10.1103/PhysRevA.107.013706}, + issn = {2469-9926}, + issue = {1}, + journal = {Physical Review A}, + month = {1}, + pages = {013706}, + publisher = {American Physical Society}, + title = {Interactions of quantum systems with pulses of quantized radiation: From a cascaded master equation to a traveling mode perspective}, + volume = {107}, + url = {https://link.aps.org/doi/10.1103/PhysRevA.107.013706}, + year = {2023}, +} diff --git a/docs/src/references.md b/docs/src/references.md index 9b5d992..1351e42 100644 --- a/docs/src/references.md +++ b/docs/src/references.md @@ -1,4 +1,4 @@ -# Suggested readings and references +# Suggested readings ## Theory and background The theory of time-bin continuous fockstates is introduced in [Heuck2020Photon-photonCavities](@cite) where it is used to derive the equations of motion for Waveguide QED systems. The numerical method in this library is heavily based on this approach, where instead of deriving the equations, the systems are solved by applying the operators themselves. The time-bin method is also used in [Heuck2020](@cite) and [Krastanov2022](@cite). @@ -8,11 +8,11 @@ The theory of time-bin continuous fockstates is introduced in [Heuck2020Photon-p The following is a list of approaches or methods that are trying to solve similar problems that can be treated with this library. * [HughesWQEDMPP2021](@cite) considers feedback in waveguide systems and uses a space-discretized waveguide picture with Monte Carlo trajectories * [Fischer2018](@cite) relates many approaches to solving WaveguideQED problems with each other and also introduces a framework that aims to deal with similar problems through master equations, photon counting and tracing. -* The SLH formalism introduced in [Kielerich2019](@cite) and [Kielerich2020](@cite) uses cascaded cavities to simulate quantum pulses. Further work also includes: [Yang2022](@cite) [Christiansen2023](@cite) +* The SLH formalism introduced in [Kiilerich2019](@cite) and [Kiilerich2019](@cite) uses cascaded cavities to simulate quantum pulses. Further work also includes: [Yang2022](@cite) [Christiansen2023](@cite) ## Papers where we reproduce results from * The theoretical results in [DynamicalPhotonLodahl2022](@cite) are reproduced in [Scattering on a two-level system](https://qojulia.github.io/WaveguideQED.jl/dev/example_lodahl/) - +# References ```@bibliography ``` From 7ceec19d786778f31f3a2b104db080e59f4b0841 Mon Sep 17 00:00:00 2001 From: mabuni1998 Date: Fri, 26 May 2023 16:14:55 -0400 Subject: [PATCH 4/5] Removed "should_upstream.jl" and added QUBase 0.4 as dependency --- Manifest.toml | 12 ++--- Project.toml | 4 +- README.md | 10 ++--- docs/src/detection.md | 4 +- docs/src/example_lodahl.md | 2 +- docs/src/index.md | 4 +- docs/src/references.md | 10 ++--- src/WaveguideOperator.jl | 19 +++++++- src/WaveguideQED.jl | 2 +- src/basis.jl | 1 + src/should_upstream.jl | 91 -------------------------------------- 11 files changed, 42 insertions(+), 117 deletions(-) delete mode 100644 src/should_upstream.jl diff --git a/Manifest.toml b/Manifest.toml index ce8bb54..b8c57ff 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -2,7 +2,7 @@ julia_version = "1.9.0" manifest_format = "2.0" -project_hash = "223688a101f8a9d7186d2b2c1de1b4a7a04b14df" +project_hash = "4dde56137bf92cdd4b71288bb369d001941db81e" [[deps.AbstractFFTs]] deps = ["LinearAlgebra"] @@ -780,15 +780,15 @@ version = "0.1.0" [[deps.QuantumOptics]] deps = ["Arpack", "DiffEqBase", "DiffEqCallbacks", "FFTW", "ForwardDiff", "IterativeSolvers", "LinearAlgebra", "LinearMaps", "OrdinaryDiffEq", "QuantumOpticsBase", "Random", "RecursiveArrayTools", "Reexport", "SparseArrays", "StochasticDiffEq", "WignerSymbols"] -git-tree-sha1 = "81d7cf56eddb8b7c6b65c9da638d10bf2f10d7c2" +git-tree-sha1 = "ff110fa403b1cd68b97527e42fb1333ab0b67969" uuid = "6e0679c1-51ea-5a7c-ac74-d61b76210b0c" -version = "1.0.9" +version = "1.0.10" [[deps.QuantumOpticsBase]] -deps = ["Adapt", "FFTW", "LRUCache", "LinearAlgebra", "QuantumInterface", "Random", "SparseArrays", "Strided", "UnsafeArrays"] -git-tree-sha1 = "c0fe25d57ffe78ec8a56f831e1631d448e5973d0" +deps = ["Adapt", "FFTW", "FillArrays", "LRUCache", "LinearAlgebra", "QuantumInterface", "Random", "SparseArrays", "Strided", "UnsafeArrays"] +git-tree-sha1 = "0d916919aa637558cc8e146dfaffa60130219db7" uuid = "4f57444f-1401-5e15-980d-4471b28d5678" -version = "0.3.12" +version = "0.4.0" [[deps.REPL]] deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] diff --git a/Project.toml b/Project.toml index eaa92ff..997db60 100644 --- a/Project.toml +++ b/Project.toml @@ -17,7 +17,7 @@ UnsafeArrays = "c4a57d5a-5b31-53a6-b365-19f8c011fbd6" Parameters = "0.12" PrecompileTools = "1" QuantumOptics = "1" -QuantumOpticsBase = "0.3.9" +QuantumOpticsBase = "0.4" Strided = "1,2" UnsafeArrays = "1" -julia = "1.8" +julia = "1.9" diff --git a/README.md b/README.md index e4e25f3..d37a76c 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ # WaveguideQED.jl Documentation of latest stable version -Test coverage from codecov +Test coverage from codecov -A julia package for simulating quantum states of photon wavepackets using a discrete-time formalism [Phys. Rev. A 101, 042322](https://journals.aps.org/pra/abstract/10.1103/PhysRevA.101.042322). Package works as an extension to [QuantumOptics.jl](https://qojulia.org/) where basises and operators from WaveguideQED.jl can be used together with operators and basises from QuantumOpics.jl. +A Julia package for simulating quantum states of photon wavepackets using a discrete-time formalism [Phys. Rev. A 101, 042322](https://journals.aps.org/pra/abstract/10.1103/PhysRevA.101.042322). The package works as an extension to [QuantumOptics.jl](https://qojulia.org/) where bases and operators from WaveguideQED.jl can be used together with operators and bases from QuantumOpics.jl. ### Example of usage: -Define a waveguide basis, containing a two photon wavepacket for a time interval 0 to 20 with 0.2 timesteps: +Define a waveguide basis, containing a two-photon wavepacket for a time interval from 0 to 20 with timesteps of 0.2: ```julia @@ -32,7 +32,7 @@ wda = a ⊗ wd adw = ad ⊗ w ``` -Finally, we can define an initial twophoton gaussian wavepacket state with view_twophoton and zero photons in the cavity, an Hamiltonian, and simulate the evolution: +Finally, we can define an initial two-photon Gaussian wavepacket state with view_twophoton and zero photons in the cavity, a Hamiltonian, and simulate the evolution: ```julia @@ -44,7 +44,7 @@ H = im*sqrt(1/dt)*(adw-wda) ψ = waveguide_evolution(times, psi, H) ``` -Plotting the twophoton state is also simple: +Plotting the two-photon state is also simple: ```julia diff --git a/docs/src/detection.md b/docs/src/detection.md index 3006d62..440e912 100644 --- a/docs/src/detection.md +++ b/docs/src/detection.md @@ -26,7 +26,7 @@ $$\begin{align*} &= \frac{1}{2} \left ( W_c^\dagger(\xi_a) W_c^\dagger(\xi_b) \ket{0}_c - W_d^\dagger(\xi_a) W_d^\dagger(\xi_b) \ket{0}_d + \int_{t_0}^{t_{end}} \mathrm{d}t \int_{t_0}^{t_{end}} \mathrm{d}t' \left [ \xi_a(t)\xi_b(t') - \xi_a(t')\xi_b(t) \right] \ket{1}_c\ket{1}_d \right) \end{align*}$$ -where we introduced $$W_{c/d}^\dagger(\xi_a) W_{c/d}^\dagger(\xi_b) \ket{0}_{c/d} = int_{t_0}^{t_{end}} \mathrm{d}t \int_{t_0}^{t_{end}} \mathrm{d}t' \xi_a(t)\xi_b(t') w_{c/d}^\dagger(t) w_{c/d}^\dagger(t') \ket{0}_{c/d}$$. $$W_{c/d}^\dagger(\xi_a) W_{c/d}^\dagger(\xi_b) \ket{0}_{c/d}$$ thus corresponds to both photons going into the same direction. It is also evident that if $$\xi_a(t)\xi_b(t') - \xi_a(t')\xi_b(t) \right = 0$$ then we will have no photons in waveguide c and d simultaneously. This condition is exactly fulfilled if the photon in waveguide a is indistinguishable from the photon in waveguide b. This also means that if the photons ARE distinguishable, we will start to see photon occurring in waveguide c and d simultaneously. All this and more can be simulated in the code, and in the next section, we walk through how to set the above example up in the code. +where we introduced $$W_{c/d}^\dagger(\xi_a) W_{c/d}^\dagger(\xi_b) \ket{0}_{c/d} = int_{t_0}^{t_{end}} \mathrm{d}t \int_{t_0}^{t_{end}} \mathrm{d}t' \xi_a(t)\xi_b(t') w_{c/d}^\dagger(t) w_{c/d}^\dagger(t') \ket{0}_{c/d}$$. $$W_{c/d}^\dagger(\xi_a) W_{c/d}^\dagger(\xi_b) \ket{0}_{c/d}$$ thus corresponds to both photons going into the same direction. It is also evident that if $$\xi_a(t)\xi_b(t') - \xi_a(t')\xi_b(t) = 0$$ then we will have no photons in waveguide c and d simultaneously. This condition is exactly fulfilled if the photon in waveguide a is indistinguishable from the photon in waveguide b. This also means that if the photons ARE distinguishable, we will start to see photons occurring in waveguides c and d simultaneously. All this and more can be simulated in the code, and in the next section, we walk through how to set the above example up in the code. ## Beamsplitter and detection in WaveguideQED.jl @@ -60,7 +60,7 @@ Dminus = Detector(wa/sqrt(2),-wb/sqrt(2)) nothing #hide ``` -The [`Detector`](@ref) applies the first operator (`wa/sqrt(2)`) to the first `Ket` in LazyTensorKet (`waveguide_a`) and the second operator (L`$\pm$ wb/sqrt(2)`) to the second `Ket` in `LazyTensorKet` (waveguide_b). The probability of detecting a photon in the detectors can then be calculated by: +The [`Detector`](@ref) applies the first operator (`wa/sqrt(2)`) to the first `Ket` in LazyTensorKet (`waveguide_a`) and the second operator ($$\pm $$ `wb/sqrt(2)`) to the second `Ket` in `LazyTensorKet` (waveguide_b). The probability of detecting a photon in the detectors can then be calculated by: ```@repl detection p_plus = Dplus * ψ_total diff --git a/docs/src/example_lodahl.md b/docs/src/example_lodahl.md index 72625d4..4436681 100644 --- a/docs/src/example_lodahl.md +++ b/docs/src/example_lodahl.md @@ -93,7 +93,7 @@ end nothing #hide ``` -Finally, we can plot the scattered wavefunctions, and we note that this matches Fig. 3 in Ref. ^[1]: +Finally, we can plot the scattered wavefunctions, and we note that this matches Fig. 3 in Ref.[^1]: ```@example lodahl using PyPlot; #hide diff --git a/docs/src/index.md b/docs/src/index.md index 9fb8ac7..bc55ec2 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -4,8 +4,8 @@ WaveguideQED.jl is a package for simulating continuous fockstates in waveguides. ## Dev docs Added functionalities: -* [`WaveguideBasis`](@ref) for representing the waveguide space and the related generator functions: [`zerophoton`](@ref), [`onephoton`](@ref), and [`twophoton`](@ref). Also see [`OnePhotonView`](@ref), [`TwoPhotonView`](@ref), and [`plot_twophoton!`](@ref) for viewing the waveguide data for plotting. Note that [`WaveguideBasis`](@ref) can contain multiple waveguides. -* [`WaveguideOperator`](@ref) which are specialized operators allowing efficient annihilation and creation operators at each time-bin in the waveguide. They are created by giving a basis to [`WaveguideQED.destroy`](@ref) and [`WaveguideQED.create`](@ref) +* [`WaveguideBasis`](@ref) for representing the waveguide Hilbert space and the related functions for generating states in this Hilbert space: [`zerophoton`](@ref), [`onephoton`](@ref), and [`twophoton`](@ref). Also see [`OnePhotonView`](@ref), [`TwoPhotonView`](@ref), and [`plot_twophoton!`](@ref) for viewing the waveguide states and plotting them. Note that [`WaveguideBasis`](@ref) can contain multiple waveguides. +* [`WaveguideOperator`](@ref) are specialized operators allowing efficient annihilation and creation operators at each time-bin in the waveguide. They are created by giving a basis to [`WaveguideQED.destroy`](@ref) and [`WaveguideQED.create`](@ref) * Since the interaction between the waveguide time-bin mode $k$ and cavity/emitter is given as: $a^\dagger w_k - a w_k^\dagger$ there are specially optimized functions for doing these operations called [`CavityWaveguideOperator`](@ref) which are created using a fockbasis and a waveguide basis and the functions [`emission`](@ref) and [`absorption`](@ref). * [`Detector`](@ref), [`LazyTensorKet`](@ref), and [`LazySumKet`](@ref), together with [`detect_single_click`](@ref) and [`detect_double_click`](@ref) allow one to do a beamsplitter interference and subsequent detection of photons coming from two waveguides. diff --git a/docs/src/references.md b/docs/src/references.md index 1351e42..f1afe10 100644 --- a/docs/src/references.md +++ b/docs/src/references.md @@ -1,16 +1,16 @@ # Suggested readings -## Theory and background +### Theory and background The theory of time-bin continuous fockstates is introduced in [Heuck2020Photon-photonCavities](@cite) where it is used to derive the equations of motion for Waveguide QED systems. The numerical method in this library is heavily based on this approach, where instead of deriving the equations, the systems are solved by applying the operators themselves. The time-bin method is also used in [Heuck2020](@cite) and [Krastanov2022](@cite). -## Similar or other approaches +### Similar approaches -The following is a list of approaches or methods that are trying to solve similar problems that can be treated with this library. +The following is a list of approaches that are trying to solve problems that can also be treated with this library. * [HughesWQEDMPP2021](@cite) considers feedback in waveguide systems and uses a space-discretized waveguide picture with Monte Carlo trajectories -* [Fischer2018](@cite) relates many approaches to solving WaveguideQED problems with each other and also introduces a framework that aims to deal with similar problems through master equations, photon counting and tracing. +* [Fischer2018](@cite) relates many approaches to solving WaveguideQED problems with each other and also introduces a framework that aims to deal with similar problems through master equations, photon counting and tracing out the waveguide. * The SLH formalism introduced in [Kiilerich2019](@cite) and [Kiilerich2019](@cite) uses cascaded cavities to simulate quantum pulses. Further work also includes: [Yang2022](@cite) [Christiansen2023](@cite) -## Papers where we reproduce results from +### Papers where we reproduce results from * The theoretical results in [DynamicalPhotonLodahl2022](@cite) are reproduced in [Scattering on a two-level system](https://qojulia.github.io/WaveguideQED.jl/dev/example_lodahl/) # References diff --git a/src/WaveguideOperator.jl b/src/WaveguideOperator.jl index 7453da7..a1713a6 100644 --- a/src/WaveguideOperator.jl +++ b/src/WaveguideOperator.jl @@ -174,13 +174,28 @@ function mul!(result::Ket{B1}, a::LazyTensor{B1,B2,F,I,T}, b::Ket{B2}, alpha, be b_data = Base.ReshapedArray(b.data, QuantumOpticsBase._comp_size(basis(b)), ()) result_data = Base.ReshapedArray(result.data, QuantumOpticsBase._comp_size(basis(result)), ()) - tp_ops = (tuple(( (isa(op,DataOperator) ? op.data : op) for op in a.operators)...), a.indices) - iso_ops = QuantumOpticsBase._explicit_isometries(a.indices, a.basis_l, a.basis_r) + tp_ops = QuantumOpticsBase._tpops_tuple(a) + iso_ops = QuantumOpticsBase._explicit_isometries(eltype(a), a.indices, a.basis_l, a.basis_r) QuantumOpticsBase._tp_sum_matmul!(result_data, tp_ops, iso_ops, b_data, alpha * a.factor, beta) result end +function QuantumOpticsBase._tpops_tuple(a::LazyTensor{B1,B2,F,I,T}; shift=0, op_transform=identity) where {B1<:Basis,B2<:Basis, F,I,T<:Tuple{Vararg{AbstractOperator}}} + length(a.operators) == 0 == length(a.indices) && return () + op_pairs = tuple((((isa(op,DataOperator) ? op_transform(op.data) : op_transform(op)), i + shift) for (op, i) in zip(a.operators, a.indices))...) + + # Filter out identities: + # This induces a non-trivial cost only if _is_square_eye is not inferrable. + # This happens if we have Eyes that are not SquareEyes. + # This can happen if the user constructs LazyTensor operators including + # explicit identityoperator(b,b). + filtered = filter(p->!QuantumOpticsBase._is_square_eye(p[1]), op_pairs) + return filtered +end +QuantumOpticsBase._is_square_eye(a::AbstractOperator) = false + + #Called from _tp_sum_matmul! #Makes sure operator works on correct part of tensor. function QuantumOpticsBase.:_tp_matmul!(result, a::WaveguideOperator, loc::Integer, b, α::Number, β::Number) diff --git a/src/WaveguideQED.jl b/src/WaveguideQED.jl index ba4d8ca..3bcbfac 100644 --- a/src/WaveguideQED.jl +++ b/src/WaveguideQED.jl @@ -22,7 +22,7 @@ include("WaveguideOperator.jl") include("CavityWaveguideOperator.jl") include("WaveguideInteraction.jl") include("solver.jl") -include("should_upstream.jl") +#include("should_upstream.jl") include("detection.jl") include("plotting.jl") include("precompile.jl") diff --git a/src/basis.jl b/src/basis.jl index 7e7c6dd..1ce6ea3 100644 --- a/src/basis.jl +++ b/src/basis.jl @@ -724,6 +724,7 @@ end - `norm::Bool=true`: normalize the resulting wavepacket. """ twophoton(b::WaveguideBasis{T,Nw},idx::I,ξ::Matrix;norm=true) where {T,Nw,I<:Union{Vector{Int64},Tuple{Vararg{Int64}}}} = twophoton(b,idx[1],idx[2],ξ,norm=norm) +twophoton(b::WaveguideBasis{1,Nw},args...;norm=true) where {Nw} = throw(ArgumentError("The input basis b only contains onephoton and I can't create twophotons. Create a new basis containing two-photons using WaveguideBasis(2,times)")) """ twophoton(b::WaveguideBasis{T,Nw},idx::I,ξ::Function,times,args...;norm=true) where {T,Nw,I<:Union{Vector{Int64},Tuple{Vararg{Int64}}}} = twophoton(b,idx[1],idx[2],ξ,times,args...,norm=norm) diff --git a/src/should_upstream.jl b/src/should_upstream.jl deleted file mode 100644 index 9b4b949..0000000 --- a/src/should_upstream.jl +++ /dev/null @@ -1,91 +0,0 @@ - -function QuantumOpticsBase.:+(a::LazyTensor{B1,B2},b::LazyTensor{B1,B2}) where {B1,B2} - LazySum(a,b) -end - -function QuantumOpticsBase.:-(a::LazyTensor{B1,B2},b::LazyTensor{B1,B2}) where {B1,B2} - LazySum((1,-1),(a,b)) -end - -function QuantumOpticsBase.:+(a::LazyTensor{B1,B2},b::Operator{B1,B2}) where {B1,B2} - LazySum(a) + b -end -function QuantumOpticsBase.:+(a::Operator{B1,B2},b::LazyTensor{B1,B2}) where {B1,B2} - +(b,a) -end -function QuantumOpticsBase.:+(a::LazyProduct{B1,B2},b::Operator{B1,B2}) where {B1,B2} - LazySum(a) + b -end -function QuantumOpticsBase.:+(a::Operator{B1,B2},b::LazyProduct{B1,B2}) where {B1,B2} - +(b,a) -end -function QuantumOpticsBase.:-(a::LazyProduct{B1,B2},b::LazyProduct{B1,B2}) where {B1,B2} - LazySum(a) - b -end -function QuantumOpticsBase.:-(a::LazyProduct{B1,B2},b::LazyProduct{B1,B2}) where {B1,B2} - a-LazySum(b) -end -function QuantumOpticsBase.:+(a::LazyProduct{B1,B2},b::LazyProduct{B1,B2}) where {B1,B2} - LazySum(a) + LazySum(b) -end -function QuantumOpticsBase.:+(a::LazyProduct{B1,B2},b::LazyProduct{B1,B2}) where {B1,B2} - +(b,a) -end - -function QuantumOpticsBase.:⊗(a::LazyTensor,b::Operator) - if isequal(b,identityoperator(basis(b))) - btotal = basis(a) ⊗ basis(b) - LazyTensor(btotal,btotal,(a.indices...,),(a.operators...,),a.factor) - else - a ⊗ LazyTensor(b.basis_l,b.basis_r,[1],(b,),1) - end -end - -function QuantumOpticsBase.:⊗(a::Operator,b::LazyTensor) - if isequal(a,identityoperator(basis(a))) - btotal = basis(a) ⊗ basis(b) - LazyTensor(btotal,btotal,(b.indices...,).+1 ,(b.operators...,),b.factor) - else - LazyTensor(a.basis_l,a.basis_r,[1],(a,),1) ⊗ b - end -end - - - -function QuantumOpticsBase.:⊗(a::Operator,b::LazySum) - btotal_l = a.basis_l ⊗ b.basis_l - btotal_r = a.basis_r ⊗ b.basis_r - ops = ([a ⊗ op op in b.operators]...,) - LazySum(btotal_l,btotal_r,b.factors,ops) -end -function QuantumOpticsBase.:⊗(a::LazySum,b::Operator) - btotal_l = a.basis_l ⊗ b.basis_l - btotal_r = a.basis_r ⊗ b.basis_r - ops = ([op ⊗ b op in a.operators]...,) - LazySum(btotal_l,btotal_r,a.factors,ops) -end - - -function QuantumOpticsBase.:⊗(a::Operator,b::LazyProduct) - ops = ([a ⊗ op for op in b.operators]...,) - LazyProduct(ops,b.factor) -end -function QuantumOpticsBase.:⊗(a::LazyProduct,b::Operator) - ops = ([op ⊗ b for op in a.operators]...,) - LazyProduct(ops,a.factor) -end - -function QuantumOpticsBase.:⊗(a::AbstractOperator,b::LazyTensor) - btotal_l = a.basis_l ⊗ b.basis_l - btotal_r = a.basis_r ⊗ b.basis_r - indices = (1,(b.indices .+ 1)...) - ops = (a,b.operators...) - LazyTensor(btotal_l,btotal_r,indices,ops,b.factor) -end -function QuantumOpticsBase.:⊗(a::LazyTensor,b::AbstractOperator) - btotal_l = a.basis_l ⊗ b.basis_l - btotal_r = a.basis_r ⊗ b.basis_r - indices = (a.indices...,length(a.indices)+1) - ops = (a.operators...,b) - LazyTensor(btotal_l,btotal_r,indices,ops,a.factor) -end From c480f5270d059f5372c06e2c2f4acc77906c1be4 Mon Sep 17 00:00:00 2001 From: mabuni1998 Date: Wed, 31 May 2023 10:04:11 -0400 Subject: [PATCH 5/5] Small documentation updates --- .gitignore | 1 + README.md | 2 +- docs/.gitignore | 1 + docs/src/theoreticalbackground.md | 2 +- docs/src/tutorial.md | 4 ++-- src/WaveguideQED.jl | 1 - 6 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2251642 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +Manifest.toml \ No newline at end of file diff --git a/README.md b/README.md index d37a76c..70fcdd5 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Finally, we can define an initial two-photon Gaussian wavepacket state with view ```julia ξfun(t1,t2,σ1,σ2,t0) = sqrt(2/σ1)* (log(2)/pi)^(1/4)*exp(-2*log(2)*(t1-t0)^2/σ1^2)*sqrt(2/σ2)* (log(2)/pi)^(1/4)*exp(-2*log(2)*(t2-t0)^2/σ2^2) -ψ_cw = twophoton(bw,ξfun,times,1,1,5) +ψ_cw = twophoton(bw,ξfun,1,1,5) psi = fockstate(bc,0) ⊗ ψ_cw dt = times[2] - times[1] H = im*sqrt(1/dt)*(adw-wda) diff --git a/docs/.gitignore b/docs/.gitignore index a303fff..aa030f0 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -1,2 +1,3 @@ build/ site/ +Manifest.toml \ No newline at end of file diff --git a/docs/src/theoreticalbackground.md b/docs/src/theoreticalbackground.md index ef9b876..9f0578b 100644 --- a/docs/src/theoreticalbackground.md +++ b/docs/src/theoreticalbackground.md @@ -10,7 +10,7 @@ $$\begin{equation*} \ket{\psi} = W^\dagger(\xi) \ket{0} = \int_{t_0}^{t_{end}} \mathrm{d}t \ \xi(t) w^\dagger(t) \ket{\emptyset} \end{equation*}$$ -here $W^\dagger(\xi)$ creates a photon with the wavefunction $\xi(t)$. $w^\dagger(t)$ is the creation operator for a photon at time $t$, and it obeys the commutation relation: $\left[w(t),w(t')\right ] = \delta(t-t')$. The probability of observing a photon at time $t$ is given by: $\bra{0} w(t) \ket{\psi} = |\xi(t)|^2$. The wavefunction $\xi(t)$ thus describes the temporal distribution of the photon. +here $W^\dagger(\xi)$ creates a photon with the wavefunction $\xi(t)$. $w^\dagger(t)$ is the creation operator for a photon at time $t$, and it obeys the commutation relation: $\left[w(t),w(t')\right ] = \delta(t-t')$. The probability of observing a photon at time $t$ is given by: $\bra{\psi} w^\dagger(t) w(t) \ket{\psi} = |\xi^{(1)}(t)|^2$. The interpretation of the wavefunction $\xi^{(1)}(t)$. The wavefunction $\xi(t)$ thus describes the temporal distribution of the photon. The heart of the photon time-binning is discretizing the continuous fock state into time-bins of width $\Delta t$. The interaction with the emitter/cavity is then assumed to span only one time-bin at a time, corresponding to a spectrally flat interaction between the waveguide and emitter/cavity. We thus discretize the annihilation and creation operators by taking[^1]: diff --git a/docs/src/tutorial.md b/docs/src/tutorial.md index 0bf8f0f..ff465ad 100644 --- a/docs/src/tutorial.md +++ b/docs/src/tutorial.md @@ -18,7 +18,7 @@ bc = FockBasis(1) nothing #hide ``` -Next, we want to create the Hamiltonian for the system. The interaction between the waveguide and cavity is at timestep k given by[^1] $$H_k = i \hbar \sqrt{\gamma / \Delta t}( a^\dagger w_k - a w_k^\dagger)$$, where $$a$$ ($$a^\dagger$$) is the cavity annihilation (creation) operator, $$w_k$$($$w_k^\dagger$$) is the waveguide annihilation (creation) operator, $$\gamma$$ is the leakage rate of the cavity, and `\Delta t = times[2]-times[1]` is the width of the time-bin. `WaveguideQED.jl` follows the same syntax as [`QuantumOptics.jl`](https://qojulia.org/), and operators are defined from a basis. Operators of different Hilbert spaces are then combined using ⊗ (``\otimes``) or `tensor`: +Next, we want to create the Hamiltonian for the system. The interaction between the waveguide and cavity is at timestep k given by[^1] $$H_k = i \hbar \sqrt{\gamma / \Delta t}( a^\dagger w_k - a w_k^\dagger)$$, where $$a$$ ($$a^\dagger$$) is the cavity annihilation (creation) operator, $$w_k$$($$w_k^\dagger$$) is the waveguide annihilation (creation) operator, $$\gamma$$ is the leakage rate of the cavity, and $$\Delta t = \mathrm{times[2]}-\mathrm{times[1]}$$ is the width of the time-bin. `WaveguideQED.jl` follows the same syntax as [`QuantumOptics.jl`](https://qojulia.org/), and operators are defined from a basis. Operators of different Hilbert spaces are then combined using ⊗ (`\otimes`) or `tensor`: ```@example tutorial a = destroy(bc) @@ -77,7 +77,7 @@ nothing #hide ``` ![alt text](scat_onephoton.svg) -We see that the wavefunction has changed after the interaction with the cavity. More specifically, we see how the pulse gets absorbed into the cavity leading and a corresponding phase change of the wave. This phase change also leads to destructive interference between the photon being emitted from the cavity and the reflection of the incoming photon. This leads to a dip in the photon wavefunction after the interaction. +We see that the wavefunction has changed after the interaction with the cavity. More specifically, we see how the pulse gets absorbed into the cavity leading to a phase change in the wavefunction. This phase change also leads to destructive interference between the photon being emitted from the cavity and the reflection of the incoming photon. This leads to a dip in the photon wavefunction after the interaction. ## Expectation values diff --git a/src/WaveguideQED.jl b/src/WaveguideQED.jl index 3bcbfac..2c43beb 100644 --- a/src/WaveguideQED.jl +++ b/src/WaveguideQED.jl @@ -22,7 +22,6 @@ include("WaveguideOperator.jl") include("CavityWaveguideOperator.jl") include("WaveguideInteraction.jl") include("solver.jl") -#include("should_upstream.jl") include("detection.jl") include("plotting.jl") include("precompile.jl")