From 6c743f022df6688d5b3dacf366964dee773c5702 Mon Sep 17 00:00:00 2001 From: Angela Riva <62027430+angelariva@users.noreply.github.com> Date: Fri, 21 Jun 2024 18:13:14 +0200 Subject: [PATCH 01/28] Update bath-observables.md --- docs/src/examples/bath-observables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/examples/bath-observables.md b/docs/src/examples/bath-observables.md index 6a17e4e..ad7a9da 100644 --- a/docs/src/examples/bath-observables.md +++ b/docs/src/examples/bath-observables.md @@ -129,7 +129,7 @@ It is possible to invert the thermofield transformation (details in [^riva_therm We remark that in the thermofield case, a negative frequency $\omega_{2k}$ is associated to each positive frequency $\omega_{1k}$. The sampling is therefore symmetric around zero. This marks a difference with T-TEDOPA, where the sampling of frequencies was obtained through the thermalized measure $d\mu(\beta) = \sqrt{J(\omega, \beta)}d\omega$, and was not symmetric. To recover the results for the physical bath of frequencies starting from the results of our simulations, that were conducted using the T-TEDOPA chain mapping, we need to do an extrapolation for all of the mean values, in order to have their values for each $\omega$ at $-\omega$ as well. This is done in the code with the `physical_occup` function: ```julia -bath_occup_phys = physical_occup(correlations_cdag[:,:,T], correlations_c[:,:,T], omeg, bath_occup[:,:,T], β, N) +bath_occup_phys = physical_occup(cdagcdag_average[:,:,T], cc_average[:,:,T], omeg, bath_occup[:,:,T], β, N) ``` Finally, in the pure dephasing case, it is also possible to obtain the analytical prediction of the time evolution of the occupations of the bath's modes, so that we can compare our numerical results with the analytical ones, exploiting the Heisenberg time evolution relation: From 61d71f885a33d1bcae79ebd80815ed6e8f567ed2 Mon Sep 17 00:00:00 2001 From: Angela Riva <62027430+angelariva@users.noreply.github.com> Date: Fri, 22 Nov 2024 16:35:15 +0100 Subject: [PATCH 02/28] Update finitetemperature.jl -- fixed doc on fermionic chains --- src/finitetemperature.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/finitetemperature.jl b/src/finitetemperature.jl index f4c4c5f..7fffabe 100644 --- a/src/finitetemperature.jl +++ b/src/finitetemperature.jl @@ -118,7 +118,7 @@ function chaincoeffs_finiteT(nummodes, β, ohmic=true; α=1, s=1, J=nothing, ωc end """ - chaincoeffs_fermionic(nummodes, β, chain; ϵ=x, ωc=1, mc=4, mp=0, AB=nothing, iq=1, idelta=2, procedure=:Lanczos, Mmax=5000, save=true) + chaincoeffs_fermionic(nummodes, β, chain; ϵ=nothing, J=nothing, ωc=1, mc=4, mp=0, AB=nothing, iq=1, idelta=2, procedure=:Lanczos, Mmax=5000, save=true) Generate chain coefficients ``[[ϵ_0,ϵ_1,...],[t_0,t_1,...],c_0]`` for a fermionic bath at the inverse temperature β. @@ -209,4 +209,4 @@ function chaincoeffs_fermionic(nummodes, β, chain; ϵ=nothing, J=nothing, ωc=1 end return [jacerg[:,1], jacerg[1:N-1,2],jacerg[N,2]] -end \ No newline at end of file +end From f2c882367fc245f62fa753becf0192fafb7710fa Mon Sep 17 00:00:00 2001 From: Angela Riva <62027430+angelariva@users.noreply.github.com> Date: Mon, 25 Nov 2024 11:47:35 +0100 Subject: [PATCH 03/28] Create convergence.md New page in doc --- docs/src/convergence.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs/src/convergence.md diff --git a/docs/src/convergence.md b/docs/src/convergence.md new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/docs/src/convergence.md @@ -0,0 +1 @@ + From 963543aacbb994f76fe8a614ca1de5b49a5a3709 Mon Sep 17 00:00:00 2001 From: Angela Riva <62027430+angelariva@users.noreply.github.com> Date: Mon, 25 Nov 2024 13:55:07 +0100 Subject: [PATCH 04/28] Update convergence.md --- docs/src/convergence.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/src/convergence.md b/docs/src/convergence.md index 8b13789..e368c2e 100644 --- a/docs/src/convergence.md +++ b/docs/src/convergence.md @@ -1 +1,10 @@ +# Convergence checks +In this page we give some tips on how to obtain converged simulations. + + +## Chain length $N$ +During a numerical simulation, a truncation on the number of chain modes (and therefore chain length) will be introduced, in order to work with a chain of finite length instead of a semi-infinite one. This truncation on chain modes, let us say $N$, introduces a sampling on the modes in the original environment. + +## Local dimension $d$ +A second truncation has to be introduced on the local dimension $d$ of each tensor comprising the MPS that will be dynamically evolved. The local dimension coincides with the truncated number of Fock's states of the chain mode's Hilbert space: each site of the MPS, can be filled up by at most $d$ excitations. Since in this case the excitations are bosonic, the Pauli exclusion principle does not hold, and this number should in principle be infinite. From 2756e904430e8783b7b8c7627a948c3192c08b2a Mon Sep 17 00:00:00 2001 From: Angela Riva <62027430+angelariva@users.noreply.github.com> Date: Mon, 25 Nov 2024 14:18:55 +0100 Subject: [PATCH 05/28] Update convergence.md --- docs/src/convergence.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/src/convergence.md b/docs/src/convergence.md index e368c2e..25167c6 100644 --- a/docs/src/convergence.md +++ b/docs/src/convergence.md @@ -1,10 +1,9 @@ # Convergence checks -In this page we give some tips on how to obtain converged simulations. - +In this section, we analyze the numerical accuracy of our simulations by outlining the necessary approximations and providing practical guidelines to ensure convergence of results. ## Chain length $N$ -During a numerical simulation, a truncation on the number of chain modes (and therefore chain length) will be introduced, in order to work with a chain of finite length instead of a semi-infinite one. This truncation on chain modes, let us say $N$, introduces a sampling on the modes in the original environment. +During a numerical simulation, a truncation on the number of chain modes (and therefore chain length) will be introduced, in order to work with a chain of finite length instead of a semi-infinite one. This truncation on chain modes, let us say $N$, introduces a sampling on the modes in the original environment. ## Local dimension $d$ -A second truncation has to be introduced on the local dimension $d$ of each tensor comprising the MPS that will be dynamically evolved. The local dimension coincides with the truncated number of Fock's states of the chain mode's Hilbert space: each site of the MPS, can be filled up by at most $d$ excitations. Since in this case the excitations are bosonic, the Pauli exclusion principle does not hold, and this number should in principle be infinite. +Another critical truncation is imposed on the local dimension $d$ of each tensor in the MPS that undergoes dynamic evolution. The local dimension dd corresponds to the number of Fock states retained in the Hilbert space of each chain mode. Since harmonic oscillators are, in principle, infinite-dimensional systems, truncating their Hilbert space to a finite $d$ is necessary for numerical computations. The choice of dd determines the maximum number of excitations per site in the MPS and must be carefully tuned to capture the relevant physics while ensuring numerical convergence. From 24be6be34e726d663e6db3a9c2050aa901895189 Mon Sep 17 00:00:00 2001 From: Angela Riva <62027430+angelariva@users.noreply.github.com> Date: Mon, 25 Nov 2024 15:44:42 +0100 Subject: [PATCH 06/28] Update convergence.md --- docs/src/convergence.md | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/docs/src/convergence.md b/docs/src/convergence.md index 25167c6..e439ae9 100644 --- a/docs/src/convergence.md +++ b/docs/src/convergence.md @@ -2,8 +2,23 @@ In this section, we analyze the numerical accuracy of our simulations by outlining the necessary approximations and providing practical guidelines to ensure convergence of results. -## Chain length $N$ -During a numerical simulation, a truncation on the number of chain modes (and therefore chain length) will be introduced, in order to work with a chain of finite length instead of a semi-infinite one. This truncation on chain modes, let us say $N$, introduces a sampling on the modes in the original environment. +### Chain length $N$ +During a numerical simulation, a truncation on the number of chain modes (and therefore chain length) will be introduced, in order to work with a chain of finite length instead of a semi-infinite one. This truncation on chain modes, let us say $N$, corresponds to a sampling on the modes in the original environment. -## Local dimension $d$ -Another critical truncation is imposed on the local dimension $d$ of each tensor in the MPS that undergoes dynamic evolution. The local dimension dd corresponds to the number of Fock states retained in the Hilbert space of each chain mode. Since harmonic oscillators are, in principle, infinite-dimensional systems, truncating their Hilbert space to a finite $d$ is necessary for numerical computations. The choice of dd determines the maximum number of excitations per site in the MPS and must be carefully tuned to capture the relevant physics while ensuring numerical convergence. +The length chain is connected to the simulation time in the following way: excitations injected from the system form a wave-front that travels along the chain. Any perturbation to the initial state outside of this wave-front are exponentially suppressed. It is thus natural to truncate in the chain basis, making sure that this truncation happens **beyond** the expanding wave-front, as in this way the sampling error is also exponentially small. + +To make sure that, for a given simulation time, and for a given set of chain coefficients, the chain-length is the optimal one, we can do as follows. We set the total simulation time, and we compute the chain coefficients for a non-optimal chain, much longer than needed. +``` +T = 100 +N_huge = 1000 +cpars = chaincoeffs_flat(N_huge, αchain; ωc = 1.0) +``` +We can then use the built-in function `findchainlength`, that computes the required chain length `N_opt` from the propagation speed on the chain sites (given by the hopping coefficients $t_n$): +``` +N_opt = findchainlength(T, cpars; eps=10^-4, verbose=false) +``` + +### Local dimension $d$ +Another critical truncation is imposed on the local dimension $d$ of each tensor in the MPS that undergoes dynamic evolution. The local dimension dd corresponds to the number of Fock states retained in the Hilbert space of each chain mode. Since harmonic oscillators are, in principle, infinite-dimensional systems, truncating their Hilbert space to a finite $d$ is necessary for numerical computations. The choice of $d$ determines the maximum number of excitations per site in the MPS and must be carefully tuned to capture the relevant physics while ensuring numerical convergence. + +### From 4f4132542812c95111a670870305d1743ce22e5f Mon Sep 17 00:00:00 2001 From: Thibaut Lacroix <57836508+tfmlaX@users.noreply.github.com> Date: Mon, 25 Nov 2024 16:35:36 +0100 Subject: [PATCH 07/28] Add references --- docs/src/convergence.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/src/convergence.md b/docs/src/convergence.md index e439ae9..b9af33e 100644 --- a/docs/src/convergence.md +++ b/docs/src/convergence.md @@ -5,7 +5,7 @@ In this section, we analyze the numerical accuracy of our simulations by outlini ### Chain length $N$ During a numerical simulation, a truncation on the number of chain modes (and therefore chain length) will be introduced, in order to work with a chain of finite length instead of a semi-infinite one. This truncation on chain modes, let us say $N$, corresponds to a sampling on the modes in the original environment. -The length chain is connected to the simulation time in the following way: excitations injected from the system form a wave-front that travels along the chain. Any perturbation to the initial state outside of this wave-front are exponentially suppressed. It is thus natural to truncate in the chain basis, making sure that this truncation happens **beyond** the expanding wave-front, as in this way the sampling error is also exponentially small. +The length chain is connected to the simulation time in the following way: excitations injected from the system form a wave-front that travels along the chain. Any perturbation to the initial state outside of this wave-front are exponentially suppressed. It is thus natural to truncate in the chain basis, making sure that this truncation happens **beyond** the expanding wave-front, as in this way the sampling error is also exponentially small [^woods_simulating_2015][^DeVega_howto_2015]. To make sure that, for a given simulation time, and for a given set of chain coefficients, the chain-length is the optimal one, we can do as follows. We set the total simulation time, and we compute the chain coefficients for a non-optimal chain, much longer than needed. ``` @@ -19,6 +19,12 @@ N_opt = findchainlength(T, cpars; eps=10^-4, verbose=false) ``` ### Local dimension $d$ -Another critical truncation is imposed on the local dimension $d$ of each tensor in the MPS that undergoes dynamic evolution. The local dimension dd corresponds to the number of Fock states retained in the Hilbert space of each chain mode. Since harmonic oscillators are, in principle, infinite-dimensional systems, truncating their Hilbert space to a finite $d$ is necessary for numerical computations. The choice of $d$ determines the maximum number of excitations per site in the MPS and must be carefully tuned to capture the relevant physics while ensuring numerical convergence. +Another critical truncation is imposed on the local dimension $d$ of each tensor in the MPS that undergoes dynamic evolution. The local dimension $d$ corresponds to the number of Fock states retained in the Hilbert space of each chain mode. Since harmonic oscillators are, in principle, infinite-dimensional systems, truncating their Hilbert space to a finite $d$ is necessary for numerical computations. The choice of $d$ determines the maximum number of excitations per site in the MPS and must be carefully tuned to capture the relevant physics while ensuring numerical convergence. +For a bath that initially contains only a finite number of particles, i.e. any bath in practice, the error originating from the local Hilbert space truncation vanishes exponentially as $d$ increases[^woods_simulating_2015]. ### + + +# References +[^woods_simulating_2015]: Woods, M. P.; Cramer, M.; Plenio, M. B. Simulating Bosonic Baths with Error Bars. Phys. Rev. Lett. 2015, 115 (13), 130401. https://doi.org/10.1103/PhysRevLett.115.130401. +[^DeVega_howto_2015]: De Vega, I.; Schollwöck, U.; Wolf, F. A. How to Discretize a Quantum Bath for Real-Time Evolution. Phys. Rev. B 2015, 92 (15), 155126. https://doi.org/10.1103/PhysRevB.92.155126. From 0ad111c8faf6889e131058c305437cc4c577af54 Mon Sep 17 00:00:00 2001 From: Angela Riva <62027430+angelariva@users.noreply.github.com> Date: Mon, 25 Nov 2024 17:11:57 +0100 Subject: [PATCH 08/28] Update convergence.md --- docs/src/convergence.md | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/docs/src/convergence.md b/docs/src/convergence.md index e439ae9..c9cbfb9 100644 --- a/docs/src/convergence.md +++ b/docs/src/convergence.md @@ -2,18 +2,22 @@ In this section, we analyze the numerical accuracy of our simulations by outlining the necessary approximations and providing practical guidelines to ensure convergence of results. +## Approximations + ### Chain length $N$ -During a numerical simulation, a truncation on the number of chain modes (and therefore chain length) will be introduced, in order to work with a chain of finite length instead of a semi-infinite one. This truncation on chain modes, let us say $N$, corresponds to a sampling on the modes in the original environment. +In numerical simulations, a truncation on the number of chain modes (and therefore the chain length) is introduced to handle a finite chain instead of a semi-infinite one. This truncation, denoted as NN, corresponds to a sampling of the modes in the original environment. + +The chain length $N$ is directly connected to the simulation time as follows: excitations injected into the chain propagate as a wavefront traveling along the chain. Perturbations to the initial state outside this wavefront are exponentially suppressed. Therefore, truncating the chain basis beyond the expanding wavefront ensures that the resulting sampling error is also exponentially small. -The length chain is connected to the simulation time in the following way: excitations injected from the system form a wave-front that travels along the chain. Any perturbation to the initial state outside of this wave-front are exponentially suppressed. It is thus natural to truncate in the chain basis, making sure that this truncation happens **beyond** the expanding wave-front, as in this way the sampling error is also exponentially small. +To optimize the chain length for a given simulation time and set of chain coefficients, the following procedure can be used: -To make sure that, for a given simulation time, and for a given set of chain coefficients, the chain-length is the optimal one, we can do as follows. We set the total simulation time, and we compute the chain coefficients for a non-optimal chain, much longer than needed. +1. Set the total simulation time and compute the chain coefficients for an intentionally oversized chain (longer than needed): ``` T = 100 N_huge = 1000 cpars = chaincoeffs_flat(N_huge, αchain; ωc = 1.0) ``` -We can then use the built-in function `findchainlength`, that computes the required chain length `N_opt` from the propagation speed on the chain sites (given by the hopping coefficients $t_n$): +2. Use the built-in function `findchainlength` to determine the optimal chain length $N_opt$ based on the propagation speed of the wavefront (given by the hopping coefficients $t_n$): ``` N_opt = findchainlength(T, cpars; eps=10^-4, verbose=false) ``` @@ -21,4 +25,18 @@ N_opt = findchainlength(T, cpars; eps=10^-4, verbose=false) ### Local dimension $d$ Another critical truncation is imposed on the local dimension $d$ of each tensor in the MPS that undergoes dynamic evolution. The local dimension dd corresponds to the number of Fock states retained in the Hilbert space of each chain mode. Since harmonic oscillators are, in principle, infinite-dimensional systems, truncating their Hilbert space to a finite $d$ is necessary for numerical computations. The choice of $d$ determines the maximum number of excitations per site in the MPS and must be carefully tuned to capture the relevant physics while ensuring numerical convergence. -### +A practical guideline for choosing $d$ can be derived by considering the physical states being simulated. For example, for coherent states, the occupation number follows a Poisson distribution. In such cases, the average occupation number is given by the mean $\langle n \rangle$, and the probability of observing a state with occupation number $n$ decreases exponentially for $n \gg \langle n \rangle$. Thus, the truncation $d$ should be chosen such that the cumulative probability of truncation error is negligible. + +### Time-step error +Different time-evolution algorithms are implemented in MPSDynamics, and can be selected as options in the function `runsim`. Detailed descriptions of these algorithms are provided in the *Theoretical Background* section of the documentation. The key parameter for ensuring convergence in these methods is controlled via the `convparams` option, which accepts arrays of multiple parameter values to test until convergence is achieved. + +Below are the main time-evolution algorithms and their corresponding convergence parameters: +- One-Site Time-Dependent Variational Principle (1TDVP): + - Selected using: `method = :1TDVP`. + - The convergence parameter is the bond dimension of the MPS, which defines the manifold on which the time evolution is constrained. To ensure convergence, multiple bond dimensions can be tested: `convparams = [bond1, bond2, bond3]`. +- Two-Sites Time-Dependent Variational Principle (2TDVP): + - Selected using: `method = :2TDVP`. + - The convergence parameter is the SVD singular value truncation threshold, which determines the precision of the truncation during simulations. Multiple truncation thresholds can be tested: `convparams = [trunc1, trunc2, trunc3]` +- Adaptive Time-Dependent Variational Principle (DTDVP): + - Selected using: `method = :DTDVP`. + - The convergence parameter is the target precision for the adaptive algorithm. Multiple precision values can be provided to test convergence: `convparams = [prec1, prec2, prec3]` From a560d73fd078249176309388fa76a29de8746264 Mon Sep 17 00:00:00 2001 From: Angela Riva <62027430+angelariva@users.noreply.github.com> Date: Mon, 25 Nov 2024 17:39:20 +0100 Subject: [PATCH 09/28] Update convergence.md --- docs/src/convergence.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/src/convergence.md b/docs/src/convergence.md index 4e2e9fa..13b2377 100644 --- a/docs/src/convergence.md +++ b/docs/src/convergence.md @@ -28,7 +28,7 @@ For a bath that initially contains only a finite number of particles, i.e. any b A practical guideline for choosing $d$ can be derived by considering the physical states being simulated. For example, for coherent states, the occupation number follows a Poisson distribution. In such cases, the average occupation number is given by the mean $\langle n \rangle$, and the probability of observing a state with occupation number $n$ decreases exponentially for $n \gg \langle n \rangle$. Thus, the truncation $d$ should be chosen such that the cumulative probability of truncation error is negligible. -### Time-step error +### Bond dimensions and time evolution Different time-evolution algorithms are implemented in MPSDynamics, and can be selected as options in the function `runsim`. Detailed descriptions of these algorithms are provided in the *Theoretical Background* section of the documentation. The key parameter for ensuring convergence in these methods is controlled via the `convparams` option, which accepts arrays of multiple parameter values to test until convergence is achieved. Below are the main time-evolution algorithms and their corresponding convergence parameters: @@ -37,14 +37,16 @@ Below are the main time-evolution algorithms and their corresponding convergence - The convergence parameter is the bond dimension of the MPS, which defines the manifold on which the time evolution is constrained. To ensure convergence, multiple bond dimensions can be tested: `convparams = [bond1, bond2, bond3]`. - Two-Sites Time-Dependent Variational Principle (2TDVP): - Selected using: `method = :2TDVP`. - - The convergence parameter is the SVD singular value truncation threshold, which determines the precision of the truncation during simulations. Multiple truncation thresholds can be tested: `convparams = [trunc1, trunc2, trunc3]` + - The convergence parameter is the SVD singular value truncation threshold, which determines the precision of the truncation during simulations. Multiple truncation thresholds can be tested: `convparams = [trunc1, trunc2, trunc3]`. The bond dimensions at each chain-site and at each time-step can be saved by specifying `savebonddims = true`. The maximum allowed value of bond dimension can be chosen by setting the `Dlim` option. - Adaptive Time-Dependent Variational Principle (DTDVP): - Selected using: `method = :DTDVP`. - - The convergence parameter is the target precision for the adaptive algorithm. Multiple precision values can be provided to test convergence: `convparams = [prec1, prec2, prec3]` -======= -### + - The convergence parameter is the target precision for the adaptive algorithm. Multiple precision values can be provided to test convergence: `convparams = [prec1, prec2, prec3]`. The bond dimensions at each chain-site and at each time-step can be saved by specifying `savebonddims = true`. The maximum allowed value of bond dimension can be chosen by setting the `Dlim` option. + +### Time-step +The simulation time-step has to be set small enough as to capture energy fluctuations ??? say something +======= # References [^woods_simulating_2015]: Woods, M. P.; Cramer, M.; Plenio, M. B. Simulating Bosonic Baths with Error Bars. Phys. Rev. Lett. 2015, 115 (13), 130401. https://doi.org/10.1103/PhysRevLett.115.130401. [^DeVega_howto_2015]: De Vega, I.; Schollwöck, U.; Wolf, F. A. How to Discretize a Quantum Bath for Real-Time Evolution. Phys. Rev. B 2015, 92 (15), 155126. https://doi.org/10.1103/PhysRevB.92.155126. From bd31d154d4daa4840b4113aa677c29935d19d751 Mon Sep 17 00:00:00 2001 From: Angela Riva <62027430+angelariva@users.noreply.github.com> Date: Mon, 25 Nov 2024 17:42:45 +0100 Subject: [PATCH 10/28] Update convergence.md --- docs/src/convergence.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/src/convergence.md b/docs/src/convergence.md index 13b2377..e84b5e9 100644 --- a/docs/src/convergence.md +++ b/docs/src/convergence.md @@ -37,13 +37,15 @@ Below are the main time-evolution algorithms and their corresponding convergence - The convergence parameter is the bond dimension of the MPS, which defines the manifold on which the time evolution is constrained. To ensure convergence, multiple bond dimensions can be tested: `convparams = [bond1, bond2, bond3]`. - Two-Sites Time-Dependent Variational Principle (2TDVP): - Selected using: `method = :2TDVP`. - - The convergence parameter is the SVD singular value truncation threshold, which determines the precision of the truncation during simulations. Multiple truncation thresholds can be tested: `convparams = [trunc1, trunc2, trunc3]`. The bond dimensions at each chain-site and at each time-step can be saved by specifying `savebonddims = true`. The maximum allowed value of bond dimension can be chosen by setting the `Dlim` option. + - The convergence parameter is the SVD singular value truncation threshold, which determines the precision of the truncation during simulations. Multiple truncation thresholds can be tested: `convparams = [trunc1, trunc2, trunc3]`. + - The bond dimensions at each chain-site and at each time-step can be saved by specifying `savebonddims = true`. The maximum allowed value of bond dimension can be chosen by setting the `Dlim` option. - Adaptive Time-Dependent Variational Principle (DTDVP): - Selected using: `method = :DTDVP`. - - The convergence parameter is the target precision for the adaptive algorithm. Multiple precision values can be provided to test convergence: `convparams = [prec1, prec2, prec3]`. The bond dimensions at each chain-site and at each time-step can be saved by specifying `savebonddims = true`. The maximum allowed value of bond dimension can be chosen by setting the `Dlim` option. + - The convergence parameter is the target precision for the adaptive algorithm. Multiple precision values can be provided to test convergence: `convparams = [prec1, prec2, prec3]`. + - The bond dimensions at each chain-site and at each time-step can be saved by specifying `savebonddims = true`. The maximum allowed value of bond dimension can be chosen by setting the `Dlim` option. ### Time-step -The simulation time-step has to be set small enough as to capture energy fluctuations ??? say something +The time step used in simulations must be small enough to accurately capture the dynamics of the system. To ensure convergence, gradually reduce the time step until key observables (e.g., energy, population dynamics, or correlation functions) stabilize. It is often practical to test a range of time steps and assess their impact on results to determine an optimal balance between accuracy and computational cost. ======= From 6b3e8b930b7c23a6d52acb34042f8deeebfd1101 Mon Sep 17 00:00:00 2001 From: Thibaut Lacroix <57836508+tfmlaX@users.noreply.github.com> Date: Mon, 25 Nov 2024 17:58:59 +0100 Subject: [PATCH 11/28] add convergence page --- docs/make.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/make.jl b/docs/make.jl index b3f5997..ea4d4d3 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -13,6 +13,7 @@ makedocs( "user-guide.md", "nutshell.md", "Examples" => ["./examples/sbm.md", "./examples/puredephasing.md", "./examples/timedep.md", "./examples/anderson-model.md", "./examples/bath-observables.md", "./examples/protontransfer.md"], + "convergence.md", "theory.md", "Methods" => "methods.md", "dev.md" From 3df56b17bba538e458115506e3a0b0cabbe9cdfd Mon Sep 17 00:00:00 2001 From: Thibaut Lacroix <57836508+tfmlaX@users.noreply.github.com> Date: Mon, 25 Nov 2024 17:59:52 +0100 Subject: [PATCH 12/28] Update toc --- docs/src/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/index.md b/docs/src/index.md index 4614a1c..b1a0370 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -17,7 +17,7 @@ The package may be installed by typing the following into a Julia REPL ## Table of Contents ```@contents -Pages = ["index.md", "user-guide.md", "examples/sbm.md", "examples/puredephasing.md", "examples/timedep.md", "examples/anderson-model.md", "examples/bath-observables.md", "examples/protontransfer.md", "theory.md", "methods.md", "dev.md"] +Pages = ["index.md", "user-guide.md", "examples/sbm.md", "examples/puredephasing.md", "examples/timedep.md", "examples/anderson-model.md", "examples/bath-observables.md", "examples/protontransfer.md", "convergence.md", "theory.md", "methods.md", "dev.md"] Depth = 3 ``` From 01701f204c491fa21ce4545f62261f2ce1b37ae5 Mon Sep 17 00:00:00 2001 From: Angela Riva <62027430+angelariva@users.noreply.github.com> Date: Mon, 25 Nov 2024 18:03:31 +0100 Subject: [PATCH 13/28] Update convergence.md --- docs/src/convergence.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/src/convergence.md b/docs/src/convergence.md index e84b5e9..6875153 100644 --- a/docs/src/convergence.md +++ b/docs/src/convergence.md @@ -42,13 +42,19 @@ Below are the main time-evolution algorithms and their corresponding convergence - Adaptive Time-Dependent Variational Principle (DTDVP): - Selected using: `method = :DTDVP`. - The convergence parameter is the target precision for the adaptive algorithm. Multiple precision values can be provided to test convergence: `convparams = [prec1, prec2, prec3]`. - - The bond dimensions at each chain-site and at each time-step can be saved by specifying `savebonddims = true`. The maximum allowed value of bond dimension can be chosen by setting the `Dlim` option. + - The bond dimensions at each chain-site and at each time-step can be saved by specifying `savebonddims = true`. The maximum allowed value of bond dimension can be chosen with the `Dlim` option. + - In some cases, it might be better to embed the initial time MPS in a manifold of higher bond-dimension, which can be done with the function `mpsembed!`, to avoid for the dynamics to get stuck. ### Time-step The time step used in simulations must be small enough to accurately capture the dynamics of the system. To ensure convergence, gradually reduce the time step until key observables (e.g., energy, population dynamics, or correlation functions) stabilize. It is often practical to test a range of time steps and assess their impact on results to determine an optimal balance between accuracy and computational cost. +## Common pitfalls + +### Hard cut-off for in the spectral density function + +### MPS gauge choice + -======= # References [^woods_simulating_2015]: Woods, M. P.; Cramer, M.; Plenio, M. B. Simulating Bosonic Baths with Error Bars. Phys. Rev. Lett. 2015, 115 (13), 130401. https://doi.org/10.1103/PhysRevLett.115.130401. [^DeVega_howto_2015]: De Vega, I.; Schollwöck, U.; Wolf, F. A. How to Discretize a Quantum Bath for Real-Time Evolution. Phys. Rev. B 2015, 92 (15), 155126. https://doi.org/10.1103/PhysRevB.92.155126. From 956d497f0a6ed1958da1af346b3a2e64cc34111c Mon Sep 17 00:00:00 2001 From: Angela Riva <62027430+angelariva@users.noreply.github.com> Date: Mon, 25 Nov 2024 18:33:46 +0100 Subject: [PATCH 14/28] Update convergence.md --- docs/src/convergence.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/src/convergence.md b/docs/src/convergence.md index 6875153..5a32bde 100644 --- a/docs/src/convergence.md +++ b/docs/src/convergence.md @@ -29,7 +29,7 @@ For a bath that initially contains only a finite number of particles, i.e. any b A practical guideline for choosing $d$ can be derived by considering the physical states being simulated. For example, for coherent states, the occupation number follows a Poisson distribution. In such cases, the average occupation number is given by the mean $\langle n \rangle$, and the probability of observing a state with occupation number $n$ decreases exponentially for $n \gg \langle n \rangle$. Thus, the truncation $d$ should be chosen such that the cumulative probability of truncation error is negligible. ### Bond dimensions and time evolution -Different time-evolution algorithms are implemented in MPSDynamics, and can be selected as options in the function `runsim`. Detailed descriptions of these algorithms are provided in the *Theoretical Background* section of the documentation. The key parameter for ensuring convergence in these methods is controlled via the `convparams` option, which accepts arrays of multiple parameter values to test until convergence is achieved. +Different time-evolution algorithms are implemented in MPSDynamics, and can be selected as options in the function `runsim`. Detailed descriptions of these algorithms are provided in the *Theoretical Background* section of this documentation. The key parameter for ensuring convergence in these methods is controlled via the `convparams` option, which accepts arrays of multiple parameter values to test until convergence is achieved. Below are the main time-evolution algorithms and their corresponding convergence parameters: - One-Site Time-Dependent Variational Principle (1TDVP): @@ -50,11 +50,14 @@ The time step used in simulations must be small enough to accurately capture the ## Common pitfalls -### Hard cut-off for in the spectral density function +### Hard cut-off in the spectral density function +The cutoff frequency $\omega_c$ in the spectral density function has to be selected in order to incorporate all of the relevant frequencies. It is to be noted that, for spectral densities belonging to the Szego class[^chin_exact_2010], the cutoff frenquency $\omega_c$ also determines the asymptotic values to which the chain coefficients converge [^woods_mappings_2014] -### MPS gauge choice +### MPS gauge choice # References [^woods_simulating_2015]: Woods, M. P.; Cramer, M.; Plenio, M. B. Simulating Bosonic Baths with Error Bars. Phys. Rev. Lett. 2015, 115 (13), 130401. https://doi.org/10.1103/PhysRevLett.115.130401. [^DeVega_howto_2015]: De Vega, I.; Schollwöck, U.; Wolf, F. A. How to Discretize a Quantum Bath for Real-Time Evolution. Phys. Rev. B 2015, 92 (15), 155126. https://doi.org/10.1103/PhysRevB.92.155126. +[^woods_mappings_2014]: Woods, M. P. et al. “Mappings of open quantum systems onto chain representations and Markovian embeddings”. In: Journal of Mathematical Physics 55.3 (Mar. 2014), p. 032101. issn: 0022-2488, 1089-7658. doi: 10.1063/1.4866769 +[^chin_exact_2010]: Chin, A. W. et al. “Exact mapping between system-reservoir quantum models and semi-infinite discrete chains using orthogonal polynomials”. In: Journal of Mathematical Physics 51.9 (Sept. 2010), p. 092109. issn: 0022-2488, 1089-7658. doi: 10.1063/1.3490188. arXiv: 1006.4507 From 4e08dc09ccc79f7efeaef241210c0d19e0d99837 Mon Sep 17 00:00:00 2001 From: Angela Riva <62027430+angelariva@users.noreply.github.com> Date: Mon, 25 Nov 2024 18:52:21 +0100 Subject: [PATCH 15/28] Update convergence.md --- docs/src/convergence.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/src/convergence.md b/docs/src/convergence.md index 5a32bde..1114981 100644 --- a/docs/src/convergence.md +++ b/docs/src/convergence.md @@ -51,11 +51,9 @@ The time step used in simulations must be small enough to accurately capture the ## Common pitfalls ### Hard cut-off in the spectral density function -The cutoff frequency $\omega_c$ in the spectral density function has to be selected in order to incorporate all of the relevant frequencies. It is to be noted that, for spectral densities belonging to the Szego class[^chin_exact_2010], the cutoff frenquency $\omega_c$ also determines the asymptotic values to which the chain coefficients converge [^woods_mappings_2014] +The cutoff frequency $\omega_c$ in the spectral density function has to be selected in order to incorporate all of the relevant frequencies. It is to be noted that, for spectral densities belonging to the Szegö class[^chin_exact_2010], the cutoff frenquency $\omega_c$ also determines the asymptotic values to which the chain coefficients converge [^woods_mappings_2014]. Therefore, if we want to reach translational invariance (converged values) in the chain coefficients, then we need to specify a cutoff. To avoid ringing effects, it is a good choice to select a spectral density function that approaches zero before the cutoff frequency. -### MPS gauge choice - # References [^woods_simulating_2015]: Woods, M. P.; Cramer, M.; Plenio, M. B. Simulating Bosonic Baths with Error Bars. Phys. Rev. Lett. 2015, 115 (13), 130401. https://doi.org/10.1103/PhysRevLett.115.130401. [^DeVega_howto_2015]: De Vega, I.; Schollwöck, U.; Wolf, F. A. How to Discretize a Quantum Bath for Real-Time Evolution. Phys. Rev. B 2015, 92 (15), 155126. https://doi.org/10.1103/PhysRevB.92.155126. From 6c864afda28bc0326ece53b3be32439142aa8246 Mon Sep 17 00:00:00 2001 From: Angela Riva <62027430+angelariva@users.noreply.github.com> Date: Mon, 25 Nov 2024 18:56:14 +0100 Subject: [PATCH 16/28] Update bath-observables.md --- docs/src/examples/bath-observables.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/src/examples/bath-observables.md b/docs/src/examples/bath-observables.md index 4c48854..d492704 100644 --- a/docs/src/examples/bath-observables.md +++ b/docs/src/examples/bath-observables.md @@ -21,8 +21,8 @@ s = 1 # ohmicity ``` We set the specifics of the simulation: ```julia -method = :TDVP1 # time-evolution method -conv = 3 # bond dimension for the TDVP1 +method = :TDVP2 # time-evolution method +conv = 0.001 # Allowed SVD singular value truncation dt = 0.5 # time step tfinal = 60.0 # simulation time ``` @@ -62,6 +62,8 @@ A, dat = runsim(dt, tfinal, A, H, prec=1E-4; convparams = conv, reduceddensity = true, verbose = false, + savebonddims = true, + Dlim = 100, save = false, plot = true, ); From d8e9280c4bb868c51480e85a6670f67776fe1e51 Mon Sep 17 00:00:00 2001 From: Angela Riva <62027430+angelariva@users.noreply.github.com> Date: Mon, 25 Nov 2024 18:57:13 +0100 Subject: [PATCH 17/28] Add files via upload --- docs/src/assets/bath_obs_output.svg | 699 ++++++++++++++++++++++++++++ 1 file changed, 699 insertions(+) create mode 100644 docs/src/assets/bath_obs_output.svg diff --git a/docs/src/assets/bath_obs_output.svg b/docs/src/assets/bath_obs_output.svg new file mode 100644 index 0000000..b711cae --- /dev/null +++ b/docs/src/assets/bath_obs_output.svg @@ -0,0 +1,699 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From e13b2d7eb26c58f69105d856a7eee8ef92806d25 Mon Sep 17 00:00:00 2001 From: Angela Riva <62027430+angelariva@users.noreply.github.com> Date: Mon, 25 Nov 2024 18:59:24 +0100 Subject: [PATCH 18/28] Update bath-observables.md --- docs/src/examples/bath-observables.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/src/examples/bath-observables.md b/docs/src/examples/bath-observables.md index d492704..bbecc32 100644 --- a/docs/src/examples/bath-observables.md +++ b/docs/src/examples/bath-observables.md @@ -195,6 +195,8 @@ p4 = plot(omeg[Mhalf:M], bath_occup_phys, lw=4, plot(p1, p2, p3, p4, layout = (2, 2), size = (1400, 1200)) ``` +![Output of this program](examples/bath_obs_svg.png) + ___________________ ## Bibliography From b647ed5ec45f11b9f7b2b3ec70760d9f015816e0 Mon Sep 17 00:00:00 2001 From: Angela Riva <62027430+angelariva@users.noreply.github.com> Date: Mon, 25 Nov 2024 19:00:01 +0100 Subject: [PATCH 19/28] Add files via upload --- docs/src/examples/bath_obs_output.svg | 699 ++++++++++++++++++++++++++ 1 file changed, 699 insertions(+) create mode 100644 docs/src/examples/bath_obs_output.svg diff --git a/docs/src/examples/bath_obs_output.svg b/docs/src/examples/bath_obs_output.svg new file mode 100644 index 0000000..b711cae --- /dev/null +++ b/docs/src/examples/bath_obs_output.svg @@ -0,0 +1,699 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From cdf03c8e99d51e473ec77ac51cf1ae7e98f6496c Mon Sep 17 00:00:00 2001 From: Angela Riva <62027430+angelariva@users.noreply.github.com> Date: Mon, 25 Nov 2024 19:33:26 +0100 Subject: [PATCH 20/28] Update anderson_model_double.jl --- examples/anderson_model_double.jl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/examples/anderson_model_double.jl b/examples/anderson_model_double.jl index 329de22..260256e 100644 --- a/examples/anderson_model_double.jl +++ b/examples/anderson_model_double.jl @@ -19,12 +19,15 @@ function ϵ(x) return x end -function V(x) +function J(x) return sqrt(1 - x^2) # semi-circular density of states end -chainparams1 = chaincoeffs_fermionic(N, β, 1.0; ϵ, V, save=false) # empty -chainparams2 = chaincoeffs_fermionic(N, β, 2.0; ϵ, V, save=false) # filled +chainparams1 = chaincoeffs_fermionic(N, β, 1.0; ϵ, J, save=false) # empty +chainparams2 = chaincoeffs_fermionic(N, β, 2.0; ϵ, J, save=false) # filled + +c1 = chainparams1[3] +c2 = chainparams2[3] #= curdir = @__DIR__ @@ -71,7 +74,7 @@ A, dat = runsim(dt, T, A, H; method = method, obs = [ob1, ob2, ob3], convobs = [ob1], - params = @LogParams(N, ϵd, β), + params = @LogParams(N, ϵd, β, c1, c2), convparams = [prec], Dlim = Dmax, savebonddims = true, # we want to save the bond dimension From fcbb6d543dcaa887e83922f698ccff860b96649a Mon Sep 17 00:00:00 2001 From: Angela Riva <62027430+angelariva@users.noreply.github.com> Date: Mon, 25 Nov 2024 19:33:45 +0100 Subject: [PATCH 21/28] Update anderson_model_interleaved.jl --- examples/anderson_model_interleaved.jl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/examples/anderson_model_interleaved.jl b/examples/anderson_model_interleaved.jl index 68d7b5b..f4d007a 100644 --- a/examples/anderson_model_interleaved.jl +++ b/examples/anderson_model_interleaved.jl @@ -19,12 +19,15 @@ function ϵ(x) return x end -function V(x) +function J(x) return sqrt(1 - x^2) # semi-circular density of states end -chainparams1 = chaincoeffs_fermionic(N, β, 1.0; ϵ, V, save=false) # empty -chainparams2 = chaincoeffs_fermionic(N, β, 2.0; ϵ, V, save=false) # filled +chainparams1 = chaincoeffs_fermionic(N, β, 1.0; ϵ, J, save=false) # empty +chainparams2 = chaincoeffs_fermionic(N, β, 2.0; ϵ, J, save=false) # filled + +c1 = chainparams1[3] +c2 = chainparams2[3] #= curdir = @__DIR__ @@ -77,7 +80,7 @@ A, dat = runsim(dt, T, A, H; method = method, obs = [ob1, ob2], convobs = [ob1], - params = @LogParams(N, ϵd, β), + params = @LogParams(N, ϵd, β, c1, c2), convparams = [prec], Dlim = Dmax, savebonddims = true, # we want to save the bond dimension From 022049d96a84f50973ddffc81b7579b6399e5617 Mon Sep 17 00:00:00 2001 From: Angela Riva <62027430+angelariva@users.noreply.github.com> Date: Mon, 25 Nov 2024 19:34:47 +0100 Subject: [PATCH 22/28] Add files via upload --- "docs/src/examples/double_output\\.svg" | 857 +++++++++++++++++++++++ docs/src/examples/interleaved_output.svg | 854 ++++++++++++++++++++++ 2 files changed, 1711 insertions(+) create mode 100644 "docs/src/examples/double_output\\.svg" create mode 100644 docs/src/examples/interleaved_output.svg diff --git "a/docs/src/examples/double_output\\.svg" "b/docs/src/examples/double_output\\.svg" new file mode 100644 index 0000000..d3df050 --- /dev/null +++ "b/docs/src/examples/double_output\\.svg" @@ -0,0 +1,857 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/src/examples/interleaved_output.svg b/docs/src/examples/interleaved_output.svg new file mode 100644 index 0000000..5cba2b1 --- /dev/null +++ b/docs/src/examples/interleaved_output.svg @@ -0,0 +1,854 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From bb01dcd837ac5de04575efaef39a188ffe67837f Mon Sep 17 00:00:00 2001 From: Angela Riva <62027430+angelariva@users.noreply.github.com> Date: Mon, 25 Nov 2024 19:38:04 +0100 Subject: [PATCH 23/28] Update bath-observables.md --- docs/src/examples/bath-observables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/examples/bath-observables.md b/docs/src/examples/bath-observables.md index bbecc32..1c12652 100644 --- a/docs/src/examples/bath-observables.md +++ b/docs/src/examples/bath-observables.md @@ -195,7 +195,7 @@ p4 = plot(omeg[Mhalf:M], bath_occup_phys, lw=4, plot(p1, p2, p3, p4, layout = (2, 2), size = (1400, 1200)) ``` -![Output of this program](examples/bath_obs_svg.png) +![Output of this program](examples/bath_obs_output.svg) ___________________ ## Bibliography From 67af4bcc364a975e71c533310d080e43b0b3ce0d Mon Sep 17 00:00:00 2001 From: Angela Riva <62027430+angelariva@users.noreply.github.com> Date: Mon, 25 Nov 2024 19:38:54 +0100 Subject: [PATCH 24/28] Update bath-observables.md --- docs/src/examples/bath-observables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/examples/bath-observables.md b/docs/src/examples/bath-observables.md index 1c12652..68d7482 100644 --- a/docs/src/examples/bath-observables.md +++ b/docs/src/examples/bath-observables.md @@ -195,7 +195,7 @@ p4 = plot(omeg[Mhalf:M], bath_occup_phys, lw=4, plot(p1, p2, p3, p4, layout = (2, 2), size = (1400, 1200)) ``` -![Output of this program](examples/bath_obs_output.svg) +![Output of this program](bath_obs_output.svg) ___________________ ## Bibliography From f9f65ff674e55a1de0ebeb2c83c9a19262d1c785 Mon Sep 17 00:00:00 2001 From: Angela Riva <62027430+angelariva@users.noreply.github.com> Date: Mon, 25 Nov 2024 19:40:29 +0100 Subject: [PATCH 25/28] Update anderson-model.md --- docs/src/examples/anderson-model.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/src/examples/anderson-model.md b/docs/src/examples/anderson-model.md index ec17db5..2f59e8c 100644 --- a/docs/src/examples/anderson-model.md +++ b/docs/src/examples/anderson-model.md @@ -275,6 +275,8 @@ plot(p2, p3, p4, p5, p1, layout = (3, 2), size = (1400, 1200)) ``` +![Output of this program](double_output\.svg) + #### Interleaved chain geometry The Hamiltonian is defined using the [`MPSDynamics.interleaved_tightbinding_mpo`](@ref) function, which takes as an input the number of modes of each chain `N`, the defect's energy `ϵd`, and the chain coefficients of the first `chainparams1` and second `chainparams2` chain. The MPS for the initial state is a factorized state (bond dimension 1) made of: a filled impurity, and 2N alternate filled-empty states. @@ -406,6 +408,8 @@ end plot(p2, p3, p4, p5, p1, layout = (3, 2), size = (1400, 1200)) ``` +![Output of this program](interleaved_output.svg) + ________________ ## Bibliography From ee34eee4cef0cf3806edbfe60569c980b07e90b8 Mon Sep 17 00:00:00 2001 From: Angela Riva <62027430+angelariva@users.noreply.github.com> Date: Mon, 25 Nov 2024 19:41:10 +0100 Subject: [PATCH 26/28] Rename double_output\.svg to double_output.svg --- .../double_output\\.svg" => docs/src/examples/double_output.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename "docs/src/examples/double_output\\.svg" => docs/src/examples/double_output.svg (99%) diff --git "a/docs/src/examples/double_output\\.svg" b/docs/src/examples/double_output.svg similarity index 99% rename from "docs/src/examples/double_output\\.svg" rename to docs/src/examples/double_output.svg index d3df050..fc8062a 100644 --- "a/docs/src/examples/double_output\\.svg" +++ b/docs/src/examples/double_output.svg @@ -854,4 +854,4 @@ gg== - \ No newline at end of file + From 3e64080ef682e13c8b6b933d420c6b9a52d6593b Mon Sep 17 00:00:00 2001 From: Angela Riva <62027430+angelariva@users.noreply.github.com> Date: Mon, 25 Nov 2024 19:41:36 +0100 Subject: [PATCH 27/28] Update anderson-model.md --- docs/src/examples/anderson-model.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/examples/anderson-model.md b/docs/src/examples/anderson-model.md index 2f59e8c..f83b143 100644 --- a/docs/src/examples/anderson-model.md +++ b/docs/src/examples/anderson-model.md @@ -275,7 +275,7 @@ plot(p2, p3, p4, p5, p1, layout = (3, 2), size = (1400, 1200)) ``` -![Output of this program](double_output\.svg) +![Output of this program](double_output.svg) #### Interleaved chain geometry From 8cbf8ecfae2d424cc6a42356e590843ab93fa05a Mon Sep 17 00:00:00 2001 From: Thibaut Lacroix <57836508+tfmlaX@users.noreply.github.com> Date: Tue, 26 Nov 2024 11:43:04 +0100 Subject: [PATCH 28/28] add cross-references --- docs/src/convergence.md | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/docs/src/convergence.md b/docs/src/convergence.md index 1114981..b6afd49 100644 --- a/docs/src/convergence.md +++ b/docs/src/convergence.md @@ -5,22 +5,26 @@ In this section, we analyze the numerical accuracy of our simulations by outlini ## Approximations ### Chain length $N$ -In numerical simulations, a truncation on the number of chain modes (and therefore the chain length) is introduced to handle a finite chain instead of a semi-infinite one. This truncation, denoted as NN, corresponds to a sampling of the modes in the original environment. +In numerical simulations, a truncation on the number of chain modes (and therefore the chain length) is introduced to handle a finite chain instead of a semi-infinite one. This truncation, denoted as $N$, corresponds to a sampling of the modes in the original environment. The chain length $N$ is directly connected to the simulation time as follows: excitations injected into the chain propagate as a wavefront traveling along the chain. Perturbations to the initial state outside this wavefront are exponentially suppressed. Therefore, truncating the chain basis beyond the expanding wavefront ensures that the resulting sampling error is also exponentially small [^woods_simulating_2015][^DeVega_howto_2015]. To optimize the chain length for a given simulation time and set of chain coefficients, the following procedure can be used: -1. Set the total simulation time and compute the chain coefficients for an intentionally oversized chain (longer than needed): +1. Set the total simulation time `T` and compute the chain coefficients for an intentionally oversized chain `N_huge` (longer than needed): ``` T = 100 N_huge = 1000 cpars = chaincoeffs_flat(N_huge, αchain; ωc = 1.0) ``` -2. Use the built-in function `findchainlength` to determine the optimal chain length $N_opt$ based on the propagation speed of the wavefront (given by the hopping coefficients $t_n$): +2. Use the built-in function [`findchainlength`](@ref) to determine the optimal chain length `N_opt` based on the propagation speed of the wavefront (given by the hopping coefficients $t_n$): ``` N_opt = findchainlength(T, cpars; eps=10^-4, verbose=false) ``` +2bis. A rule-of-thumb estimate `N_est` can also be obtained with [`findchainlength`](@ref) using universal asymptotic properties of chain mapped environment: +``` +N_est = findchainlength(T, ωc, β) +``` ### Local dimension $d$ Another critical truncation is imposed on the local dimension $d$ of each tensor in the MPS that undergoes dynamic evolution. The local dimension $d$ corresponds to the number of Fock states retained in the Hilbert space of each chain mode. Since harmonic oscillators are, in principle, infinite-dimensional systems, truncating their Hilbert space to a finite $d$ is necessary for numerical computations. The choice of $d$ determines the maximum number of excitations per site in the MPS and must be carefully tuned to capture the relevant physics while ensuring numerical convergence. @@ -29,14 +33,14 @@ For a bath that initially contains only a finite number of particles, i.e. any b A practical guideline for choosing $d$ can be derived by considering the physical states being simulated. For example, for coherent states, the occupation number follows a Poisson distribution. In such cases, the average occupation number is given by the mean $\langle n \rangle$, and the probability of observing a state with occupation number $n$ decreases exponentially for $n \gg \langle n \rangle$. Thus, the truncation $d$ should be chosen such that the cumulative probability of truncation error is negligible. ### Bond dimensions and time evolution -Different time-evolution algorithms are implemented in MPSDynamics, and can be selected as options in the function `runsim`. Detailed descriptions of these algorithms are provided in the *Theoretical Background* section of this documentation. The key parameter for ensuring convergence in these methods is controlled via the `convparams` option, which accepts arrays of multiple parameter values to test until convergence is achieved. +Different time-evolution algorithms are implemented in MPSDynamics, and can be selected as options in the function [`runsim`](@ref). Detailed descriptions of these algorithms are provided in the [Theoretical Background](@ref) section of this documentation. The key parameter for ensuring convergence in these methods is controlled via the `convparams` option, which accepts arrays of multiple parameter values to test until convergence is achieved. Below are the main time-evolution algorithms and their corresponding convergence parameters: - One-Site Time-Dependent Variational Principle (1TDVP): - - Selected using: `method = :1TDVP`. + - Selected using: `method = :TDVP1`. - The convergence parameter is the bond dimension of the MPS, which defines the manifold on which the time evolution is constrained. To ensure convergence, multiple bond dimensions can be tested: `convparams = [bond1, bond2, bond3]`. -- Two-Sites Time-Dependent Variational Principle (2TDVP): - - Selected using: `method = :2TDVP`. +- Two-Site Time-Dependent Variational Principle (2TDVP): + - Selected using: `method = :TDVP2`. - The convergence parameter is the SVD singular value truncation threshold, which determines the precision of the truncation during simulations. Multiple truncation thresholds can be tested: `convparams = [trunc1, trunc2, trunc3]`. - The bond dimensions at each chain-site and at each time-step can be saved by specifying `savebonddims = true`. The maximum allowed value of bond dimension can be chosen by setting the `Dlim` option. - Adaptive Time-Dependent Variational Principle (DTDVP): @@ -54,7 +58,7 @@ The time step used in simulations must be small enough to accurately capture the The cutoff frequency $\omega_c$ in the spectral density function has to be selected in order to incorporate all of the relevant frequencies. It is to be noted that, for spectral densities belonging to the Szegö class[^chin_exact_2010], the cutoff frenquency $\omega_c$ also determines the asymptotic values to which the chain coefficients converge [^woods_mappings_2014]. Therefore, if we want to reach translational invariance (converged values) in the chain coefficients, then we need to specify a cutoff. To avoid ringing effects, it is a good choice to select a spectral density function that approaches zero before the cutoff frequency. -# References +## References [^woods_simulating_2015]: Woods, M. P.; Cramer, M.; Plenio, M. B. Simulating Bosonic Baths with Error Bars. Phys. Rev. Lett. 2015, 115 (13), 130401. https://doi.org/10.1103/PhysRevLett.115.130401. [^DeVega_howto_2015]: De Vega, I.; Schollwöck, U.; Wolf, F. A. How to Discretize a Quantum Bath for Real-Time Evolution. Phys. Rev. B 2015, 92 (15), 155126. https://doi.org/10.1103/PhysRevB.92.155126. [^woods_mappings_2014]: Woods, M. P. et al. “Mappings of open quantum systems onto chain representations and Markovian embeddings”. In: Journal of Mathematical Physics 55.3 (Mar. 2014), p. 032101. issn: 0022-2488, 1089-7658. doi: 10.1063/1.4866769