From 64bf479781b8269fb102714ee70240e683881d80 Mon Sep 17 00:00:00 2001 From: christoph Date: Tue, 2 Apr 2024 14:00:16 +0200 Subject: [PATCH] fix @register() -> @register_symbolic() in docs example --- .../heterodyne_detection.ipynb | 350 ++++++++++++++++-- .../ramsey spectroscopy.ipynb | 41 +- docs/src/examples/ramsey_spectroscopy.md | 2 +- 3 files changed, 359 insertions(+), 34 deletions(-) diff --git a/docs/src/examples/jupyter_notebooks/heterodyne_detection.ipynb b/docs/src/examples/jupyter_notebooks/heterodyne_detection.ipynb index 68115837..cedae23e 100644 --- a/docs/src/examples/jupyter_notebooks/heterodyne_detection.ipynb +++ b/docs/src/examples/jupyter_notebooks/heterodyne_detection.ipynb @@ -1,5 +1,14 @@ { "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# TODO: using Plots" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -10,9 +19,207 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[36m\u001b[1m[ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mPrecompiling QuantumCumulants [35bcea6d-e19f-57db-af74-8011de6c7255]\n", + "\u001b[91m\u001b[1mERROR: \u001b[22m\u001b[39mLoadError: InitError: UndefVarError: `memset` not defined\n", + "Stacktrace:\n", + " [1] \u001b[0m\u001b[1mgetproperty\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mBase.jl:31\u001b[24m\u001b[39m\u001b[90m [inlined]\u001b[39m\n", + " [2] \u001b[0m\u001b[1m__init__\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[0m\u001b[1m)\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[35mTriangularSolve\u001b[39m \u001b[90m~/.julia/packages/TriangularSolve/Bule6/src/\u001b[39m\u001b[90m\u001b[4mTriangularSolve.jl:269\u001b[24m\u001b[39m\n", + " [3] \u001b[0m\u001b[1mregister_restored_modules\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90msv\u001b[39m::\u001b[0mCore.SimpleVector, \u001b[90mpkg\u001b[39m::\u001b[0mBase.PkgId, \u001b[90mpath\u001b[39m::\u001b[0mString\u001b[0m\u001b[1m)\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:1115\u001b[24m\u001b[39m\n", + " [4] \u001b[0m\u001b[1m_include_from_serialized\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90mpkg\u001b[39m::\u001b[0mBase.PkgId, \u001b[90mpath\u001b[39m::\u001b[0mString, \u001b[90mocachepath\u001b[39m::\u001b[0mString, \u001b[90mdepmods\u001b[39m::\u001b[0mVector\u001b[90m{Any}\u001b[39m\u001b[0m\u001b[1m)\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:1061\u001b[24m\u001b[39m\n", + " [5] \u001b[0m\u001b[1m_tryrequire_from_serialized\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90mpkg\u001b[39m::\u001b[0mBase.PkgId, \u001b[90mpath\u001b[39m::\u001b[0mString, \u001b[90mocachepath\u001b[39m::\u001b[0mString\u001b[0m\u001b[1m)\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:1442\u001b[24m\u001b[39m\n", + " [6] \u001b[0m\u001b[1m_require\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90mpkg\u001b[39m::\u001b[0mBase.PkgId, \u001b[90menv\u001b[39m::\u001b[0mString\u001b[0m\u001b[1m)\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:1816\u001b[24m\u001b[39m\n", + " [7] \u001b[0m\u001b[1m_require_prelocked\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90muuidkey\u001b[39m::\u001b[0mBase.PkgId, \u001b[90menv\u001b[39m::\u001b[0mString\u001b[0m\u001b[1m)\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:1660\u001b[24m\u001b[39m\n", + " [8] \u001b[0m\u001b[1mmacro expansion\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:1648\u001b[24m\u001b[39m\u001b[90m [inlined]\u001b[39m\n", + " [9] \u001b[0m\u001b[1mmacro expansion\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mlock.jl:267\u001b[24m\u001b[39m\u001b[90m [inlined]\u001b[39m\n", + " [10] \u001b[0m\u001b[1mrequire\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90minto\u001b[39m::\u001b[0mModule, \u001b[90mmod\u001b[39m::\u001b[0mSymbol\u001b[0m\u001b[1m)\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:1611\u001b[24m\u001b[39m\n", + " [11] \u001b[0m\u001b[1minclude\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90mmod\u001b[39m::\u001b[0mModule, \u001b[90m_path\u001b[39m::\u001b[0mString\u001b[0m\u001b[1m)\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mBase.jl:457\u001b[24m\u001b[39m\n", + " [12] \u001b[0m\u001b[1minclude\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90mx\u001b[39m::\u001b[0mString\u001b[0m\u001b[1m)\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[36mRecursiveFactorization\u001b[39m \u001b[90m~/.julia/packages/RecursiveFactorization/cDP6H/src/\u001b[39m\u001b[90m\u001b[4mRecursiveFactorization.jl:1\u001b[24m\u001b[39m\n", + " [13] top-level scope\n", + "\u001b[90m @\u001b[39m \u001b[90m~/.julia/packages/RecursiveFactorization/cDP6H/src/\u001b[39m\u001b[90m\u001b[4mRecursiveFactorization.jl:6\u001b[24m\u001b[39m\n", + " [14] \u001b[0m\u001b[1minclude\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mBase.jl:457\u001b[24m\u001b[39m\u001b[90m [inlined]\u001b[39m\n", + " [15] \u001b[0m\u001b[1minclude_package_for_output\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90mpkg\u001b[39m::\u001b[0mBase.PkgId, \u001b[90minput\u001b[39m::\u001b[0mString, \u001b[90mdepot_path\u001b[39m::\u001b[0mVector\u001b[90m{String}\u001b[39m, \u001b[90mdl_load_path\u001b[39m::\u001b[0mVector\u001b[90m{String}\u001b[39m, \u001b[90mload_path\u001b[39m::\u001b[0mVector\u001b[90m{String}\u001b[39m, \u001b[90mconcrete_deps\u001b[39m::\u001b[0mVector\u001b[90m{Pair{Base.PkgId, UInt128}}\u001b[39m, \u001b[90msource\u001b[39m::\u001b[0mString\u001b[0m\u001b[1m)\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:2045\u001b[24m\u001b[39m\n", + " [16] top-level scope\n", + "\u001b[90m @\u001b[39m \u001b[90m\u001b[4mstdin:3\u001b[24m\u001b[39m\n", + "during initialization of module TriangularSolve\n", + "in expression starting at /home/christoph/.julia/packages/RecursiveFactorization/cDP6H/src/lu.jl:2\n", + "in expression starting at /home/christoph/.julia/packages/RecursiveFactorization/cDP6H/src/RecursiveFactorization.jl:1\n", + "in expression starting at stdin:3\n", + "\u001b[91m\u001b[1mERROR: \u001b[22m\u001b[39mLoadError: Failed to precompile RecursiveFactorization [f2c3362d-daeb-58d1-803e-2bc74f2840b4] to \"/home/christoph/.julia/compiled/v1.9/RecursiveFactorization/jl_FKWWOV\".\n", + "Stacktrace:\n", + " [1] \u001b[0m\u001b[1merror\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90ms\u001b[39m::\u001b[0mString\u001b[0m\u001b[1m)\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4merror.jl:35\u001b[24m\u001b[39m\n", + " [2] \u001b[0m\u001b[1mcompilecache\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90mpkg\u001b[39m::\u001b[0mBase.PkgId, \u001b[90mpath\u001b[39m::\u001b[0mString, \u001b[90minternal_stderr\u001b[39m::\u001b[0mIO, \u001b[90minternal_stdout\u001b[39m::\u001b[0mIO, \u001b[90mkeep_loaded_modules\u001b[39m::\u001b[0mBool\u001b[0m\u001b[1m)\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:2296\u001b[24m\u001b[39m\n", + " [3] \u001b[0m\u001b[1mcompilecache\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:2163\u001b[24m\u001b[39m\u001b[90m [inlined]\u001b[39m\n", + " [4] \u001b[0m\u001b[1m_require\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90mpkg\u001b[39m::\u001b[0mBase.PkgId, \u001b[90menv\u001b[39m::\u001b[0mString\u001b[0m\u001b[1m)\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:1805\u001b[24m\u001b[39m\n", + " [5] \u001b[0m\u001b[1m_require_prelocked\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90muuidkey\u001b[39m::\u001b[0mBase.PkgId, \u001b[90menv\u001b[39m::\u001b[0mString\u001b[0m\u001b[1m)\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:1660\u001b[24m\u001b[39m\n", + " [6] \u001b[0m\u001b[1mmacro expansion\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:1648\u001b[24m\u001b[39m\u001b[90m [inlined]\u001b[39m\n", + " [7] \u001b[0m\u001b[1mmacro expansion\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mlock.jl:267\u001b[24m\u001b[39m\u001b[90m [inlined]\u001b[39m\n", + " [8] \u001b[0m\u001b[1mrequire\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90minto\u001b[39m::\u001b[0mModule, \u001b[90mmod\u001b[39m::\u001b[0mSymbol\u001b[0m\u001b[1m)\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:1611\u001b[24m\u001b[39m\n", + " [9] top-level scope\n", + "\u001b[90m @\u001b[39m \u001b[90m~/.julia/packages/LinearSolve/Dqpre/src/\u001b[39m\u001b[90m\u001b[4mLinearSolve.jl:11\u001b[24m\u001b[39m\n", + " [10] \u001b[0m\u001b[1meval\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mboot.jl:370\u001b[24m\u001b[39m\u001b[90m [inlined]\u001b[39m\n", + " [11] \u001b[0m\u001b[1mrecompile_invalidations\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90m__module__\u001b[39m::\u001b[0mModule, \u001b[90mexpr\u001b[39m::\u001b[0mAny\u001b[0m\u001b[1m)\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[35mPrecompileTools\u001b[39m \u001b[90m~/.julia/packages/PrecompileTools/L8A3n/src/\u001b[39m\u001b[90m\u001b[4minvalidations.jl:18\u001b[24m\u001b[39m\n", + " [12] top-level scope\n", + "\u001b[90m @\u001b[39m \u001b[90m~/.julia/packages/LinearSolve/Dqpre/src/\u001b[39m\u001b[90m\u001b[4mLinearSolve.jl:9\u001b[24m\u001b[39m\n", + " [13] \u001b[0m\u001b[1minclude\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mBase.jl:457\u001b[24m\u001b[39m\u001b[90m [inlined]\u001b[39m\n", + " [14] \u001b[0m\u001b[1minclude_package_for_output\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90mpkg\u001b[39m::\u001b[0mBase.PkgId, \u001b[90minput\u001b[39m::\u001b[0mString, \u001b[90mdepot_path\u001b[39m::\u001b[0mVector\u001b[90m{String}\u001b[39m, \u001b[90mdl_load_path\u001b[39m::\u001b[0mVector\u001b[90m{String}\u001b[39m, \u001b[90mload_path\u001b[39m::\u001b[0mVector\u001b[90m{String}\u001b[39m, \u001b[90mconcrete_deps\u001b[39m::\u001b[0mVector\u001b[90m{Pair{Base.PkgId, UInt128}}\u001b[39m, \u001b[90msource\u001b[39m::\u001b[0mString\u001b[0m\u001b[1m)\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:2045\u001b[24m\u001b[39m\n", + " [15] top-level scope\n", + "\u001b[90m @\u001b[39m \u001b[90m\u001b[4mstdin:3\u001b[24m\u001b[39m\n", + "in expression starting at /home/christoph/.julia/packages/LinearSolve/Dqpre/src/LinearSolve.jl:1\n", + "in expression starting at stdin:3\n", + "\u001b[91m\u001b[1mERROR: \u001b[22m\u001b[39mLoadError: Failed to precompile LinearSolve [7ed4a6bd-45f5-4d41-b270-4a48e9bafcae] to \"/home/christoph/.julia/compiled/v1.9/LinearSolve/jl_FLzMFx\".\n", + "Stacktrace:\n", + " [1] \u001b[0m\u001b[1merror\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90ms\u001b[39m::\u001b[0mString\u001b[0m\u001b[1m)\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4merror.jl:35\u001b[24m\u001b[39m\n", + " [2] \u001b[0m\u001b[1mcompilecache\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90mpkg\u001b[39m::\u001b[0mBase.PkgId, \u001b[90mpath\u001b[39m::\u001b[0mString, \u001b[90minternal_stderr\u001b[39m::\u001b[0mIO, \u001b[90minternal_stdout\u001b[39m::\u001b[0mIO, \u001b[90mkeep_loaded_modules\u001b[39m::\u001b[0mBool\u001b[0m\u001b[1m)\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:2296\u001b[24m\u001b[39m\n", + " [3] \u001b[0m\u001b[1mcompilecache\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:2163\u001b[24m\u001b[39m\u001b[90m [inlined]\u001b[39m\n", + " [4] \u001b[0m\u001b[1m_require\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90mpkg\u001b[39m::\u001b[0mBase.PkgId, \u001b[90menv\u001b[39m::\u001b[0mString\u001b[0m\u001b[1m)\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:1805\u001b[24m\u001b[39m\n", + " [5] \u001b[0m\u001b[1m_require_prelocked\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90muuidkey\u001b[39m::\u001b[0mBase.PkgId, \u001b[90menv\u001b[39m::\u001b[0mString\u001b[0m\u001b[1m)\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:1660\u001b[24m\u001b[39m\n", + " [6] \u001b[0m\u001b[1mmacro expansion\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:1648\u001b[24m\u001b[39m\u001b[90m [inlined]\u001b[39m\n", + " [7] \u001b[0m\u001b[1mmacro expansion\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mlock.jl:267\u001b[24m\u001b[39m\u001b[90m [inlined]\u001b[39m\n", + " [8] \u001b[0m\u001b[1mrequire\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90minto\u001b[39m::\u001b[0mModule, \u001b[90mmod\u001b[39m::\u001b[0mSymbol\u001b[0m\u001b[1m)\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:1611\u001b[24m\u001b[39m\n", + " [9] \u001b[0m\u001b[1minclude\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mBase.jl:457\u001b[24m\u001b[39m\u001b[90m [inlined]\u001b[39m\n", + " [10] \u001b[0m\u001b[1minclude_package_for_output\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90mpkg\u001b[39m::\u001b[0mBase.PkgId, \u001b[90minput\u001b[39m::\u001b[0mString, \u001b[90mdepot_path\u001b[39m::\u001b[0mVector\u001b[90m{String}\u001b[39m, \u001b[90mdl_load_path\u001b[39m::\u001b[0mVector\u001b[90m{String}\u001b[39m, \u001b[90mload_path\u001b[39m::\u001b[0mVector\u001b[90m{String}\u001b[39m, \u001b[90mconcrete_deps\u001b[39m::\u001b[0mVector\u001b[90m{Pair{Base.PkgId, UInt128}}\u001b[39m, \u001b[90msource\u001b[39m::\u001b[0mString\u001b[0m\u001b[1m)\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:2045\u001b[24m\u001b[39m\n", + " [11] top-level scope\n", + "\u001b[90m @\u001b[39m \u001b[90m\u001b[4mstdin:3\u001b[24m\u001b[39m\n", + "in expression starting at /home/christoph/.julia/packages/OrdinaryDiffEq/ZbQoo/src/OrdinaryDiffEq.jl:1\n", + "in expression starting at stdin:3\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[91m\u001b[1mERROR: \u001b[22m\u001b[39mLoadError: Failed to precompile OrdinaryDiffEq [1dea7af3-3e70-54e6-95c3-0bf5283fa5ed] to \"/home/christoph/.julia/compiled/v1.9/OrdinaryDiffEq/jl_xSiUtp\".\n", + "Stacktrace:\n", + " [1] \u001b[0m\u001b[1merror\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90ms\u001b[39m::\u001b[0mString\u001b[0m\u001b[1m)\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4merror.jl:35\u001b[24m\u001b[39m\n", + " [2] \u001b[0m\u001b[1mcompilecache\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90mpkg\u001b[39m::\u001b[0mBase.PkgId, \u001b[90mpath\u001b[39m::\u001b[0mString, \u001b[90minternal_stderr\u001b[39m::\u001b[0mIO, \u001b[90minternal_stdout\u001b[39m::\u001b[0mIO, \u001b[90mkeep_loaded_modules\u001b[39m::\u001b[0mBool\u001b[0m\u001b[1m)\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:2296\u001b[24m\u001b[39m\n", + " [3] \u001b[0m\u001b[1mcompilecache\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:2163\u001b[24m\u001b[39m\u001b[90m [inlined]\u001b[39m\n", + " [4] \u001b[0m\u001b[1m_require\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90mpkg\u001b[39m::\u001b[0mBase.PkgId, \u001b[90menv\u001b[39m::\u001b[0mString\u001b[0m\u001b[1m)\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:1805\u001b[24m\u001b[39m\n", + " [5] \u001b[0m\u001b[1m_require_prelocked\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90muuidkey\u001b[39m::\u001b[0mBase.PkgId, \u001b[90menv\u001b[39m::\u001b[0mString\u001b[0m\u001b[1m)\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:1660\u001b[24m\u001b[39m\n", + " [6] \u001b[0m\u001b[1mmacro expansion\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:1648\u001b[24m\u001b[39m\u001b[90m [inlined]\u001b[39m\n", + " [7] \u001b[0m\u001b[1mmacro expansion\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mlock.jl:267\u001b[24m\u001b[39m\u001b[90m [inlined]\u001b[39m\n", + " [8] \u001b[0m\u001b[1mrequire\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90minto\u001b[39m::\u001b[0mModule, \u001b[90mmod\u001b[39m::\u001b[0mSymbol\u001b[0m\u001b[1m)\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:1611\u001b[24m\u001b[39m\n", + " [9] top-level scope\n", + "\u001b[90m @\u001b[39m \u001b[90m~/.julia/packages/ModelingToolkit/fsg2r/src/\u001b[39m\u001b[90m\u001b[4mModelingToolkit.jl:70\u001b[24m\u001b[39m\n", + " [10] \u001b[0m\u001b[1meval\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mboot.jl:370\u001b[24m\u001b[39m\u001b[90m [inlined]\u001b[39m\n", + " [11] \u001b[0m\u001b[1mrecompile_invalidations\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90m__module__\u001b[39m::\u001b[0mModule, \u001b[90mexpr\u001b[39m::\u001b[0mAny\u001b[0m\u001b[1m)\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[35mPrecompileTools\u001b[39m \u001b[90m~/.julia/packages/PrecompileTools/L8A3n/src/\u001b[39m\u001b[90m\u001b[4minvalidations.jl:18\u001b[24m\u001b[39m\n", + " [12] top-level scope\n", + "\u001b[90m @\u001b[39m \u001b[90m~/.julia/packages/ModelingToolkit/fsg2r/src/\u001b[39m\u001b[90m\u001b[4mModelingToolkit.jl:6\u001b[24m\u001b[39m\n", + " [13] \u001b[0m\u001b[1minclude\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mBase.jl:457\u001b[24m\u001b[39m\u001b[90m [inlined]\u001b[39m\n", + " [14] \u001b[0m\u001b[1minclude_package_for_output\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90mpkg\u001b[39m::\u001b[0mBase.PkgId, \u001b[90minput\u001b[39m::\u001b[0mString, \u001b[90mdepot_path\u001b[39m::\u001b[0mVector\u001b[90m{String}\u001b[39m, \u001b[90mdl_load_path\u001b[39m::\u001b[0mVector\u001b[90m{String}\u001b[39m, \u001b[90mload_path\u001b[39m::\u001b[0mVector\u001b[90m{String}\u001b[39m, \u001b[90mconcrete_deps\u001b[39m::\u001b[0mVector\u001b[90m{Pair{Base.PkgId, UInt128}}\u001b[39m, \u001b[90msource\u001b[39m::\u001b[0mString\u001b[0m\u001b[1m)\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:2045\u001b[24m\u001b[39m\n", + " [15] top-level scope\n", + "\u001b[90m @\u001b[39m \u001b[90m\u001b[4mstdin:3\u001b[24m\u001b[39m\n", + "in expression starting at /home/christoph/.julia/packages/ModelingToolkit/fsg2r/src/ModelingToolkit.jl:1\n", + "in expression starting at stdin:3\n", + "\u001b[91m\u001b[1mERROR: \u001b[22m\u001b[39mLoadError: Failed to precompile ModelingToolkit [961ee093-0014-501f-94e3-6117800e7a78] to \"/home/christoph/.julia/compiled/v1.9/ModelingToolkit/jl_kEJqR3\".\n", + "Stacktrace:\n", + " [1] \u001b[0m\u001b[1merror\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90ms\u001b[39m::\u001b[0mString\u001b[0m\u001b[1m)\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4merror.jl:35\u001b[24m\u001b[39m\n", + " [2] \u001b[0m\u001b[1mcompilecache\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90mpkg\u001b[39m::\u001b[0mBase.PkgId, \u001b[90mpath\u001b[39m::\u001b[0mString, \u001b[90minternal_stderr\u001b[39m::\u001b[0mIO, \u001b[90minternal_stdout\u001b[39m::\u001b[0mIO, \u001b[90mkeep_loaded_modules\u001b[39m::\u001b[0mBool\u001b[0m\u001b[1m)\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:2296\u001b[24m\u001b[39m\n", + " [3] \u001b[0m\u001b[1mcompilecache\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:2163\u001b[24m\u001b[39m\u001b[90m [inlined]\u001b[39m\n", + " [4] \u001b[0m\u001b[1m_require\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90mpkg\u001b[39m::\u001b[0mBase.PkgId, \u001b[90menv\u001b[39m::\u001b[0mString\u001b[0m\u001b[1m)\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:1805\u001b[24m\u001b[39m\n", + " [5] \u001b[0m\u001b[1m_require_prelocked\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90muuidkey\u001b[39m::\u001b[0mBase.PkgId, \u001b[90menv\u001b[39m::\u001b[0mString\u001b[0m\u001b[1m)\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:1660\u001b[24m\u001b[39m\n", + " [6] \u001b[0m\u001b[1mmacro expansion\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:1648\u001b[24m\u001b[39m\u001b[90m [inlined]\u001b[39m\n", + " [7] \u001b[0m\u001b[1mmacro expansion\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mlock.jl:267\u001b[24m\u001b[39m\u001b[90m [inlined]\u001b[39m\n", + " [8] \u001b[0m\u001b[1mrequire\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90minto\u001b[39m::\u001b[0mModule, \u001b[90mmod\u001b[39m::\u001b[0mSymbol\u001b[0m\u001b[1m)\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:1611\u001b[24m\u001b[39m\n", + " [9] \u001b[0m\u001b[1minclude\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mBase.jl:457\u001b[24m\u001b[39m\u001b[90m [inlined]\u001b[39m\n", + " [10] \u001b[0m\u001b[1minclude_package_for_output\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90mpkg\u001b[39m::\u001b[0mBase.PkgId, \u001b[90minput\u001b[39m::\u001b[0mString, \u001b[90mdepot_path\u001b[39m::\u001b[0mVector\u001b[90m{String}\u001b[39m, \u001b[90mdl_load_path\u001b[39m::\u001b[0mVector\u001b[90m{String}\u001b[39m, \u001b[90mload_path\u001b[39m::\u001b[0mVector\u001b[90m{String}\u001b[39m, \u001b[90mconcrete_deps\u001b[39m::\u001b[0mVector\u001b[90m{Pair{Base.PkgId, UInt128}}\u001b[39m, \u001b[90msource\u001b[39m::\u001b[0mNothing\u001b[0m\u001b[1m)\u001b[22m\n", + "\u001b[90m @\u001b[39m \u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:2045\u001b[24m\u001b[39m\n", + " [11] top-level scope\n", + "\u001b[90m @\u001b[39m \u001b[90m\u001b[4mstdin:3\u001b[24m\u001b[39m\n", + "in expression starting at /home/christoph/git/QuantumCumulants.jl/src/QuantumCumulants.jl:1\n", + "in expression starting at stdin:3\n" + ] + }, + { + "ename": "LoadError", + "evalue": "Failed to precompile QuantumCumulants [35bcea6d-e19f-57db-af74-8011de6c7255] to \"/home/christoph/.julia/compiled/v1.9/QuantumCumulants/jl_O98yl3\".", + "output_type": "error", + "traceback": [ + "Failed to precompile QuantumCumulants [35bcea6d-e19f-57db-af74-8011de6c7255] to \"/home/christoph/.julia/compiled/v1.9/QuantumCumulants/jl_O98yl3\".", + "", + "Stacktrace:", + " [1] error(s::String)", + " @ Base ./error.jl:35", + " [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)", + " @ Base ./loading.jl:2296", + " [3] compilecache", + " @ ./loading.jl:2163 [inlined]", + " [4] _require(pkg::Base.PkgId, env::String)", + " @ Base ./loading.jl:1805", + " [5] _require_prelocked(uuidkey::Base.PkgId, env::String)", + " @ Base ./loading.jl:1660", + " [6] macro expansion", + " @ ./loading.jl:1648 [inlined]", + " [7] macro expansion", + " @ ./lock.jl:267 [inlined]", + " [8] require(into::Module, mod::Symbol)", + " @ Base ./loading.jl:1611" + ] + } + ], "source": [ "using QuantumCumulants\n", "using SymbolicUtils\n", @@ -40,13 +247,23 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "metadata": {}, - "outputs": [], + "outputs": [ + { + "ename": "LoadError", + "evalue": "LoadError: UndefVarError: `@cnumbers` not defined\nin expression starting at In[2]:1", + "output_type": "error", + "traceback": [ + "LoadError: UndefVarError: `@cnumbers` not defined\nin expression starting at In[2]:1", + "" + ] + } + ], "source": [ "@cnumbers N ωa γ η χ ωc κ g ξ ωl\n", "@syms t::Real\n", - "@register pulse(t)\n", + "@register_symbolic pulse(t)\n", "\n", "hc = FockSpace(:resonator)\n", "ha = NLevelSpace(:atom,2)\n", @@ -73,9 +290,22 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "metadata": {}, - "outputs": [], + "outputs": [ + { + "ename": "LoadError", + "evalue": "UndefVarError: `a` not defined", + "output_type": "error", + "traceback": [ + "UndefVarError: `a` not defined", + "", + "Stacktrace:", + " [1] top-level scope", + " @ In[3]:1" + ] + } + ], "source": [ "J = [a*exp(1.0im*ωl*t),σ(1,2,j),σ(2,1,j),σ(2,2,j)]\n", "rates = [κ,γ,η*pulse(t),2*χ]\n", @@ -107,9 +337,22 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 4, "metadata": {}, - "outputs": [], + "outputs": [ + { + "ename": "LoadError", + "evalue": "UndefVarError: `ξ` not defined", + "output_type": "error", + "traceback": [ + "UndefVarError: `ξ` not defined", + "", + "Stacktrace:", + " [1] top-level scope", + " @ In[4]:1" + ] + } + ], "source": [ "efficiencies = [ξ,0,0,0]\n", "ops = [a',a'*a,σ(2,2,k),σ(1,2,k), a*a];\n", @@ -126,9 +369,22 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "metadata": {}, - "outputs": [], + "outputs": [ + { + "ename": "LoadError", + "evalue": "UndefVarError: `indexed_complete` not defined", + "output_type": "error", + "traceback": [ + "UndefVarError: `indexed_complete` not defined", + "", + "Stacktrace:", + " [1] top-level scope", + " @ In[5]:1" + ] + } + ], "source": [ "eqs_c = indexed_complete(eqs)\n", "scaled_eqs = scale(eqs_c)" @@ -144,9 +400,22 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 6, "metadata": {}, - "outputs": [], + "outputs": [ + { + "ename": "LoadError", + "evalue": "UndefVarError: `N` not defined", + "output_type": "error", + "traceback": [ + "UndefVarError: `N` not defined", + "", + "Stacktrace:", + " [1] top-level scope", + " @ In[6]:4" + ] + } + ], "source": [ "ωc_ = 0.0; κ_ = 2.0 * π * 2.26e6; ξ_ = 0.12; N_=5e4; \n", "ωa_ = 0.0; γ_ = 2.0 * π * 375; η_ = 2.0 * π * 20e3; χ_ = 0.1; \n", @@ -177,9 +446,19 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 7, "metadata": {}, - "outputs": [], + "outputs": [ + { + "ename": "LoadError", + "evalue": "LoadError: UndefVarError: `@named` not defined\nin expression starting at In[7]:1", + "output_type": "error", + "traceback": [ + "LoadError: UndefVarError: `@named` not defined\nin expression starting at In[7]:1", + "" + ] + } + ], "source": [ "@named sys = SDESystem(scaled_eqs)\n", "u0 = zeros(ComplexF64,length(scaled_eqs.equations))\n", @@ -200,9 +479,22 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 8, "metadata": {}, - "outputs": [], + "outputs": [ + { + "ename": "LoadError", + "evalue": "UndefVarError: `sol` not defined", + "output_type": "error", + "traceback": [ + "UndefVarError: `sol` not defined", + "", + "Stacktrace:", + " [1] top-level scope", + " @ In[8]:1" + ] + } + ], "source": [ "us = fill(0.0, length(sol.u), length(sol.u[1].t))\n", "for (i, el) in enumerate(sol.u)\n", @@ -230,9 +522,22 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 9, "metadata": {}, - "outputs": [], + "outputs": [ + { + "ename": "LoadError", + "evalue": "UndefVarError: `sol` not defined", + "output_type": "error", + "traceback": [ + "UndefVarError: `sol` not defined", + "", + "Stacktrace:", + " [1] top-level scope", + " @ In[9]:1" + ] + } + ], "source": [ "us = fill(0.0, length(sol.u), length(sol.u[1].t))\n", "for (i, el) in enumerate(sol.u)\n", @@ -252,7 +557,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Julia 1.9.3", + "display_name": "Julia 1.9.1", "language": "julia", "name": "julia-1.9" }, @@ -260,9 +565,8 @@ "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", - "version": "1.9.3" - }, - "orig_nbformat": 4 + "version": "1.9.1" + } }, "nbformat": 4, "nbformat_minor": 2 diff --git a/docs/src/examples/jupyter_notebooks/ramsey spectroscopy.ipynb b/docs/src/examples/jupyter_notebooks/ramsey spectroscopy.ipynb index a38715ff..01ea8360 100644 --- a/docs/src/examples/jupyter_notebooks/ramsey spectroscopy.ipynb +++ b/docs/src/examples/jupyter_notebooks/ramsey spectroscopy.ipynb @@ -44,7 +44,7 @@ "source": [ "@cnumbers Δ Ω Γ ν\n", "@syms t::Real\n", - "@register f(t)" + "@register_symbolic f(t)" ] }, { @@ -99,7 +99,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 5, "metadata": {}, "outputs": [], "source": [ @@ -139,9 +139,20 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 6, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "\"/home/christoph/git/QuantumCumulants.jl/docs/src/examples/jupyter_notebooks/timeevolution_ramsey.svg\"" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "prob = ODEProblem(sys,u0,(0.0, 2tp+tf), ps.=>p0)\n", "sol = solve(prob,Tsit5(),maxiters=1e7)\n", @@ -169,9 +180,20 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 7, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "\"/home/christoph/git/QuantumCumulants.jl/docs/src/examples/jupyter_notebooks/scan_ramsey.svg\"" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "Δ_ls = [-2000:4:2000;]Γ_\n", "s22_ls = zeros(length(Δ_ls))\n", @@ -196,17 +218,16 @@ ], "metadata": { "kernelspec": { - "display_name": "Julia 1.7.2", + "display_name": "Julia 1.10.2", "language": "julia", - "name": "julia-1.7" + "name": "julia-1.10" }, "language_info": { "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", - "version": "1.7.2" + "version": "1.10.2" }, - "orig_nbformat": 4, "vscode": { "interpreter": { "hash": "6f38cfe8922d941c92fc591066a74813a9285a455efec88dafae5eaa218834d9" diff --git a/docs/src/examples/ramsey_spectroscopy.md b/docs/src/examples/ramsey_spectroscopy.md index 33b09f05..0d1beecb 100644 --- a/docs/src/examples/ramsey_spectroscopy.md +++ b/docs/src/examples/ramsey_spectroscopy.md @@ -22,7 +22,7 @@ Beside defining the symbolic parameters we additionally need to [register](https ```@example ramsey @cnumbers Δ Ω Γ ν @syms t::Real -@register f(t) +@register_symbolic f(t) ``` After defining the Hilbert space and the operator of the two-level atom we construct the time dependent Hamiltonian as well as the jump operator list with the corresponding rates.