diff --git a/Manifest.toml b/Manifest.toml index 9fc0409..e12086f 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -1,8 +1,8 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.11.2" +julia_version = "1.10.5" manifest_format = "2.0" -project_hash = "a11849c16b8a292508a1917ef28e3146642e2d77" +project_hash = "a23e703e9eb4627d34909a54a62cb3e99c92aa51" [[deps.AbstractTrees]] git-tree-sha1 = "2d9c9a55f9c93e8887ad391fbae72f8ef55e1177" @@ -57,7 +57,7 @@ version = "2.4.0" [[deps.ArgTools]] uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" -version = "1.1.2" +version = "1.1.1" [[deps.ArnoldiMethod]] deps = ["LinearAlgebra", "Random", "StaticArrays"] @@ -109,7 +109,6 @@ weakdeps = ["SparseArrays"] [[deps.Artifacts]] uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" -version = "1.11.0" [[deps.AxisAlgorithms]] deps = ["LinearAlgebra", "Random", "SparseArrays", "WoodburyMatrices"] @@ -141,7 +140,6 @@ version = "0.4.3" [[deps.Base64]] uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" -version = "1.11.0" [[deps.Baselet]] git-tree-sha1 = "aebf55e6d7795e02ca500a689d326ac979aaf89e" @@ -181,13 +179,13 @@ version = "0.7.3" deps = ["Artifacts", "JLLWrappers", "Libdl", "Lz4_jll", "Zlib_jll", "Zstd_jll"] git-tree-sha1 = "ef12cdd1c7fb7e1dfd6fa8fd60d4db6bc61d2f23" uuid = "0b7ba130-8d10-5ba8-a3d6-c5182647fed9" -version = "1.21.6+0" +version = "1.21.6+2" [[deps.Bzip2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "8873e196c2eb87962a2048b3b8e08946535864a1" uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0" -version = "1.0.8+2" +version = "1.0.8+4" [[deps.Cairo_jll]] deps = ["Artifacts", "Bzip2_jll", "CompilerSupportLibraries_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"] @@ -197,9 +195,9 @@ version = "1.18.2+1" [[deps.ChainRulesCore]] deps = ["Compat", "LinearAlgebra"] -git-tree-sha1 = "3e4b134270b372f2ed4d4d0e936aabaefc1802bc" +git-tree-sha1 = "1713c74e00545bfe14605d2a2be1712de8fbcb58" uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" -version = "1.25.0" +version = "1.25.1" weakdeps = ["SparseArrays"] [deps.ChainRulesCore.extensions] @@ -313,7 +311,6 @@ version = "1.0.0" [[deps.Dates]] deps = ["Printf"] uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" -version = "1.11.0" [[deps.Dbus_jll]] deps = ["Artifacts", "Expat_jll", "JLLWrappers", "Libdl"] @@ -341,7 +338,6 @@ version = "0.4.3" [[deps.Distributed]] deps = ["Random", "Serialization", "Sockets"] uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" -version = "1.11.0" [[deps.DocStringExtensions]] deps = ["LibGit2"] @@ -382,7 +378,7 @@ version = "0.1.11" deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "e51db81749b0777b2147fbe7b783ee79045b8e99" uuid = "2e619515-83b5-522b-bb60-26c02a35a201" -version = "2.6.4+1" +version = "2.6.4+3" [[deps.ExprTools]] git-tree-sha1 = "27415f162e6028e81c72b82ef756bf321213b6ec" @@ -423,7 +419,6 @@ weakdeps = ["HTTP"] [[deps.FileWatching]] uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" -version = "1.11.0" [[deps.FillArrays]] deps = ["LinearAlgebra"] @@ -478,9 +473,9 @@ version = "2.13.3+1" [[deps.FriBidi_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "1ed150b39aebcc805c26b93a8d0122c940f64ce2" +git-tree-sha1 = "846f7026a9decf3679419122b49f8a1fdb48d2d5" uuid = "559328eb-81f9-559d-9380-de523a88c83c" -version = "1.0.14+0" +version = "1.0.16+0" [[deps.Functors]] deps = ["Compat", "ConstructionBase", "LinearAlgebra", "Random"] @@ -491,25 +486,24 @@ version = "0.5.2" [[deps.Future]] deps = ["Random"] uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" -version = "1.11.0" [[deps.GLFW_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libglvnd_jll", "Xorg_libXcursor_jll", "Xorg_libXi_jll", "Xorg_libXinerama_jll", "Xorg_libXrandr_jll", "libdecor_jll", "xkbcommon_jll"] -git-tree-sha1 = "532f9126ad901533af1d4f5c198867227a7bb077" +git-tree-sha1 = "fcb0584ff34e25155876418979d4c8971243bb89" uuid = "0656b61e-2033-5cc2-a64a-77c0f6c09b89" -version = "3.4.0+1" +version = "3.4.0+2" [[deps.GR]] deps = ["Artifacts", "Base64", "DelimitedFiles", "Downloads", "GR_jll", "HTTP", "JSON", "Libdl", "LinearAlgebra", "Preferences", "Printf", "Qt6Wayland_jll", "Random", "Serialization", "Sockets", "TOML", "Tar", "Test", "p7zip_jll"] -git-tree-sha1 = "52adc6828958ea8a0cf923d53aa10773dbca7d5f" +git-tree-sha1 = "424c8f76017e39fdfcdbb5935a8e6742244959e8" uuid = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71" -version = "0.73.9" +version = "0.73.10" [[deps.GR_jll]] deps = ["Artifacts", "Bzip2_jll", "Cairo_jll", "FFMPEG_jll", "Fontconfig_jll", "FreeType2_jll", "GLFW_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pixman_jll", "Qt6Base_jll", "Zlib_jll", "libpng_jll"] -git-tree-sha1 = "4e9e2966af45b06f24fd952285841428f1d6e858" +git-tree-sha1 = "b90934c8cb33920a8dc66736471dc3961b42ec9f" uuid = "d2c73de3-f751-5644-a686-071e5b155ba9" -version = "0.73.9+0" +version = "0.73.10+0" [[deps.GeoFormatTypes]] git-tree-sha1 = "59107c179a586f0fe667024c5eb7033e81333271" @@ -542,9 +536,9 @@ version = "0.21.0+0" [[deps.Glib_jll]] deps = ["Artifacts", "Gettext_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Libiconv_jll", "Libmount_jll", "PCRE2_jll", "Zlib_jll"] -git-tree-sha1 = "48b5d4c75b2c9078ead62e345966fa51a25c05ad" +git-tree-sha1 = "b0036b392358c80d2d2124746c2bf3d48d457938" uuid = "7746bdde-850d-59dc-9ae8-88ece973131d" -version = "2.82.2+1" +version = "2.82.4+0" [[deps.GraphRecipes]] deps = ["AbstractTrees", "GeometryTypes", "Graphs", "InteractiveUtils", "Interpolations", "LinearAlgebra", "NaNMath", "NetworkLayout", "PlotUtils", "RecipesBase", "SparseArrays", "Statistics"] @@ -595,9 +589,9 @@ version = "1.14.2+1" [[deps.HTTP]] deps = ["Base64", "CodecZlib", "ConcurrentUtilities", "Dates", "ExceptionUnwrapping", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "PrecompileTools", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] -git-tree-sha1 = "627fcacdb7cb51dc67f557e1598cdffe4dda386d" +git-tree-sha1 = "c67b33b085f6e2faf8bf79a61962e7339a81129c" uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3" -version = "1.10.14" +version = "1.10.15" [[deps.HalfIntegers]] git-tree-sha1 = "9c3149243abb5bc0bad0431d6c4fcac0f4443c7c" @@ -614,7 +608,7 @@ version = "8.5.0+0" deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "50aedf345a709ab75872f80a2779568dc0bb461b" uuid = "e33a78d0-f292-5ffc-b300-72abe9b543c8" -version = "2.11.2+1" +version = "2.11.2+3" [[deps.ITensorMPS]] deps = ["Adapt", "Compat", "ITensors", "IsApprox", "KrylovKit", "LinearAlgebra", "NDTensors", "Printf", "Random", "SerializedElementArrays", "TupleTools"] @@ -688,7 +682,6 @@ version = "1.4.2" [[deps.InteractiveUtils]] deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" -version = "1.11.0" [[deps.Interpolations]] deps = ["Adapt", "AxisAlgorithms", "ChainRulesCore", "LinearAlgebra", "OffsetArrays", "Random", "Ratios", "Requires", "SharedArrays", "SparseArrays", "StaticArrays", "WoodburyMatrices"] @@ -745,9 +738,9 @@ version = "0.1.9" [[deps.JLLWrappers]] deps = ["Artifacts", "Preferences"] -git-tree-sha1 = "be3dc50a92e5a386872a493a10050136d4703f9b" +git-tree-sha1 = "a007feb38b422fbdab534406aeca1b86823cb4d6" uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.6.1" +version = "1.7.0" [[deps.JSON]] deps = ["Dates", "Mmap", "Parsers", "Unicode"] @@ -763,9 +756,9 @@ version = "0.7.0" [[deps.JpegTurbo_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "25ee0be4d43d0269027024d75a24c24d6c6e590c" +git-tree-sha1 = "eac1206917768cb54957c65a615460d87b455fc1" uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8" -version = "3.0.4+0" +version = "3.1.1+0" [[deps.KrylovKit]] deps = ["LinearAlgebra", "PackageExtensionCompat", "Printf", "Random", "VectorInterface"] @@ -785,9 +778,9 @@ version = "3.100.2+0" [[deps.LERC_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "36bdbc52f13a7d1dcb0f3cd694e01677a515655b" +git-tree-sha1 = "aaafe88dccbd957a8d82f7d05be9b69172e0cee3" uuid = "88015f11-f218-50d7-93a8-a6af411a945d" -version = "4.0.0+0" +version = "4.0.1+0" [[deps.LLVMOpenMP_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -808,7 +801,7 @@ weakdeps = ["Serialization"] deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "854a9c268c43b77b0a27f22d7fab8d33cdb3a731" uuid = "dd4b983a-f0e5-5f8d-a1b7-129d4a5fb1ac" -version = "2.10.2+1" +version = "2.10.2+3" [[deps.LaTeXStrings]] git-tree-sha1 = "dda21b8cbd6a6c40d9d02a73230f9d70fed6918c" @@ -834,7 +827,6 @@ version = "0.16.5" [[deps.LazyArtifacts]] deps = ["Artifacts", "Pkg"] uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" -version = "1.11.0" [[deps.LibCURL]] deps = ["LibCURL_jll", "MozillaCACerts_jll"] @@ -844,17 +836,16 @@ version = "0.6.4" [[deps.LibCURL_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "8.6.0+0" +version = "8.4.0+0" [[deps.LibGit2]] deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" -version = "1.11.0" [[deps.LibGit2_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" -version = "1.7.2+0" +version = "1.6.4+0" [[deps.LibSSH2_jll]] deps = ["Artifacts", "Libdl", "MbedTLS_jll"] @@ -863,13 +854,12 @@ version = "1.11.0+1" [[deps.Libdl]] uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" -version = "1.11.0" [[deps.Libffi_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "0b4a5d71f3e5200a7dff793393e09dfc2d874290" +git-tree-sha1 = "27ecae93dd25ee0909666e6835051dd684cc035e" uuid = "e9f186c6-92d2-5b65-8a66-fee21dc1b490" -version = "3.2.2+1" +version = "3.2.2+2" [[deps.Libgcrypt_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgpg_error_jll"] @@ -885,9 +875,9 @@ version = "1.7.0+0" [[deps.Libgpg_error_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "c6ce1e19f3aec9b59186bdf06cdf3c4fc5f5f3e6" +git-tree-sha1 = "df37206100d39f79b3376afb6b9cee4970041c61" uuid = "7add5ba3-2f88-524e-9cd5-f83b8a55f7b8" -version = "1.50.0+0" +version = "1.51.1+0" [[deps.Libiconv_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -899,24 +889,23 @@ version = "1.17.0+1" deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "84eef7acd508ee5b3e956a2ae51b05024181dee0" uuid = "4b2f31a3-9ecc-558c-b454-b3730dcb73e9" -version = "2.40.2+0" +version = "2.40.2+2" [[deps.Libtiff_jll]] deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "LERC_jll", "Libdl", "XZ_jll", "Zlib_jll", "Zstd_jll"] -git-tree-sha1 = "b404131d06f7886402758c9ce2214b636eb4d54a" +git-tree-sha1 = "4ab7581296671007fc33f07a721631b8855f4b1d" uuid = "89763e89-9b03-5906-acba-b20f662cd828" -version = "4.7.0+0" +version = "4.7.1+0" [[deps.Libuuid_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "edbf5309f9ddf1cab25afc344b1e8150b7c832f9" uuid = "38a345b3-de98-5d2b-a5d3-14cd9215e700" -version = "2.40.2+0" +version = "2.40.2+2" [[deps.LinearAlgebra]] deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -version = "1.11.0" [[deps.LogExpFunctions]] deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] @@ -936,7 +925,6 @@ version = "0.3.29" [[deps.Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" -version = "1.11.0" [[deps.LoggingExtras]] deps = ["Dates", "Logging"] @@ -946,9 +934,9 @@ version = "1.1.0" [[deps.Lz4_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "abf88ff67f4fd89839efcae2f4c39cbc4ecd0846" +git-tree-sha1 = "191686b1ac1ea9c89fc52e996ad15d1d241d1e33" uuid = "5ced341a-0733-55b8-9ab6-a4889d929147" -version = "1.10.0+1" +version = "1.10.1+0" [[deps.MPICH_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Hwloc_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"] @@ -966,18 +954,16 @@ version = "0.1.11" deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"] git-tree-sha1 = "70e830dab5d0775183c99fc75e4c24c614ed7142" uuid = "f1f71cc9-e9ae-5b93-9b94-4fe0e1ad3748" -version = "5.5.1+0" +version = "5.5.1+2" [[deps.MacroTools]] -deps = ["Markdown", "Random"] -git-tree-sha1 = "2fa9ee3e63fd3a4f7a9a4f4744a52f4856de82df" +git-tree-sha1 = "72aebe0b5051e5143a079a4685a46da330a40472" uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" -version = "0.5.13" +version = "0.5.15" [[deps.Markdown]] deps = ["Base64"] uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" -version = "1.11.0" [[deps.MbedTLS]] deps = ["Dates", "MbedTLS_jll", "MozillaCACerts_jll", "NetworkOptions", "Random", "Sockets"] @@ -988,7 +974,7 @@ version = "1.1.9" [[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.6+0" +version = "2.28.2+1" [[deps.Measures]] git-tree-sha1 = "c13304c81eec1ed3af7fc20e75fb6b26092a1102" @@ -1015,11 +1001,10 @@ version = "1.2.0" [[deps.Mmap]] uuid = "a63ad114-7e13-5084-954f-fe012c677804" -version = "1.11.0" [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2023.12.12" +version = "2023.1.10" [[deps.NDTensors]] deps = ["Accessors", "Adapt", "ArrayLayouts", "BlockArrays", "Compat", "Dictionaries", "EllipsisNotation", "FillArrays", "Folds", "Functors", "HalfIntegers", "InlineStrings", "LinearAlgebra", "MacroTools", "PackageExtensionCompat", "Random", "SimpleTraits", "SparseArrays", "SplitApplyCombine", "StaticArrays", "Strided", "StridedViews", "TimerOutputs", "TupleTools", "VectorInterface"] @@ -1059,9 +1044,9 @@ version = "1.0.2" [[deps.NetworkLayout]] deps = ["GeometryBasics", "LinearAlgebra", "Random", "Requires", "StaticArrays"] -git-tree-sha1 = "0c51e19351dc1eecc61bc23caaf2262e7ba71973" +git-tree-sha1 = "90bce32eda5bf1d09dc7282aec2fbae721deace6" uuid = "46757867-2c16-5918-afeb-47bfcb05e46a" -version = "0.4.7" +version = "0.4.8" weakdeps = ["Graphs"] [deps.NetworkLayout.extensions] @@ -1072,9 +1057,9 @@ uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" version = "1.2.0" [[deps.OffsetArrays]] -git-tree-sha1 = "39d000d9c33706b8364817d8894fae1548f40295" +git-tree-sha1 = "5e1897147d1ff8d98883cda2be2187dcf57d8f0c" uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" -version = "1.14.2" +version = "1.15.0" weakdeps = ["Adapt"] [deps.OffsetArrays.extensions] @@ -1089,7 +1074,7 @@ version = "1.3.5+1" [[deps.OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.27+1" +version = "0.3.23+4" [[deps.OpenLibm_jll]] deps = ["Artifacts", "Libdl"] @@ -1112,13 +1097,13 @@ version = "1.4.3" deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "7493f61f55a6cce7325f197443aa80d32554ba10" uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" -version = "3.0.15+1" +version = "3.0.15+3" [[deps.OpenSpecFun_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "13652491f6856acfd2db29360e1bbcd4565d04f1" +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] +git-tree-sha1 = "1346c9208249809840c91b26703912dff463d335" uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" -version = "0.5.5+0" +version = "0.5.6+0" [[deps.Opus_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -1144,9 +1129,9 @@ weakdeps = ["Requires", "TOML"] [[deps.Pango_jll]] deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "FriBidi_jll", "Glib_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl"] -git-tree-sha1 = "e127b609fb9ecba6f201ba7ab753d5a605d53801" +git-tree-sha1 = "ed6834e95bd326c52d5675b4181386dfbe885afb" uuid = "36c8627f-9965-5494-a995-c6b170f724f3" -version = "1.54.1+0" +version = "1.55.5+0" [[deps.Parsers]] deps = ["Dates", "PrecompileTools", "UUIDs"] @@ -1166,13 +1151,9 @@ uuid = "30392449-352a-5448-841d-b1acce4e97dc" version = "0.43.4+0" [[deps.Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "Random", "SHA", "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.11.0" -weakdeps = ["REPL"] - - [deps.Pkg.extensions] - REPLExt = "REPL" +version = "1.10.0" [[deps.PlotThemes]] deps = ["PlotUtils", "Statistics"] @@ -1239,7 +1220,6 @@ version = "1.4.3" [[deps.Printf]] deps = ["Unicode"] uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" -version = "1.11.0" [[deps.PtrArrays]] git-tree-sha1 = "77a42d78b6a92df47ab37e177b2deac405e1c88f" @@ -1283,14 +1263,12 @@ version = "2.11.1" Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" [[deps.REPL]] -deps = ["InteractiveUtils", "Markdown", "Sockets", "StyledStrings", "Unicode"] +deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" -version = "1.11.0" [[deps.Random]] deps = ["SHA"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -version = "1.11.0" [[deps.Ratios]] deps = ["Requires"] @@ -1349,7 +1327,6 @@ version = "1.2.1" [[deps.Serialization]] uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" -version = "1.11.0" [[deps.SerializedElementArrays]] deps = ["Serialization"] @@ -1366,7 +1343,6 @@ version = "1.1.1" [[deps.SharedArrays]] deps = ["Distributed", "Mmap", "Random", "Serialization"] uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" -version = "1.11.0" [[deps.Showoff]] deps = ["Dates", "Grisu"] @@ -1387,7 +1363,6 @@ version = "0.9.4" [[deps.Sockets]] uuid = "6462fe0b-24de-5631-8697-dd941f90decc" -version = "1.11.0" [[deps.SortingAlgorithms]] deps = ["DataStructures"] @@ -1398,7 +1373,7 @@ version = "1.2.1" [[deps.SparseArrays]] deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -version = "1.11.0" +version = "1.10.0" [[deps.SpecialFunctions]] deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] @@ -1447,9 +1422,9 @@ weakdeps = ["OffsetArrays", "StaticArrays"] [[deps.StaticArrays]] deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] -git-tree-sha1 = "777657803913ffc7e8cc20f0fd04b634f871af8f" +git-tree-sha1 = "47091a0340a675c738b1304b58161f3b0839d454" uuid = "90137ffa-7385-5640-81b9-e52037218182" -version = "1.9.8" +version = "1.9.10" weakdeps = ["ChainRulesCore", "Statistics"] [deps.StaticArrays.extensions] @@ -1462,14 +1437,9 @@ uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" version = "1.4.3" [[deps.Statistics]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "ae3bb1eb3bba077cd276bc5cfc337cc65c3075c0" +deps = ["LinearAlgebra", "SparseArrays"] uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -version = "1.11.1" -weakdeps = ["SparseArrays"] - - [deps.Statistics.extensions] - SparseArraysExt = ["SparseArrays"] +version = "1.10.0" [[deps.StatsAPI]] deps = ["LinearAlgebra"] @@ -1522,14 +1492,10 @@ version = "0.6.21" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" -[[deps.StyledStrings]] -uuid = "f489334b-da3d-4c2e-b8f0-e476e12c162b" -version = "1.11.0" - [[deps.SuiteSparse_jll]] deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "7.7.0+0" +version = "7.2.1+1" [[deps.TOML]] deps = ["Dates"] @@ -1577,7 +1543,6 @@ version = "4.1.1" [[deps.Test]] deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" -version = "1.11.0" [[deps.ThreadedScans]] deps = ["ArgCheck"] @@ -1631,11 +1596,9 @@ version = "1.5.1" [[deps.UUIDs]] deps = ["Random", "SHA"] uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" -version = "1.11.0" [[deps.Unicode]] uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" -version = "1.11.0" [[deps.UnicodeFun]] deps = ["REPL"] @@ -1645,9 +1608,9 @@ version = "0.4.1" [[deps.Unitful]] deps = ["Dates", "LinearAlgebra", "Random"] -git-tree-sha1 = "01915bfcd62be15329c9a07235447a89d588327c" +git-tree-sha1 = "c0667a8e676c53d390a09dc6870b3d8d6650e2bf" uuid = "1986cc42-f94f-5a68-af5c-568840ba703d" -version = "1.21.1" +version = "1.22.0" weakdeps = ["ConstructionBase", "InverseFunctions"] [deps.Unitful.extensions] @@ -1679,15 +1642,15 @@ version = "1.3.243+0" [[deps.Wayland_jll]] deps = ["Artifacts", "EpollShim_jll", "Expat_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg", "XML2_jll"] -git-tree-sha1 = "7558e29847e99bc3f04d6569e82d0f5c54460703" +git-tree-sha1 = "85c7811eddec9e7f22615371c3cc81a504c508ee" uuid = "a2964d1f-97da-50d4-b82a-358c7fce9d89" -version = "1.21.0+1" +version = "1.21.0+2" [[deps.Wayland_protocols_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "93f43ab61b16ddfb2fd3bb13b3ce241cafb0e6c9" +git-tree-sha1 = "5db3e9d307d32baba7067b13fc7b5aa6edd4a19a" uuid = "2381bf8a-dfd0-557d-9999-79630e7b1b91" -version = "1.31.0+0" +version = "1.36.0+0" [[deps.WoodburyMatrices]] deps = ["LinearAlgebra", "SparseArrays"] @@ -1709,9 +1672,9 @@ version = "1.1.42+0" [[deps.XZ_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "15e637a697345f6743674f1322beefbc5dcd5cfc" +git-tree-sha1 = "beef98d5aad604d9e7d60b2ece5181f7888e2fd6" uuid = "ffd25f8a-64ca-5728-b0f7-c24cf3aae800" -version = "5.6.3+0" +version = "5.6.4+0" [[deps.Xorg_libICE_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -1729,43 +1692,43 @@ version = "1.2.4+0" deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxcb_jll", "Xorg_xtrans_jll"] git-tree-sha1 = "9dafcee1d24c4f024e7edc92603cedba72118283" uuid = "4f6342f7-b3d2-589e-9d20-edeb45f2b2bc" -version = "1.8.6+1" +version = "1.8.6+3" [[deps.Xorg_libXau_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "2b0e27d52ec9d8d483e2ca0b72b3cb1a8df5c27a" uuid = "0c0b7dd1-d40b-584c-a123-a41640f87eec" -version = "1.0.11+1" +version = "1.0.11+3" [[deps.Xorg_libXcursor_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXfixes_jll", "Xorg_libXrender_jll"] -git-tree-sha1 = "12e0eb3bc634fa2080c1c37fccf56f7c22989afd" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXfixes_jll", "Xorg_libXrender_jll"] +git-tree-sha1 = "807c226eaf3651e7b2c468f687ac788291f9a89b" uuid = "935fb764-8cf2-53bf-bb30-45bb1f8bf724" -version = "1.2.0+4" +version = "1.2.3+0" [[deps.Xorg_libXdmcp_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "02054ee01980c90297412e4c809c8694d7323af3" uuid = "a3789734-cfe1-5b06-b2d0-1dd0d9d62d05" -version = "1.1.4+1" +version = "1.1.4+3" [[deps.Xorg_libXext_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] git-tree-sha1 = "d7155fea91a4123ef59f42c4afb5ab3b4ca95058" uuid = "1082639a-0dae-5f34-9b06-72781eeb8cb3" -version = "1.3.6+1" +version = "1.3.6+3" [[deps.Xorg_libXfixes_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] -git-tree-sha1 = "0e0dc7431e7a0587559f9294aeec269471c991a4" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] +git-tree-sha1 = "6fcc21d5aea1a0b7cce6cab3e62246abd1949b86" uuid = "d091e8ba-531a-589c-9de9-94069b037ed8" -version = "5.0.3+4" +version = "6.0.0+0" [[deps.Xorg_libXi_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll", "Xorg_libXfixes_jll"] -git-tree-sha1 = "89b52bc2160aadc84d707093930ef0bffa641246" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXext_jll", "Xorg_libXfixes_jll"] +git-tree-sha1 = "984b313b049c89739075b8e2a94407076de17449" uuid = "a51aa0fd-4e3c-5386-b890-e753decda492" -version = "1.7.10+4" +version = "1.8.2+0" [[deps.Xorg_libXinerama_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXext_jll"] @@ -1789,13 +1752,13 @@ version = "0.9.11+1" deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "fee57a273563e273f0f53275101cd41a8153517a" uuid = "14d82f49-176c-5ed1-bb49-ad3f5cbd8c74" -version = "0.1.1+1" +version = "0.1.1+3" [[deps.Xorg_libxcb_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "XSLT_jll", "Xorg_libXau_jll", "Xorg_libXdmcp_jll", "Xorg_libpthread_stubs_jll"] git-tree-sha1 = "1a74296303b6524a0472a8cb12d3d87a78eb3612" uuid = "c7cfdc94-dc32-55de-ac96-5a1b8d977c5b" -version = "1.17.0+1" +version = "1.17.0+3" [[deps.Xorg_libxkbfile_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] @@ -1855,7 +1818,7 @@ version = "2.39.0+0" deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "b9ead2d2bdb27330545eb14234a2e300da61232e" uuid = "c5fb5394-a638-5e4d-96e5-b29de1b5cf10" -version = "1.5.0+1" +version = "1.5.0+3" [[deps.Zeros]] deps = ["Test"] @@ -1870,9 +1833,9 @@ version = "1.2.13+1" [[deps.Zstd_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "555d1076590a6cc2fdee2ef1469451f872d8b41b" +git-tree-sha1 = "622cf78670d067c738667aaa96c553430b65e269" uuid = "3161d3a3-bdf6-5164-811a-617609db77b4" -version = "1.5.6+1" +version = "1.5.7+0" [[deps.eudev_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "gperf_jll"] @@ -1896,13 +1859,13 @@ version = "3.1.1+1" deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "46bf7be2917b59b761247be3f317ddf75e50e997" uuid = "477f73a3-ac25-53e9-8cc3-50b2fa2566f0" -version = "1.1.2+0" +version = "1.1.2+2" [[deps.libaom_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "1827acba325fdcdf1d2647fc8d5301dd9ba43a9d" +git-tree-sha1 = "522c1df09d05a71785765d19c9524661234738e9" uuid = "a4ae2306-e953-59d6-aa16-d00cac43593b" -version = "3.9.0+0" +version = "3.11.0+0" [[deps.libass_jll]] deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl", "Zlib_jll"] @@ -1941,9 +1904,9 @@ version = "1.18.0+0" [[deps.libpng_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Zlib_jll"] -git-tree-sha1 = "b70c870239dc3d7bc094eb2d6be9b73d27bef280" +git-tree-sha1 = "b7bfd3ab9d2c58c3829684142f5804e4c6499abc" uuid = "b53b4c65-9356-5827-b1ea-8c7a1a84506f" -version = "1.6.44+0" +version = "1.6.45+0" [[deps.libvorbis_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Ogg_jll", "Pkg"] @@ -1960,7 +1923,7 @@ version = "1.1.6+0" [[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.59.0+0" +version = "1.52.0+1" [[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] @@ -1981,6 +1944,6 @@ version = "3.5.0+0" [[deps.xkbcommon_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Wayland_jll", "Wayland_protocols_jll", "Xorg_libxcb_jll", "Xorg_xkeyboard_config_jll"] -git-tree-sha1 = "9c304562909ab2bab0262639bd4f444d7bc2be37" +git-tree-sha1 = "63406453ed9b33a0df95d570816d5366c92b7809" uuid = "d8fb68d0-12a3-5cfd-a85a-d49703b185fd" -version = "1.4.1+1" +version = "1.4.1+2" diff --git a/docs/Project.toml b/docs/Project.toml index 43ecaae..8e3c54e 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -2,4 +2,4 @@ Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" [compat] -Documenter = "1.8" +Documenter = "1.8" \ No newline at end of file diff --git a/docs/src/examples/puredephasing.md b/docs/src/examples/puredephasing.md index 0f45c40..e7c3a81 100644 --- a/docs/src/examples/puredephasing.md +++ b/docs/src/examples/puredephasing.md @@ -114,7 +114,7 @@ This initial state is a product state between the system and the chain. It is co # MPO and initial state MPS #--------------------------- -H = puredephasingmpo(ΔE, d, N, cpars) +H = puredephasingmpo(ω0, d, N, cpars) # Initial electronic system in a superposition of 1 and 2 ψ = zeros(2) @@ -142,7 +142,7 @@ A, dat = runsim(dt, tfinal, A, H, prec=1E-4; method = method, obs = [ob1], convobs = [ob1], - params = @LogParams(ΔE, N, d, α, s), + params = @LogParams(ω0, N, d, α, s), convparams = D, reduceddensity=true, verbose = false, diff --git a/docs/src/examples/timedep.md b/docs/src/examples/timedep.md index df761a9..6ef5c3b 100644 --- a/docs/src/examples/timedep.md +++ b/docs/src/examples/timedep.md @@ -164,7 +164,7 @@ ob3 = TwoSiteObservable("SXdisp", sx, disp(d), [1], collect(2:N+1)) A, dat = runsim(dt, tfinal, A, H; name = "Driving field on ohmic spin boson model", method = method, - obs = [ob1], + obs = [ob1, ob2, ob3], convobs = [ob1], params = @LogParams(N, d, α, Δ, ω0, s), convparams = D, @@ -176,7 +176,7 @@ A, dat = runsim(dt, tfinal, A, H; plot = true, ); ``` -Eventually, the stored observables can be represented. For more information about the chain observables, see [Inspecting the bath by undoing the chain mapping] +Eventually, the stored observables can be represented. For more information about the chain observables, see [Inspecting the bath by undoing the chain mapping](@ref) ```julia #---------- diff --git a/docs/src/methods.md b/docs/src/methods.md index 98ed7ee..370352b 100644 --- a/docs/src/methods.md +++ b/docs/src/methods.md @@ -44,5 +44,5 @@ Pages = ["MPSDynamics.jl", "chain2TDVP.jl", "chainA1TDVP.jl","chainDMRG.jl","cha ## Advanced ```@autodocs Modules = [MPSDynamics] -Pages = ["flattendict.jl", "logging.jl", "logiter.jl","machines.jl"] +Pages = ["flattendict.jl", "logging.jl", "logiter.jl","machines.jl","utilities.jl"] ``` diff --git a/src/MPSDynamics.jl b/src/MPSDynamics.jl index 65e9e95..03aeca8 100644 --- a/src/MPSDynamics.jl +++ b/src/MPSDynamics.jl @@ -28,6 +28,7 @@ include("run_DTDVP.jl") include("chainA1TDVP.jl") include("switchmpo.jl") include("finitetemperature.jl") +include("utilities.jl") """ runsim(dt, tmax, A, H; @@ -87,12 +88,16 @@ function runsim(dt, tmax, A, H; convparams = typeof(convparams) <: Vector ? only(convparams) : convparams end - if save || plot + if save || plot || (:onthefly in keys(kwargs) && !isempty(kwargs[:onthefly][:save_obs]) && kwargs[:onthefly][:savedir] == "auto") if savedir[end] != '/' savedir = string(savedir,"/") end isdir(savedir) || mkdir(savedir) open_log(dt, tmax, convparams, method, machine, savedir, unid, name, params, obs, convobs, convcheck, kwargs...) + if :onthefly in keys(kwargs) + mkdir(string(savedir, unid, "/tmp/")) + kwargs[:onthefly][:savedir] = string(savedir, unid, "/tmp/") + end end paramdict = Dict([[(par[1], par[2]) for par in params]..., @@ -155,7 +160,7 @@ export chaincoeffs_ohmic, spinbosonmpo, methylbluempo, methylbluempo_correlated, export productstatemps, physdims, randmps, bonddims, elementmps -export measure, measurempo, OneSiteObservable, TwoSiteObservable, FockError, errorbar +export measure, measurempo, OneSiteObservable, TwoSiteObservable, RhoReduced, FockError, errorbar export runsim, run_all @@ -175,5 +180,7 @@ export rhoreduced_2sites, rhoreduced_1site, protontransfermpo export chaincoeffs_finiteT, chaincoeffs_fermionic, fermionicspectraldensity_finiteT, chaincoeffs_finiteT_discrete +export onthefly, mergetmp + end diff --git a/src/measure.jl b/src/measure.jl index 3122f7b..cc7787a 100644 --- a/src/measure.jl +++ b/src/measure.jl @@ -35,6 +35,17 @@ struct TwoSiteObservable <: Observable allsites::Bool end +""" + RhoReduced(name,sites) + +Computes the reduced density matrix on the sites `sites` which can be either a single site or a tuple of two sites. Used to define +reduced density matrices that are obs and convobs parameters for the `runsim` function. +""" +struct RhoReduced <: Observable + name::String + sites::Union{Int, Tuple{Int, Int}} +end + struct CdagCup <: Observable name::String sites::Tuple{Int,Int} @@ -183,6 +194,7 @@ measure(A, O::TwoSiteObservable, ::Nothing) = measure2siteoperator(A, O.op1, O.op2, O.sites1, O.sites2) measure(A, O::TwoSiteObservable, ρ::Vector) = measure2siteoperator(A, O.op1, O.op2, O.sites1, O.sites2, ρ) +measure(A, O::RhoReduced; kwargs...) = O.sites isa Int ? rhoreduced_1site(A, O.sites) : rhoreduced_2sites(A, O.sites) """ measure1siteoperator(A::Vector, O, sites::Vector{Int}) diff --git a/src/run_1TDVP.jl b/src/run_1TDVP.jl index 50daa57..c743041 100644 --- a/src/run_1TDVP.jl +++ b/src/run_1TDVP.jl @@ -1,4 +1,4 @@ -function run_1TDVP(dt, tmax, A, H, Dmax; obs=[], timed=false, reduceddensity=false, timedep=false, kwargs...) +function run_1TDVP(dt, tmax, A, H, Dmax; obs=[], timed=false, reduceddensity=false, timedep=false, progressbar=true, onthefly=Dict(), kwargs...) A0=deepcopy(A) H0=deepcopy(H) data = Dict{String,Any}() @@ -19,12 +19,19 @@ function run_1TDVP(dt, tmax, A, H, Dmax; obs=[], timed=false, reduceddensity=fal end timed && (ttdvp = Vector{Float64}(undef, numsteps)) + onthefly = copy(onthefly) + ontheflyplotbool = !isempty(onthefly) && !isnothing(onthefly[:plot_obs]) + ontheflysavebool = !isempty(onthefly) && !isempty(onthefly[:save_obs]) + ontheflysavebool && (onthefly[:save_obs] = intersect(onthefly[:save_obs], [ob.name for ob in obs])) F=nothing mpsembed!(A0, Dmax) - for tstep=1:numsteps - @printf("%i/%i, t = %.3f ", tstep, numsteps, times[tstep]) - println() + iter = progressbar ? ProgressBar(numsteps; ETA=true) : 1:numsteps + for tstep in iter + if !progressbar + @printf("%i/%i, t = %.3f ", tstep, numsteps, times[tstep]) + println() + end if timedep Ndrive = kwargs[:Ndrive] Htime = kwargs[:Htime] @@ -55,6 +62,8 @@ function run_1TDVP(dt, tmax, A, H, Dmax; obs=[], timed=false, reduceddensity=fal exprho = rhoreduced_1site(A0,Nrho) data["Reduced ρ"] = cat(data["Reduced ρ"], exprho; dims=ndims(exprho)+1) end + ontheflyplotbool && tstep%onthefly[:step] == 0 && ontheflyplot(onthefly, tstep, times, data) + ontheflysavebool && tstep%onthefly[:step] == 0 && ontheflysave(onthefly, tstep, times, data) end timed && push!(data, "deltat"=>ttdvp) push!(data, "times" => times) diff --git a/src/run_2TDVP.jl b/src/run_2TDVP.jl index d7e22fe..aa06b59 100644 --- a/src/run_2TDVP.jl +++ b/src/run_2TDVP.jl @@ -1,4 +1,4 @@ -function run_2TDVP(dt, tmax, A, H, truncerr; obs=[], Dlim=50, savebonddims=false, timed=false, reduceddensity=false, timedep=false, kwargs...) +function run_2TDVP(dt, tmax, A, H, truncerr; obs=[], Dlim=50, savebonddims=false, timed=false, reduceddensity=false, timedep=false, progressbar=true, onthefly=Dict(), kwargs...) A0=deepcopy(A) H0=deepcopy(H) data = Dict{String,Any}() @@ -22,12 +22,19 @@ function run_2TDVP(dt, tmax, A, H, truncerr; obs=[], Dlim=50, savebonddims=false savebonddims && push!(data, "bonddims" => reshape([bonds...], length(bonds), 1)) timed && (ttdvp = Vector{Float64}(undef, numsteps)) + onthefly = copy(onthefly) + ontheflyplotbool = !isempty(onthefly) && !isnothing(onthefly[:plot_obs]) + ontheflysavebool = !isempty(onthefly) && !isempty(onthefly[:save_obs]) + ontheflysavebool && (onthefly[:save_obs] = intersect(onthefly[:save_obs], [ob.name for ob in obs])) F=nothing - for tstep=1:numsteps - maxbond = max(bonds...) - @printf("%i/%i, t = %.3f, Dmax = %i ", tstep, numsteps, times[tstep], maxbond) - println() + iter = progressbar ? ProgressBar(numsteps; ETA=false) : 1:numsteps + for tstep in iter + if !progressbar + maxbond = max(bonds...) + @printf("%i/%i, t = %.3f, Dmax = %i ", tstep, numsteps, times[tstep], maxbond) + println() + end if timedep Ndrive = kwargs[:Ndrive] Htime = kwargs[:Htime] @@ -52,6 +59,8 @@ function run_2TDVP(dt, tmax, A, H, truncerr; obs=[], Dlim=50, savebonddims=false A0, F = tdvp2sweep!(dt, A0, H0, F; truncerr=truncerr, truncdim=Dlim, kwargs...) end bonds = bonddims(A0) + progressbar && (maxbond = max(bonds...)) + progressbar && (iter.Dmax = maxbond) exp = measure(A0, obs; t=times[tstep]) for (i, ob) in enumerate(obs) data[ob.name] = cat(data[ob.name], exp[i], dims=ndims(exp[i])+1) @@ -63,6 +72,8 @@ function run_2TDVP(dt, tmax, A, H, truncerr; obs=[], Dlim=50, savebonddims=false if savebonddims data["bonddims"] = cat(data["bonddims"], [bonds...], dims=2) end + ontheflyplotbool && tstep%onthefly[:step] == 0 && ontheflyplot(onthefly, tstep, times, data) + ontheflysavebool && tstep%onthefly[:step] == 0 && ontheflysave(onthefly, tstep, times, data) end timed && push!(data, "deltat"=>ttdvp) push!(data, "times" => times) diff --git a/src/run_DTDVP.jl b/src/run_DTDVP.jl index 7689a66..4cf97a9 100644 --- a/src/run_DTDVP.jl +++ b/src/run_DTDVP.jl @@ -1,4 +1,4 @@ -function run_DTDVP(dt, tmax, A, H, prec; obs=[], effects=false, error=false, timed=false, savebonddims=false, Dplusmax=nothing, Dlim=50, reduceddensity=false, timedep=false, kwargs...) +function run_DTDVP(dt, tmax, A, H, prec; obs=[], effects=false, error=false, timed=false, savebonddims=false, Dplusmax=nothing, Dlim=50, reduceddensity=false, timedep=false, progressbar=true, onthefly=Dict(), kwargs...) A0=deepcopy(A) H0=deepcopy(H) data = Dict{String,Any}() @@ -25,12 +25,19 @@ function run_DTDVP(dt, tmax, A, H, prec; obs=[], effects=false, error=false, tim timed && (ttdvp = Vector{Float64}(undef, numsteps)) timed && (tproj = Vector{Float64}(undef, numsteps)) effects && (efft = Vector{Any}(undef, numsteps)) + onthefly = copy(onthefly) + ontheflyplotbool = !isempty(onthefly) && !isnothing(onthefly[:plot_obs]) + ontheflysavebool = !isempty(onthefly) && !isempty(onthefly[:save_obs]) + ontheflysavebool && (onthefly[:save_obs] = intersect(onthefly[:save_obs], [ob.name for ob in obs])) F=nothing Afull=nothing - for tstep=1:numsteps - maxbond = max(bonds...) - @printf("%i/%i, t = %.3f, Dmax = %i \n", tstep, numsteps, times[tstep], maxbond) + iter = progressbar ? ProgressBar(numsteps; ETA=false) : 1:numsteps + for tstep in iter + if !progressbar + maxbond = max(bonds...) + @printf("%i/%i, t = %.3f, Dmax = %i \n", tstep, numsteps, times[tstep], maxbond) + end if timedep Ndrive = kwargs[:Ndrive] Htime = kwargs[:Htime] @@ -58,6 +65,9 @@ function run_DTDVP(dt, tmax, A, H, prec; obs=[], effects=false, error=false, tim exp = info["obs"] bonds = info["dims"] + progressbar && (maxbond = max(bonds...)) + progressbar && (iter.Dmax = maxbond) + effects && (efft[tstep] = reduce(hcat, info["effect"])) error && (errs[tstep] = info["err"]) timed && (ttdvp[tstep] = info["t2"] + info["t3"]) @@ -71,6 +81,8 @@ function run_DTDVP(dt, tmax, A, H, prec; obs=[], effects=false, error=false, tim exprho = rhoreduced_1site(A0,Nrho) data["Reduced ρ"] = cat(data["Reduced ρ"], exprho; dims=ndims(exprho)+1) end + ontheflyplotbool && (tstep-1)%onthefly[:step] == 0 && ontheflyplot(onthefly, tstep-1, times, data) + ontheflysavebool && (tstep-1)%onthefly[:step] == 0 && ontheflysave(onthefly, tstep-1, times, data) end if savebonddims data["bonddims"] = cat(data["bonddims"], bonds, dims=2) diff --git a/src/utilities.jl b/src/utilities.jl new file mode 100644 index 0000000..012970e --- /dev/null +++ b/src/utilities.jl @@ -0,0 +1,130 @@ +mutable struct ProgressBar + numsteps::Int + ETA::Bool + times::Vector{<:Float64} + Dmax::Int + length::UInt +end + +""" + ProgressBar(numsteps::Int; ETA=false, last=10) + +An iterable returning values from 1 to `numsteps`. Displays a progress bar for the for loop where it has been called. +If ETA is true then displays an estimation of the remaining time calculated based on the time spent computing the last `last` values. +The progress bar can be activated or deactivated by setting the `progressbar` keyword argument in `runsim` to true or false.""" +ProgressBar(numsteps::Int; ETA=false, last=10) = ProgressBar(numsteps, ETA, fill(0., (ETA ? last : 1)+1), 0, displaysize(stdout)[2] > 54 ? min(displaysize(stdout)[2]-54, 50) : error("Error : Terminal window too narrow")) + +function Base.iterate(bar::ProgressBar, state=1) + Ntimes = length(bar.times)-1 + if state > bar.numsteps + println() + return nothing + elseif state == 1 + printstyled("\nCompiling..."; color=:red, bold=true) + bar.times = fill(time(), Ntimes+1) + else + tnow = time() + dtelapsed = tnow - bar.times[1] + dtETA = (tnow - bar.times[2+state%Ntimes])*(bar.numsteps - state)/min(state-1, Ntimes) + dtiter = tnow - bar.times[2+(state-1)%Ntimes] + bar.times[2+state%Ntimes] = tnow + elapsedstr = Dates.format(Time(0)+Second(floor(Int, dtelapsed)), dtelapsed>3600 ? "HH:MM:SS" : "MM:SS") + ETAstr = Dates.format(Time(0)+Second(floor(Int, dtETA)), dtETA>3600 ? "HH:MM:SS" : "MM:SS") + iterstr = Dates.format(Time(0)+Millisecond(floor(Int, 1000*dtiter)), dtiter>60 ? "MM:SS.sss" : "SS.sss") + print("\r") + printstyled("$(round(100*state/bar.numsteps, digits=1))% "; color = :green, bold=true) + print("┣"*"#"^(round(Int, state/bar.numsteps*bar.length))*" "^(bar.length-round(Int, state/bar.numsteps*bar.length))*"┫") + printstyled(" $state/$(bar.numsteps) [$(elapsedstr)s"*(bar.ETA ? "; ETA:$(ETAstr)s" : "")*"; $(iterstr)s/it"*(bar.Dmax > 0 ? "; Dmax=$(bar.Dmax)" : "")*"]"; color = :green, bold=true) + end + return (state, state+1) +end + +""" + onthefly(;plot_obs=nothing::Union{<:Observable, Nothing}, save_obs=Vector{Observable}(undef, 0)::Union{<:Observable, Vector{<:Observable}}, savedir="auto", step=10::Int, func=identity<:Function, compare=nothing::Union{Tuple{Vector{Float64}, Vector{Float64}}, Nothing}, clear=identity<:Function) + +Helper function returning a dictionnary containing the necessary arguments for on the fly plotting or saving in the `runsim` function. + +# Arguments + +* `plot_obs` : Observable to plot +* `save_obs` : List of Observable(s) to save +* `savedir` : Used to specify the path where temporary files are stored, default is `"auto"` which saves in a "tmp" folder in the run folder (generally located at "~/MPSDynamics//tmp/"). +* `step` : Number of time steps every which the function plots or saves the data +* `func` : Function to apply to the result of measurement of plot_obs (for example `real` or `abs` to make a complex result possible to plot) +* `compare` : Tuple `(times, data)` of previous results to compare against the plot_obs results, +* `clear` : Function used to clear the output before each attempt to plot, helpful for working in Jupyter notebooks where clear=IJulia.clear_output allows to reduce the size of the cell output + +# Examples + +For example in the [Spin-Boson model example](@ref "The Spin Boson Model"), adding the following argument to the `runsim` function allows to save +the "sz" observable `ob1` in the directory "~/MPSDynamics//tmp/" and plot its real part during the simulation: +```julia +runsim(..., onthefly=onthefly(plot_obs=ob1, save_obs=[ob1], savedir="auto", step=10, func=real)) +``` +To merge the temporary files in one usable file, one can then use [`MPSDynamics.mergetmp`](@ref). +""" +function onthefly(;plot_obs=nothing::Union{<:Observable, Nothing}, save_obs=Vector{Observable}(undef, 0)::Union{<:Observable, Vector{<:Observable}}, savedir="auto", step=10::Int, func=identity::Function, compare=nothing::Union{Tuple{Vector{Float64}, Vector{Float64}}, Nothing}, clear=nothing) + if isnothing(plot_obs) && isempty(save_obs) + error("Must provide an observable to plot/save") + end + # !isempty(save_obs) && (isdir(savedir) || mkdir(savedir)) + plt = isnothing(plot_obs) ? nothing : plot(title="Intermediate Results", xlabel="t", ylabel=plot_obs.name) + !isnothing(compare) && plot!(compare) + println("On the fly mode activated") + return Dict(:plot_obs => isnothing(plot_obs) ? nothing : plot_obs.name, :save_obs => [ob.name for ob in save_obs], :savedir => savedir, :step => step, :func => func, :clear => clear, :compare => compare, :plot => plt) +end + +""" + ontheflyplot(onthefly, tstep, times, data) + +Plots data according to the arguments of the `onthefly` dictionnary.""" +function ontheflyplot(onthefly, tstep, times, data) + tstep < onthefly[:step]+2 && plot!(onthefly[:plot], [], []) + N = ndims(data[onthefly[:plot_obs]]) + N == 1 ? slicefunc(arr, N, i) = arr[i] : slicefunc = selectdim + append!(onthefly[:plot].series_list[end], times[tstep-onthefly[:step]+1:tstep+1], map(onthefly[:func], (slicefunc(data[onthefly[:plot_obs]], N, i) for i in (tstep-onthefly[:step]+1):(tstep+1)))) + !isnothing(onthefly[:clear]) && onthefly[:clear](true) + sleep(0.05);display(onthefly[:plot]) +end + +""" + ontheflysave(onthefly, tstep, times, data) + +Saves data according to the arguments of the `onthefly` dictionnary.""" +function ontheflysave(onthefly, tstep, times, data) + jldopen(onthefly[:savedir]*"tmp$(tstep÷onthefly[:step]).jld", "w") do file + write(file, "times", times[tstep-onthefly[:step]+1:tstep+1]) + for name in onthefly[:save_obs] + write(file, name, data[name][tstep-onthefly[:step]+1:tstep+1]) + end + end +end + +""" + mergetmp(tmpdir; fields=[], overwrite=true) + +Merges the temporary files created by the `ontheflysave` function at the directory `tmpdir` and returns a dictionnary containing the resulting data. +By default all fields are present but one can select the fields of interest with a list of names in `fields`.""" +function mergetmp(tmpdir; fields=[], overwrite=true) + tmpdir[end] != '/' && (tmpdir *= '/') + !isdir(tmpdir) && error("Choose a valid directory") + files = [walkdir(tmpdir)...][1][3] + files = filter(x->!isnothing(match(r"tmp(\d+).jld", x)), files) + files = sort(files, by=(x -> parse(Int, match(r"(\d+)", x).captures[1]))) + isempty(fields) && (fields = keys(JLD.load(tmpdir*files[1]))) + merged_data = Dict(ob => [] for ob in fields) + i = 1 + for file in files + for ob in fields + append!(merged_data[ob], JLD.load(tmpdir*file, ob)) + end + i += 1 + end + if overwrite + for file in files + rm(tmpdir*file) + end + JLD.save(tmpdir*files[end], Iterators.flatten(merged_data)...) + end + return merged_data +end \ No newline at end of file