diff --git a/docs/dev/index.html b/docs/dev/index.html
index aa1d9f7..59a2620 100644
--- a/docs/dev/index.html
+++ b/docs/dev/index.html
@@ -1,2 +1,2 @@
 <!DOCTYPE html>
-<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Developpers · MPSDynamics.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../"><img src="../assets/logo.png" alt="MPSDynamics.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">MPSDynamics.jl</span></div><form class="docs-search" action="../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Introduction</a></li><li><a class="tocitem" href="../user-guide/">User Guide</a></li><li><span class="tocitem">Examples</span><ul><li><a class="tocitem" href="../examples/sbm/">The Spin-Boson Model</a></li><li><a class="tocitem" href="../examples/puredephasing/">Pure-Dephasing</a></li></ul></li><li><a class="tocitem" href="../theory/">Theoretical Background</a></li><li><a class="tocitem" href="../methods/">Methods</a></li><li class="is-active"><a class="tocitem" href>Developpers</a><ul class="internal"><li><a class="tocitem" href="#Simulation-Workflow"><span>Simulation Workflow</span></a></li><li><a class="tocitem" href="#How-to-Contribute"><span>How to Contribute</span></a></li></ul></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Developpers</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Developpers</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/shareloqs/MPSDynamics/blob/master/docs/src/dev.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Developpers"><a class="docs-heading-anchor" href="#Developpers">Developpers</a><a id="Developpers-1"></a><a class="docs-heading-anchor-permalink" href="#Developpers" title="Permalink"></a></h1><h2 id="Simulation-Workflow"><a class="docs-heading-anchor" href="#Simulation-Workflow">Simulation Workflow</a><a id="Simulation-Workflow-1"></a><a class="docs-heading-anchor-permalink" href="#Simulation-Workflow" title="Permalink"></a></h2><p>The flow chart will go here</p><h2 id="How-to-Contribute"><a class="docs-heading-anchor" href="#How-to-Contribute">How to Contribute</a><a id="How-to-Contribute-1"></a><a class="docs-heading-anchor-permalink" href="#How-to-Contribute" title="Permalink"></a></h2><p>Contributions are welcome! Don&#39;t hesitate to contact us if you</p><ul><li>found a bug;</li><li>have a suggestion on how to improve the code and/or documentation;</li><li>would like to get involved in writing code and/or documentation.</li></ul><p>You can contact us by raising an <a href="https://github.com/shareloqs/MPSDynamics/issues">issue on Github</a>, or by writing to one of the developpers.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../methods/">« Methods</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Wednesday 17 April 2024 15:15">Wednesday 17 April 2024</span>. Using Julia version 1.7.3.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
+<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Developpers · MPSDynamics.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../"><img src="../assets/logo.png" alt="MPSDynamics.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">MPSDynamics.jl</span></div><form class="docs-search" action="../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Introduction</a></li><li><a class="tocitem" href="../user-guide/">User Guide</a></li><li><span class="tocitem">Examples</span><ul><li><a class="tocitem" href="../examples/sbm/">The Spin-Boson Model</a></li><li><a class="tocitem" href="../examples/puredephasing/">Pure-Dephasing</a></li></ul></li><li><a class="tocitem" href="../theory/">Theoretical Background</a></li><li><a class="tocitem" href="../methods/">Methods</a></li><li class="is-active"><a class="tocitem" href>Developpers</a><ul class="internal"><li><a class="tocitem" href="#Simulation-Workflow"><span>Simulation Workflow</span></a></li><li><a class="tocitem" href="#How-to-Contribute"><span>How to Contribute</span></a></li></ul></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Developpers</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Developpers</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/shareloqs/MPSDynamics/blob/master/docs/src/dev.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Developpers"><a class="docs-heading-anchor" href="#Developpers">Developpers</a><a id="Developpers-1"></a><a class="docs-heading-anchor-permalink" href="#Developpers" title="Permalink"></a></h1><h2 id="Simulation-Workflow"><a class="docs-heading-anchor" href="#Simulation-Workflow">Simulation Workflow</a><a id="Simulation-Workflow-1"></a><a class="docs-heading-anchor-permalink" href="#Simulation-Workflow" title="Permalink"></a></h2><p>The flow chart will go here</p><h2 id="How-to-Contribute"><a class="docs-heading-anchor" href="#How-to-Contribute">How to Contribute</a><a id="How-to-Contribute-1"></a><a class="docs-heading-anchor-permalink" href="#How-to-Contribute" title="Permalink"></a></h2><p>Contributions are welcome! Don&#39;t hesitate to contact us if you</p><ul><li>found a bug;</li><li>have a suggestion on how to improve the code and/or documentation;</li><li>would like to get involved in writing code and/or documentation.</li></ul><p>You can contact us by raising an <a href="https://github.com/shareloqs/MPSDynamics/issues">issue on Github</a>, or by writing to one of the developpers.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../methods/">« Methods</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Wednesday 17 April 2024 15:17">Wednesday 17 April 2024</span>. Using Julia version 1.7.3.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
diff --git a/docs/examples/puredephasing/index.html b/docs/examples/puredephasing/index.html
index f7591b6..ee0db85 100644
--- a/docs/examples/puredephasing/index.html
+++ b/docs/examples/puredephasing/index.html
@@ -1,2 +1,2 @@
 <!DOCTYPE html>
-<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Pure-Dephasing · MPSDynamics.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../../"><img src="../../assets/logo.png" alt="MPSDynamics.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">MPSDynamics.jl</span></div><form class="docs-search" action="../../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../../">Introduction</a></li><li><a class="tocitem" href="../../user-guide/">User Guide</a></li><li><span class="tocitem">Examples</span><ul><li><a class="tocitem" href="../sbm/">The Spin-Boson Model</a></li><li class="is-active"><a class="tocitem" href>Pure-Dephasing</a><ul class="internal"><li><a class="tocitem" href="#Zero-Temperature"><span>Zero Temperature</span></a></li><li><a class="tocitem" href="#Finite-Temperature"><span>Finite Temperature</span></a></li></ul></li></ul></li><li><a class="tocitem" href="../../theory/">Theoretical Background</a></li><li><a class="tocitem" href="../../methods/">Methods</a></li><li><a class="tocitem" href="../../dev/">Developpers</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">Examples</a></li><li class="is-active"><a href>Pure-Dephasing</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Pure-Dephasing</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/shareloqs/MPSDynamics/blob/master/docs/src/examples/puredephasing.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Pure-Dephasing"><a class="docs-heading-anchor" href="#Pure-Dephasing">Pure-Dephasing</a><a id="Pure-Dephasing-1"></a><a class="docs-heading-anchor-permalink" href="#Pure-Dephasing" title="Permalink"></a></h1><h2 id="Zero-Temperature"><a class="docs-heading-anchor" href="#Zero-Temperature">Zero Temperature</a><a id="Zero-Temperature-1"></a><a class="docs-heading-anchor-permalink" href="#Zero-Temperature" title="Permalink"></a></h2><h2 id="Finite-Temperature"><a class="docs-heading-anchor" href="#Finite-Temperature">Finite Temperature</a><a id="Finite-Temperature-1"></a><a class="docs-heading-anchor-permalink" href="#Finite-Temperature" title="Permalink"></a></h2></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../sbm/">« The Spin-Boson Model</a><a class="docs-footer-nextpage" href="../../theory/">Theoretical Background »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Wednesday 17 April 2024 15:15">Wednesday 17 April 2024</span>. Using Julia version 1.7.3.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
+<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Pure-Dephasing · MPSDynamics.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../../"><img src="../../assets/logo.png" alt="MPSDynamics.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">MPSDynamics.jl</span></div><form class="docs-search" action="../../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../../">Introduction</a></li><li><a class="tocitem" href="../../user-guide/">User Guide</a></li><li><span class="tocitem">Examples</span><ul><li><a class="tocitem" href="../sbm/">The Spin-Boson Model</a></li><li class="is-active"><a class="tocitem" href>Pure-Dephasing</a><ul class="internal"><li><a class="tocitem" href="#Zero-Temperature"><span>Zero Temperature</span></a></li><li><a class="tocitem" href="#Finite-Temperature"><span>Finite Temperature</span></a></li></ul></li></ul></li><li><a class="tocitem" href="../../theory/">Theoretical Background</a></li><li><a class="tocitem" href="../../methods/">Methods</a></li><li><a class="tocitem" href="../../dev/">Developpers</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">Examples</a></li><li class="is-active"><a href>Pure-Dephasing</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Pure-Dephasing</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/shareloqs/MPSDynamics/blob/master/docs/src/examples/puredephasing.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Pure-Dephasing"><a class="docs-heading-anchor" href="#Pure-Dephasing">Pure-Dephasing</a><a id="Pure-Dephasing-1"></a><a class="docs-heading-anchor-permalink" href="#Pure-Dephasing" title="Permalink"></a></h1><h2 id="Zero-Temperature"><a class="docs-heading-anchor" href="#Zero-Temperature">Zero Temperature</a><a id="Zero-Temperature-1"></a><a class="docs-heading-anchor-permalink" href="#Zero-Temperature" title="Permalink"></a></h2><h2 id="Finite-Temperature"><a class="docs-heading-anchor" href="#Finite-Temperature">Finite Temperature</a><a id="Finite-Temperature-1"></a><a class="docs-heading-anchor-permalink" href="#Finite-Temperature" title="Permalink"></a></h2></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../sbm/">« The Spin-Boson Model</a><a class="docs-footer-nextpage" href="../../theory/">Theoretical Background »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Wednesday 17 April 2024 15:17">Wednesday 17 April 2024</span>. Using Julia version 1.7.3.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
diff --git a/docs/examples/sbm/index.html b/docs/examples/sbm/index.html
index 6c84814..3c3b3a2 100644
--- a/docs/examples/sbm/index.html
+++ b/docs/examples/sbm/index.html
@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>The Spin-Boson Model · MPSDynamics.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../../"><img src="../../assets/logo.png" alt="MPSDynamics.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">MPSDynamics.jl</span></div><form class="docs-search" action="../../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../../">Introduction</a></li><li><a class="tocitem" href="../../user-guide/">User Guide</a></li><li><span class="tocitem">Examples</span><ul><li class="is-active"><a class="tocitem" href>The Spin-Boson Model</a><ul class="internal"><li><a class="tocitem" href="#Context"><span>Context</span></a></li><li><a class="tocitem" href="#The-code"><span>The code</span></a></li></ul></li><li><a class="tocitem" href="../puredephasing/">Pure-Dephasing</a></li></ul></li><li><a class="tocitem" href="../../theory/">Theoretical Background</a></li><li><a class="tocitem" href="../../methods/">Methods</a></li><li><a class="tocitem" href="../../dev/">Developpers</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">Examples</a></li><li class="is-active"><a href>The Spin-Boson Model</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>The Spin-Boson Model</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/shareloqs/MPSDynamics/blob/master/docs/src/examples/sbm.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="The-Spin-Boson-Model"><a class="docs-heading-anchor" href="#The-Spin-Boson-Model">The Spin-Boson Model</a><a id="The-Spin-Boson-Model-1"></a><a class="docs-heading-anchor-permalink" href="#The-Spin-Boson-Model" title="Permalink"></a></h1><h2 id="Context"><a class="docs-heading-anchor" href="#Context">Context</a><a id="Context-1"></a><a class="docs-heading-anchor-permalink" href="#Context" title="Permalink"></a></h2><p>The Spin-Boson Model (SBM) is a prototypical model in the theory of open quantum systems where a two level system interacts linearly with a bosonic bath</p><p class="math-container">\[	\hat{H} = \frac{\omega_0}{2}\hat{\sigma}_z + \Delta\hat{\sigma}_y + \int_0^{+\infty}\omega \hat{a}^\dagger_\omega\hat{a}_\omega \mathrm{d}\omega + \hat{\sigma}_x\int_0^{+\infty}\sqrt{J(\omega)}(\hat{a}_\omega\hat{a}^\dagger_\omega)\mathrm{d}\omega\]</p><p>Even though this model is fairly simple it is physically very rich and it is not analytically solvable. For these reason it has become a test-bed for numerical methods simulating open quantum systems dynamics in the non-perturbative non-Markovian regime.</p><p>For instance when the SD is Ohmic, this model presents a phase transition between a so called localised and a delocalised phase for <span>$\alpha \approx 1.2$</span>.</p><p>Here we break out and comment the script in <code>MPSDynamics/examples/sbm_zero_temperature.jl</code> to show how to simulate this model with an Ohmic SD (hard cut-off) using the T-TEDOPA method as implemented in <code>MPSDynamics.jl</code>.</p><p>The T-TEDOPA method relies on a truncated chain mapping that transform the initial Hamiltonian into</p><p class="math-container">\[	\hat{H} = \frac{\omega_0}{2} \hat{\sigma}_z + \Delta \hat{\sigma}_x + c_0 \hat{\sigma}_x(\hat{b}_0^\dagger + \hat{b}_0) + \sum_{i=0}^{N-1} t_i (\hat{b}_{i+1}^\dagger \hat{b}_i + \mathrm{h.c.}) + \sum_{i=0}^{N-1} \epsilon_i \hat{b}_i^\dagger \hat{b}_i \]</p><h2 id="The-code"><a class="docs-heading-anchor" href="#The-code">The code</a><a id="The-code-1"></a><a class="docs-heading-anchor-permalink" href="#The-code" title="Permalink"></a></h2><p>First a multi-line comment introduces the model and the aim of the script.</p><pre><code class="language-julia">#=
+<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>The Spin-Boson Model · MPSDynamics.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../../"><img src="../../assets/logo.png" alt="MPSDynamics.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">MPSDynamics.jl</span></div><form class="docs-search" action="../../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../../">Introduction</a></li><li><a class="tocitem" href="../../user-guide/">User Guide</a></li><li><span class="tocitem">Examples</span><ul><li class="is-active"><a class="tocitem" href>The Spin-Boson Model</a><ul class="internal"><li><a class="tocitem" href="#Context"><span>Context</span></a></li><li><a class="tocitem" href="#The-code"><span>The code</span></a></li></ul></li><li><a class="tocitem" href="../puredephasing/">Pure-Dephasing</a></li></ul></li><li><a class="tocitem" href="../../theory/">Theoretical Background</a></li><li><a class="tocitem" href="../../methods/">Methods</a></li><li><a class="tocitem" href="../../dev/">Developpers</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">Examples</a></li><li class="is-active"><a href>The Spin-Boson Model</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>The Spin-Boson Model</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/shareloqs/MPSDynamics/blob/master/docs/src/examples/sbm.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="The-Spin-Boson-Model"><a class="docs-heading-anchor" href="#The-Spin-Boson-Model">The Spin-Boson Model</a><a id="The-Spin-Boson-Model-1"></a><a class="docs-heading-anchor-permalink" href="#The-Spin-Boson-Model" title="Permalink"></a></h1><h2 id="Context"><a class="docs-heading-anchor" href="#Context">Context</a><a id="Context-1"></a><a class="docs-heading-anchor-permalink" href="#Context" title="Permalink"></a></h2><p>The Spin-Boson Model (SBM) is a prototypical model in the theory of open quantum systems where a two level system interacts linearly with a bosonic bath</p><p class="math-container">\[	\hat{H} = \frac{\omega_0}{2}\hat{\sigma}_z + \Delta\hat{\sigma}_x + \int_0^{+\infty}\omega \hat{a}^\dagger_\omega\hat{a}_\omega \mathrm{d}\omega + \hat{\sigma}_x\int_0^{+\infty}\sqrt{J(\omega)}(\hat{a}_\omega\hat{a}^\dagger_\omega)\mathrm{d}\omega\]</p><p>Even though this model is fairly simple it is physically very rich and it is not analytically solvable. For these reason it has become a test-bed for numerical methods simulating open quantum systems dynamics in the non-perturbative non-Markovian regime.</p><p>For instance when the SD is Ohmic, this model presents a phase transition between a so called localised and a delocalised phase for <span>$\alpha \approx 1.2$</span>.</p><p>Here we break out and comment the script in <code>MPSDynamics/examples/sbm_zero_temperature.jl</code> to show how to simulate this model with an Ohmic SD (hard cut-off) using the T-TEDOPA method as implemented in <code>MPSDynamics.jl</code>.</p><p>The T-TEDOPA method relies on a truncated chain mapping that transform the initial Hamiltonian into</p><p class="math-container">\[	\hat{H} = \frac{\omega_0}{2} \hat{\sigma}_z + \Delta \hat{\sigma}_x + c_0 \hat{\sigma}_x(\hat{b}_0^\dagger + \hat{b}_0) + \sum_{i=0}^{N-1} t_i (\hat{b}_{i+1}^\dagger \hat{b}_i + \mathrm{h.c.}) + \sum_{i=0}^{N-1} \epsilon_i \hat{b}_i^\dagger \hat{b}_i \]</p><h2 id="The-code"><a class="docs-heading-anchor" href="#The-code">The code</a><a id="The-code-1"></a><a class="docs-heading-anchor-permalink" href="#The-code" title="Permalink"></a></h2><p>First a multi-line comment introduces the model and the aim of the script.</p><pre><code class="language-julia">#=
     Example of a zero-temperature Spin-Boson Model with an hard cut-off Ohmic spectral density J(ω) = 2αω when ω &lt; ωc and 0 otherwise
 
     The dynamics is simulated using the T-TEDOPA method that maps the normal modes environment into a non-uniform tight-binding chain.
@@ -78,4 +78,4 @@
 
 method == :DTDVP &amp;&amp; heatmap(dat[&quot;data/times&quot;], collect(0:N+1), dat[&quot;data/bonddims&quot;], xlabel=L&quot;t&quot;,ylabel=&quot;bond index&quot;)
 
-heatmap(dat[&quot;data/times&quot;], collect(1:N), abs.(dat[&quot;data/SXdisp&quot;][1,:,:]), xlabel=L&quot;t&quot;,ylabel=&quot;chain mode&quot;)</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../../user-guide/">« User Guide</a><a class="docs-footer-nextpage" href="../puredephasing/">Pure-Dephasing »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Wednesday 17 April 2024 15:15">Wednesday 17 April 2024</span>. Using Julia version 1.7.3.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
+heatmap(dat[&quot;data/times&quot;], collect(1:N), abs.(dat[&quot;data/SXdisp&quot;][1,:,:]), xlabel=L&quot;t&quot;,ylabel=&quot;chain mode&quot;)</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../../user-guide/">« User Guide</a><a class="docs-footer-nextpage" href="../puredephasing/">Pure-Dephasing »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Wednesday 17 April 2024 15:17">Wednesday 17 April 2024</span>. Using Julia version 1.7.3.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
diff --git a/docs/index.html b/docs/index.html
index e85355c..ac348e6 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -8,4 +8,4 @@
 	author = {Dunnett, Angus and Lacroix, Thibaut and Le Dé, Brieuc and Riva, Angela},
 	year = {2021},
 	doi = {10.5281/zenodo.5106435},
-}</code></pre></article><nav class="docs-footer"><a class="docs-footer-nextpage" href="user-guide/">User Guide »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Wednesday 17 April 2024 15:15">Wednesday 17 April 2024</span>. Using Julia version 1.7.3.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
+}</code></pre></article><nav class="docs-footer"><a class="docs-footer-nextpage" href="user-guide/">User Guide »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Wednesday 17 April 2024 15:17">Wednesday 17 April 2024</span>. Using Julia version 1.7.3.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
diff --git a/docs/methods/index.html b/docs/methods/index.html
index 8d372dc..bf545ea 100644
--- a/docs/methods/index.html
+++ b/docs/methods/index.html
@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Methods · MPSDynamics.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../"><img src="../assets/logo.png" alt="MPSDynamics.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">MPSDynamics.jl</span></div><form class="docs-search" action="../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Introduction</a></li><li><a class="tocitem" href="../user-guide/">User Guide</a></li><li><span class="tocitem">Examples</span><ul><li><a class="tocitem" href="../examples/sbm/">The Spin-Boson Model</a></li><li><a class="tocitem" href="../examples/puredephasing/">Pure-Dephasing</a></li></ul></li><li><a class="tocitem" href="../theory/">Theoretical Background</a></li><li class="is-active"><a class="tocitem" href>Methods</a></li><li><a class="tocitem" href="../dev/">Developpers</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Methods</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Methods</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/shareloqs/MPSDynamics/blob/master/docs/src/methods.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="List-of-all-methods"><a class="docs-heading-anchor" href="#List-of-all-methods">List of all methods</a><a id="List-of-all-methods-1"></a><a class="docs-heading-anchor-permalink" href="#List-of-all-methods" title="Permalink"></a></h1><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.OneSiteObservable-Tuple{Any, Any, Any}" href="#MPSDynamics.OneSiteObservable-Tuple{Any, Any, Any}"><code>MPSDynamics.OneSiteObservable</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">OneSiteObservable(name,op,sites)</code></pre><p>Computes the local expectation value of the one-site operator <code>op</code> on the specified sites. Used to define one-site observables that are obs and convobs parameters for the <code>runsim</code> function.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/measure.jl#L11-L17">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.MPOtoVector-Tuple{ITensors.MPO}" href="#MPSDynamics.MPOtoVector-Tuple{ITensors.MPO}"><code>MPSDynamics.MPOtoVector</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">MPOtoVector(mpo::MPO)</code></pre><p>Convert an ITensors chain MPO into a form compatible with MPSDynamics</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/fundamentals.jl#L372-L377">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.addchild!-Tuple{MPSDynamics.Tree, Int64}" href="#MPSDynamics.addchild!-Tuple{MPSDynamics.Tree, Int64}"><code>MPSDynamics.addchild!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">addchild!(tree::Tree, id::Int)</code></pre><p>Add child to node <code>id</code> of <code>tree</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/treeBasics.jl#L40-L45">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.addchildren!-Tuple{MPSDynamics.Tree, Int64, Int64}" href="#MPSDynamics.addchildren!-Tuple{MPSDynamics.Tree, Int64, Int64}"><code>MPSDynamics.addchildren!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">addchildren!(tree::Tree, id::Int, n::Int)</code></pre><p>Add <code>n</code> children to node <code>id</code> of <code>tree</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/treeBasics.jl#L54-L59">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.chaincoeffs_ohmic-Tuple{Any, Any, Any}" href="#MPSDynamics.chaincoeffs_ohmic-Tuple{Any, Any, Any}"><code>MPSDynamics.chaincoeffs_ohmic</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">chaincoeffs_ohmic(N, α, s; ωc=1, soft=false)</code></pre><p>Generate chain coefficients <span>$[[ϵ_0,ϵ_1,...],[t_0,t_1,...],c_0]$</span> for an Harmonic bath at zero temperature with a power law spectral density given by:</p><p>soft cutoff: <span>$J(ω) = 2παω_c (\frac{ω}{ω_c})^s \exp(-ω/ω_c)$</span> </p><p>hard cutoff: <span>$J(ω) = 2παω_c (\frac{ω}{ω_c})^s θ(ω-ω_c)$</span></p><p>The coefficients parameterise the chain Hamiltonian</p><p><span>$H = H_S + c_0 A_S⊗B_0+\sum_{i=0}^{N-1}t_i (b_{i+1}^\dagger b_i +h.c.) + \sum_{i=0}^{N} ϵ_ib_i^\dagger b_i$</span></p><p>which is unitarily equivalent (before the truncation to <code>N</code> sites) to</p><p><span>$H = H_S + A_S⊗\int_0^∞dω\sqrt{\frac{J(ω)}{π}}B_ω + \int_0^∞dωωb_ω^\dagger b_ω$</span></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/models.jl#L483-L505">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.chainmps-Tuple{Int64, Int64, Int64}" href="#MPSDynamics.chainmps-Tuple{Int64, Int64, Int64}"><code>MPSDynamics.chainmps</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">chainmps(N::Int, site::Int, numex::Int)</code></pre><p>Generate an MPS with <code>numex</code> excitations on <code>site</code></p><p>The returned MPS will have bond-dimensions and physical dimensions <code>numex+1</code></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/mpsBasics.jl#L221-L228">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.chainmps-Tuple{Int64, Vector{Int64}, Int64}" href="#MPSDynamics.chainmps-Tuple{Int64, Vector{Int64}, Int64}"><code>MPSDynamics.chainmps</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">chainmps(N::Int, sites::Vector{Int}, numex::Int)</code></pre><p>Generate an MPS with <code>numex</code> excitations of an equal super-position over <code>sites</code></p><p>The returned MPS will have bond-dimensions and physical dimensions <code>numex+1</code></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/mpsBasics.jl#L248-L255">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.chainprop-Tuple{Any, Any}" href="#MPSDynamics.chainprop-Tuple{Any, Any}"><code>MPSDynamics.chainprop</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">chainprop(t, cparams...)</code></pre><p>Propagate an excitation placed initially on the first site of a tight-binding chain with parameters given by cparams for a time t and return occupation expectation for each site.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/fundamentals.jl#L208-L213">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.dynamap-NTuple{4, Any}" href="#MPSDynamics.dynamap-NTuple{4, Any}"><code>MPSDynamics.dynamap</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">dynamap(ps1,ps2,ps3,ps4)</code></pre><p>Calulate complete dynamical map to time step at which ps1, ps2, ps3 and ps4 are specified.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/fundamentals.jl#L272-L277">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.electron2kmps" href="#MPSDynamics.electron2kmps"><code>MPSDynamics.electron2kmps</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">electronkmps(N::Int, k::Vector{Int}, spin=:Up, chainparams=[fill(1.0,N), fill(1.0,N-1)])</code></pre><p>Generate an MPS with 2 electrons in k-states <code>k1</code> and <code>k2</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/mpsBasics.jl#L382-L387">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.electronkmps" href="#MPSDynamics.electronkmps"><code>MPSDynamics.electronkmps</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">electronkmps(N::Int, k::Int, spin=:Up, chainparams=[fill(1.0,N), fill(1.0,N-1)])</code></pre><p>Generate an MPS for an electron with momentum <code>k</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/mpsBasics.jl#L346-L351">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.elementmpo-Tuple{Any, Vararg{Any}}" href="#MPSDynamics.elementmpo-Tuple{Any, Vararg{Any}}"><code>MPSDynamics.elementmpo</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">elementmpo(M, el...)</code></pre><p>Return the element of the MPO <code>M</code> for the set of physical states <code>el...</code></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/mpsBasics.jl#L506-L510">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.elementmps-Tuple{Any, Vararg{Any}}" href="#MPSDynamics.elementmps-Tuple{Any, Vararg{Any}}"><code>MPSDynamics.elementmps</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">elementmps(A, el...)</code></pre><p>Return the element of the MPS <code>A</code> for the set of physical states <code>el...</code></p><p><strong>Examples</strong></p><pre><code class="language-julia-repl">julia&gt; A = chainmps(6, [2,4], 1);
+<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Methods · MPSDynamics.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../"><img src="../assets/logo.png" alt="MPSDynamics.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">MPSDynamics.jl</span></div><form class="docs-search" action="../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Introduction</a></li><li><a class="tocitem" href="../user-guide/">User Guide</a></li><li><span class="tocitem">Examples</span><ul><li><a class="tocitem" href="../examples/sbm/">The Spin-Boson Model</a></li><li><a class="tocitem" href="../examples/puredephasing/">Pure-Dephasing</a></li></ul></li><li><a class="tocitem" href="../theory/">Theoretical Background</a></li><li class="is-active"><a class="tocitem" href>Methods</a></li><li><a class="tocitem" href="../dev/">Developpers</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Methods</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Methods</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/shareloqs/MPSDynamics/blob/master/docs/src/methods.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="List-of-all-methods"><a class="docs-heading-anchor" href="#List-of-all-methods">List of all methods</a><a id="List-of-all-methods-1"></a><a class="docs-heading-anchor-permalink" href="#List-of-all-methods" title="Permalink"></a></h1><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.OneSiteObservable-Tuple{Any, Any, Any}" href="#MPSDynamics.OneSiteObservable-Tuple{Any, Any, Any}"><code>MPSDynamics.OneSiteObservable</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">OneSiteObservable(name,op,sites)</code></pre><p>Computes the local expectation value of the one-site operator <code>op</code> on the specified sites. Used to define one-site observables that are obs and convobs parameters for the <code>runsim</code> function.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/measure.jl#L11-L17">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.MPOtoVector-Tuple{ITensors.MPO}" href="#MPSDynamics.MPOtoVector-Tuple{ITensors.MPO}"><code>MPSDynamics.MPOtoVector</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">MPOtoVector(mpo::MPO)</code></pre><p>Convert an ITensors chain MPO into a form compatible with MPSDynamics</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/fundamentals.jl#L372-L377">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.addchild!-Tuple{MPSDynamics.Tree, Int64}" href="#MPSDynamics.addchild!-Tuple{MPSDynamics.Tree, Int64}"><code>MPSDynamics.addchild!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">addchild!(tree::Tree, id::Int)</code></pre><p>Add child to node <code>id</code> of <code>tree</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/treeBasics.jl#L40-L45">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.addchildren!-Tuple{MPSDynamics.Tree, Int64, Int64}" href="#MPSDynamics.addchildren!-Tuple{MPSDynamics.Tree, Int64, Int64}"><code>MPSDynamics.addchildren!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">addchildren!(tree::Tree, id::Int, n::Int)</code></pre><p>Add <code>n</code> children to node <code>id</code> of <code>tree</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/treeBasics.jl#L54-L59">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.chaincoeffs_ohmic-Tuple{Any, Any, Any}" href="#MPSDynamics.chaincoeffs_ohmic-Tuple{Any, Any, Any}"><code>MPSDynamics.chaincoeffs_ohmic</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">chaincoeffs_ohmic(N, α, s; ωc=1, soft=false)</code></pre><p>Generate chain coefficients <span>$[[ϵ_0,ϵ_1,...],[t_0,t_1,...],c_0]$</span> for an Harmonic bath at zero temperature with a power law spectral density given by:</p><p>soft cutoff: <span>$J(ω) = 2παω_c (\frac{ω}{ω_c})^s \exp(-ω/ω_c)$</span> </p><p>hard cutoff: <span>$J(ω) = 2παω_c (\frac{ω}{ω_c})^s θ(ω-ω_c)$</span></p><p>The coefficients parameterise the chain Hamiltonian</p><p><span>$H = H_S + c_0 A_S⊗B_0+\sum_{i=0}^{N-1}t_i (b_{i+1}^\dagger b_i +h.c.) + \sum_{i=0}^{N} ϵ_ib_i^\dagger b_i$</span></p><p>which is unitarily equivalent (before the truncation to <code>N</code> sites) to</p><p><span>$H = H_S + A_S⊗\int_0^∞dω\sqrt{\frac{J(ω)}{π}}B_ω + \int_0^∞dωωb_ω^\dagger b_ω$</span></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/models.jl#L483-L505">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.chainmps-Tuple{Int64, Int64, Int64}" href="#MPSDynamics.chainmps-Tuple{Int64, Int64, Int64}"><code>MPSDynamics.chainmps</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">chainmps(N::Int, site::Int, numex::Int)</code></pre><p>Generate an MPS with <code>numex</code> excitations on <code>site</code></p><p>The returned MPS will have bond-dimensions and physical dimensions <code>numex+1</code></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/mpsBasics.jl#L221-L228">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.chainmps-Tuple{Int64, Vector{Int64}, Int64}" href="#MPSDynamics.chainmps-Tuple{Int64, Vector{Int64}, Int64}"><code>MPSDynamics.chainmps</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">chainmps(N::Int, sites::Vector{Int}, numex::Int)</code></pre><p>Generate an MPS with <code>numex</code> excitations of an equal super-position over <code>sites</code></p><p>The returned MPS will have bond-dimensions and physical dimensions <code>numex+1</code></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/mpsBasics.jl#L248-L255">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.chainprop-Tuple{Any, Any}" href="#MPSDynamics.chainprop-Tuple{Any, Any}"><code>MPSDynamics.chainprop</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">chainprop(t, cparams...)</code></pre><p>Propagate an excitation placed initially on the first site of a tight-binding chain with parameters given by cparams for a time t and return occupation expectation for each site.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/fundamentals.jl#L208-L213">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.dynamap-NTuple{4, Any}" href="#MPSDynamics.dynamap-NTuple{4, Any}"><code>MPSDynamics.dynamap</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">dynamap(ps1,ps2,ps3,ps4)</code></pre><p>Calulate complete dynamical map to time step at which ps1, ps2, ps3 and ps4 are specified.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/fundamentals.jl#L272-L277">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.electron2kmps" href="#MPSDynamics.electron2kmps"><code>MPSDynamics.electron2kmps</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">electronkmps(N::Int, k::Vector{Int}, spin=:Up, chainparams=[fill(1.0,N), fill(1.0,N-1)])</code></pre><p>Generate an MPS with 2 electrons in k-states <code>k1</code> and <code>k2</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/mpsBasics.jl#L382-L387">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.electronkmps" href="#MPSDynamics.electronkmps"><code>MPSDynamics.electronkmps</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">electronkmps(N::Int, k::Int, spin=:Up, chainparams=[fill(1.0,N), fill(1.0,N-1)])</code></pre><p>Generate an MPS for an electron with momentum <code>k</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/mpsBasics.jl#L346-L351">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.elementmpo-Tuple{Any, Vararg{Any}}" href="#MPSDynamics.elementmpo-Tuple{Any, Vararg{Any}}"><code>MPSDynamics.elementmpo</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">elementmpo(M, el...)</code></pre><p>Return the element of the MPO <code>M</code> for the set of physical states <code>el...</code></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/mpsBasics.jl#L506-L510">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.elementmps-Tuple{Any, Vararg{Any}}" href="#MPSDynamics.elementmps-Tuple{Any, Vararg{Any}}"><code>MPSDynamics.elementmps</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">elementmps(A, el...)</code></pre><p>Return the element of the MPS <code>A</code> for the set of physical states <code>el...</code></p><p><strong>Examples</strong></p><pre><code class="language-julia-repl">julia&gt; A = chainmps(6, [2,4], 1);
 
 julia&gt; elementmps(A, 1, 2, 1, 1, 1, 1)
 0.7071067811865475
@@ -11,14 +11,14 @@
 0.0
 
 julia&gt; elementmps(A, 1, 1, 1, 1, 1, 1)
-0.0</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/mpsBasics.jl#L473-L495">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.entanglemententropy-Tuple{Any}" href="#MPSDynamics.entanglemententropy-Tuple{Any}"><code>MPSDynamics.entanglemententropy</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">entanglemententropy(A)</code></pre><p>For a list of tensors <code>A</code> representing a right orthonormalized MPS, compute the entanglement entropy for a bipartite cut for every bond.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/mpsBasics.jl#L422-L428">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.findchainlength-Tuple{Any, Any}" href="#MPSDynamics.findchainlength-Tuple{Any, Any}"><code>MPSDynamics.findchainlength</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">findchainlength(T, cparams...; eps=10^-6)</code></pre><p>Estimate length of chain required for a particular set of chain parameters by calculating how long an excitation on the first site takes to reach the end. The chain length is given as the length required for the excitation to have just reached the last site after time T. The initial number of sites in cparams has to be larger than the findchainlength result.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/fundamentals.jl#L178-L185">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.findchild-Tuple{MPSDynamics.TreeNode, Int64}" href="#MPSDynamics.findchild-Tuple{MPSDynamics.TreeNode, Int64}"><code>MPSDynamics.findchild</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">findchild(node::TreeNode, id::Int)</code></pre><p>Return integer corresponding to the which number child site <code>id</code> is of <code>node</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/treeBasics.jl#L222-L227">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.hbathchain-Tuple{Int64, Int64, Any, Vararg{Any}}" href="#MPSDynamics.hbathchain-Tuple{Int64, Int64, Any, Vararg{Any}}"><code>MPSDynamics.hbathchain</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">hbathchain(N::Int, d::Int, chainparams, longrangecc...; tree=false, reverse=false, coupletox=false)</code></pre><p>Generate MPO representing a tight-binding chain of <code>N</code> oscillators with <code>d</code> Fock states each. Chain parameters are supplied in the standard form: <code>chainparams</code> <span>$=[[ϵ_0,ϵ_1,...],[t_0,t_1,...],c_0]$</span>. The output does not itself represent a complete MPO but will possess an end which is <em>open</em> and should be attached to another tensor site, usually representing the <em>system</em>.</p><p><strong>Arguments</strong></p><ul><li><code>reverse</code>: If <code>reverse=true</code> create a chain were the last (i.e. Nth) site is the site which couples to the system</li><li><code>coupletox</code>: Used to choose the form of the system coupling. <code>coupletox=true</code> gives a non-number conserving coupling of the form <span>$H_{\text{I}}= A_{\text{S}}(b_{0}^\dagger + b_0)$</span> where <span>$A_{\text{S}}$</span> is a system operator, while <code>coupletox=false</code> gives the number-converving coupling <span>$H_{\text{I}}=(A_{\text{S}} b_{0}^\dagger + A_{\text{S}}^\dagger b_0)$</span></li><li><code>tree</code>: If <code>true</code> the resulting chain will be of type <code>TreeNetwork</code>; useful for construcing tree-MPOs </li></ul><p><strong>Example</strong></p><p>One can constuct a system site tensor to couple to a chain by using the function <code>up</code> to populate the tensor. For example, to construct a system site with Hamiltonian <code>Hs</code> and coupling operator <code>As</code>, the system tensor <code>M</code> is constructed as follows for a non-number conserving interaction:</p><pre><code class="language-julia">u = one(Hs) # system identity
+0.0</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/mpsBasics.jl#L473-L495">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.entanglemententropy-Tuple{Any}" href="#MPSDynamics.entanglemententropy-Tuple{Any}"><code>MPSDynamics.entanglemententropy</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">entanglemententropy(A)</code></pre><p>For a list of tensors <code>A</code> representing a right orthonormalized MPS, compute the entanglement entropy for a bipartite cut for every bond.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/mpsBasics.jl#L422-L428">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.findchainlength-Tuple{Any, Any}" href="#MPSDynamics.findchainlength-Tuple{Any, Any}"><code>MPSDynamics.findchainlength</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">findchainlength(T, cparams...; eps=10^-6)</code></pre><p>Estimate length of chain required for a particular set of chain parameters by calculating how long an excitation on the first site takes to reach the end. The chain length is given as the length required for the excitation to have just reached the last site after time T. The initial number of sites in cparams has to be larger than the findchainlength result.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/fundamentals.jl#L178-L185">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.findchild-Tuple{MPSDynamics.TreeNode, Int64}" href="#MPSDynamics.findchild-Tuple{MPSDynamics.TreeNode, Int64}"><code>MPSDynamics.findchild</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">findchild(node::TreeNode, id::Int)</code></pre><p>Return integer corresponding to the which number child site <code>id</code> is of <code>node</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/treeBasics.jl#L222-L227">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.hbathchain-Tuple{Int64, Int64, Any, Vararg{Any}}" href="#MPSDynamics.hbathchain-Tuple{Int64, Int64, Any, Vararg{Any}}"><code>MPSDynamics.hbathchain</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">hbathchain(N::Int, d::Int, chainparams, longrangecc...; tree=false, reverse=false, coupletox=false)</code></pre><p>Generate MPO representing a tight-binding chain of <code>N</code> oscillators with <code>d</code> Fock states each. Chain parameters are supplied in the standard form: <code>chainparams</code> <span>$=[[ϵ_0,ϵ_1,...],[t_0,t_1,...],c_0]$</span>. The output does not itself represent a complete MPO but will possess an end which is <em>open</em> and should be attached to another tensor site, usually representing the <em>system</em>.</p><p><strong>Arguments</strong></p><ul><li><code>reverse</code>: If <code>reverse=true</code> create a chain were the last (i.e. Nth) site is the site which couples to the system</li><li><code>coupletox</code>: Used to choose the form of the system coupling. <code>coupletox=true</code> gives a non-number conserving coupling of the form <span>$H_{\text{I}}= A_{\text{S}}(b_{0}^\dagger + b_0)$</span> where <span>$A_{\text{S}}$</span> is a system operator, while <code>coupletox=false</code> gives the number-converving coupling <span>$H_{\text{I}}=(A_{\text{S}} b_{0}^\dagger + A_{\text{S}}^\dagger b_0)$</span></li><li><code>tree</code>: If <code>true</code> the resulting chain will be of type <code>TreeNetwork</code>; useful for construcing tree-MPOs </li></ul><p><strong>Example</strong></p><p>One can constuct a system site tensor to couple to a chain by using the function <code>up</code> to populate the tensor. For example, to construct a system site with Hamiltonian <code>Hs</code> and coupling operator <code>As</code>, the system tensor <code>M</code> is constructed as follows for a non-number conserving interaction:</p><pre><code class="language-julia">u = one(Hs) # system identity
 M = zeros(1,3,2,2)
 M[1, :, :, :] = up(Hs, As, u)</code></pre><p>The full MPO can then be constructed with:</p><pre><code class="language-julia">Hmpo = [M, hbathchain(N, d, chainparams, coupletox=true)...]</code></pre><p>Similarly for a number conserving interaction the site tensor would look like:</p><pre><code class="language-julia">u = one(Hs) # system identity
 M = zeros(1,4,2,2)
-M[1, :, :, :] = up(Hs, As, As&#39;, u)</code></pre><p>And the full MPO would be</p><pre><code class="language-julia">Hmpo = [M, hbathchain(N, d, chainparams; coupletox=false)...]</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/models.jl#L180-L216">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.heisenbergmpo" href="#MPSDynamics.heisenbergmpo"><code>MPSDynamics.heisenbergmpo</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">heisenbergmpo(N::Int, J=1.0) = xyzmpo(N; Jx=J)</code></pre><p>Generate MPO for the <code>N</code>-spin Heisenberg XXX model, defined by the Hamiltonian</p><p><span>$H = \sum_{n=1}^{N-1} -J σ_x^{n} σ_x^{n+1} - J σ_y^{n} σ_y^{n+1} - J σ_z^{n} σ_z^{n+1}$</span></p><p>with <span>$σ_x^{n}, σ_y^{n}, σ_z^{n}$</span> the Pauli spin-1/2 matrices of the <span>$n^\text{th}$</span> site.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/models.jl#L55-L67">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.ibmmpo-NTuple{4, Any}" href="#MPSDynamics.ibmmpo-NTuple{4, Any}"><code>MPSDynamics.ibmmpo</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">ibmmpo(ω0, d, N, chainparams; tree=false)</code></pre><p>Generate MPO for a spin-1/2 coupled to a chain of harmonic oscillators with the interacting boson model (IBM), defined by the Hamiltonian</p><p><span>$H = \frac{ω_0}{2}σ_z +  c_0σ_z(b_0^\dagger+b_0) + \sum_{i=0}^{N-1} t_i (b_{i+1}^\dagger b_i +h.c.) + \sum_{i=0}^{N} ϵ_ib_i^\dagger b_i$</span>.</p><p>The spin is on site 1 of the MPS and the bath modes are to the right.</p><p>This Hamiltonain is unitarily equivalent (before the truncation to <code>N</code> sites) to the spin-boson Hamiltonian defined by</p><p><span>$H =  \frac{ω_0}{2}σ_z + σ_z\int_0^∞ dω\sqrt{\frac{J(ω)}{π}}(b_ω^\dagger+b_ω) + \int_0^∞ dω ωb_ω^\dagger b_ω$</span>.</p><p>The chain parameters, supplied by <code>chainparams</code>=<span>$[[ϵ_0,ϵ_1,...],[t_0,t_1,...],c_0]$</span>, can be chosen to represent any arbitrary spectral density <span>$J(ω)$</span> at any temperature.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/models.jl#L565-L584">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.isingmpo-Tuple{Int64}" href="#MPSDynamics.isingmpo-Tuple{Int64}"><code>MPSDynamics.isingmpo</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">isingmpo(N; J=1.0, h=1.0)</code></pre><p>Generate MPO for the <code>N</code>-spin 1D Ising model with external field <span>$\vec{h} = (0,0,h)$</span>, defined by the Hamiltonian</p><p><span>$H = \sum_{n=1}^{N-1} -J_x σ_x^{n} σ_x^{n+1} + \sum_{n=1}^{N}(- h_z σ_z^{n})$</span></p><p>with <span>$σ_x^{n}, σ_y^{n}, σ_z^{n}$</span> the Pauli spin-1/2 matrices of the <span>$n^\text{th}$</span> site.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/models.jl#L42-L53">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.longrange_isingmpo" href="#MPSDynamics.longrange_isingmpo"><code>MPSDynamics.longrange_isingmpo</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">longrange_isingmpo(N::Int, α::Float64=0.; J=1.0, h=1.0) = longrange_xyzmpo(N, α; Jx=J, Jy=0., Jz=0., hz=h, hx=0.)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/models.jl#L121-L124">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.longrange_xyzmpo" href="#MPSDynamics.longrange_xyzmpo"><code>MPSDynamics.longrange_xyzmpo</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">longrange_xyzmpo(N::Int, α::Float64=0.; Jx=1.0, Jy=Jx, Jz=Jx, hx=0., hz=0.)</code></pre><p>Gennerate MPO for the <code>N</code>-spin long-range XYZ model with external field <span>$\vec{h}=(h_x, 0, h_z)$</span>, , defined by the Hamiltonian</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/models.jl#L83-L89">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.measure-Tuple{Any, OneSiteObservable}" href="#MPSDynamics.measure-Tuple{Any, OneSiteObservable}"><code>MPSDynamics.measure</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">measure(A, O; kwargs...)</code></pre><p>Measure observable <code>O</code> on mps state <code>A</code></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/measure.jl#L136-L141">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.measure1siteoperator-Tuple{Vector, Any, Vector{Int64}}" href="#MPSDynamics.measure1siteoperator-Tuple{Vector, Any, Vector{Int64}}"><code>MPSDynamics.measure1siteoperator</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">measure1siteoperator(A::Vector, O, sites::Vector{Int})</code></pre><p>For a list of tensors <code>A</code> representing a right orthonormalized MPS, compute the local expectation value of a one-site operator O for every site or just one if it is specified.</p><p>For calculating operators on single sites this will be more efficient if the site is on the left of the mps.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/measure.jl#L191-L199">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.measure1siteoperator-Tuple{Vector, Any}" href="#MPSDynamics.measure1siteoperator-Tuple{Vector, Any}"><code>MPSDynamics.measure1siteoperator</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">measure1siteoperator(A::Vector, O)</code></pre><p>For a list of tensors <code>A</code> representing a right orthonormalized MPS, compute the local expectation value of a one-site operator O for every site.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/measure.jl#L252-L257">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.measure2siteoperator-Tuple{Vector, Any, Any, Int64, Int64}" href="#MPSDynamics.measure2siteoperator-Tuple{Vector, Any, Any, Int64, Int64}"><code>MPSDynamics.measure2siteoperator</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia"> measure2siteoperator(A::Vector, M1, M2, j1, j2)</code></pre><p>Caculate expectation of M1*M2 where M1 acts on site j1 and M2 acts on site j2, assumes A is right normalised.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/measure.jl#L291-L296">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.modemps" href="#MPSDynamics.modemps"><code>MPSDynamics.modemps</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">modemps(N::Int, k::Vector{Int}, numex::Int, chainparams=[fill(1.0,N), fill(1.0,N-1)])</code></pre><p>Generate an MPS with <code>numex</code> excitations of an equal superposition of modes <code>k</code> of a bosonic tight-binding chain.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/mpsBasics.jl#L313-L318">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.modemps" href="#MPSDynamics.modemps"><code>MPSDynamics.modemps</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">modemps(N::Int, k::Int, numex::Int, chainparams=[fill(1.0,N), fill(1.0,N-1)])</code></pre><p>Generate an MPS with <code>numex</code> excitations of mode <code>k</code> of a bosonic tight-binding chain. </p><p><code>chainparams</code> takes the form <code>[e::Vector, t::Vector]</code> where <code>e</code> are the on-site energies and <code>t</code> are the hoppping parameters.</p><p>The returned MPS will have bond-dimensions and physical dimensions <code>numex+1</code></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/mpsBasics.jl#L276-L286">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.mpsembed!-Tuple{Vector, Int64}" href="#MPSDynamics.mpsembed!-Tuple{Vector, Int64}"><code>MPSDynamics.mpsembed!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">mpsembed(A::Vector, Dmax::Int)</code></pre><p>Embed MPS <code>A</code> in manifold of max bond-dimension <code>Dmax</code></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/mpsBasics.jl#L702-L707">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.mpsleftnorm!" href="#MPSDynamics.mpsleftnorm!"><code>MPSDynamics.mpsleftnorm!</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">mpsleftnorm!(A::Vector, jq::Int=length(A))</code></pre><p>Left orthoganalise MPS <code>A</code> up to site <code>jq</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/mpsBasics.jl#L69-L74">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.mpsmixednorm!-Tuple{MPSDynamics.TreeNetwork, Int64}" href="#MPSDynamics.mpsmixednorm!-Tuple{MPSDynamics.TreeNetwork, Int64}"><code>MPSDynamics.mpsmixednorm!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">mpsmixednorm!(A::TreeNetwork, id::Int)</code></pre><p>Normalise tree-MPS <code>A</code> such that orthogonality centre is on site <code>id</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/treeTDVP.jl#L66-L71">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.mpsmixednorm!-Tuple{Vector, Int64}" href="#MPSDynamics.mpsmixednorm!-Tuple{Vector, Int64}"><code>MPSDynamics.mpsmixednorm!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">mpsmixednorm!(A::Vector, OC::Int)</code></pre><p>Put MPS <code>A</code> into mixed canonical form with orthogonality centre on site <code>OC</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/mpsBasics.jl#L84-L89">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.mpsmoveoc!-Tuple{MPSDynamics.TreeNetwork, Int64}" href="#MPSDynamics.mpsmoveoc!-Tuple{MPSDynamics.TreeNetwork, Int64}"><code>MPSDynamics.mpsmoveoc!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">mpsmoveoc!(A::TreeNetwork, id::Int)</code></pre><p>Move the orthogonality centre of right normalised tree-MPS <code>A</code> to site <code>id</code>.</p><p>This function will be more efficient than using <code>mpsmixednorm!</code> if the tree-MPS is already right-normalised.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/treeTDVP.jl#L78-L85">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.mpsrightnorm!" href="#MPSDynamics.mpsrightnorm!"><code>MPSDynamics.mpsrightnorm!</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">mpsrightnorm!(A::Vector, jq::Int=1)</code></pre><p>Right orthoganalise MPS <code>A</code> up to site <code>jq</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/mpsBasics.jl#L52-L57">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.mpsrightnorm!-Tuple{MPSDynamics.TreeNetwork}" href="#MPSDynamics.mpsrightnorm!-Tuple{MPSDynamics.TreeNetwork}"><code>MPSDynamics.mpsrightnorm!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">mpsrightnorm!(A::TreeNetwork)</code></pre><p>When applied to a tree-MPS, right normalise towards head-node.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/treeTDVP.jl#L58-L63">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.mpsshiftoc!-Tuple{MPSDynamics.TreeNetwork, Int64}" href="#MPSDynamics.mpsshiftoc!-Tuple{MPSDynamics.TreeNetwork, Int64}"><code>MPSDynamics.mpsshiftoc!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">mpsshiftoc!(A::TreeNetwork, newhd::Int)</code></pre><p>Shift the orthogonality centre by one site, setting new head-node <code>newhd</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/treeTDVP.jl#L92-L97">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.multiply-Tuple{Vector, Vector}" href="#MPSDynamics.multiply-Tuple{Vector, Vector}"><code>MPSDynamics.multiply</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">multiply(M1::Vector, M2::Vector)</code></pre><p>Calculates M1*M2 where M1 and M2 are MPOs</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/mpsBasics.jl#L683-L688">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.nearestneighbourmpo" href="#MPSDynamics.nearestneighbourmpo"><code>MPSDynamics.nearestneighbourmpo</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">nearestneighbourmpo(N::Int, h0, A, Ad = A&#39;)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/models.jl#L639-L646">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.nearestneighbourmpo" href="#MPSDynamics.nearestneighbourmpo"><code>MPSDynamics.nearestneighbourmpo</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">nearestneighbourmpo(tree_::Tree, h0, A, Ad = A&#39;)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/models.jl#L663-L670">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.normmps-Tuple{MPSDynamics.TreeNetwork}" href="#MPSDynamics.normmps-Tuple{MPSDynamics.TreeNetwork}"><code>MPSDynamics.normmps</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">normmps(net::TreeNetwork; mpsorthog=:None)</code></pre><p>When applied to a tree-MPS <code>mpsorthog=:Left</code> is not defined.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/treeTDVP.jl#L183-L188">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.normmps-Tuple{Vector}" href="#MPSDynamics.normmps-Tuple{Vector}"><code>MPSDynamics.normmps</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">normmps(A::Vector; mpsorthog=:None)</code></pre><p>Calculate norm of MPS <code>A</code>.</p><p>Setting <code>mpsorthog</code>=<code>:Right</code>/<code>:Left</code> will calculate the norm assuming right/left canonical form. Setting <code>mpsorthog=OC::Int</code> will cause the norm to be calculated assuming the orthoganility center is on site <code>OC</code>. If mpsorthog is <code>:None</code> the norm will be calculated as an MPS-MPS product.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/mpsBasics.jl#L21-L30">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.orthcentersmps-Tuple{Vector}" href="#MPSDynamics.orthcentersmps-Tuple{Vector}"><code>MPSDynamics.orthcentersmps</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">orthcentersmps(A)</code></pre><p>Compute the orthoganality centres of MPS <code>A</code>.</p><p>Return value is a list in which each element is the corresponding site tensor of <code>A</code> with the orthoganility centre on that site. Assumes <code>A</code> is right normalised.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/mpsBasics.jl#L1-L9">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.physdims-Tuple{Vector}" href="#MPSDynamics.physdims-Tuple{Vector}"><code>MPSDynamics.physdims</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">physdims(M)</code></pre><p>Return the physical dimensions of an MPS or MPO <code>M</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/mpsBasics.jl#L624-L628">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.productstatemps" href="#MPSDynamics.productstatemps"><code>MPSDynamics.productstatemps</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">productstatemps(physdims::Dims, Dmax=1; state=:Vacuum, mpsorthog=:Right)</code></pre><p>Return an MPS representing a product state with local Hilbert space dimensions given by <code>physdims</code>.</p><p>By default all bond-dimensions will be 1 since the state is a product state. However, to embed the product state in a manifold of greater bond-dimension, <code>Dmax</code> can be set accordingly.</p><p>The indvidual states of the MPS sites can be provided by setting <code>state</code> to a list of column vectors. Setting <code>state=:Vacuum</code> will produce an MPS in the vacuum state (where the state of each site is represented by a column vector with a 1 in the first row and zeros elsewhere). Setting <code>state=:FullOccupy</code> will produce an MPS in which each site is fully occupied (ie. a column vector with a 1 in the last row and zeros elsewhere).</p><p>The argument <code>mpsorthog</code> can be used to set the gauge of the resulting MPS.</p><p><strong>Example</strong></p><pre><code class="language-julia-repl">julia&gt; ψ = unitcol(1,2); d = 6; N = 30; α = 0.1; Δ = 0.0; ω0 = 0.2; s = 1
+M[1, :, :, :] = up(Hs, As, As&#39;, u)</code></pre><p>And the full MPO would be</p><pre><code class="language-julia">Hmpo = [M, hbathchain(N, d, chainparams; coupletox=false)...]</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/models.jl#L180-L216">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.heisenbergmpo" href="#MPSDynamics.heisenbergmpo"><code>MPSDynamics.heisenbergmpo</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">heisenbergmpo(N::Int, J=1.0) = xyzmpo(N; Jx=J)</code></pre><p>Generate MPO for the <code>N</code>-spin Heisenberg XXX model, defined by the Hamiltonian</p><p><span>$H = \sum_{n=1}^{N-1} -J σ_x^{n} σ_x^{n+1} - J σ_y^{n} σ_y^{n+1} - J σ_z^{n} σ_z^{n+1}$</span></p><p>with <span>$σ_x^{n}, σ_y^{n}, σ_z^{n}$</span> the Pauli spin-1/2 matrices of the <span>$n^\text{th}$</span> site.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/models.jl#L55-L67">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.ibmmpo-NTuple{4, Any}" href="#MPSDynamics.ibmmpo-NTuple{4, Any}"><code>MPSDynamics.ibmmpo</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">ibmmpo(ω0, d, N, chainparams; tree=false)</code></pre><p>Generate MPO for a spin-1/2 coupled to a chain of harmonic oscillators with the interacting boson model (IBM), defined by the Hamiltonian</p><p><span>$H = \frac{ω_0}{2}σ_z +  c_0σ_z(b_0^\dagger+b_0) + \sum_{i=0}^{N-1} t_i (b_{i+1}^\dagger b_i +h.c.) + \sum_{i=0}^{N} ϵ_ib_i^\dagger b_i$</span>.</p><p>The spin is on site 1 of the MPS and the bath modes are to the right.</p><p>This Hamiltonain is unitarily equivalent (before the truncation to <code>N</code> sites) to the spin-boson Hamiltonian defined by</p><p><span>$H =  \frac{ω_0}{2}σ_z + σ_z\int_0^∞ dω\sqrt{\frac{J(ω)}{π}}(b_ω^\dagger+b_ω) + \int_0^∞ dω ωb_ω^\dagger b_ω$</span>.</p><p>The chain parameters, supplied by <code>chainparams</code>=<span>$[[ϵ_0,ϵ_1,...],[t_0,t_1,...],c_0]$</span>, can be chosen to represent any arbitrary spectral density <span>$J(ω)$</span> at any temperature.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/models.jl#L565-L584">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.isingmpo-Tuple{Int64}" href="#MPSDynamics.isingmpo-Tuple{Int64}"><code>MPSDynamics.isingmpo</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">isingmpo(N; J=1.0, h=1.0)</code></pre><p>Generate MPO for the <code>N</code>-spin 1D Ising model with external field <span>$\vec{h} = (0,0,h)$</span>, defined by the Hamiltonian</p><p><span>$H = \sum_{n=1}^{N-1} -J_x σ_x^{n} σ_x^{n+1} + \sum_{n=1}^{N}(- h_z σ_z^{n})$</span></p><p>with <span>$σ_x^{n}, σ_y^{n}, σ_z^{n}$</span> the Pauli spin-1/2 matrices of the <span>$n^\text{th}$</span> site.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/models.jl#L42-L53">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.longrange_isingmpo" href="#MPSDynamics.longrange_isingmpo"><code>MPSDynamics.longrange_isingmpo</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">longrange_isingmpo(N::Int, α::Float64=0.; J=1.0, h=1.0) = longrange_xyzmpo(N, α; Jx=J, Jy=0., Jz=0., hz=h, hx=0.)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/models.jl#L121-L124">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.longrange_xyzmpo" href="#MPSDynamics.longrange_xyzmpo"><code>MPSDynamics.longrange_xyzmpo</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">longrange_xyzmpo(N::Int, α::Float64=0.; Jx=1.0, Jy=Jx, Jz=Jx, hx=0., hz=0.)</code></pre><p>Gennerate MPO for the <code>N</code>-spin long-range XYZ model with external field <span>$\vec{h}=(h_x, 0, h_z)$</span>, , defined by the Hamiltonian</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/models.jl#L83-L89">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.measure-Tuple{Any, OneSiteObservable}" href="#MPSDynamics.measure-Tuple{Any, OneSiteObservable}"><code>MPSDynamics.measure</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">measure(A, O; kwargs...)</code></pre><p>Measure observable <code>O</code> on mps state <code>A</code></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/measure.jl#L136-L141">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.measure1siteoperator-Tuple{Vector, Any, Vector{Int64}}" href="#MPSDynamics.measure1siteoperator-Tuple{Vector, Any, Vector{Int64}}"><code>MPSDynamics.measure1siteoperator</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">measure1siteoperator(A::Vector, O, sites::Vector{Int})</code></pre><p>For a list of tensors <code>A</code> representing a right orthonormalized MPS, compute the local expectation value of a one-site operator O for every site or just one if it is specified.</p><p>For calculating operators on single sites this will be more efficient if the site is on the left of the mps.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/measure.jl#L191-L199">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.measure1siteoperator-Tuple{Vector, Any}" href="#MPSDynamics.measure1siteoperator-Tuple{Vector, Any}"><code>MPSDynamics.measure1siteoperator</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">measure1siteoperator(A::Vector, O)</code></pre><p>For a list of tensors <code>A</code> representing a right orthonormalized MPS, compute the local expectation value of a one-site operator O for every site.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/measure.jl#L252-L257">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.measure2siteoperator-Tuple{Vector, Any, Any, Int64, Int64}" href="#MPSDynamics.measure2siteoperator-Tuple{Vector, Any, Any, Int64, Int64}"><code>MPSDynamics.measure2siteoperator</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia"> measure2siteoperator(A::Vector, M1, M2, j1, j2)</code></pre><p>Caculate expectation of M1*M2 where M1 acts on site j1 and M2 acts on site j2, assumes A is right normalised.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/measure.jl#L291-L296">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.modemps" href="#MPSDynamics.modemps"><code>MPSDynamics.modemps</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">modemps(N::Int, k::Vector{Int}, numex::Int, chainparams=[fill(1.0,N), fill(1.0,N-1)])</code></pre><p>Generate an MPS with <code>numex</code> excitations of an equal superposition of modes <code>k</code> of a bosonic tight-binding chain.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/mpsBasics.jl#L313-L318">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.modemps" href="#MPSDynamics.modemps"><code>MPSDynamics.modemps</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">modemps(N::Int, k::Int, numex::Int, chainparams=[fill(1.0,N), fill(1.0,N-1)])</code></pre><p>Generate an MPS with <code>numex</code> excitations of mode <code>k</code> of a bosonic tight-binding chain. </p><p><code>chainparams</code> takes the form <code>[e::Vector, t::Vector]</code> where <code>e</code> are the on-site energies and <code>t</code> are the hoppping parameters.</p><p>The returned MPS will have bond-dimensions and physical dimensions <code>numex+1</code></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/mpsBasics.jl#L276-L286">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.mpsembed!-Tuple{Vector, Int64}" href="#MPSDynamics.mpsembed!-Tuple{Vector, Int64}"><code>MPSDynamics.mpsembed!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">mpsembed(A::Vector, Dmax::Int)</code></pre><p>Embed MPS <code>A</code> in manifold of max bond-dimension <code>Dmax</code></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/mpsBasics.jl#L702-L707">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.mpsleftnorm!" href="#MPSDynamics.mpsleftnorm!"><code>MPSDynamics.mpsleftnorm!</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">mpsleftnorm!(A::Vector, jq::Int=length(A))</code></pre><p>Left orthoganalise MPS <code>A</code> up to site <code>jq</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/mpsBasics.jl#L69-L74">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.mpsmixednorm!-Tuple{MPSDynamics.TreeNetwork, Int64}" href="#MPSDynamics.mpsmixednorm!-Tuple{MPSDynamics.TreeNetwork, Int64}"><code>MPSDynamics.mpsmixednorm!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">mpsmixednorm!(A::TreeNetwork, id::Int)</code></pre><p>Normalise tree-MPS <code>A</code> such that orthogonality centre is on site <code>id</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/treeTDVP.jl#L66-L71">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.mpsmixednorm!-Tuple{Vector, Int64}" href="#MPSDynamics.mpsmixednorm!-Tuple{Vector, Int64}"><code>MPSDynamics.mpsmixednorm!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">mpsmixednorm!(A::Vector, OC::Int)</code></pre><p>Put MPS <code>A</code> into mixed canonical form with orthogonality centre on site <code>OC</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/mpsBasics.jl#L84-L89">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.mpsmoveoc!-Tuple{MPSDynamics.TreeNetwork, Int64}" href="#MPSDynamics.mpsmoveoc!-Tuple{MPSDynamics.TreeNetwork, Int64}"><code>MPSDynamics.mpsmoveoc!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">mpsmoveoc!(A::TreeNetwork, id::Int)</code></pre><p>Move the orthogonality centre of right normalised tree-MPS <code>A</code> to site <code>id</code>.</p><p>This function will be more efficient than using <code>mpsmixednorm!</code> if the tree-MPS is already right-normalised.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/treeTDVP.jl#L78-L85">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.mpsrightnorm!" href="#MPSDynamics.mpsrightnorm!"><code>MPSDynamics.mpsrightnorm!</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">mpsrightnorm!(A::Vector, jq::Int=1)</code></pre><p>Right orthoganalise MPS <code>A</code> up to site <code>jq</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/mpsBasics.jl#L52-L57">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.mpsrightnorm!-Tuple{MPSDynamics.TreeNetwork}" href="#MPSDynamics.mpsrightnorm!-Tuple{MPSDynamics.TreeNetwork}"><code>MPSDynamics.mpsrightnorm!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">mpsrightnorm!(A::TreeNetwork)</code></pre><p>When applied to a tree-MPS, right normalise towards head-node.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/treeTDVP.jl#L58-L63">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.mpsshiftoc!-Tuple{MPSDynamics.TreeNetwork, Int64}" href="#MPSDynamics.mpsshiftoc!-Tuple{MPSDynamics.TreeNetwork, Int64}"><code>MPSDynamics.mpsshiftoc!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">mpsshiftoc!(A::TreeNetwork, newhd::Int)</code></pre><p>Shift the orthogonality centre by one site, setting new head-node <code>newhd</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/treeTDVP.jl#L92-L97">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.multiply-Tuple{Vector, Vector}" href="#MPSDynamics.multiply-Tuple{Vector, Vector}"><code>MPSDynamics.multiply</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">multiply(M1::Vector, M2::Vector)</code></pre><p>Calculates M1*M2 where M1 and M2 are MPOs</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/mpsBasics.jl#L683-L688">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.nearestneighbourmpo" href="#MPSDynamics.nearestneighbourmpo"><code>MPSDynamics.nearestneighbourmpo</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">nearestneighbourmpo(N::Int, h0, A, Ad = A&#39;)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/models.jl#L639-L646">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.nearestneighbourmpo" href="#MPSDynamics.nearestneighbourmpo"><code>MPSDynamics.nearestneighbourmpo</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">nearestneighbourmpo(tree_::Tree, h0, A, Ad = A&#39;)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/models.jl#L663-L670">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.normmps-Tuple{MPSDynamics.TreeNetwork}" href="#MPSDynamics.normmps-Tuple{MPSDynamics.TreeNetwork}"><code>MPSDynamics.normmps</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">normmps(net::TreeNetwork; mpsorthog=:None)</code></pre><p>When applied to a tree-MPS <code>mpsorthog=:Left</code> is not defined.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/treeTDVP.jl#L183-L188">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.normmps-Tuple{Vector}" href="#MPSDynamics.normmps-Tuple{Vector}"><code>MPSDynamics.normmps</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">normmps(A::Vector; mpsorthog=:None)</code></pre><p>Calculate norm of MPS <code>A</code>.</p><p>Setting <code>mpsorthog</code>=<code>:Right</code>/<code>:Left</code> will calculate the norm assuming right/left canonical form. Setting <code>mpsorthog=OC::Int</code> will cause the norm to be calculated assuming the orthoganility center is on site <code>OC</code>. If mpsorthog is <code>:None</code> the norm will be calculated as an MPS-MPS product.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/mpsBasics.jl#L21-L30">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.orthcentersmps-Tuple{Vector}" href="#MPSDynamics.orthcentersmps-Tuple{Vector}"><code>MPSDynamics.orthcentersmps</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">orthcentersmps(A)</code></pre><p>Compute the orthoganality centres of MPS <code>A</code>.</p><p>Return value is a list in which each element is the corresponding site tensor of <code>A</code> with the orthoganility centre on that site. Assumes <code>A</code> is right normalised.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/mpsBasics.jl#L1-L9">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.physdims-Tuple{Vector}" href="#MPSDynamics.physdims-Tuple{Vector}"><code>MPSDynamics.physdims</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">physdims(M)</code></pre><p>Return the physical dimensions of an MPS or MPO <code>M</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/mpsBasics.jl#L624-L628">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.productstatemps" href="#MPSDynamics.productstatemps"><code>MPSDynamics.productstatemps</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">productstatemps(physdims::Dims, Dmax=1; state=:Vacuum, mpsorthog=:Right)</code></pre><p>Return an MPS representing a product state with local Hilbert space dimensions given by <code>physdims</code>.</p><p>By default all bond-dimensions will be 1 since the state is a product state. However, to embed the product state in a manifold of greater bond-dimension, <code>Dmax</code> can be set accordingly.</p><p>The indvidual states of the MPS sites can be provided by setting <code>state</code> to a list of column vectors. Setting <code>state=:Vacuum</code> will produce an MPS in the vacuum state (where the state of each site is represented by a column vector with a 1 in the first row and zeros elsewhere). Setting <code>state=:FullOccupy</code> will produce an MPS in which each site is fully occupied (ie. a column vector with a 1 in the last row and zeros elsewhere).</p><p>The argument <code>mpsorthog</code> can be used to set the gauge of the resulting MPS.</p><p><strong>Example</strong></p><pre><code class="language-julia-repl">julia&gt; ψ = unitcol(1,2); d = 6; N = 30; α = 0.1; Δ = 0.0; ω0 = 0.2; s = 1
 
 julia&gt; cpars = chaincoeffs_ohmic(N, α, s)
 
 julia&gt; H = spinbosonmpo(ω0, Δ, d, N, cpars)
 
-julia&gt; A = productstatemps(physdims(H), state=[ψ, fill(unitcol(1,d), N)...]) # MPS representation of |ψ&gt;|Vacuum&gt;</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/mpsBasics.jl#L134-L161">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.productstatemps" href="#MPSDynamics.productstatemps"><code>MPSDynamics.productstatemps</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">productstatemps(N::Int, d::Int, Dmax=1; state=:Vacuum, mpsorthog=:Right)</code></pre><p>Return an <code>N</code>-site MPS with all local Hilbert space dimensions given by <code>d</code>. </p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/mpsBasics.jl#L212-L217">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.randisometry-Tuple{Type, Int64, Int64}" href="#MPSDynamics.randisometry-Tuple{Type, Int64, Int64}"><code>MPSDynamics.randisometry</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">randisometry([T=Float64], dims...)</code></pre><p>Construct a random isometry</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/fundamentals.jl#L337-L340">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.randmps" href="#MPSDynamics.randmps"><code>MPSDynamics.randmps</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">randmps(N::Int, d::Int, Dmax::Int, T=Float64)</code></pre><p>Construct a random, <code>N</code>-site, right-normalised MPS with all local Hilbert space dimensions given by <code>d</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/mpsBasics.jl#L126-L131">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.randmps" href="#MPSDynamics.randmps"><code>MPSDynamics.randmps</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">randmps(tree::Tree, physdims, Dmax::Int, T::Type{&lt;:Number} = Float64)</code></pre><p>Construct a random, right-normalised, tree-MPS, with structure given by tree and max bond-dimension given by <code>Dmax</code>.</p><p>The local Hilbert space dimensions are specified by physdims which can either be of type <code>Dims{length(tree)}</code>, specifying the dimension of each site, or of type <code>Int</code>, in which case the same local dimension is used for every site.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/treeTDVP.jl#L127-L134">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.randmps-Union{Tuple{N}, Tuple{Tuple{Vararg{Int64, N}}, Int64}, Tuple{Tuple{Vararg{Int64, N}}, Int64, Type{&lt;:Number}}} where N" href="#MPSDynamics.randmps-Union{Tuple{N}, Tuple{Tuple{Vararg{Int64, N}}, Int64}, Tuple{Tuple{Vararg{Int64, N}}, Int64, Type{&lt;:Number}}} where N"><code>MPSDynamics.randmps</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">randmps(physdims::Dims{N}, Dmax::Int, T::Type{&lt;:Number} = Float64) where {N}</code></pre><p>Construct a random, right-normalised MPS with local Hilbert space dimensions given by <code>physdims</code> and max bond-dimension given by <code>Dmax</code>. </p><p><code>T</code> specifies the element type, eg. use <code>T=ComplexF64</code> for a complex valued MPS.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/mpsBasics.jl#L95-L103">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.randtree-Tuple{Int64, Int64}" href="#MPSDynamics.randtree-Tuple{Int64, Int64}"><code>MPSDynamics.randtree</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">randtree(numnodes::Int, maxdegree::Int)</code></pre><p>Construct a random tree with <code>nummodes</code> modes and max degree <code>maxdegree</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/treeBasics.jl#L353-L358">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.readchaincoeffs-Tuple{Any, Vararg{Any}}" href="#MPSDynamics.readchaincoeffs-Tuple{Any, Vararg{Any}}"><code>MPSDynamics.readchaincoeffs</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">readchaincoeffs(fdir, params...)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/models.jl#L537-L543">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.rmsd-Tuple{Any, Any}" href="#MPSDynamics.rmsd-Tuple{Any, Any}"><code>MPSDynamics.rmsd</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">rmsd(dat1::Vector{Float64}, dat2::Vector{Float64})</code></pre><p>Calculate the root mean squared difference between two measurements of an observable over the same time period.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/fundamentals.jl#L258-L263">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.spinbosonmpo-NTuple{5, Any}" href="#MPSDynamics.spinbosonmpo-NTuple{5, Any}"><code>MPSDynamics.spinbosonmpo</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">spinbosonmpo(ω0, Δ, d, N, chainparams; rwa=false, tree=false)</code></pre><p>Generate MPO for a spin-1/2 coupled to a chain of harmonic oscillators, defined by the Hamiltonian</p><p><span>$H = \frac{ω_0}{2}σ_z + Δσ_x + c_0σ_x(b_0^\dagger+b_0) + \sum_{i=0}^{N-1} t_i (b_{i+1}^\dagger b_i +h.c.) + \sum_{i=0}^{N} ϵ_ib_i^\dagger b_i$</span>.</p><p>The spin is on site 1 of the MPS and the bath modes are to the right.</p><p>This Hamiltonain is unitarily equivalent (before the truncation to <code>N</code> sites) to the spin-boson Hamiltonian defined by</p><p><span>$H =  \frac{ω_0}{2}σ_z + Δσ_x + σ_x\int_0^∞ dω\sqrt{\frac{J(ω)}{π}}(b_ω^\dagger+b_ω) + \int_0^∞ dω ωb_ω^\dagger b_ω$</span>.</p><p>The chain parameters, supplied by <code>chainparams</code>=<span>$[[ϵ_0,ϵ_1,...],[t_0,t_1,...],c_0]$</span>, can be chosen to represent any arbitrary spectral density <span>$J(ω)$</span> at any temperature.</p><p>The rotating wave approximation can be made by setting <code>rwa=true</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/models.jl#L398-L419">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.spinchainmpo-Tuple{Int64}" href="#MPSDynamics.spinchainmpo-Tuple{Int64}"><code>MPSDynamics.spinchainmpo</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">spinchainmpo(N::Int; J=1.0, hz=1.0, hx=0.0, i=div(N,2))</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/models.jl#L127-L131">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.svdmps-Tuple{Any}" href="#MPSDynamics.svdmps-Tuple{Any}"><code>MPSDynamics.svdmps</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">svdmps(A)</code></pre><p>For a right normalised mps <code>A</code> compute the full svd spectrum for a bipartition at every bond.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/mpsBasics.jl#L451-L455">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.svdtrunc-Tuple{Any}" href="#MPSDynamics.svdtrunc-Tuple{Any}"><code>MPSDynamics.svdtrunc</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">U, S, Vd = svdtrunc(A; truncdim = max(size(A)...), truncerr = 0.)</code></pre><p>Perform a truncated SVD, with maximum number of singular values to keep equal to <code>truncdim</code> or truncating any singular values smaller than <code>truncerr</code>. If both options are provided, the smallest number of singular values will be kept. Unlike the SVD in Julia, this returns matrix U, a diagonal matrix (not a vector) S, and Vt such that A ≈ U * S * Vt</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/tensorOps.jl#L594-L601">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.tightbindingmpo-Tuple{Int64, Int64}" href="#MPSDynamics.tightbindingmpo-Tuple{Int64, Int64}"><code>MPSDynamics.tightbindingmpo</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">tightbindingmpo(N::Int, d::Int; J=1.0, e=1.0)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/models.jl#L156-L161">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.tunnelingmpo-Tuple{Any, Any, Any, Any, Any, Int64, Int64}" href="#MPSDynamics.tunnelingmpo-Tuple{Any, Any, Any, Any, Any, Int64, Int64}"><code>MPSDynamics.tunnelingmpo</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">tunnelingmpo(ϵ, delta, α, s, β, d::Int, nummodes::Int; tree=false, ωc=1)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/models.jl#L607-L614">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.twobathspinmpo" href="#MPSDynamics.twobathspinmpo"><code>MPSDynamics.twobathspinmpo</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">twobathspinmpo(ω0, Δ, Nl, Nr, dl, dr, chainparamsl=[fill(1.0,N),fill(1.0,N-1), 1.0], chainparamsr=chainparamsl; tree=false)</code></pre><p>Generate MPO for a spin-1/2 coupled to two chains of harmonic oscillators, defined by the Hamiltonian</p><p><span>$H = \frac{ω_0}{2}σ_z + Δσ_x + c_0^rσ_x(b_0^\dagger+b_0) + \sum_{i=0}^{N_r-1} t_i^r (b_{i+1}^\dagger b_i +h.c.) + \sum_{i=0}^{N_r} ϵ_i^rb_i^\dagger b_i + c_0^lσ_x(d_0^\dagger+d_0) + \sum_{i=0}^{N_l-1} t_i^l (d_{i+1}^\dagger d_i +h.c.) + \sum_{i=0}^{N_l} ϵ_i^l d_i^\dagger d_i$</span>.</p><p>The spin is on site <span>$N_l + 1$</span> of the MPS, surrounded by the left chain modes and the right chain modes.</p><p>This Hamiltonain is unitarily equivalent (before the truncation to <code>N</code> sites) to the spin-boson Hamiltonian defined by</p><p><span>$H =  \frac{ω_0}{2}σ_z + Δσ_x + σ_x\int_0^∞ dω\sqrt{\frac{J(ω)}{π}}(b_ω^\dagger+b_ω) + \int_0^∞ dω ωb_ω^\dagger b_ωi + σ_x\int_0^∞ dω\sqrt{\frac{J^l(ω)}{π}}(d_ω^\dagger+d_ω) + \int_0^∞ dω ωd_ω^\dagger d_ω$</span>.</p><p>The chain parameters, supplied by <code>chainparams</code>=<span>$[[ϵ_0,ϵ_1,...],[t_0,t_1,...],c_0]$</span>, can be chosen to represent any arbitrary spectral density <span>$J(ω)$</span> at any temperature. The two chains can have a different spectral density.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/models.jl#L446-L465">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.xxzmpo" href="#MPSDynamics.xxzmpo"><code>MPSDynamics.xxzmpo</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">xxzmpo(N::Int, Δ = 1.0, J=1.0) = xyzmpo(N; Jx=J, Jy=J, Jz=J*Δ)</code></pre><p>Generate MPO for the <code>N</code>-spin XXZ model, defined by the Hamiltonian</p><p><span>$H = \sum_{n=1}^{N-1} -J σ_x^{n} σ_x^{n+1} - J σ_y^{n} σ_y^{n+1} - \Delta J σ_z^{n} σ_z^{n+1}$</span></p><p>with <span>$σ_x^{n}, σ_y^{n}, σ_z^{n}$</span> the Pauli spin-1/2 matrices of the <span>$n^\text{th}$</span> site.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/models.jl#L69-L80">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.xyzmpo-Tuple{Int64}" href="#MPSDynamics.xyzmpo-Tuple{Int64}"><code>MPSDynamics.xyzmpo</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">xyzmpo(N::Int; Jx=1.0, Jy=Jx, Jz=Jx, hx=0., hz=0.)</code></pre><p>Generate MPO for the <code>N</code>-spin XYZ model with external field <span>$\vec{h}=(h_x, 0, h_z)$</span>, , defined by the Hamiltonian</p><p><span>$H = \sum_{n=1}^{N-1} -J_x σ_x^{n} σ_x^{n+1} - J_y σ_y^{n} σ_y^{n+1} - J_z σ_z^{n} σ_z^{n+1} + \sum_{n=1}^{N}(- h_x σ_x^{n} - h_z σ_z^{n})$</span></p><p>with <span>$σ_x^{n}, σ_y^{n}, σ_z^{n}$</span> the Pauli spin-1/2 matrices of the <span>$n^\text{th}$</span> site.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/aa3aa0531de32773079cfceabbd9465cf9e6526f/src/models.jl#L4-L15">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../theory/">« Theoretical Background</a><a class="docs-footer-nextpage" href="../dev/">Developpers »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Wednesday 17 April 2024 15:15">Wednesday 17 April 2024</span>. Using Julia version 1.7.3.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
+julia&gt; A = productstatemps(physdims(H), state=[ψ, fill(unitcol(1,d), N)...]) # MPS representation of |ψ&gt;|Vacuum&gt;</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/mpsBasics.jl#L134-L161">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.productstatemps" href="#MPSDynamics.productstatemps"><code>MPSDynamics.productstatemps</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">productstatemps(N::Int, d::Int, Dmax=1; state=:Vacuum, mpsorthog=:Right)</code></pre><p>Return an <code>N</code>-site MPS with all local Hilbert space dimensions given by <code>d</code>. </p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/mpsBasics.jl#L212-L217">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.randisometry-Tuple{Type, Int64, Int64}" href="#MPSDynamics.randisometry-Tuple{Type, Int64, Int64}"><code>MPSDynamics.randisometry</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">randisometry([T=Float64], dims...)</code></pre><p>Construct a random isometry</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/fundamentals.jl#L337-L340">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.randmps" href="#MPSDynamics.randmps"><code>MPSDynamics.randmps</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">randmps(N::Int, d::Int, Dmax::Int, T=Float64)</code></pre><p>Construct a random, <code>N</code>-site, right-normalised MPS with all local Hilbert space dimensions given by <code>d</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/mpsBasics.jl#L126-L131">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.randmps" href="#MPSDynamics.randmps"><code>MPSDynamics.randmps</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">randmps(tree::Tree, physdims, Dmax::Int, T::Type{&lt;:Number} = Float64)</code></pre><p>Construct a random, right-normalised, tree-MPS, with structure given by tree and max bond-dimension given by <code>Dmax</code>.</p><p>The local Hilbert space dimensions are specified by physdims which can either be of type <code>Dims{length(tree)}</code>, specifying the dimension of each site, or of type <code>Int</code>, in which case the same local dimension is used for every site.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/treeTDVP.jl#L127-L134">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.randmps-Union{Tuple{N}, Tuple{Tuple{Vararg{Int64, N}}, Int64}, Tuple{Tuple{Vararg{Int64, N}}, Int64, Type{&lt;:Number}}} where N" href="#MPSDynamics.randmps-Union{Tuple{N}, Tuple{Tuple{Vararg{Int64, N}}, Int64}, Tuple{Tuple{Vararg{Int64, N}}, Int64, Type{&lt;:Number}}} where N"><code>MPSDynamics.randmps</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">randmps(physdims::Dims{N}, Dmax::Int, T::Type{&lt;:Number} = Float64) where {N}</code></pre><p>Construct a random, right-normalised MPS with local Hilbert space dimensions given by <code>physdims</code> and max bond-dimension given by <code>Dmax</code>. </p><p><code>T</code> specifies the element type, eg. use <code>T=ComplexF64</code> for a complex valued MPS.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/mpsBasics.jl#L95-L103">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.randtree-Tuple{Int64, Int64}" href="#MPSDynamics.randtree-Tuple{Int64, Int64}"><code>MPSDynamics.randtree</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">randtree(numnodes::Int, maxdegree::Int)</code></pre><p>Construct a random tree with <code>nummodes</code> modes and max degree <code>maxdegree</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/treeBasics.jl#L353-L358">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.readchaincoeffs-Tuple{Any, Vararg{Any}}" href="#MPSDynamics.readchaincoeffs-Tuple{Any, Vararg{Any}}"><code>MPSDynamics.readchaincoeffs</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">readchaincoeffs(fdir, params...)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/models.jl#L537-L543">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.rmsd-Tuple{Any, Any}" href="#MPSDynamics.rmsd-Tuple{Any, Any}"><code>MPSDynamics.rmsd</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">rmsd(dat1::Vector{Float64}, dat2::Vector{Float64})</code></pre><p>Calculate the root mean squared difference between two measurements of an observable over the same time period.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/fundamentals.jl#L258-L263">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.spinbosonmpo-NTuple{5, Any}" href="#MPSDynamics.spinbosonmpo-NTuple{5, Any}"><code>MPSDynamics.spinbosonmpo</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">spinbosonmpo(ω0, Δ, d, N, chainparams; rwa=false, tree=false)</code></pre><p>Generate MPO for a spin-1/2 coupled to a chain of harmonic oscillators, defined by the Hamiltonian</p><p><span>$H = \frac{ω_0}{2}σ_z + Δσ_x + c_0σ_x(b_0^\dagger+b_0) + \sum_{i=0}^{N-1} t_i (b_{i+1}^\dagger b_i +h.c.) + \sum_{i=0}^{N} ϵ_ib_i^\dagger b_i$</span>.</p><p>The spin is on site 1 of the MPS and the bath modes are to the right.</p><p>This Hamiltonain is unitarily equivalent (before the truncation to <code>N</code> sites) to the spin-boson Hamiltonian defined by</p><p><span>$H =  \frac{ω_0}{2}σ_z + Δσ_x + σ_x\int_0^∞ dω\sqrt{\frac{J(ω)}{π}}(b_ω^\dagger+b_ω) + \int_0^∞ dω ωb_ω^\dagger b_ω$</span>.</p><p>The chain parameters, supplied by <code>chainparams</code>=<span>$[[ϵ_0,ϵ_1,...],[t_0,t_1,...],c_0]$</span>, can be chosen to represent any arbitrary spectral density <span>$J(ω)$</span> at any temperature.</p><p>The rotating wave approximation can be made by setting <code>rwa=true</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/models.jl#L398-L419">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.spinchainmpo-Tuple{Int64}" href="#MPSDynamics.spinchainmpo-Tuple{Int64}"><code>MPSDynamics.spinchainmpo</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">spinchainmpo(N::Int; J=1.0, hz=1.0, hx=0.0, i=div(N,2))</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/models.jl#L127-L131">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.svdmps-Tuple{Any}" href="#MPSDynamics.svdmps-Tuple{Any}"><code>MPSDynamics.svdmps</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">svdmps(A)</code></pre><p>For a right normalised mps <code>A</code> compute the full svd spectrum for a bipartition at every bond.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/mpsBasics.jl#L451-L455">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.svdtrunc-Tuple{Any}" href="#MPSDynamics.svdtrunc-Tuple{Any}"><code>MPSDynamics.svdtrunc</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">U, S, Vd = svdtrunc(A; truncdim = max(size(A)...), truncerr = 0.)</code></pre><p>Perform a truncated SVD, with maximum number of singular values to keep equal to <code>truncdim</code> or truncating any singular values smaller than <code>truncerr</code>. If both options are provided, the smallest number of singular values will be kept. Unlike the SVD in Julia, this returns matrix U, a diagonal matrix (not a vector) S, and Vt such that A ≈ U * S * Vt</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/tensorOps.jl#L594-L601">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.tightbindingmpo-Tuple{Int64, Int64}" href="#MPSDynamics.tightbindingmpo-Tuple{Int64, Int64}"><code>MPSDynamics.tightbindingmpo</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">tightbindingmpo(N::Int, d::Int; J=1.0, e=1.0)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/models.jl#L156-L161">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.tunnelingmpo-Tuple{Any, Any, Any, Any, Any, Int64, Int64}" href="#MPSDynamics.tunnelingmpo-Tuple{Any, Any, Any, Any, Any, Int64, Int64}"><code>MPSDynamics.tunnelingmpo</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">tunnelingmpo(ϵ, delta, α, s, β, d::Int, nummodes::Int; tree=false, ωc=1)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/models.jl#L607-L614">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.twobathspinmpo" href="#MPSDynamics.twobathspinmpo"><code>MPSDynamics.twobathspinmpo</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">twobathspinmpo(ω0, Δ, Nl, Nr, dl, dr, chainparamsl=[fill(1.0,N),fill(1.0,N-1), 1.0], chainparamsr=chainparamsl; tree=false)</code></pre><p>Generate MPO for a spin-1/2 coupled to two chains of harmonic oscillators, defined by the Hamiltonian</p><p><span>$H = \frac{ω_0}{2}σ_z + Δσ_x + c_0^rσ_x(b_0^\dagger+b_0) + \sum_{i=0}^{N_r-1} t_i^r (b_{i+1}^\dagger b_i +h.c.) + \sum_{i=0}^{N_r} ϵ_i^rb_i^\dagger b_i + c_0^lσ_x(d_0^\dagger+d_0) + \sum_{i=0}^{N_l-1} t_i^l (d_{i+1}^\dagger d_i +h.c.) + \sum_{i=0}^{N_l} ϵ_i^l d_i^\dagger d_i$</span>.</p><p>The spin is on site <span>$N_l + 1$</span> of the MPS, surrounded by the left chain modes and the right chain modes.</p><p>This Hamiltonain is unitarily equivalent (before the truncation to <code>N</code> sites) to the spin-boson Hamiltonian defined by</p><p><span>$H =  \frac{ω_0}{2}σ_z + Δσ_x + σ_x\int_0^∞ dω\sqrt{\frac{J(ω)}{π}}(b_ω^\dagger+b_ω) + \int_0^∞ dω ωb_ω^\dagger b_ωi + σ_x\int_0^∞ dω\sqrt{\frac{J^l(ω)}{π}}(d_ω^\dagger+d_ω) + \int_0^∞ dω ωd_ω^\dagger d_ω$</span>.</p><p>The chain parameters, supplied by <code>chainparams</code>=<span>$[[ϵ_0,ϵ_1,...],[t_0,t_1,...],c_0]$</span>, can be chosen to represent any arbitrary spectral density <span>$J(ω)$</span> at any temperature. The two chains can have a different spectral density.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/models.jl#L446-L465">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.xxzmpo" href="#MPSDynamics.xxzmpo"><code>MPSDynamics.xxzmpo</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">xxzmpo(N::Int, Δ = 1.0, J=1.0) = xyzmpo(N; Jx=J, Jy=J, Jz=J*Δ)</code></pre><p>Generate MPO for the <code>N</code>-spin XXZ model, defined by the Hamiltonian</p><p><span>$H = \sum_{n=1}^{N-1} -J σ_x^{n} σ_x^{n+1} - J σ_y^{n} σ_y^{n+1} - \Delta J σ_z^{n} σ_z^{n+1}$</span></p><p>with <span>$σ_x^{n}, σ_y^{n}, σ_z^{n}$</span> the Pauli spin-1/2 matrices of the <span>$n^\text{th}$</span> site.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/models.jl#L69-L80">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MPSDynamics.xyzmpo-Tuple{Int64}" href="#MPSDynamics.xyzmpo-Tuple{Int64}"><code>MPSDynamics.xyzmpo</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">xyzmpo(N::Int; Jx=1.0, Jy=Jx, Jz=Jx, hx=0., hz=0.)</code></pre><p>Generate MPO for the <code>N</code>-spin XYZ model with external field <span>$\vec{h}=(h_x, 0, h_z)$</span>, , defined by the Hamiltonian</p><p><span>$H = \sum_{n=1}^{N-1} -J_x σ_x^{n} σ_x^{n+1} - J_y σ_y^{n} σ_y^{n+1} - J_z σ_z^{n} σ_z^{n+1} + \sum_{n=1}^{N}(- h_x σ_x^{n} - h_z σ_z^{n})$</span></p><p>with <span>$σ_x^{n}, σ_y^{n}, σ_z^{n}$</span> the Pauli spin-1/2 matrices of the <span>$n^\text{th}$</span> site.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/shareloqs/MPSDynamics/blob/fe922d97f1d6f4c7b551823784296117718bf27d/src/models.jl#L4-L15">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../theory/">« Theoretical Background</a><a class="docs-footer-nextpage" href="../dev/">Developpers »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Wednesday 17 April 2024 15:17">Wednesday 17 April 2024</span>. Using Julia version 1.7.3.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
diff --git a/docs/search/index.html b/docs/search/index.html
index 679e1c4..3545c74 100644
--- a/docs/search/index.html
+++ b/docs/search/index.html
@@ -1,2 +1,2 @@
 <!DOCTYPE html>
-<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Search · MPSDynamics.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../"><img src="../assets/logo.png" alt="MPSDynamics.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">MPSDynamics.jl</span></div><form class="docs-search" action><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Introduction</a></li><li><a class="tocitem" href="../user-guide/">User Guide</a></li><li><span class="tocitem">Examples</span><ul><li><a class="tocitem" href="../examples/sbm/">The Spin-Boson Model</a></li><li><a class="tocitem" href="../examples/puredephasing/">Pure-Dephasing</a></li></ul></li><li><a class="tocitem" href="../theory/">Theoretical Background</a></li><li><a class="tocitem" href="../methods/">Methods</a></li><li><a class="tocitem" href="../dev/">Developpers</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Search</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Search</a></li></ul></nav><div class="docs-right"><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article><p id="documenter-search-info">Loading search...</p><ul id="documenter-search-results"></ul></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Wednesday 17 April 2024 15:15">Wednesday 17 April 2024</span>. Using Julia version 1.7.3.</p></section><footer class="modal-card-foot"></footer></div></div></div></body><script src="../search_index.js"></script><script src="../assets/search.js"></script></html>
+<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Search · MPSDynamics.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../"><img src="../assets/logo.png" alt="MPSDynamics.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">MPSDynamics.jl</span></div><form class="docs-search" action><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Introduction</a></li><li><a class="tocitem" href="../user-guide/">User Guide</a></li><li><span class="tocitem">Examples</span><ul><li><a class="tocitem" href="../examples/sbm/">The Spin-Boson Model</a></li><li><a class="tocitem" href="../examples/puredephasing/">Pure-Dephasing</a></li></ul></li><li><a class="tocitem" href="../theory/">Theoretical Background</a></li><li><a class="tocitem" href="../methods/">Methods</a></li><li><a class="tocitem" href="../dev/">Developpers</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Search</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Search</a></li></ul></nav><div class="docs-right"><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article><p id="documenter-search-info">Loading search...</p><ul id="documenter-search-results"></ul></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Wednesday 17 April 2024 15:17">Wednesday 17 April 2024</span>. Using Julia version 1.7.3.</p></section><footer class="modal-card-foot"></footer></div></div></div></body><script src="../search_index.js"></script><script src="../assets/search.js"></script></html>
diff --git a/docs/search_index.js b/docs/search_index.js
index f748a60..b878af7 100644
--- a/docs/search_index.js
+++ b/docs/search_index.js
@@ -1,3 +1,3 @@
 var documenterSearchIndex = {"docs":
-[{"location":"dev/#Developpers","page":"Developpers","title":"Developpers","text":"","category":"section"},{"location":"dev/#Simulation-Workflow","page":"Developpers","title":"Simulation Workflow","text":"","category":"section"},{"location":"dev/","page":"Developpers","title":"Developpers","text":"The flow chart will go here","category":"page"},{"location":"dev/#How-to-Contribute","page":"Developpers","title":"How to Contribute","text":"","category":"section"},{"location":"dev/","page":"Developpers","title":"Developpers","text":"Contributions are welcome! Don't hesitate to contact us if you","category":"page"},{"location":"dev/","page":"Developpers","title":"Developpers","text":"found a bug;\nhave a suggestion on how to improve the code and/or documentation;\nwould like to get involved in writing code and/or documentation.","category":"page"},{"location":"dev/","page":"Developpers","title":"Developpers","text":"You can contact us by raising an issue on Github, or by writing to one of the developpers.","category":"page"},{"location":"theory/#Theoretical-Background","page":"Theoretical Background","title":"Theoretical Background","text":"","category":"section"},{"location":"theory/#Chain-Mapping-of-bosonic-environments","page":"Theoretical Background","title":"Chain-Mapping of bosonic environments","text":"","category":"section"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"We consider, in the Schrödinger picture, a general Hamiltonian where a non-specified system interacts linearly with a bosonic environments","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"beginaligned\n    hatH = hatH_S + int_0^+infty hbaromegahata^dagger_omegahata_omega mathrmdomega + hatA_Sint_0^+inftysqrtJ(omega)left(hata_omega + hata^dagger_omegaright)mathrmdomega\nendaligned","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"where hata_omega (hata^dagger_omega) is a bosonic annihilation (creation) operator for a normal mode of the environment of energy hbaromega, hatA_S is a system operator, and J(omega) = sum_k g_k^2delta(omega - omega_k) is the bath spectral density (SD), defined with the microscopic system-environment coupling strength g_k. The SD quantifies the coupling strengths of the different normal modes of the environment with the system. Any SD that is not flat corresponds to a non-Markovian environment.","category":"page"},{"location":"theory/#Zero-Temperature","page":"Theoretical Background","title":"Zero Temperature","text":"","category":"section"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"Let us consider the Hamiltonian presented in Eq.(1). We can introduce a unitary transformation of the continuous normal modes hata_omega to an infinite discrete set of interacting modes hatb_n[chin_exact_2010].","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"    hata_omega = sum_n=0^+infty U_n(omega)hatb_n = sum_n=0^+infty sqrtJ(omega)P_n(omega)hatb_n ","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"where P_n(omega) are orthonormal polynomials such that","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"    int_0^+inftyP_n(omega)P_m(omega)J(omega)mathrmdomega = delta_nm ","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"and the inverse transformation is","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"    hatb_n = int_0^+infty U_n(omega)hata_omegamathrmdomega ","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"Note that the orthonormality of the polynomials ensures the unitarity of the transformation defined in Eq.(2). The mapping from a continuous set of modes to a (still infinite) discrete set might seem counter-intuitive, however it is a direct consequence of the separability of the underlying Hilbert space.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"Under this transformation, the Hamiltonian in Eq.(1) becomes","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"    hatH= hatH_S + sum_n=0^+inftyvarepsilon_nhatb_n^daggerhatb_n + t_n(hatb_n+1^daggerhatb_n + mathrmhc) + kappahatA_S(hatb_0 + hatb_0^dagger) ","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"Hence, this mapping transforms the normal bath Hamiltonian into a tight-binding Hamiltonian with on-site energies varepsilon_n and hopping energies t_n. Another important consequence of this mapping is that now the system only interacts with the first mode n = 0 of the chain-mapped environment. The chain coefficients varepsilon_n, t_n, and the coupling kappa depend solely on the SD.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"This makes chain mapping a tool of choice for describing systems coupled to environment with highly structured SD (e.g. experimentally measured or calculated ab initio)[chin_role_2013][alvertis_nonequilibrium_2019][dunnett_influence_2021][caycedosoler_exact_2022]. In this new representation, the Hamiltonian in Eq.(5) has naturally a 1D chain topology. This makes its representation as a Matrix Product Operator (MPO) and the representation of the joint {System + Environment} wave-function as a Matrix Product State (MPS) suited [orus_practical_2014][paeckel_timeevolution_2019].","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"The orthogonal polynomial-based chain mapping and the subsequent representation of the joint wave-function as a MPS (and the operators as MPO) are the building blocks of the Time-dependent Density operator with Orthonormal Polynomials Algorithm (TEDOPA) one of the state-of-the-art numerically exact method to simulate the dynamics of open quantum systems especially in the non-Markovian, non-perturbative regimes both at zero and finite temperatures [prior_efficient_2010][woods_simulating_2015][tamascelli_efficient_2019][dunnett_simulating_2021][lacroix_unveiling_2021].","category":"page"},{"location":"theory/#Finite-Temperature","page":"Theoretical Background","title":"Finite Temperature","text":"","category":"section"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"Explain that by extending the bath to negative frequencies and having temperature-dependent system environment couplings, it is possible to describe the finite temperature case as an effective zero temperature one. Hence, we can keep the pure state description and avoid moving to density matrices at the cost of doubling the size of the environment.","category":"page"},{"location":"theory/#Computation-of-the-chain-coefficients","page":"Theoretical Background","title":"Computation of the chain coefficients","text":"","category":"section"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"A useful property of the orthonormal polynomials is that they obey a recurrence relation","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"    P_n(omega) = (C_n-1omega - A_n-1)P_n-1(omega) + B_n-1P_n-2(omega) ","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"where A_n is related to the first moment of P_n, B_n and C_n to the norms of P_n and P_n-1[appel_mathematics_2007]. This recurrence relation can be used to construct the polynomials with the conditions that P_0(omega) = p_0^-1 = left(int_mathbbR^+ J(omega)mathrmdomega right)^-frac12 and P_-1(omega) = 0, with bullet the norm of bullet with respect to the measure J(omega), and P_n(omega) = p_n(omega)p_n^-1 ; where the polynomials p_n_ninmathbbN are the so called monic polynomials where the factor a_n in front of omega^n is equal to 1.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"The energy of the chain mode n is given by varepsilon_n = A_n C_n^-1 and t_n=C_n^-1 is the coupling between mode n and n+1[chin_exact_2010].","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"The system couples only to the first mode with the coupling strength kappa = p_0.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"Explain that for some weight function/SD they are known analytically and that for others we can use the build-in routines inspired by Gautschi or the PolyChaos.jl package.","category":"page"},{"location":"theory/#Tensor-Networks","page":"Theoretical Background","title":"Tensor Networks","text":"","category":"section"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"A multipartite quantum state psirangle, e.g. a N-site system where the sites can each be in a state phi_irangle belonging to a d-dimensional Hilbert space, can be written as follows","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"    psirangle = sum_i_kc_i_1ldots i_Nphi_i_1rangleotimesldotsotimesphi_i_Nrangle ","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"where the complex numbers c_i_1ldots i_N are the amplitudes of each state phi_i_1rangleotimesldotsotimesphi_i_Nrangle whose superpositions form in full generality the state psirangle. Thus the state psirangle can be completely represented by a rank-N tensor c that is the collection of all possible amplitudes c_i_1ldots i_N. Here by the rank of a tensor, we simply mean the number of indices it has.","category":"page"},{"location":"theory/#MPS","page":"Theoretical Background","title":"MPS","text":"","category":"section"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"The tensor c of a quantum state psirangle corresponding to a one-dimensional system can be decomposed into a product of N smaller rank-3 tensors T_k (except for the first and last sites where the tensors will have a rank-2)","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"    c_i_1ldots i_N = sum_alpha T^alpha_1_i_1T^alpha_1alpha_2 _i_2T^alpha_2alpha_3 _i_3ldots T^alpha_N-1_i_N  ","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"In this form, the local tensor T_k contains the information on the quantum state on site k and its relation (especially the entanglement) with the neighbouring sites.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"The decomposition of the tensor of the amplitudes of a quantum state into a product of smaller rank tensors is called a Matrix Product State decomposition.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"The contracted indices alpha_k between the tensors are called virtual indices and carry information about the correlations between bi-partitions of the state at bond k. The number of different values a virtual index can take is called the bond dimension and is denoted D. The free indices i_k associated with local quantum states are called physical indices. Thus, they can take d values (with d the dimension of the local Hilbert space).","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"Any state in the Hilbert space of a one-dimensional many-body system can in principle be represented by a MPS by choosing a sufficiently large value for the bond dimension D \\cite{Orus}. On top of this intellectually satisfying property of MPSs being a dense set of states for a 1d-system, they can also be used as a practical Ansätze for a many-body quantum states by setting a maximal allowed value chi for the bond dimension D. In doing so, we restrict ourselves to a corner of the total Hilbert space. The rationale behind this Ansatz is the following: if the initial quantum state of a many-body system has a low bond dimension (typically if the initial state is a product state with D = 1), then in a finite time it will only be able to explore a region of the Hilbert space that is not to far away from its starting point. Thus, the bond dimension will not have the time to diverge exponentially \\cite{poulinquantum2011}. However, depending on the physical system at hand, this sub-manifold of the Hilbert space could still be \"too large\". There is an additional reason that explains why MPSs are good Ansätze for 1d physical systems. Most many-body Hamiltonians we (physicists) are interested in are local, meaning that the interactions they describe involve objects that are \"neighbours\". For such Hamiltonians, the ground states (outside of potential critical phases) follow the so called area law for the entanglement entropy.\\cite{srednickientropy1993, vidalentanglement2003, wolfarea2008}. This law states that the entanglement entropy S_vN of a bi-partition of the system is proportional, not to the volume of the partition as one might expect, but to the hyper-surface of the partition's boundary; hence the name \"area law\". For a 3d system this corresponds to an actual surface area A, S_vN sim A; for a 2d system it corresponds to the length L of the partition's boundary, S_vN sim L; and in 1d the boundary reduces to a point, thus the entropy will be independent of the size of the system S_vN sim textconstant. The MPSs are states that satisfy this area law.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"An application of the Singular Value Decomposition is to create efficient approximations of quantum states to perform computations. The main idea is to reduce the content of the MPS to keep only the parts that contain the physics of interest. One method to realise this approximation is to do a SVD on each of the tensors of the MPS after each time step of the state time-evolution and to trim the smallest singular values in order to decrease the bond dimension of the MPS down to a chosen maximal value chi. The corresponding columns and rows of the unitary matrices U and V^dagger are also removed. Then, the trimmed matrices tildeU, tildeS and tildeV^dagger are contracted back to give an approximated tensor T with a smaller bond dimension. Another way to apply the restricted rank approximation is to restrict oneself into working in a manifold of fixed bond dimension D and to use methods that can enforce this constraint.","category":"page"},{"location":"theory/#MPO","page":"Theoretical Background","title":"MPO","text":"","category":"section"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"In order to compute expectation values of observables or apply unitary transformations to a quantum state, we need a TN representation of operators. In the same fashion as a one-dimensional quantum state can be represented as a MPS, operators acting on those states can be represented as Matrix Product Operators (MPO). For an operator hatO, its MPO can be defined as follows","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"    hatO = sum_i_ki_k^ w W^i_1 i^_1_1 w_0w_1ldots  W^i_N i^_N_N w_N-1w_N phi_i_1^ldots phi_i_N^ranglelanglephi_i_1ldots phi_i_N ","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"The contracted indices between the tensors are called virtual indices. The free indices are called physical indices and correspond to the different input and output local quantum states.  They can take d values (with d the dimension of the local Hilbert space).","category":"page"},{"location":"theory/#TTN","page":"Theoretical Background","title":"TTN","text":"","category":"section"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"A natural extension to the MPS is the (loop-free) tree tensor network.  A TTN is a generalisation of the MPS wherein each site, instead of being connected to only one other site to its right, may be connected to any arbitrary number of child sites. Provided the tree does not contain any loops, everything that one can do to an MPS/MPO can be extended straight-forwardly to TTN states and TTN operators.  The generalisation to trees introduces no new conceptual complexity (only implementational complexity). The sites of a TTN are usually referred to as nodes.  For our purposes, every node of a TTN state and operator has one parent leg, and any number (including zero) of child legs.  The first node is known as the head-node and has a dummy parent leg with dimension 1.","category":"page"},{"location":"theory/#Time-Dependent-Variational-Principal","page":"Theoretical Background","title":"Time-Dependent Variational Principal","text":"","category":"section"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"The original idea behind TDVP goes back to Dirac \\cite{diracnote1930} and Frenkel \\cite{frenkelwave1934}. The main point, in the modern tensor networks formulation, is that instead of solving the Schrödinger equation and then truncating the MPS representation of the quantum state, one can solve the equations of motion projected into a space of restricted bond dimension \\cite{haegemantime-dependent2011, haegemanunifying2016}.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"The general formulation of the Dirac-Frenkel Variational Principle~\\cite{raabdiracfrenkelmclachlan2000} is that one looks for a solution varphirangle in mathcalM of the Schrödinger equation where mathcalM subset mathcalH is a manifold of the total Hilbert space mathcalH in which we think that the relevant physical states `live'.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"We define T_varphiranglemathcalM the tangent space of mathcalM around the state varphirangle. The criterion to find varphirangle is that for every state chirangle in T_varphiranglemathcalM","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"    langlechileft(fracmathrmdmathrmdt - frac1mathrmihbarhatHright)varphirangle =0 ","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"which can be interpreted as saying that the time evolution procedure should keep varphirangle inside of the manifold mathcalM.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"The term variational in the name of the method comes from the fact that in practice one aims at minimising the right-hand side of Eq.~(\\ref{eq:DiracFrenkel1}) to find varphirangle.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"Introducing hatP_T_varphiranglemathcalM the projector onto the tangent space T_varphiranglemathcalM, we can write the state chirangle = hatP_T_varphiranglemathcalMphirangle with phirangle a state in mathcalH. Leading to","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"    forall phirangle in mathcalH  langlephihatP_T_varphiranglemathcalMleft(fracmathrmdmathrmdt - frac1mathrmihbarhatHright)varphirangle =0 ","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"Because the time derivation and the projector commute, we have","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"    forall phirangle in mathcalH  langlephileft(fracmathrmdmathrmdt - frac1mathrmihbarhatP_T_varphiranglemathcalMhatHright)varphirangle =0 ","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"This equation must be true for any phirangle in mathcalH, Eq.~(\\ref{eq:DiracFrenkel1}) can thus be written","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"    left(fracmathrmdmathrmdt - frac1mathrmihbarhatP_T_varphiranglemathcalMhatHright)varphirangle =0 ","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"In the context of MPS, the manifold mathcalM will correspond to the space of full-ranked MPS of a given bond dimension D, and the tangent space will be the space spanned by variations of single MPS tensors.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"The major advantage of this method is that it naturally preserves the unitarity of the time evolution and conserves the energy.","category":"page"},{"location":"theory/#Bibliography","page":"Theoretical Background","title":"Bibliography","text":"","category":"section"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"[chin_exact_2010]: Chin, A. W.; Rivas, Á.; Huelga, S. F.; Plenio, M. B. Exact Mapping between System-Reservoir Quantum Models and Semi-Infinite Discrete Chains Using Orthogonal Polynomials. Journal of Mathematical Physics 2010, 51 (9), 092109. https://doi.org/10.1063/1.3490188.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"[chin_role_2013]: Chin, A. W.; Prior, J.; Rosenbach, R.; Caycedo-Soler, F.; Huelga, S. F.; Plenio, M. B. The Role of Non-Equilibrium Vibrational Structures in Electronic Coherence and Recoherence in Pigment–Protein Complexes. Nature Phys 2013, 9 (2), 113–118. https://doi.org/10.1038/nphys2515.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"[alvertis_nonequilibrium_2019]: Alvertis, A. M.; Schröder, F. A. Y. N.; Chin, A. W. Non-Equilibrium Relaxation of Hot States in Organic Semiconductors: Impact of Mode-Selective Excitation on Charge Transfer. J. Chem. Phys. 2019, 151 (8), 084104. https://doi.org/10.1063/1.5115239.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"[dunnett_influence_2021]: Dunnett, A. J.; Gowland, D.; Isborn, C. M.; Chin, A. W.; Zuehlsdorff, T. J. Influence of Non-Adiabatic Effects on Linear Absorption Spectra in the Condensed Phase: Methylene Blue. J. Chem. Phys. 2021, 155 (14), 144112. https://doi.org/10.1063/5.0062950.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"[caycedosoler_exact_2022]: Caycedo-Soler, F.; Mattioni, A.; Lim, J.; Renger, T.; Huelga, S. F.; Plenio, M. B. Exact Simulation of Pigment-Protein Complexes Unveils Vibronic Renormalization of Electronic Parameters in Ultrafast Spectroscopy. Nat Commun 2022, 13 (1), 2912. https://doi.org/10.1038/s41467-022-30565-4.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"[orus_practical_2014]: Orus, R. A Practical Introduction to Tensor Networks: Matrix Product States and Projected Entangled Pair States. Annals of Physics 2014, 349, 117–158. https://doi.org/10.1016/j.aop.2014.06.013.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"[paeckel_timeevolution_2019]: Paeckel, S.; Köhler, T.; Swoboda, A.; Manmana, S. R.; Schollwöck, U.; Hubig, C. Time-Evolution Methods for Matrix-Product States. Annals of Physics 2019, 411, 167998. https://doi.org/10.1016/j.aop.2019.167998.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"[prior_efficient_2010]: Prior, J.; Chin, A. W.; Huelga, S. F.; Plenio, M. B. Efficient Simulation of Strong System-Environment Interactions. Phys. Rev. Lett. 2010, 105 (5), 050404. https://doi.org/10.1103/PhysRevLett.105.050404.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"[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.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"[tamascelli_efficient_2019]: Tamascelli, D.; Smirne, A.; Lim, J.; Huelga, S. F.; Plenio, M. B. Efficient Simulation of Finite-Temperature Open Quantum Systems. Phys. Rev. Lett. 2019, 123 (9), 090402. https://doi.org/10.1103/PhysRevLett.123.090402.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"[dunnett_simulating_2021]: Dunnett, A. J.; Chin, A. W. Simulating Quantum Vibronic Dynamics at Finite Temperatures With Many Body Wave Functions at 0 K. Front. Chem. 2021, 8. https://doi.org/10.3389/fchem.2020.600731.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"[lacroix_unveiling_2021]: Lacroix, T.; Dunnett, A.; Gribben, D.; Lovett, B. W.; Chin, A. Unveiling Non-Markovian Spacetime Signaling in Open Quantum Systems with Long-Range Tensor Network Dynamics. Phys. Rev. A 2021, 104 (5), 052204. https://doi.org/10.1103/PhysRevA.104.052204.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"[appel_mathematics_2007]: Appel, W. Mathematics for Physics and Physicists; Princeton University Press, 2007.","category":"page"},{"location":"user-guide/#User-Guide","page":"User Guide","title":"User Guide","text":"","category":"section"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"Here we explain the different steps to perform a simulation.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"Examples with detailed explanations can be found in Examples.","category":"page"},{"location":"user-guide/#Initial-State","page":"User Guide","title":"Initial State","text":"","category":"section"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"The initial many-body state of the {System + Environment} can be described easily as Matrix Product States (MPS) or Tree Tensor Networks (TTN) state (e.g. when a system is coupled to several environments).","category":"page"},{"location":"user-guide/#Matrix-Product-States","page":"User Guide","title":"Matrix Product States","text":"","category":"section"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"A MPS can be initialized with several methods.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"The productstatemps method enables  to instantiate arbitrary MPS of fixed uniform bond dimension with non-uniform physical dimensions. The individual states of the MPS sites can be provided by setting state to a list of column vectors.  Setting state=:Vacuum will produce an MPS in the vacuum state.  Setting state=:FullOccupy will produce an MPS in which each site is fully occupied. The gauge of the MPS can also be set using a keyword argument.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"julia> ψ = unitcol(1,2) # system initial state\n\njulia> d = 6; N = 30; α = 0.1; Δ = 0.0; ω0 = 0.2; s = 1 \n\njulia> cpars = chaincoeffs_ohmic(N, α, s) # chain coefficient for an Ohmic spectral density\n\njulia> H = spinbosonmpo(ω0, Δ, d, N, cpars)\n\njulia> A = productstatemps(physdims(H), state=[ψ, fill(unitcol(1,d), N)...]) # MPS representation of |ψ>|Vacuum>","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"Alternatively, a chain with a specified number of excitation localised on one site, or delocalized accross several sites can be generated with MPSDynamics.chainmps.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"Random MPS can also be generated with the randmps method.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"For the case of fermionic states (which need to be anti-symmetrized), the MPSDynamics.electronkmps method generate an MPS for an electron with momentum k, and the MPSDynamics.electron2kmps generate an MPS with 2 electrons in k-states k1 and k2.","category":"page"},{"location":"user-guide/#Tree-Tensor-Networks","page":"User Guide","title":"Tree Tensor Networks","text":"","category":"section"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"Write a quick explanation of the how trees are structured: parents, child, nodes; and that most methods to initialize a MPS are overloaded for TreeNetwork. ","category":"page"},{"location":"user-guide/#Hamiltonian","page":"User Guide","title":"Hamiltonian","text":"","category":"section"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"In order to perform time evolution and have access to the dynamics of the many-body state a Hamiltonian needs to be specified in the form of a Matrix Product Operator (MPO) of as a tree tensor network. Either way, this can be done by using a Build-in Hamiltonian, Convert a MPO from ITensor, or creating a Tailored MPO.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"In the context of Open Quantum Systems, custom chain coefficients for the environment can be generated for finite temperature simulations, and/or user provided spectral densities (SDs).","category":"page"},{"location":"user-guide/#Build-in-Hamiltonian","page":"User Guide","title":"Build-in Hamiltonian","text":"","category":"section"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"MPSDynamics provides several topical Hamiltonians directly in the form of MPO or Tree Tensor Networks such as the Ising model MPSDynamics.isingmpo, the XYZ Hamiltonian MPSDynamics.xyzmpo, the Spin Boson Model MPSDynamics.spinbosonmpo, a spin coupled to two bosonic baths MPSDynamics.twobathspinmpo, nearest neighbour interactions Hamiltonian MPSDynamics.nearestneighbourmpo, the independent boson model MPSDynamics.ibmmpo, (non-)uniform tight-binding chain Hamiltonian MPSDynamics.tightbindingmpo.","category":"page"},{"location":"user-guide/#Convert-a-MPO-from-ITensor","page":"User Guide","title":"Convert a MPO from ITensor","text":"","category":"section"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"The method MPSDynamics.MPOtoVector converts an ITensors chain MPO into a form compatible with MPSDynamics.","category":"page"},{"location":"user-guide/#Tailored-MPO","page":"User Guide","title":"Tailored MPO","text":"","category":"section"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"One can also construct MPO tailored to the problem one is interested in. MPOs are fundamentally a lists of rank-4 tensors such that the right bond dimension of the nth tensor must be equal to the left bond dimension of the n+1th tensor; and the dimension of the physical bonds of the nth tensor must be equal to the corresponding physical bond on the MPS.","category":"page"},{"location":"user-guide/#Finite-Temperature-and-Custom-SD","page":"User Guide","title":"Finite Temperature and Custom SD","text":"","category":"section"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"In the T-TEDOPA framework (see Theoretical Background for more details) finite temperature simulations are done with an effective pure state description of the system and the environment where the coupling coefficients (or the SD) is temperature-dependent.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"The corresponding chain coefficients for an Ohmic or a user provided spectral density (that can thus in pratice be either at zero or finite temperature) are computed with the [chaincoeffs_finiteT](@ref). This method is based on the ORTHOPOL routines[Gautschi]","category":"page"},{"location":"user-guide/#Observables","page":"User Guide","title":"Observables","text":"","category":"section"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"System and environment observables can be computed, as well as system-and-environment 'non-local' observables.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"Observables that will be passed to MPSDynamics.runsim(@ref) to have their expectation value computated at each time step are defined with the OneSiteObservable and [TwoSiteObservable](@ref).","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"One-site and two-site obsevables work similarly, they need to be given a name, an (pair of) operator(s) and the (list of) site(s) on which they are evaluated.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"For instance one can calculated the average number of excitation in each of the N environmental modes","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"    ob = OneSiteObservable(\"chain mode occupation\", numb(d), (2,N+1))","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"It is also possible to measure composite system/environment observables, for example","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"    ob = TwoSiteObservable(\"SXdisp\", sx, disp(d), [1], collect(2:N+1))","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"which measure the correlation between the spin in the x-direction and the displacement of the bath modes.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"Purely environmental 'non-local' observables such as ","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"    ob = TwoSiteObservable(\"bath coherence\", crea(d), anih(d), collect(2:N+1), collect(2:N+1))","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"that computes all the chain mode coherences langlehata_n^daggerhata_mrangle (and the chain mode occupation when n = m).","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"We note that if one knows the coherences and populations of all the chain modes, it is then possible to reconstruct the populations of the normal mode environment.","category":"page"},{"location":"user-guide/#Time-Evolution","page":"User Guide","title":"Time-Evolution","text":"","category":"section"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"Explain that we do TDVP.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"A simulation is runned by the MPSDynamics.runsim(@ref) function.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"Local one-site and two-site observables, as well as non-local two-site observables, can be efficiently computed for each time-step of the time-evolution.","category":"page"},{"location":"user-guide/#One-site-TDVP","page":"User Guide","title":"One-site TDVP","text":"","category":"section"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"Fixed bond dimension, complexity XXX, preserves unitarity.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"The convergence parameter is the bond dimension.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"Is set in MPSDynamics.runsim(@ref) usind the key word argument method=:TDVP1","category":"page"},{"location":"user-guide/#Two-Site-TDVP","page":"User Guide","title":"Two-Site TDVP","text":"","category":"section"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"Varying bond dimension, complexity higher than 1TDVP, but breaks unitarity because of a SVD.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"The convergence parameter is the threshold of the SVD.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"Is set in MPSDynamics.runsim(@ref) usind the key word argument method=:TDVP2","category":"page"},{"location":"user-guide/#Adaptive-One-Site-TDVP","page":"User Guide","title":"Adaptive One-Site TDVP","text":"","category":"section"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"Keeps the good scaling of the 1TDVP, preserves unitarity but is able to increase the bond dimendion.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"The convergence parameter is a threshold value for the rate of change of the projection error with respect to the bond dimension.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"Is set in MPSDynamics.runsim(@ref) usind the key word argument method=:DTDVP","category":"page"},{"location":"user-guide/#Data-Storage","page":"User Guide","title":"Data Storage","text":"","category":"section"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"The data (i.e. observables time-series) is stored in the JLD format which is based on HDF5.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"The HDF5 format is natively supported across many platforms and languages (e.g. Python, or Mathematica).","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"For the data to be saved to a file after a run, the keyword argument save=true needs to be used in runsim.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"The directory where the data should be saved can be chosen by setting a path with the savedir keyword argument.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"A plot keyword argument can also be used to choose whether plots for 1D observables will be automatically generated and saved along with the data. ","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"Loading the data in Julia using the JLD.jl package will recover the full type information of the Julia variables that were stored.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"julia> using JLD\n\njulia> dat = load(\"filename.jld\")\nDict{String, Any} with 2 entries:\n  \"parameters\" => Dict{String, Any}(\"tmax\"=>0.2, \"method\"=>:DTDVP, \"dt\"=>0.0005…\n  \"data\"       => Dict{String, Any}(\"bonddims\"=>[1 1 … 1 1; 1 2 … 2 2; … ; 1 1 …","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"If the data is loaded in an variable dat the structure is the folowing:","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"the parameters entry contains a dictionary where all the simulation parameters are stored\nthe data entry contains a dictionary where are stored simulation time, the observables and (whenever relevent) the bond dimension of the state at each time steps. ","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"julia> dat[\"parameters\"]\nDict{String, Any} with 11 entries:\n  \"tmax\"       => 0.2\n  \"method\"     => :DTDVP\n  \"dt\"         => 0.0005\n  \"name\"       => \"my model\"\n  \"Δ\"          => 0.0\n  \"β\"          => 0.0186854\n  \"N\"          => 300.0\n  \"d\"          => 15.0\n  \"unid\"       => \"Ovzm6\"\n  \"ω0\"         => 0.0\n  \"convparams\" => 0.0005\n\njulia> dat[\"data\"]\nDict{String, Any} with 6 entries:\n  \"bonddims\" => [1 1 … 1 1; 1 2 … 2 2; … ; 1 1 … 7 7; 1 1 … 1 1]\n  \"sx\"       => [1.0, 0.912818, 0.741759, 0.605797, 0.528792, 0.492497, 0.47976…\n  \"sz\"       => [0.0, 0.0871825, 0.25824, 0.394201, 0.471207, 0.507503, 0.52023…\n  \"nchain\"   => [0.0 0.23466 … 1.84319 1.76098; 0.0 0.00231507 … 0.83105 0.9033…\n  \"sy\"       => [0.0, -0.0133489, -0.0588887, -0.0858181, -0.0759996, -0.048539…\n  \"times\"    => [0.0, 0.0005, 0.001, 0.0015, 0.002, 0.0025, 0.003, 0.0035, 0.00…\n","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"[Gautschi]: Gautschi, W. Algorithm 726: ORTHPOL–a package of routines for generating orthogonal polynomials and Gauss-type quadrature rules. ACM Trans. Math. Softw. 20, 21–62 (1994).","category":"page"},{"location":"examples/puredephasing/#Pure-Dephasing","page":"Pure-Dephasing","title":"Pure-Dephasing","text":"","category":"section"},{"location":"examples/puredephasing/#Zero-Temperature","page":"Pure-Dephasing","title":"Zero Temperature","text":"","category":"section"},{"location":"examples/puredephasing/#Finite-Temperature","page":"Pure-Dephasing","title":"Finite Temperature","text":"","category":"section"},{"location":"examples/sbm/#The-Spin-Boson-Model","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"","category":"section"},{"location":"examples/sbm/#Context","page":"The Spin-Boson Model","title":"Context","text":"","category":"section"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"The Spin-Boson Model (SBM) is a prototypical model in the theory of open quantum systems where a two level system interacts linearly with a bosonic bath","category":"page"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"\thatH = fracomega_02hatsigma_z + Deltahatsigma_y + int_0^+inftyomega hata^dagger_omegahata_omega mathrmdomega + hatsigma_xint_0^+inftysqrtJ(omega)(hata_omegahata^dagger_omega)mathrmdomega","category":"page"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"Even though this model is fairly simple it is physically very rich and it is not analytically solvable. For these reason it has become a test-bed for numerical methods simulating open quantum systems dynamics in the non-perturbative non-Markovian regime.","category":"page"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"For instance when the SD is Ohmic, this model presents a phase transition between a so called localised and a delocalised phase for alpha approx 12.","category":"page"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"Here we break out and comment the script in MPSDynamics/examples/sbm_zero_temperature.jl to show how to simulate this model with an Ohmic SD (hard cut-off) using the T-TEDOPA method as implemented in MPSDynamics.jl.","category":"page"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"The T-TEDOPA method relies on a truncated chain mapping that transform the initial Hamiltonian into","category":"page"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"\thatH = fracomega_02 hatsigma_z + Delta hatsigma_x + c_0 hatsigma_x(hatb_0^dagger + hatb_0) + sum_i=0^N-1 t_i (hatb_i+1^dagger hatb_i + mathrmhc) + sum_i=0^N-1 epsilon_i hatb_i^dagger hatb_i ","category":"page"},{"location":"examples/sbm/#The-code","page":"The Spin-Boson Model","title":"The code","text":"","category":"section"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"First a multi-line comment introduces the model and the aim of the script.","category":"page"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"#=\n    Example of a zero-temperature Spin-Boson Model with an hard cut-off Ohmic spectral density J(ω) = 2αω when ω < ωc and 0 otherwise\n\n    The dynamics is simulated using the T-TEDOPA method that maps the normal modes environment into a non-uniform tight-binding chain.\n\n    H = \\\\frac{ω_0}{2} σ_z + Δ σ_x + c_0 σ_x(b_0^\\\\dagger + b_0) + \\\\sum_{i=0}^{N-1} t_i (b_{i+1}^\\\\dagger b_i +h.c.) + \\\\sum_{i=0}^{N-1} ϵ_i b_i^\\\\dagger b_i \n\n    Two variants of the one-site Time Dependent Variational Principal (TDVP) are presented for the time evolution of the quantum state.\n=#","category":"page"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"We load the MPSdynamics.jl package to be able to perform the simulation, the Plots.jl one to plot the results, and the LaTeXStrings.jl one to be able to use LaTeX in the plots.","category":"page"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"using MPSDynamics, Plots, LaTeXStrings","category":"page"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"We then define variables for the physical parameters of the symulation. Among these, two are convergence parameters:","category":"page"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"d is the number of states we retain for the truncated harmonic oscillators representation of environmental modes \nN is the number of chain (environmental) modes we keep. This parameters determines the maximum simulation time of the simulation: indeed excitations that arrive at the end of the chain are reflected towards the system and can lead to unphysical results","category":"page"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"#----------------------------\n# Physical parameters\n#----------------------------\n\nd = 6 # number of Fock states of the chain modes\n\nN = 30 # length of the chain\n\nα = 0.1 # coupling strength\n\nΔ = 0.0 # tunneling \n\nω0 = 0.2 # TLS gap\n\ns = 1 # ohmicity\n\ncpars = chaincoeffs_ohmic(N, α, s) # chain parameters, i.e. on-site energies ϵ_i, hopping energies t_i, and system-chain coupling c_0","category":"page"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"We set the simulation parameters and choose a time evolution method. As always for simulations of dynamics, the time step must be chosen wisely. The error of the TDVP methods is mathcalO(dt^3). In this example we present two one-site implementation of TDVP that both preserves the unitarity of the evolution:","category":"page"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"the regular one-site method with the keyword :TDVP1 where all the virtual bonds of the MPS have the same bond dimension D\nthe adaptive method with the keyword :DTDVP where the bond dimension is locally increased at each time step if the TDVP projection error crosses a threshold value","category":"page"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"Logically the constant bond dimension of the MPS for TDVP1 and the threshold of the projection error for DTDVP are their respective convergence parameter. ","category":"page"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"#-----------------------\n# Simulation parameters\n#-----------------------\n\ndt = 0.5 # time step\n\ntfinal = 30.0 # simulation time\n\nmethod = :TDVP1 # Regular one-site TDVP (fixed bond dimension)\n\n# method = :DTDVP # Adaptive one-site TDVP (dynamically updating bond dimension)\n\nconvparams = [2,4,6] # MPS bond dimension (1TDVP)\n\n# convparams = [1e-2, 1e-3, 1e-4] # threshold value of the projection error (DTDVP)","category":"page"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"Using MPSDynamics.jl built-in methods we define the SBM MPO and the MPS representing the initial state. This initial state is a product state between the system and the chain. It is constructed using a list of the 'local state' of each site of the MPS, and the dimensions of the physical legs of the MPS are set to be the same as the ones dof the MPO.","category":"page"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"#---------------------------\n# MPO and initial state MPS\n#---------------------------\n\nH = spinbosonmpo(ω0, Δ, d, N, cpars) # MPO representation of the Hamiltonian\n\nψ = unitcol(1,2) # Initial up-z system state \n\nA = productstatemps(physdims(H), state=[ψ, fill(unitcol(1,d), N)...]) # MPS representation of |ψ>|Vacuum>","category":"page"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"#---------------------------\n# Definition of observables\n#---------------------------\n\nob1 = OneSiteObservable(\"sz\", sz, 1)\n\nob2 = OneSiteObservable(\"chain mode occupation\", numb(d), (2,N+1))\n\nob3 = TwoSiteObservable(\"SXdisp\", sx, disp(d), [1], collect(2:N+1))","category":"page"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"#-------------\n# Simulation\n#------------\n\nA, dat = runsim(dt, tfinal, A, H;\n                name = \"ohmic spin boson model\",\n                method = method,\n                obs = [ob2,ob3],\n                convobs = [ob1],\n                params = @LogParams(N, d, α, Δ, ω0, s),\n                convparams = convparams,\n                verbose = false,\n                savebonddims = true, # this keyword argument enables the bond dimension at each time step to be saved when using DTDVP\n                save = true,\n                plot = true,\n                );","category":"page"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"#----------\n# Plots\n#----------\n\nmethod == :TDVP1 && plot(dat[\"data/times\"], dat[\"convdata/sz\"], label=[\"Dmax = 2\" \"Dmax = 4\" \"Dmax = 6\"], xlabel=L\"t\",ylabel=L\"\\sigma_z\")\n\nmethod == :DTDVP && plot(dat[\"data/times\"], dat[\"convdata/sz\"], label=[\"p = 1e-2\" \"p = 1e-3\" \"p = 1e-4\"], xlabel=L\"t\",ylabel=L\"\\sigma_z\") \n\nmethod == :DTDVP && heatmap(dat[\"data/times\"], collect(0:N+1), dat[\"data/bonddims\"], xlabel=L\"t\",ylabel=\"bond index\")\n\nheatmap(dat[\"data/times\"], collect(1:N), abs.(dat[\"data/SXdisp\"][1,:,:]), xlabel=L\"t\",ylabel=\"chain mode\")","category":"page"},{"location":"methods/#List-of-all-methods","page":"Methods","title":"List of all methods","text":"","category":"section"},{"location":"methods/","page":"Methods","title":"Methods","text":"Modules = [MPSDynamics]","category":"page"},{"location":"methods/#MPSDynamics.OneSiteObservable-Tuple{Any, Any, Any}","page":"Methods","title":"MPSDynamics.OneSiteObservable","text":"OneSiteObservable(name,op,sites)\n\nComputes the local expectation value of the one-site operator op on the specified sites. Used to define one-site observables that are obs and convobs parameters for the runsim function.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.MPOtoVector-Tuple{ITensors.MPO}","page":"Methods","title":"MPSDynamics.MPOtoVector","text":"MPOtoVector(mpo::MPO)\n\nConvert an ITensors chain MPO into a form compatible with MPSDynamics\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.addchild!-Tuple{MPSDynamics.Tree, Int64}","page":"Methods","title":"MPSDynamics.addchild!","text":"addchild!(tree::Tree, id::Int)\n\nAdd child to node id of tree.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.addchildren!-Tuple{MPSDynamics.Tree, Int64, Int64}","page":"Methods","title":"MPSDynamics.addchildren!","text":"addchildren!(tree::Tree, id::Int, n::Int)\n\nAdd n children to node id of tree.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.chaincoeffs_ohmic-Tuple{Any, Any, Any}","page":"Methods","title":"MPSDynamics.chaincoeffs_ohmic","text":"chaincoeffs_ohmic(N, α, s; ωc=1, soft=false)\n\nGenerate chain coefficients ϵ_0ϵ_1t_0t_1c_0 for an Harmonic bath at zero temperature with a power law spectral density given by:\n\nsoft cutoff: J(ω) = 2παω_c (fracωω_c)^s exp(-ωω_c) \n\nhard cutoff: J(ω) = 2παω_c (fracωω_c)^s θ(ω-ω_c)\n\nThe coefficients parameterise the chain Hamiltonian\n\nH = H_S + c_0 A_SB_0+sum_i=0^N-1t_i (b_i+1^dagger b_i +hc) + sum_i=0^N ϵ_ib_i^dagger b_i\n\nwhich is unitarily equivalent (before the truncation to N sites) to\n\nH = H_S + A_Sint_0^dωsqrtfracJ(ω)πB_ω + int_0^dωωb_ω^dagger b_ω\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.chainmps-Tuple{Int64, Int64, Int64}","page":"Methods","title":"MPSDynamics.chainmps","text":"chainmps(N::Int, site::Int, numex::Int)\n\nGenerate an MPS with numex excitations on site\n\nThe returned MPS will have bond-dimensions and physical dimensions numex+1\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.chainmps-Tuple{Int64, Vector{Int64}, Int64}","page":"Methods","title":"MPSDynamics.chainmps","text":"chainmps(N::Int, sites::Vector{Int}, numex::Int)\n\nGenerate an MPS with numex excitations of an equal super-position over sites\n\nThe returned MPS will have bond-dimensions and physical dimensions numex+1\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.chainprop-Tuple{Any, Any}","page":"Methods","title":"MPSDynamics.chainprop","text":"chainprop(t, cparams...)\n\nPropagate an excitation placed initially on the first site of a tight-binding chain with parameters given by cparams for a time t and return occupation expectation for each site.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.dynamap-NTuple{4, Any}","page":"Methods","title":"MPSDynamics.dynamap","text":"dynamap(ps1,ps2,ps3,ps4)\n\nCalulate complete dynamical map to time step at which ps1, ps2, ps3 and ps4 are specified.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.electron2kmps","page":"Methods","title":"MPSDynamics.electron2kmps","text":"electronkmps(N::Int, k::Vector{Int}, spin=:Up, chainparams=[fill(1.0,N), fill(1.0,N-1)])\n\nGenerate an MPS with 2 electrons in k-states k1 and k2.\n\n\n\n\n\n","category":"function"},{"location":"methods/#MPSDynamics.electronkmps","page":"Methods","title":"MPSDynamics.electronkmps","text":"electronkmps(N::Int, k::Int, spin=:Up, chainparams=[fill(1.0,N), fill(1.0,N-1)])\n\nGenerate an MPS for an electron with momentum k.\n\n\n\n\n\n","category":"function"},{"location":"methods/#MPSDynamics.elementmpo-Tuple{Any, Vararg{Any}}","page":"Methods","title":"MPSDynamics.elementmpo","text":"elementmpo(M, el...)\n\nReturn the element of the MPO M for the set of physical states el...\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.elementmps-Tuple{Any, Vararg{Any}}","page":"Methods","title":"MPSDynamics.elementmps","text":"elementmps(A, el...)\n\nReturn the element of the MPS A for the set of physical states el...\n\nExamples\n\njulia> A = chainmps(6, [2,4], 1);\n\njulia> elementmps(A, 1, 2, 1, 1, 1, 1)\n0.7071067811865475\n\njulia> elementmps(A, 1, 1, 1, 2, 1, 1)\n0.7071067811865475\n\njulia> elementmps(A, 1, 2, 1, 2, 1, 1)\n0.0\n\njulia> elementmps(A, 1, 1, 1, 1, 1, 1)\n0.0\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.entanglemententropy-Tuple{Any}","page":"Methods","title":"MPSDynamics.entanglemententropy","text":"entanglemententropy(A)\n\nFor a list of tensors A representing a right orthonormalized MPS, compute the entanglement entropy for a bipartite cut for every bond.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.findchainlength-Tuple{Any, Any}","page":"Methods","title":"MPSDynamics.findchainlength","text":"findchainlength(T, cparams...; eps=10^-6)\n\nEstimate length of chain required for a particular set of chain parameters by calculating how long an excitation on the first site takes to reach the end. The chain length is given as the length required for the excitation to have just reached the last site after time T. The initial number of sites in cparams has to be larger than the findchainlength result.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.findchild-Tuple{MPSDynamics.TreeNode, Int64}","page":"Methods","title":"MPSDynamics.findchild","text":"findchild(node::TreeNode, id::Int)\n\nReturn integer corresponding to the which number child site id is of node.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.hbathchain-Tuple{Int64, Int64, Any, Vararg{Any}}","page":"Methods","title":"MPSDynamics.hbathchain","text":"hbathchain(N::Int, d::Int, chainparams, longrangecc...; tree=false, reverse=false, coupletox=false)\n\nGenerate MPO representing a tight-binding chain of N oscillators with d Fock states each. Chain parameters are supplied in the standard form: chainparams =ϵ_0ϵ_1t_0t_1c_0. The output does not itself represent a complete MPO but will possess an end which is open and should be attached to another tensor site, usually representing the system.\n\nArguments\n\nreverse: If reverse=true create a chain were the last (i.e. Nth) site is the site which couples to the system\ncoupletox: Used to choose the form of the system coupling. coupletox=true gives a non-number conserving coupling of the form H_textI= A_textS(b_0^dagger + b_0) where A_textS is a system operator, while coupletox=false gives the number-converving coupling H_textI=(A_textS b_0^dagger + A_textS^dagger b_0)\ntree: If true the resulting chain will be of type TreeNetwork; useful for construcing tree-MPOs \n\nExample\n\nOne can constuct a system site tensor to couple to a chain by using the function up to populate the tensor. For example, to construct a system site with Hamiltonian Hs and coupling operator As, the system tensor M is constructed as follows for a non-number conserving interaction:\n\nu = one(Hs) # system identity\nM = zeros(1,3,2,2)\nM[1, :, :, :] = up(Hs, As, u)\n\nThe full MPO can then be constructed with:\n\nHmpo = [M, hbathchain(N, d, chainparams, coupletox=true)...]\n\nSimilarly for a number conserving interaction the site tensor would look like:\n\nu = one(Hs) # system identity\nM = zeros(1,4,2,2)\nM[1, :, :, :] = up(Hs, As, As', u)\n\nAnd the full MPO would be\n\nHmpo = [M, hbathchain(N, d, chainparams; coupletox=false)...]\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.heisenbergmpo","page":"Methods","title":"MPSDynamics.heisenbergmpo","text":"heisenbergmpo(N::Int, J=1.0) = xyzmpo(N; Jx=J)\n\nGenerate MPO for the N-spin Heisenberg XXX model, defined by the Hamiltonian\n\nH = sum_n=1^N-1 -J σ_x^n σ_x^n+1 - J σ_y^n σ_y^n+1 - J σ_z^n σ_z^n+1\n\nwith σ_x^n σ_y^n σ_z^n the Pauli spin-1/2 matrices of the n^textth site.\n\n\n\n\n\n","category":"function"},{"location":"methods/#MPSDynamics.ibmmpo-NTuple{4, Any}","page":"Methods","title":"MPSDynamics.ibmmpo","text":"ibmmpo(ω0, d, N, chainparams; tree=false)\n\nGenerate MPO for a spin-1/2 coupled to a chain of harmonic oscillators with the interacting boson model (IBM), defined by the Hamiltonian\n\nH = fracω_02σ_z +  c_0σ_z(b_0^dagger+b_0) + sum_i=0^N-1 t_i (b_i+1^dagger b_i +hc) + sum_i=0^N ϵ_ib_i^dagger b_i.\n\nThe spin is on site 1 of the MPS and the bath modes are to the right.\n\nThis Hamiltonain is unitarily equivalent (before the truncation to N sites) to the spin-boson Hamiltonian defined by\n\nH =  fracω_02σ_z + σ_zint_0^ dωsqrtfracJ(ω)π(b_ω^dagger+b_ω) + int_0^ dω ωb_ω^dagger b_ω.\n\nThe chain parameters, supplied by chainparams=ϵ_0ϵ_1t_0t_1c_0, can be chosen to represent any arbitrary spectral density J(ω) at any temperature.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.isingmpo-Tuple{Int64}","page":"Methods","title":"MPSDynamics.isingmpo","text":"isingmpo(N; J=1.0, h=1.0)\n\nGenerate MPO for the N-spin 1D Ising model with external field vech = (00h), defined by the Hamiltonian\n\nH = sum_n=1^N-1 -J_x σ_x^n σ_x^n+1 + sum_n=1^N(- h_z σ_z^n)\n\nwith σ_x^n σ_y^n σ_z^n the Pauli spin-1/2 matrices of the n^textth site.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.longrange_isingmpo","page":"Methods","title":"MPSDynamics.longrange_isingmpo","text":"longrange_isingmpo(N::Int, α::Float64=0.; J=1.0, h=1.0) = longrange_xyzmpo(N, α; Jx=J, Jy=0., Jz=0., hz=h, hx=0.)\n\n\n\n\n\n","category":"function"},{"location":"methods/#MPSDynamics.longrange_xyzmpo","page":"Methods","title":"MPSDynamics.longrange_xyzmpo","text":"longrange_xyzmpo(N::Int, α::Float64=0.; Jx=1.0, Jy=Jx, Jz=Jx, hx=0., hz=0.)\n\nGennerate MPO for the N-spin long-range XYZ model with external field vech=(h_x 0 h_z), , defined by the Hamiltonian\n\n\n\n\n\n","category":"function"},{"location":"methods/#MPSDynamics.measure-Tuple{Any, OneSiteObservable}","page":"Methods","title":"MPSDynamics.measure","text":"measure(A, O; kwargs...)\n\nMeasure observable O on mps state A\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.measure1siteoperator-Tuple{Vector, Any, Vector{Int64}}","page":"Methods","title":"MPSDynamics.measure1siteoperator","text":"measure1siteoperator(A::Vector, O, sites::Vector{Int})\n\nFor a list of tensors A representing a right orthonormalized MPS, compute the local expectation value of a one-site operator O for every site or just one if it is specified.\n\nFor calculating operators on single sites this will be more efficient if the site is on the left of the mps.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.measure1siteoperator-Tuple{Vector, Any}","page":"Methods","title":"MPSDynamics.measure1siteoperator","text":"measure1siteoperator(A::Vector, O)\n\nFor a list of tensors A representing a right orthonormalized MPS, compute the local expectation value of a one-site operator O for every site.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.measure2siteoperator-Tuple{Vector, Any, Any, Int64, Int64}","page":"Methods","title":"MPSDynamics.measure2siteoperator","text":" measure2siteoperator(A::Vector, M1, M2, j1, j2)\n\nCaculate expectation of M1*M2 where M1 acts on site j1 and M2 acts on site j2, assumes A is right normalised.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.modemps","page":"Methods","title":"MPSDynamics.modemps","text":"modemps(N::Int, k::Vector{Int}, numex::Int, chainparams=[fill(1.0,N), fill(1.0,N-1)])\n\nGenerate an MPS with numex excitations of an equal superposition of modes k of a bosonic tight-binding chain.\n\n\n\n\n\n","category":"function"},{"location":"methods/#MPSDynamics.modemps-2","page":"Methods","title":"MPSDynamics.modemps","text":"modemps(N::Int, k::Int, numex::Int, chainparams=[fill(1.0,N), fill(1.0,N-1)])\n\nGenerate an MPS with numex excitations of mode k of a bosonic tight-binding chain. \n\nchainparams takes the form [e::Vector, t::Vector] where e are the on-site energies and t are the hoppping parameters.\n\nThe returned MPS will have bond-dimensions and physical dimensions numex+1\n\n\n\n\n\n","category":"function"},{"location":"methods/#MPSDynamics.mpsembed!-Tuple{Vector, Int64}","page":"Methods","title":"MPSDynamics.mpsembed!","text":"mpsembed(A::Vector, Dmax::Int)\n\nEmbed MPS A in manifold of max bond-dimension Dmax\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.mpsleftnorm!","page":"Methods","title":"MPSDynamics.mpsleftnorm!","text":"mpsleftnorm!(A::Vector, jq::Int=length(A))\n\nLeft orthoganalise MPS A up to site jq.\n\n\n\n\n\n","category":"function"},{"location":"methods/#MPSDynamics.mpsmixednorm!-Tuple{MPSDynamics.TreeNetwork, Int64}","page":"Methods","title":"MPSDynamics.mpsmixednorm!","text":"mpsmixednorm!(A::TreeNetwork, id::Int)\n\nNormalise tree-MPS A such that orthogonality centre is on site id.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.mpsmixednorm!-Tuple{Vector, Int64}","page":"Methods","title":"MPSDynamics.mpsmixednorm!","text":"mpsmixednorm!(A::Vector, OC::Int)\n\nPut MPS A into mixed canonical form with orthogonality centre on site OC.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.mpsmoveoc!-Tuple{MPSDynamics.TreeNetwork, Int64}","page":"Methods","title":"MPSDynamics.mpsmoveoc!","text":"mpsmoveoc!(A::TreeNetwork, id::Int)\n\nMove the orthogonality centre of right normalised tree-MPS A to site id.\n\nThis function will be more efficient than using mpsmixednorm! if the tree-MPS is already right-normalised.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.mpsrightnorm!","page":"Methods","title":"MPSDynamics.mpsrightnorm!","text":"mpsrightnorm!(A::Vector, jq::Int=1)\n\nRight orthoganalise MPS A up to site jq.\n\n\n\n\n\n","category":"function"},{"location":"methods/#MPSDynamics.mpsrightnorm!-Tuple{MPSDynamics.TreeNetwork}","page":"Methods","title":"MPSDynamics.mpsrightnorm!","text":"mpsrightnorm!(A::TreeNetwork)\n\nWhen applied to a tree-MPS, right normalise towards head-node.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.mpsshiftoc!-Tuple{MPSDynamics.TreeNetwork, Int64}","page":"Methods","title":"MPSDynamics.mpsshiftoc!","text":"mpsshiftoc!(A::TreeNetwork, newhd::Int)\n\nShift the orthogonality centre by one site, setting new head-node newhd.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.multiply-Tuple{Vector, Vector}","page":"Methods","title":"MPSDynamics.multiply","text":"multiply(M1::Vector, M2::Vector)\n\nCalculates M1*M2 where M1 and M2 are MPOs\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.nearestneighbourmpo","page":"Methods","title":"MPSDynamics.nearestneighbourmpo","text":"nearestneighbourmpo(N::Int, h0, A, Ad = A')\n\n\n\n\n\n","category":"function"},{"location":"methods/#MPSDynamics.nearestneighbourmpo-2","page":"Methods","title":"MPSDynamics.nearestneighbourmpo","text":"nearestneighbourmpo(tree_::Tree, h0, A, Ad = A')\n\n\n\n\n\n","category":"function"},{"location":"methods/#MPSDynamics.normmps-Tuple{MPSDynamics.TreeNetwork}","page":"Methods","title":"MPSDynamics.normmps","text":"normmps(net::TreeNetwork; mpsorthog=:None)\n\nWhen applied to a tree-MPS mpsorthog=:Left is not defined.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.normmps-Tuple{Vector}","page":"Methods","title":"MPSDynamics.normmps","text":"normmps(A::Vector; mpsorthog=:None)\n\nCalculate norm of MPS A.\n\nSetting mpsorthog=:Right/:Left will calculate the norm assuming right/left canonical form. Setting mpsorthog=OC::Int will cause the norm to be calculated assuming the orthoganility center is on site OC. If mpsorthog is :None the norm will be calculated as an MPS-MPS product.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.orthcentersmps-Tuple{Vector}","page":"Methods","title":"MPSDynamics.orthcentersmps","text":"orthcentersmps(A)\n\nCompute the orthoganality centres of MPS A.\n\nReturn value is a list in which each element is the corresponding site tensor of A with the orthoganility centre on that site. Assumes A is right normalised.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.physdims-Tuple{Vector}","page":"Methods","title":"MPSDynamics.physdims","text":"physdims(M)\n\nReturn the physical dimensions of an MPS or MPO M.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.productstatemps","page":"Methods","title":"MPSDynamics.productstatemps","text":"productstatemps(physdims::Dims, Dmax=1; state=:Vacuum, mpsorthog=:Right)\n\nReturn an MPS representing a product state with local Hilbert space dimensions given by physdims.\n\nBy default all bond-dimensions will be 1 since the state is a product state. However, to embed the product state in a manifold of greater bond-dimension, Dmax can be set accordingly.\n\nThe indvidual states of the MPS sites can be provided by setting state to a list of column vectors. Setting state=:Vacuum will produce an MPS in the vacuum state (where the state of each site is represented by a column vector with a 1 in the first row and zeros elsewhere). Setting state=:FullOccupy will produce an MPS in which each site is fully occupied (ie. a column vector with a 1 in the last row and zeros elsewhere).\n\nThe argument mpsorthog can be used to set the gauge of the resulting MPS.\n\nExample\n\njulia> ψ = unitcol(1,2); d = 6; N = 30; α = 0.1; Δ = 0.0; ω0 = 0.2; s = 1\n\njulia> cpars = chaincoeffs_ohmic(N, α, s)\n\njulia> H = spinbosonmpo(ω0, Δ, d, N, cpars)\n\njulia> A = productstatemps(physdims(H), state=[ψ, fill(unitcol(1,d), N)...]) # MPS representation of |ψ>|Vacuum>\n\n\n\n\n\n","category":"function"},{"location":"methods/#MPSDynamics.productstatemps-2","page":"Methods","title":"MPSDynamics.productstatemps","text":"productstatemps(N::Int, d::Int, Dmax=1; state=:Vacuum, mpsorthog=:Right)\n\nReturn an N-site MPS with all local Hilbert space dimensions given by d. \n\n\n\n\n\n","category":"function"},{"location":"methods/#MPSDynamics.randisometry-Tuple{Type, Int64, Int64}","page":"Methods","title":"MPSDynamics.randisometry","text":"randisometry([T=Float64], dims...)\n\nConstruct a random isometry\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.randmps","page":"Methods","title":"MPSDynamics.randmps","text":"randmps(N::Int, d::Int, Dmax::Int, T=Float64)\n\nConstruct a random, N-site, right-normalised MPS with all local Hilbert space dimensions given by d.\n\n\n\n\n\n","category":"function"},{"location":"methods/#MPSDynamics.randmps-2","page":"Methods","title":"MPSDynamics.randmps","text":"randmps(tree::Tree, physdims, Dmax::Int, T::Type{<:Number} = Float64)\n\nConstruct a random, right-normalised, tree-MPS, with structure given by tree and max bond-dimension given by Dmax.\n\nThe local Hilbert space dimensions are specified by physdims which can either be of type Dims{length(tree)}, specifying the dimension of each site, or of type Int, in which case the same local dimension is used for every site.\n\n\n\n\n\n","category":"function"},{"location":"methods/#MPSDynamics.randmps-Union{Tuple{N}, Tuple{Tuple{Vararg{Int64, N}}, Int64}, Tuple{Tuple{Vararg{Int64, N}}, Int64, Type{<:Number}}} where N","page":"Methods","title":"MPSDynamics.randmps","text":"randmps(physdims::Dims{N}, Dmax::Int, T::Type{<:Number} = Float64) where {N}\n\nConstruct a random, right-normalised MPS with local Hilbert space dimensions given by physdims and max bond-dimension given by Dmax. \n\nT specifies the element type, eg. use T=ComplexF64 for a complex valued MPS.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.randtree-Tuple{Int64, Int64}","page":"Methods","title":"MPSDynamics.randtree","text":"randtree(numnodes::Int, maxdegree::Int)\n\nConstruct a random tree with nummodes modes and max degree maxdegree.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.readchaincoeffs-Tuple{Any, Vararg{Any}}","page":"Methods","title":"MPSDynamics.readchaincoeffs","text":"readchaincoeffs(fdir, params...)\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.rmsd-Tuple{Any, Any}","page":"Methods","title":"MPSDynamics.rmsd","text":"rmsd(dat1::Vector{Float64}, dat2::Vector{Float64})\n\nCalculate the root mean squared difference between two measurements of an observable over the same time period.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.spinbosonmpo-NTuple{5, Any}","page":"Methods","title":"MPSDynamics.spinbosonmpo","text":"spinbosonmpo(ω0, Δ, d, N, chainparams; rwa=false, tree=false)\n\nGenerate MPO for a spin-1/2 coupled to a chain of harmonic oscillators, defined by the Hamiltonian\n\nH = fracω_02σ_z + Δσ_x + c_0σ_x(b_0^dagger+b_0) + sum_i=0^N-1 t_i (b_i+1^dagger b_i +hc) + sum_i=0^N ϵ_ib_i^dagger b_i.\n\nThe spin is on site 1 of the MPS and the bath modes are to the right.\n\nThis Hamiltonain is unitarily equivalent (before the truncation to N sites) to the spin-boson Hamiltonian defined by\n\nH =  fracω_02σ_z + Δσ_x + σ_xint_0^ dωsqrtfracJ(ω)π(b_ω^dagger+b_ω) + int_0^ dω ωb_ω^dagger b_ω.\n\nThe chain parameters, supplied by chainparams=ϵ_0ϵ_1t_0t_1c_0, can be chosen to represent any arbitrary spectral density J(ω) at any temperature.\n\nThe rotating wave approximation can be made by setting rwa=true.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.spinchainmpo-Tuple{Int64}","page":"Methods","title":"MPSDynamics.spinchainmpo","text":"spinchainmpo(N::Int; J=1.0, hz=1.0, hx=0.0, i=div(N,2))\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.svdmps-Tuple{Any}","page":"Methods","title":"MPSDynamics.svdmps","text":"svdmps(A)\n\nFor a right normalised mps A compute the full svd spectrum for a bipartition at every bond.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.svdtrunc-Tuple{Any}","page":"Methods","title":"MPSDynamics.svdtrunc","text":"U, S, Vd = svdtrunc(A; truncdim = max(size(A)...), truncerr = 0.)\n\nPerform a truncated SVD, with maximum number of singular values to keep equal to truncdim or truncating any singular values smaller than truncerr. If both options are provided, the smallest number of singular values will be kept. Unlike the SVD in Julia, this returns matrix U, a diagonal matrix (not a vector) S, and Vt such that A ≈ U * S * Vt\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.tightbindingmpo-Tuple{Int64, Int64}","page":"Methods","title":"MPSDynamics.tightbindingmpo","text":"tightbindingmpo(N::Int, d::Int; J=1.0, e=1.0)\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.tunnelingmpo-Tuple{Any, Any, Any, Any, Any, Int64, Int64}","page":"Methods","title":"MPSDynamics.tunnelingmpo","text":"tunnelingmpo(ϵ, delta, α, s, β, d::Int, nummodes::Int; tree=false, ωc=1)\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.twobathspinmpo","page":"Methods","title":"MPSDynamics.twobathspinmpo","text":"twobathspinmpo(ω0, Δ, Nl, Nr, dl, dr, chainparamsl=[fill(1.0,N),fill(1.0,N-1), 1.0], chainparamsr=chainparamsl; tree=false)\n\nGenerate MPO for a spin-1/2 coupled to two chains of harmonic oscillators, defined by the Hamiltonian\n\nH = fracω_02σ_z + Δσ_x + c_0^rσ_x(b_0^dagger+b_0) + sum_i=0^N_r-1 t_i^r (b_i+1^dagger b_i +hc) + sum_i=0^N_r ϵ_i^rb_i^dagger b_i + c_0^lσ_x(d_0^dagger+d_0) + sum_i=0^N_l-1 t_i^l (d_i+1^dagger d_i +hc) + sum_i=0^N_l ϵ_i^l d_i^dagger d_i.\n\nThe spin is on site N_l + 1 of the MPS, surrounded by the left chain modes and the right chain modes.\n\nThis Hamiltonain is unitarily equivalent (before the truncation to N sites) to the spin-boson Hamiltonian defined by\n\nH =  fracω_02σ_z + Δσ_x + σ_xint_0^ dωsqrtfracJ(ω)π(b_ω^dagger+b_ω) + int_0^ dω ωb_ω^dagger b_ωi + σ_xint_0^ dωsqrtfracJ^l(ω)π(d_ω^dagger+d_ω) + int_0^ dω ωd_ω^dagger d_ω.\n\nThe chain parameters, supplied by chainparams=ϵ_0ϵ_1t_0t_1c_0, can be chosen to represent any arbitrary spectral density J(ω) at any temperature. The two chains can have a different spectral density.\n\n\n\n\n\n","category":"function"},{"location":"methods/#MPSDynamics.xxzmpo","page":"Methods","title":"MPSDynamics.xxzmpo","text":"xxzmpo(N::Int, Δ = 1.0, J=1.0) = xyzmpo(N; Jx=J, Jy=J, Jz=J*Δ)\n\nGenerate MPO for the N-spin XXZ model, defined by the Hamiltonian\n\nH = sum_n=1^N-1 -J σ_x^n σ_x^n+1 - J σ_y^n σ_y^n+1 - Delta J σ_z^n σ_z^n+1\n\nwith σ_x^n σ_y^n σ_z^n the Pauli spin-1/2 matrices of the n^textth site.\n\n\n\n\n\n","category":"function"},{"location":"methods/#MPSDynamics.xyzmpo-Tuple{Int64}","page":"Methods","title":"MPSDynamics.xyzmpo","text":"xyzmpo(N::Int; Jx=1.0, Jy=Jx, Jz=Jx, hx=0., hz=0.)\n\nGenerate MPO for the N-spin XYZ model with external field vech=(h_x 0 h_z), , defined by the Hamiltonian\n\nH = sum_n=1^N-1 -J_x σ_x^n σ_x^n+1 - J_y σ_y^n σ_y^n+1 - J_z σ_z^n σ_z^n+1 + sum_n=1^N(- h_x σ_x^n - h_z σ_z^n)\n\nwith σ_x^n σ_y^n σ_z^n the Pauli spin-1/2 matrices of the n^textth site.\n\n\n\n\n\n","category":"method"},{"location":"#Introduction","page":"Introduction","title":"Introduction","text":"","category":"section"},{"location":"","page":"Introduction","title":"Introduction","text":"The MPSDynamics.jl package provides an easy to use interface for performing tensor network simulations on matrix product states (MPS) and tree tensor network (TTN) states. Written in the Julia programming language, MPSDynamics.jl is a versatile open-source package providing a choice of several variants of the Time-Dependent Variational Principle (TDVP) method for time evolution.  The package also provides strong support for the measurement of observables, as well as the storing and logging of data, which makes it a useful tool for the study of many-body physics.  The package has been developed with the aim of studying non-Markovian open system dynamics at finite temperature using the state-of-the-art numerically exact Thermalized-Time Evolving Density operator with Orthonormal Polynomials Algorithm (T-TEDOPA) based on environment chain mapping. However the methods implemented can equally be applied to other areas of physics.","category":"page"},{"location":"","page":"Introduction","title":"Introduction","text":"warning: Warning\nThe documentation is currently undergoing massive restructurations/improvement. It's a work in progress until the next release scheduled for May, 2024.","category":"page"},{"location":"#Installation","page":"Introduction","title":"Installation","text":"","category":"section"},{"location":"","page":"Introduction","title":"Introduction","text":"The package may be installed by typing the following into a Julia REPL","category":"page"},{"location":"","page":"Introduction","title":"Introduction","text":"    ] add https://github.com/shareloqs/MPSDynamics.git","category":"page"},{"location":"#Table-of-Contents","page":"Introduction","title":"Table of Contents","text":"","category":"section"},{"location":"","page":"Introduction","title":"Introduction","text":"Pages = [\"index.md\", \"user-guide.md\", \"./examples/sbm.md\", \"./examples/puredephasing.md\", \"theory.md\", \"methods.md\", \"dev.md\"]\nDepth = 3","category":"page"},{"location":"#Citation","page":"Introduction","title":"Citation","text":"","category":"section"},{"location":"","page":"Introduction","title":"Introduction","text":"If you use the package in your research, please consider citing it. You can add the Zenodo record to your BibTex file:","category":"page"},{"location":"","page":"Introduction","title":"Introduction","text":"@misc{mpsdynamics_zenodo2021,\n\ttitle = {shareloqs/{MPSDynamics}},\n\tshorttitle = {{MPSDynamics.jl}},\n\turl = {https://zenodo.org/record/5106435},\n\tabstract = {Tensor network simulations for finite temperature, open quantum system dynamics},\n\tpublisher = {Zenodo},\n\tauthor = {Dunnett, Angus and Lacroix, Thibaut and Le Dé, Brieuc and Riva, Angela},\n\tyear = {2021},\n\tdoi = {10.5281/zenodo.5106435},\n}","category":"page"}]
+[{"location":"dev/#Developpers","page":"Developpers","title":"Developpers","text":"","category":"section"},{"location":"dev/#Simulation-Workflow","page":"Developpers","title":"Simulation Workflow","text":"","category":"section"},{"location":"dev/","page":"Developpers","title":"Developpers","text":"The flow chart will go here","category":"page"},{"location":"dev/#How-to-Contribute","page":"Developpers","title":"How to Contribute","text":"","category":"section"},{"location":"dev/","page":"Developpers","title":"Developpers","text":"Contributions are welcome! Don't hesitate to contact us if you","category":"page"},{"location":"dev/","page":"Developpers","title":"Developpers","text":"found a bug;\nhave a suggestion on how to improve the code and/or documentation;\nwould like to get involved in writing code and/or documentation.","category":"page"},{"location":"dev/","page":"Developpers","title":"Developpers","text":"You can contact us by raising an issue on Github, or by writing to one of the developpers.","category":"page"},{"location":"theory/#Theoretical-Background","page":"Theoretical Background","title":"Theoretical Background","text":"","category":"section"},{"location":"theory/#Chain-Mapping-of-bosonic-environments","page":"Theoretical Background","title":"Chain-Mapping of bosonic environments","text":"","category":"section"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"We consider, in the Schrödinger picture, a general Hamiltonian where a non-specified system interacts linearly with a bosonic environments","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"beginaligned\n    hatH = hatH_S + int_0^+infty hbaromegahata^dagger_omegahata_omega mathrmdomega + hatA_Sint_0^+inftysqrtJ(omega)left(hata_omega + hata^dagger_omegaright)mathrmdomega\nendaligned","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"where hata_omega (hata^dagger_omega) is a bosonic annihilation (creation) operator for a normal mode of the environment of energy hbaromega, hatA_S is a system operator, and J(omega) = sum_k g_k^2delta(omega - omega_k) is the bath spectral density (SD), defined with the microscopic system-environment coupling strength g_k. The SD quantifies the coupling strengths of the different normal modes of the environment with the system. Any SD that is not flat corresponds to a non-Markovian environment.","category":"page"},{"location":"theory/#Zero-Temperature","page":"Theoretical Background","title":"Zero Temperature","text":"","category":"section"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"Let us consider the Hamiltonian presented in Eq.(1). We can introduce a unitary transformation of the continuous normal modes hata_omega to an infinite discrete set of interacting modes hatb_n[chin_exact_2010].","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"    hata_omega = sum_n=0^+infty U_n(omega)hatb_n = sum_n=0^+infty sqrtJ(omega)P_n(omega)hatb_n ","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"where P_n(omega) are orthonormal polynomials such that","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"    int_0^+inftyP_n(omega)P_m(omega)J(omega)mathrmdomega = delta_nm ","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"and the inverse transformation is","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"    hatb_n = int_0^+infty U_n(omega)hata_omegamathrmdomega ","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"Note that the orthonormality of the polynomials ensures the unitarity of the transformation defined in Eq.(2). The mapping from a continuous set of modes to a (still infinite) discrete set might seem counter-intuitive, however it is a direct consequence of the separability of the underlying Hilbert space.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"Under this transformation, the Hamiltonian in Eq.(1) becomes","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"    hatH= hatH_S + sum_n=0^+inftyvarepsilon_nhatb_n^daggerhatb_n + t_n(hatb_n+1^daggerhatb_n + mathrmhc) + kappahatA_S(hatb_0 + hatb_0^dagger) ","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"Hence, this mapping transforms the normal bath Hamiltonian into a tight-binding Hamiltonian with on-site energies varepsilon_n and hopping energies t_n. Another important consequence of this mapping is that now the system only interacts with the first mode n = 0 of the chain-mapped environment. The chain coefficients varepsilon_n, t_n, and the coupling kappa depend solely on the SD.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"This makes chain mapping a tool of choice for describing systems coupled to environment with highly structured SD (e.g. experimentally measured or calculated ab initio)[chin_role_2013][alvertis_nonequilibrium_2019][dunnett_influence_2021][caycedosoler_exact_2022]. In this new representation, the Hamiltonian in Eq.(5) has naturally a 1D chain topology. This makes its representation as a Matrix Product Operator (MPO) and the representation of the joint {System + Environment} wave-function as a Matrix Product State (MPS) suited [orus_practical_2014][paeckel_timeevolution_2019].","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"The orthogonal polynomial-based chain mapping and the subsequent representation of the joint wave-function as a MPS (and the operators as MPO) are the building blocks of the Time-dependent Density operator with Orthonormal Polynomials Algorithm (TEDOPA) one of the state-of-the-art numerically exact method to simulate the dynamics of open quantum systems especially in the non-Markovian, non-perturbative regimes both at zero and finite temperatures [prior_efficient_2010][woods_simulating_2015][tamascelli_efficient_2019][dunnett_simulating_2021][lacroix_unveiling_2021].","category":"page"},{"location":"theory/#Finite-Temperature","page":"Theoretical Background","title":"Finite Temperature","text":"","category":"section"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"Explain that by extending the bath to negative frequencies and having temperature-dependent system environment couplings, it is possible to describe the finite temperature case as an effective zero temperature one. Hence, we can keep the pure state description and avoid moving to density matrices at the cost of doubling the size of the environment.","category":"page"},{"location":"theory/#Computation-of-the-chain-coefficients","page":"Theoretical Background","title":"Computation of the chain coefficients","text":"","category":"section"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"A useful property of the orthonormal polynomials is that they obey a recurrence relation","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"    P_n(omega) = (C_n-1omega - A_n-1)P_n-1(omega) + B_n-1P_n-2(omega) ","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"where A_n is related to the first moment of P_n, B_n and C_n to the norms of P_n and P_n-1[appel_mathematics_2007]. This recurrence relation can be used to construct the polynomials with the conditions that P_0(omega) = p_0^-1 = left(int_mathbbR^+ J(omega)mathrmdomega right)^-frac12 and P_-1(omega) = 0, with bullet the norm of bullet with respect to the measure J(omega), and P_n(omega) = p_n(omega)p_n^-1 ; where the polynomials p_n_ninmathbbN are the so called monic polynomials where the factor a_n in front of omega^n is equal to 1.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"The energy of the chain mode n is given by varepsilon_n = A_n C_n^-1 and t_n=C_n^-1 is the coupling between mode n and n+1[chin_exact_2010].","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"The system couples only to the first mode with the coupling strength kappa = p_0.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"Explain that for some weight function/SD they are known analytically and that for others we can use the build-in routines inspired by Gautschi or the PolyChaos.jl package.","category":"page"},{"location":"theory/#Tensor-Networks","page":"Theoretical Background","title":"Tensor Networks","text":"","category":"section"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"A multipartite quantum state psirangle, e.g. a N-site system where the sites can each be in a state phi_irangle belonging to a d-dimensional Hilbert space, can be written as follows","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"    psirangle = sum_i_kc_i_1ldots i_Nphi_i_1rangleotimesldotsotimesphi_i_Nrangle ","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"where the complex numbers c_i_1ldots i_N are the amplitudes of each state phi_i_1rangleotimesldotsotimesphi_i_Nrangle whose superpositions form in full generality the state psirangle. Thus the state psirangle can be completely represented by a rank-N tensor c that is the collection of all possible amplitudes c_i_1ldots i_N. Here by the rank of a tensor, we simply mean the number of indices it has.","category":"page"},{"location":"theory/#MPS","page":"Theoretical Background","title":"MPS","text":"","category":"section"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"The tensor c of a quantum state psirangle corresponding to a one-dimensional system can be decomposed into a product of N smaller rank-3 tensors T_k (except for the first and last sites where the tensors will have a rank-2)","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"    c_i_1ldots i_N = sum_alpha T^alpha_1_i_1T^alpha_1alpha_2 _i_2T^alpha_2alpha_3 _i_3ldots T^alpha_N-1_i_N  ","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"In this form, the local tensor T_k contains the information on the quantum state on site k and its relation (especially the entanglement) with the neighbouring sites.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"The decomposition of the tensor of the amplitudes of a quantum state into a product of smaller rank tensors is called a Matrix Product State decomposition.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"The contracted indices alpha_k between the tensors are called virtual indices and carry information about the correlations between bi-partitions of the state at bond k. The number of different values a virtual index can take is called the bond dimension and is denoted D. The free indices i_k associated with local quantum states are called physical indices. Thus, they can take d values (with d the dimension of the local Hilbert space).","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"Any state in the Hilbert space of a one-dimensional many-body system can in principle be represented by a MPS by choosing a sufficiently large value for the bond dimension D \\cite{Orus}. On top of this intellectually satisfying property of MPSs being a dense set of states for a 1d-system, they can also be used as a practical Ansätze for a many-body quantum states by setting a maximal allowed value chi for the bond dimension D. In doing so, we restrict ourselves to a corner of the total Hilbert space. The rationale behind this Ansatz is the following: if the initial quantum state of a many-body system has a low bond dimension (typically if the initial state is a product state with D = 1), then in a finite time it will only be able to explore a region of the Hilbert space that is not to far away from its starting point. Thus, the bond dimension will not have the time to diverge exponentially \\cite{poulinquantum2011}. However, depending on the physical system at hand, this sub-manifold of the Hilbert space could still be \"too large\". There is an additional reason that explains why MPSs are good Ansätze for 1d physical systems. Most many-body Hamiltonians we (physicists) are interested in are local, meaning that the interactions they describe involve objects that are \"neighbours\". For such Hamiltonians, the ground states (outside of potential critical phases) follow the so called area law for the entanglement entropy.\\cite{srednickientropy1993, vidalentanglement2003, wolfarea2008}. This law states that the entanglement entropy S_vN of a bi-partition of the system is proportional, not to the volume of the partition as one might expect, but to the hyper-surface of the partition's boundary; hence the name \"area law\". For a 3d system this corresponds to an actual surface area A, S_vN sim A; for a 2d system it corresponds to the length L of the partition's boundary, S_vN sim L; and in 1d the boundary reduces to a point, thus the entropy will be independent of the size of the system S_vN sim textconstant. The MPSs are states that satisfy this area law.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"An application of the Singular Value Decomposition is to create efficient approximations of quantum states to perform computations. The main idea is to reduce the content of the MPS to keep only the parts that contain the physics of interest. One method to realise this approximation is to do a SVD on each of the tensors of the MPS after each time step of the state time-evolution and to trim the smallest singular values in order to decrease the bond dimension of the MPS down to a chosen maximal value chi. The corresponding columns and rows of the unitary matrices U and V^dagger are also removed. Then, the trimmed matrices tildeU, tildeS and tildeV^dagger are contracted back to give an approximated tensor T with a smaller bond dimension. Another way to apply the restricted rank approximation is to restrict oneself into working in a manifold of fixed bond dimension D and to use methods that can enforce this constraint.","category":"page"},{"location":"theory/#MPO","page":"Theoretical Background","title":"MPO","text":"","category":"section"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"In order to compute expectation values of observables or apply unitary transformations to a quantum state, we need a TN representation of operators. In the same fashion as a one-dimensional quantum state can be represented as a MPS, operators acting on those states can be represented as Matrix Product Operators (MPO). For an operator hatO, its MPO can be defined as follows","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"    hatO = sum_i_ki_k^ w W^i_1 i^_1_1 w_0w_1ldots  W^i_N i^_N_N w_N-1w_N phi_i_1^ldots phi_i_N^ranglelanglephi_i_1ldots phi_i_N ","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"The contracted indices between the tensors are called virtual indices. The free indices are called physical indices and correspond to the different input and output local quantum states.  They can take d values (with d the dimension of the local Hilbert space).","category":"page"},{"location":"theory/#TTN","page":"Theoretical Background","title":"TTN","text":"","category":"section"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"A natural extension to the MPS is the (loop-free) tree tensor network.  A TTN is a generalisation of the MPS wherein each site, instead of being connected to only one other site to its right, may be connected to any arbitrary number of child sites. Provided the tree does not contain any loops, everything that one can do to an MPS/MPO can be extended straight-forwardly to TTN states and TTN operators.  The generalisation to trees introduces no new conceptual complexity (only implementational complexity). The sites of a TTN are usually referred to as nodes.  For our purposes, every node of a TTN state and operator has one parent leg, and any number (including zero) of child legs.  The first node is known as the head-node and has a dummy parent leg with dimension 1.","category":"page"},{"location":"theory/#Time-Dependent-Variational-Principal","page":"Theoretical Background","title":"Time-Dependent Variational Principal","text":"","category":"section"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"The original idea behind TDVP goes back to Dirac \\cite{diracnote1930} and Frenkel \\cite{frenkelwave1934}. The main point, in the modern tensor networks formulation, is that instead of solving the Schrödinger equation and then truncating the MPS representation of the quantum state, one can solve the equations of motion projected into a space of restricted bond dimension \\cite{haegemantime-dependent2011, haegemanunifying2016}.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"The general formulation of the Dirac-Frenkel Variational Principle~\\cite{raabdiracfrenkelmclachlan2000} is that one looks for a solution varphirangle in mathcalM of the Schrödinger equation where mathcalM subset mathcalH is a manifold of the total Hilbert space mathcalH in which we think that the relevant physical states `live'.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"We define T_varphiranglemathcalM the tangent space of mathcalM around the state varphirangle. The criterion to find varphirangle is that for every state chirangle in T_varphiranglemathcalM","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"    langlechileft(fracmathrmdmathrmdt - frac1mathrmihbarhatHright)varphirangle =0 ","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"which can be interpreted as saying that the time evolution procedure should keep varphirangle inside of the manifold mathcalM.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"The term variational in the name of the method comes from the fact that in practice one aims at minimising the right-hand side of Eq.~(\\ref{eq:DiracFrenkel1}) to find varphirangle.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"Introducing hatP_T_varphiranglemathcalM the projector onto the tangent space T_varphiranglemathcalM, we can write the state chirangle = hatP_T_varphiranglemathcalMphirangle with phirangle a state in mathcalH. Leading to","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"    forall phirangle in mathcalH  langlephihatP_T_varphiranglemathcalMleft(fracmathrmdmathrmdt - frac1mathrmihbarhatHright)varphirangle =0 ","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"Because the time derivation and the projector commute, we have","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"    forall phirangle in mathcalH  langlephileft(fracmathrmdmathrmdt - frac1mathrmihbarhatP_T_varphiranglemathcalMhatHright)varphirangle =0 ","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"This equation must be true for any phirangle in mathcalH, Eq.~(\\ref{eq:DiracFrenkel1}) can thus be written","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"    left(fracmathrmdmathrmdt - frac1mathrmihbarhatP_T_varphiranglemathcalMhatHright)varphirangle =0 ","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"In the context of MPS, the manifold mathcalM will correspond to the space of full-ranked MPS of a given bond dimension D, and the tangent space will be the space spanned by variations of single MPS tensors.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"The major advantage of this method is that it naturally preserves the unitarity of the time evolution and conserves the energy.","category":"page"},{"location":"theory/#Bibliography","page":"Theoretical Background","title":"Bibliography","text":"","category":"section"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"[chin_exact_2010]: Chin, A. W.; Rivas, Á.; Huelga, S. F.; Plenio, M. B. Exact Mapping between System-Reservoir Quantum Models and Semi-Infinite Discrete Chains Using Orthogonal Polynomials. Journal of Mathematical Physics 2010, 51 (9), 092109. https://doi.org/10.1063/1.3490188.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"[chin_role_2013]: Chin, A. W.; Prior, J.; Rosenbach, R.; Caycedo-Soler, F.; Huelga, S. F.; Plenio, M. B. The Role of Non-Equilibrium Vibrational Structures in Electronic Coherence and Recoherence in Pigment–Protein Complexes. Nature Phys 2013, 9 (2), 113–118. https://doi.org/10.1038/nphys2515.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"[alvertis_nonequilibrium_2019]: Alvertis, A. M.; Schröder, F. A. Y. N.; Chin, A. W. Non-Equilibrium Relaxation of Hot States in Organic Semiconductors: Impact of Mode-Selective Excitation on Charge Transfer. J. Chem. Phys. 2019, 151 (8), 084104. https://doi.org/10.1063/1.5115239.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"[dunnett_influence_2021]: Dunnett, A. J.; Gowland, D.; Isborn, C. M.; Chin, A. W.; Zuehlsdorff, T. J. Influence of Non-Adiabatic Effects on Linear Absorption Spectra in the Condensed Phase: Methylene Blue. J. Chem. Phys. 2021, 155 (14), 144112. https://doi.org/10.1063/5.0062950.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"[caycedosoler_exact_2022]: Caycedo-Soler, F.; Mattioni, A.; Lim, J.; Renger, T.; Huelga, S. F.; Plenio, M. B. Exact Simulation of Pigment-Protein Complexes Unveils Vibronic Renormalization of Electronic Parameters in Ultrafast Spectroscopy. Nat Commun 2022, 13 (1), 2912. https://doi.org/10.1038/s41467-022-30565-4.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"[orus_practical_2014]: Orus, R. A Practical Introduction to Tensor Networks: Matrix Product States and Projected Entangled Pair States. Annals of Physics 2014, 349, 117–158. https://doi.org/10.1016/j.aop.2014.06.013.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"[paeckel_timeevolution_2019]: Paeckel, S.; Köhler, T.; Swoboda, A.; Manmana, S. R.; Schollwöck, U.; Hubig, C. Time-Evolution Methods for Matrix-Product States. Annals of Physics 2019, 411, 167998. https://doi.org/10.1016/j.aop.2019.167998.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"[prior_efficient_2010]: Prior, J.; Chin, A. W.; Huelga, S. F.; Plenio, M. B. Efficient Simulation of Strong System-Environment Interactions. Phys. Rev. Lett. 2010, 105 (5), 050404. https://doi.org/10.1103/PhysRevLett.105.050404.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"[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.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"[tamascelli_efficient_2019]: Tamascelli, D.; Smirne, A.; Lim, J.; Huelga, S. F.; Plenio, M. B. Efficient Simulation of Finite-Temperature Open Quantum Systems. Phys. Rev. Lett. 2019, 123 (9), 090402. https://doi.org/10.1103/PhysRevLett.123.090402.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"[dunnett_simulating_2021]: Dunnett, A. J.; Chin, A. W. Simulating Quantum Vibronic Dynamics at Finite Temperatures With Many Body Wave Functions at 0 K. Front. Chem. 2021, 8. https://doi.org/10.3389/fchem.2020.600731.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"[lacroix_unveiling_2021]: Lacroix, T.; Dunnett, A.; Gribben, D.; Lovett, B. W.; Chin, A. Unveiling Non-Markovian Spacetime Signaling in Open Quantum Systems with Long-Range Tensor Network Dynamics. Phys. Rev. A 2021, 104 (5), 052204. https://doi.org/10.1103/PhysRevA.104.052204.","category":"page"},{"location":"theory/","page":"Theoretical Background","title":"Theoretical Background","text":"[appel_mathematics_2007]: Appel, W. Mathematics for Physics and Physicists; Princeton University Press, 2007.","category":"page"},{"location":"user-guide/#User-Guide","page":"User Guide","title":"User Guide","text":"","category":"section"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"Here we explain the different steps to perform a simulation.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"Examples with detailed explanations can be found in Examples.","category":"page"},{"location":"user-guide/#Initial-State","page":"User Guide","title":"Initial State","text":"","category":"section"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"The initial many-body state of the {System + Environment} can be described easily as Matrix Product States (MPS) or Tree Tensor Networks (TTN) state (e.g. when a system is coupled to several environments).","category":"page"},{"location":"user-guide/#Matrix-Product-States","page":"User Guide","title":"Matrix Product States","text":"","category":"section"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"A MPS can be initialized with several methods.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"The productstatemps method enables  to instantiate arbitrary MPS of fixed uniform bond dimension with non-uniform physical dimensions. The individual states of the MPS sites can be provided by setting state to a list of column vectors.  Setting state=:Vacuum will produce an MPS in the vacuum state.  Setting state=:FullOccupy will produce an MPS in which each site is fully occupied. The gauge of the MPS can also be set using a keyword argument.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"julia> ψ = unitcol(1,2) # system initial state\n\njulia> d = 6; N = 30; α = 0.1; Δ = 0.0; ω0 = 0.2; s = 1 \n\njulia> cpars = chaincoeffs_ohmic(N, α, s) # chain coefficient for an Ohmic spectral density\n\njulia> H = spinbosonmpo(ω0, Δ, d, N, cpars)\n\njulia> A = productstatemps(physdims(H), state=[ψ, fill(unitcol(1,d), N)...]) # MPS representation of |ψ>|Vacuum>","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"Alternatively, a chain with a specified number of excitation localised on one site, or delocalized accross several sites can be generated with MPSDynamics.chainmps.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"Random MPS can also be generated with the randmps method.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"For the case of fermionic states (which need to be anti-symmetrized), the MPSDynamics.electronkmps method generate an MPS for an electron with momentum k, and the MPSDynamics.electron2kmps generate an MPS with 2 electrons in k-states k1 and k2.","category":"page"},{"location":"user-guide/#Tree-Tensor-Networks","page":"User Guide","title":"Tree Tensor Networks","text":"","category":"section"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"Write a quick explanation of the how trees are structured: parents, child, nodes; and that most methods to initialize a MPS are overloaded for TreeNetwork. ","category":"page"},{"location":"user-guide/#Hamiltonian","page":"User Guide","title":"Hamiltonian","text":"","category":"section"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"In order to perform time evolution and have access to the dynamics of the many-body state a Hamiltonian needs to be specified in the form of a Matrix Product Operator (MPO) of as a tree tensor network. Either way, this can be done by using a Build-in Hamiltonian, Convert a MPO from ITensor, or creating a Tailored MPO.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"In the context of Open Quantum Systems, custom chain coefficients for the environment can be generated for finite temperature simulations, and/or user provided spectral densities (SDs).","category":"page"},{"location":"user-guide/#Build-in-Hamiltonian","page":"User Guide","title":"Build-in Hamiltonian","text":"","category":"section"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"MPSDynamics provides several topical Hamiltonians directly in the form of MPO or Tree Tensor Networks such as the Ising model MPSDynamics.isingmpo, the XYZ Hamiltonian MPSDynamics.xyzmpo, the Spin Boson Model MPSDynamics.spinbosonmpo, a spin coupled to two bosonic baths MPSDynamics.twobathspinmpo, nearest neighbour interactions Hamiltonian MPSDynamics.nearestneighbourmpo, the independent boson model MPSDynamics.ibmmpo, (non-)uniform tight-binding chain Hamiltonian MPSDynamics.tightbindingmpo.","category":"page"},{"location":"user-guide/#Convert-a-MPO-from-ITensor","page":"User Guide","title":"Convert a MPO from ITensor","text":"","category":"section"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"The method MPSDynamics.MPOtoVector converts an ITensors chain MPO into a form compatible with MPSDynamics.","category":"page"},{"location":"user-guide/#Tailored-MPO","page":"User Guide","title":"Tailored MPO","text":"","category":"section"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"One can also construct MPO tailored to the problem one is interested in. MPOs are fundamentally a lists of rank-4 tensors such that the right bond dimension of the nth tensor must be equal to the left bond dimension of the n+1th tensor; and the dimension of the physical bonds of the nth tensor must be equal to the corresponding physical bond on the MPS.","category":"page"},{"location":"user-guide/#Finite-Temperature-and-Custom-SD","page":"User Guide","title":"Finite Temperature and Custom SD","text":"","category":"section"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"In the T-TEDOPA framework (see Theoretical Background for more details) finite temperature simulations are done with an effective pure state description of the system and the environment where the coupling coefficients (or the SD) is temperature-dependent.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"The corresponding chain coefficients for an Ohmic or a user provided spectral density (that can thus in pratice be either at zero or finite temperature) are computed with the [chaincoeffs_finiteT](@ref). This method is based on the ORTHOPOL routines[Gautschi]","category":"page"},{"location":"user-guide/#Observables","page":"User Guide","title":"Observables","text":"","category":"section"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"System and environment observables can be computed, as well as system-and-environment 'non-local' observables.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"Observables that will be passed to MPSDynamics.runsim(@ref) to have their expectation value computated at each time step are defined with the OneSiteObservable and [TwoSiteObservable](@ref).","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"One-site and two-site obsevables work similarly, they need to be given a name, an (pair of) operator(s) and the (list of) site(s) on which they are evaluated.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"For instance one can calculated the average number of excitation in each of the N environmental modes","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"    ob = OneSiteObservable(\"chain mode occupation\", numb(d), (2,N+1))","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"It is also possible to measure composite system/environment observables, for example","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"    ob = TwoSiteObservable(\"SXdisp\", sx, disp(d), [1], collect(2:N+1))","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"which measure the correlation between the spin in the x-direction and the displacement of the bath modes.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"Purely environmental 'non-local' observables such as ","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"    ob = TwoSiteObservable(\"bath coherence\", crea(d), anih(d), collect(2:N+1), collect(2:N+1))","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"that computes all the chain mode coherences langlehata_n^daggerhata_mrangle (and the chain mode occupation when n = m).","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"We note that if one knows the coherences and populations of all the chain modes, it is then possible to reconstruct the populations of the normal mode environment.","category":"page"},{"location":"user-guide/#Time-Evolution","page":"User Guide","title":"Time-Evolution","text":"","category":"section"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"Explain that we do TDVP.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"A simulation is runned by the MPSDynamics.runsim(@ref) function.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"Local one-site and two-site observables, as well as non-local two-site observables, can be efficiently computed for each time-step of the time-evolution.","category":"page"},{"location":"user-guide/#One-site-TDVP","page":"User Guide","title":"One-site TDVP","text":"","category":"section"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"Fixed bond dimension, complexity XXX, preserves unitarity.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"The convergence parameter is the bond dimension.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"Is set in MPSDynamics.runsim(@ref) usind the key word argument method=:TDVP1","category":"page"},{"location":"user-guide/#Two-Site-TDVP","page":"User Guide","title":"Two-Site TDVP","text":"","category":"section"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"Varying bond dimension, complexity higher than 1TDVP, but breaks unitarity because of a SVD.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"The convergence parameter is the threshold of the SVD.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"Is set in MPSDynamics.runsim(@ref) usind the key word argument method=:TDVP2","category":"page"},{"location":"user-guide/#Adaptive-One-Site-TDVP","page":"User Guide","title":"Adaptive One-Site TDVP","text":"","category":"section"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"Keeps the good scaling of the 1TDVP, preserves unitarity but is able to increase the bond dimendion.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"The convergence parameter is a threshold value for the rate of change of the projection error with respect to the bond dimension.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"Is set in MPSDynamics.runsim(@ref) usind the key word argument method=:DTDVP","category":"page"},{"location":"user-guide/#Data-Storage","page":"User Guide","title":"Data Storage","text":"","category":"section"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"The data (i.e. observables time-series) is stored in the JLD format which is based on HDF5.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"The HDF5 format is natively supported across many platforms and languages (e.g. Python, or Mathematica).","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"For the data to be saved to a file after a run, the keyword argument save=true needs to be used in runsim.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"The directory where the data should be saved can be chosen by setting a path with the savedir keyword argument.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"A plot keyword argument can also be used to choose whether plots for 1D observables will be automatically generated and saved along with the data. ","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"Loading the data in Julia using the JLD.jl package will recover the full type information of the Julia variables that were stored.","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"julia> using JLD\n\njulia> dat = load(\"filename.jld\")\nDict{String, Any} with 2 entries:\n  \"parameters\" => Dict{String, Any}(\"tmax\"=>0.2, \"method\"=>:DTDVP, \"dt\"=>0.0005…\n  \"data\"       => Dict{String, Any}(\"bonddims\"=>[1 1 … 1 1; 1 2 … 2 2; … ; 1 1 …","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"If the data is loaded in an variable dat the structure is the folowing:","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"the parameters entry contains a dictionary where all the simulation parameters are stored\nthe data entry contains a dictionary where are stored simulation time, the observables and (whenever relevent) the bond dimension of the state at each time steps. ","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"julia> dat[\"parameters\"]\nDict{String, Any} with 11 entries:\n  \"tmax\"       => 0.2\n  \"method\"     => :DTDVP\n  \"dt\"         => 0.0005\n  \"name\"       => \"my model\"\n  \"Δ\"          => 0.0\n  \"β\"          => 0.0186854\n  \"N\"          => 300.0\n  \"d\"          => 15.0\n  \"unid\"       => \"Ovzm6\"\n  \"ω0\"         => 0.0\n  \"convparams\" => 0.0005\n\njulia> dat[\"data\"]\nDict{String, Any} with 6 entries:\n  \"bonddims\" => [1 1 … 1 1; 1 2 … 2 2; … ; 1 1 … 7 7; 1 1 … 1 1]\n  \"sx\"       => [1.0, 0.912818, 0.741759, 0.605797, 0.528792, 0.492497, 0.47976…\n  \"sz\"       => [0.0, 0.0871825, 0.25824, 0.394201, 0.471207, 0.507503, 0.52023…\n  \"nchain\"   => [0.0 0.23466 … 1.84319 1.76098; 0.0 0.00231507 … 0.83105 0.9033…\n  \"sy\"       => [0.0, -0.0133489, -0.0588887, -0.0858181, -0.0759996, -0.048539…\n  \"times\"    => [0.0, 0.0005, 0.001, 0.0015, 0.002, 0.0025, 0.003, 0.0035, 0.00…\n","category":"page"},{"location":"user-guide/","page":"User Guide","title":"User Guide","text":"[Gautschi]: Gautschi, W. Algorithm 726: ORTHPOL–a package of routines for generating orthogonal polynomials and Gauss-type quadrature rules. ACM Trans. Math. Softw. 20, 21–62 (1994).","category":"page"},{"location":"examples/puredephasing/#Pure-Dephasing","page":"Pure-Dephasing","title":"Pure-Dephasing","text":"","category":"section"},{"location":"examples/puredephasing/#Zero-Temperature","page":"Pure-Dephasing","title":"Zero Temperature","text":"","category":"section"},{"location":"examples/puredephasing/#Finite-Temperature","page":"Pure-Dephasing","title":"Finite Temperature","text":"","category":"section"},{"location":"examples/sbm/#The-Spin-Boson-Model","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"","category":"section"},{"location":"examples/sbm/#Context","page":"The Spin-Boson Model","title":"Context","text":"","category":"section"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"The Spin-Boson Model (SBM) is a prototypical model in the theory of open quantum systems where a two level system interacts linearly with a bosonic bath","category":"page"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"\thatH = fracomega_02hatsigma_z + Deltahatsigma_x + int_0^+inftyomega hata^dagger_omegahata_omega mathrmdomega + hatsigma_xint_0^+inftysqrtJ(omega)(hata_omegahata^dagger_omega)mathrmdomega","category":"page"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"Even though this model is fairly simple it is physically very rich and it is not analytically solvable. For these reason it has become a test-bed for numerical methods simulating open quantum systems dynamics in the non-perturbative non-Markovian regime.","category":"page"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"For instance when the SD is Ohmic, this model presents a phase transition between a so called localised and a delocalised phase for alpha approx 12.","category":"page"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"Here we break out and comment the script in MPSDynamics/examples/sbm_zero_temperature.jl to show how to simulate this model with an Ohmic SD (hard cut-off) using the T-TEDOPA method as implemented in MPSDynamics.jl.","category":"page"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"The T-TEDOPA method relies on a truncated chain mapping that transform the initial Hamiltonian into","category":"page"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"\thatH = fracomega_02 hatsigma_z + Delta hatsigma_x + c_0 hatsigma_x(hatb_0^dagger + hatb_0) + sum_i=0^N-1 t_i (hatb_i+1^dagger hatb_i + mathrmhc) + sum_i=0^N-1 epsilon_i hatb_i^dagger hatb_i ","category":"page"},{"location":"examples/sbm/#The-code","page":"The Spin-Boson Model","title":"The code","text":"","category":"section"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"First a multi-line comment introduces the model and the aim of the script.","category":"page"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"#=\n    Example of a zero-temperature Spin-Boson Model with an hard cut-off Ohmic spectral density J(ω) = 2αω when ω < ωc and 0 otherwise\n\n    The dynamics is simulated using the T-TEDOPA method that maps the normal modes environment into a non-uniform tight-binding chain.\n\n    H = \\\\frac{ω_0}{2} σ_z + Δ σ_x + c_0 σ_x(b_0^\\\\dagger + b_0) + \\\\sum_{i=0}^{N-1} t_i (b_{i+1}^\\\\dagger b_i +h.c.) + \\\\sum_{i=0}^{N-1} ϵ_i b_i^\\\\dagger b_i \n\n    Two variants of the one-site Time Dependent Variational Principal (TDVP) are presented for the time evolution of the quantum state.\n=#","category":"page"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"We load the MPSdynamics.jl package to be able to perform the simulation, the Plots.jl one to plot the results, and the LaTeXStrings.jl one to be able to use LaTeX in the plots.","category":"page"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"using MPSDynamics, Plots, LaTeXStrings","category":"page"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"We then define variables for the physical parameters of the symulation. Among these, two are convergence parameters:","category":"page"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"d is the number of states we retain for the truncated harmonic oscillators representation of environmental modes \nN is the number of chain (environmental) modes we keep. This parameters determines the maximum simulation time of the simulation: indeed excitations that arrive at the end of the chain are reflected towards the system and can lead to unphysical results","category":"page"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"#----------------------------\n# Physical parameters\n#----------------------------\n\nd = 6 # number of Fock states of the chain modes\n\nN = 30 # length of the chain\n\nα = 0.1 # coupling strength\n\nΔ = 0.0 # tunneling \n\nω0 = 0.2 # TLS gap\n\ns = 1 # ohmicity\n\ncpars = chaincoeffs_ohmic(N, α, s) # chain parameters, i.e. on-site energies ϵ_i, hopping energies t_i, and system-chain coupling c_0","category":"page"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"We set the simulation parameters and choose a time evolution method. As always for simulations of dynamics, the time step must be chosen wisely. The error of the TDVP methods is mathcalO(dt^3). In this example we present two one-site implementation of TDVP that both preserves the unitarity of the evolution:","category":"page"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"the regular one-site method with the keyword :TDVP1 where all the virtual bonds of the MPS have the same bond dimension D\nthe adaptive method with the keyword :DTDVP where the bond dimension is locally increased at each time step if the TDVP projection error crosses a threshold value","category":"page"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"Logically the constant bond dimension of the MPS for TDVP1 and the threshold of the projection error for DTDVP are their respective convergence parameter. ","category":"page"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"#-----------------------\n# Simulation parameters\n#-----------------------\n\ndt = 0.5 # time step\n\ntfinal = 30.0 # simulation time\n\nmethod = :TDVP1 # Regular one-site TDVP (fixed bond dimension)\n\n# method = :DTDVP # Adaptive one-site TDVP (dynamically updating bond dimension)\n\nconvparams = [2,4,6] # MPS bond dimension (1TDVP)\n\n# convparams = [1e-2, 1e-3, 1e-4] # threshold value of the projection error (DTDVP)","category":"page"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"Using MPSDynamics.jl built-in methods we define the SBM MPO and the MPS representing the initial state. This initial state is a product state between the system and the chain. It is constructed using a list of the 'local state' of each site of the MPS, and the dimensions of the physical legs of the MPS are set to be the same as the ones dof the MPO.","category":"page"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"#---------------------------\n# MPO and initial state MPS\n#---------------------------\n\nH = spinbosonmpo(ω0, Δ, d, N, cpars) # MPO representation of the Hamiltonian\n\nψ = unitcol(1,2) # Initial up-z system state \n\nA = productstatemps(physdims(H), state=[ψ, fill(unitcol(1,d), N)...]) # MPS representation of |ψ>|Vacuum>","category":"page"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"#---------------------------\n# Definition of observables\n#---------------------------\n\nob1 = OneSiteObservable(\"sz\", sz, 1)\n\nob2 = OneSiteObservable(\"chain mode occupation\", numb(d), (2,N+1))\n\nob3 = TwoSiteObservable(\"SXdisp\", sx, disp(d), [1], collect(2:N+1))","category":"page"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"#-------------\n# Simulation\n#------------\n\nA, dat = runsim(dt, tfinal, A, H;\n                name = \"ohmic spin boson model\",\n                method = method,\n                obs = [ob2,ob3],\n                convobs = [ob1],\n                params = @LogParams(N, d, α, Δ, ω0, s),\n                convparams = convparams,\n                verbose = false,\n                savebonddims = true, # this keyword argument enables the bond dimension at each time step to be saved when using DTDVP\n                save = true,\n                plot = true,\n                );","category":"page"},{"location":"examples/sbm/","page":"The Spin-Boson Model","title":"The Spin-Boson Model","text":"#----------\n# Plots\n#----------\n\nmethod == :TDVP1 && plot(dat[\"data/times\"], dat[\"convdata/sz\"], label=[\"Dmax = 2\" \"Dmax = 4\" \"Dmax = 6\"], xlabel=L\"t\",ylabel=L\"\\sigma_z\")\n\nmethod == :DTDVP && plot(dat[\"data/times\"], dat[\"convdata/sz\"], label=[\"p = 1e-2\" \"p = 1e-3\" \"p = 1e-4\"], xlabel=L\"t\",ylabel=L\"\\sigma_z\") \n\nmethod == :DTDVP && heatmap(dat[\"data/times\"], collect(0:N+1), dat[\"data/bonddims\"], xlabel=L\"t\",ylabel=\"bond index\")\n\nheatmap(dat[\"data/times\"], collect(1:N), abs.(dat[\"data/SXdisp\"][1,:,:]), xlabel=L\"t\",ylabel=\"chain mode\")","category":"page"},{"location":"methods/#List-of-all-methods","page":"Methods","title":"List of all methods","text":"","category":"section"},{"location":"methods/","page":"Methods","title":"Methods","text":"Modules = [MPSDynamics]","category":"page"},{"location":"methods/#MPSDynamics.OneSiteObservable-Tuple{Any, Any, Any}","page":"Methods","title":"MPSDynamics.OneSiteObservable","text":"OneSiteObservable(name,op,sites)\n\nComputes the local expectation value of the one-site operator op on the specified sites. Used to define one-site observables that are obs and convobs parameters for the runsim function.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.MPOtoVector-Tuple{ITensors.MPO}","page":"Methods","title":"MPSDynamics.MPOtoVector","text":"MPOtoVector(mpo::MPO)\n\nConvert an ITensors chain MPO into a form compatible with MPSDynamics\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.addchild!-Tuple{MPSDynamics.Tree, Int64}","page":"Methods","title":"MPSDynamics.addchild!","text":"addchild!(tree::Tree, id::Int)\n\nAdd child to node id of tree.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.addchildren!-Tuple{MPSDynamics.Tree, Int64, Int64}","page":"Methods","title":"MPSDynamics.addchildren!","text":"addchildren!(tree::Tree, id::Int, n::Int)\n\nAdd n children to node id of tree.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.chaincoeffs_ohmic-Tuple{Any, Any, Any}","page":"Methods","title":"MPSDynamics.chaincoeffs_ohmic","text":"chaincoeffs_ohmic(N, α, s; ωc=1, soft=false)\n\nGenerate chain coefficients ϵ_0ϵ_1t_0t_1c_0 for an Harmonic bath at zero temperature with a power law spectral density given by:\n\nsoft cutoff: J(ω) = 2παω_c (fracωω_c)^s exp(-ωω_c) \n\nhard cutoff: J(ω) = 2παω_c (fracωω_c)^s θ(ω-ω_c)\n\nThe coefficients parameterise the chain Hamiltonian\n\nH = H_S + c_0 A_SB_0+sum_i=0^N-1t_i (b_i+1^dagger b_i +hc) + sum_i=0^N ϵ_ib_i^dagger b_i\n\nwhich is unitarily equivalent (before the truncation to N sites) to\n\nH = H_S + A_Sint_0^dωsqrtfracJ(ω)πB_ω + int_0^dωωb_ω^dagger b_ω\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.chainmps-Tuple{Int64, Int64, Int64}","page":"Methods","title":"MPSDynamics.chainmps","text":"chainmps(N::Int, site::Int, numex::Int)\n\nGenerate an MPS with numex excitations on site\n\nThe returned MPS will have bond-dimensions and physical dimensions numex+1\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.chainmps-Tuple{Int64, Vector{Int64}, Int64}","page":"Methods","title":"MPSDynamics.chainmps","text":"chainmps(N::Int, sites::Vector{Int}, numex::Int)\n\nGenerate an MPS with numex excitations of an equal super-position over sites\n\nThe returned MPS will have bond-dimensions and physical dimensions numex+1\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.chainprop-Tuple{Any, Any}","page":"Methods","title":"MPSDynamics.chainprop","text":"chainprop(t, cparams...)\n\nPropagate an excitation placed initially on the first site of a tight-binding chain with parameters given by cparams for a time t and return occupation expectation for each site.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.dynamap-NTuple{4, Any}","page":"Methods","title":"MPSDynamics.dynamap","text":"dynamap(ps1,ps2,ps3,ps4)\n\nCalulate complete dynamical map to time step at which ps1, ps2, ps3 and ps4 are specified.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.electron2kmps","page":"Methods","title":"MPSDynamics.electron2kmps","text":"electronkmps(N::Int, k::Vector{Int}, spin=:Up, chainparams=[fill(1.0,N), fill(1.0,N-1)])\n\nGenerate an MPS with 2 electrons in k-states k1 and k2.\n\n\n\n\n\n","category":"function"},{"location":"methods/#MPSDynamics.electronkmps","page":"Methods","title":"MPSDynamics.electronkmps","text":"electronkmps(N::Int, k::Int, spin=:Up, chainparams=[fill(1.0,N), fill(1.0,N-1)])\n\nGenerate an MPS for an electron with momentum k.\n\n\n\n\n\n","category":"function"},{"location":"methods/#MPSDynamics.elementmpo-Tuple{Any, Vararg{Any}}","page":"Methods","title":"MPSDynamics.elementmpo","text":"elementmpo(M, el...)\n\nReturn the element of the MPO M for the set of physical states el...\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.elementmps-Tuple{Any, Vararg{Any}}","page":"Methods","title":"MPSDynamics.elementmps","text":"elementmps(A, el...)\n\nReturn the element of the MPS A for the set of physical states el...\n\nExamples\n\njulia> A = chainmps(6, [2,4], 1);\n\njulia> elementmps(A, 1, 2, 1, 1, 1, 1)\n0.7071067811865475\n\njulia> elementmps(A, 1, 1, 1, 2, 1, 1)\n0.7071067811865475\n\njulia> elementmps(A, 1, 2, 1, 2, 1, 1)\n0.0\n\njulia> elementmps(A, 1, 1, 1, 1, 1, 1)\n0.0\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.entanglemententropy-Tuple{Any}","page":"Methods","title":"MPSDynamics.entanglemententropy","text":"entanglemententropy(A)\n\nFor a list of tensors A representing a right orthonormalized MPS, compute the entanglement entropy for a bipartite cut for every bond.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.findchainlength-Tuple{Any, Any}","page":"Methods","title":"MPSDynamics.findchainlength","text":"findchainlength(T, cparams...; eps=10^-6)\n\nEstimate length of chain required for a particular set of chain parameters by calculating how long an excitation on the first site takes to reach the end. The chain length is given as the length required for the excitation to have just reached the last site after time T. The initial number of sites in cparams has to be larger than the findchainlength result.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.findchild-Tuple{MPSDynamics.TreeNode, Int64}","page":"Methods","title":"MPSDynamics.findchild","text":"findchild(node::TreeNode, id::Int)\n\nReturn integer corresponding to the which number child site id is of node.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.hbathchain-Tuple{Int64, Int64, Any, Vararg{Any}}","page":"Methods","title":"MPSDynamics.hbathchain","text":"hbathchain(N::Int, d::Int, chainparams, longrangecc...; tree=false, reverse=false, coupletox=false)\n\nGenerate MPO representing a tight-binding chain of N oscillators with d Fock states each. Chain parameters are supplied in the standard form: chainparams =ϵ_0ϵ_1t_0t_1c_0. The output does not itself represent a complete MPO but will possess an end which is open and should be attached to another tensor site, usually representing the system.\n\nArguments\n\nreverse: If reverse=true create a chain were the last (i.e. Nth) site is the site which couples to the system\ncoupletox: Used to choose the form of the system coupling. coupletox=true gives a non-number conserving coupling of the form H_textI= A_textS(b_0^dagger + b_0) where A_textS is a system operator, while coupletox=false gives the number-converving coupling H_textI=(A_textS b_0^dagger + A_textS^dagger b_0)\ntree: If true the resulting chain will be of type TreeNetwork; useful for construcing tree-MPOs \n\nExample\n\nOne can constuct a system site tensor to couple to a chain by using the function up to populate the tensor. For example, to construct a system site with Hamiltonian Hs and coupling operator As, the system tensor M is constructed as follows for a non-number conserving interaction:\n\nu = one(Hs) # system identity\nM = zeros(1,3,2,2)\nM[1, :, :, :] = up(Hs, As, u)\n\nThe full MPO can then be constructed with:\n\nHmpo = [M, hbathchain(N, d, chainparams, coupletox=true)...]\n\nSimilarly for a number conserving interaction the site tensor would look like:\n\nu = one(Hs) # system identity\nM = zeros(1,4,2,2)\nM[1, :, :, :] = up(Hs, As, As', u)\n\nAnd the full MPO would be\n\nHmpo = [M, hbathchain(N, d, chainparams; coupletox=false)...]\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.heisenbergmpo","page":"Methods","title":"MPSDynamics.heisenbergmpo","text":"heisenbergmpo(N::Int, J=1.0) = xyzmpo(N; Jx=J)\n\nGenerate MPO for the N-spin Heisenberg XXX model, defined by the Hamiltonian\n\nH = sum_n=1^N-1 -J σ_x^n σ_x^n+1 - J σ_y^n σ_y^n+1 - J σ_z^n σ_z^n+1\n\nwith σ_x^n σ_y^n σ_z^n the Pauli spin-1/2 matrices of the n^textth site.\n\n\n\n\n\n","category":"function"},{"location":"methods/#MPSDynamics.ibmmpo-NTuple{4, Any}","page":"Methods","title":"MPSDynamics.ibmmpo","text":"ibmmpo(ω0, d, N, chainparams; tree=false)\n\nGenerate MPO for a spin-1/2 coupled to a chain of harmonic oscillators with the interacting boson model (IBM), defined by the Hamiltonian\n\nH = fracω_02σ_z +  c_0σ_z(b_0^dagger+b_0) + sum_i=0^N-1 t_i (b_i+1^dagger b_i +hc) + sum_i=0^N ϵ_ib_i^dagger b_i.\n\nThe spin is on site 1 of the MPS and the bath modes are to the right.\n\nThis Hamiltonain is unitarily equivalent (before the truncation to N sites) to the spin-boson Hamiltonian defined by\n\nH =  fracω_02σ_z + σ_zint_0^ dωsqrtfracJ(ω)π(b_ω^dagger+b_ω) + int_0^ dω ωb_ω^dagger b_ω.\n\nThe chain parameters, supplied by chainparams=ϵ_0ϵ_1t_0t_1c_0, can be chosen to represent any arbitrary spectral density J(ω) at any temperature.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.isingmpo-Tuple{Int64}","page":"Methods","title":"MPSDynamics.isingmpo","text":"isingmpo(N; J=1.0, h=1.0)\n\nGenerate MPO for the N-spin 1D Ising model with external field vech = (00h), defined by the Hamiltonian\n\nH = sum_n=1^N-1 -J_x σ_x^n σ_x^n+1 + sum_n=1^N(- h_z σ_z^n)\n\nwith σ_x^n σ_y^n σ_z^n the Pauli spin-1/2 matrices of the n^textth site.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.longrange_isingmpo","page":"Methods","title":"MPSDynamics.longrange_isingmpo","text":"longrange_isingmpo(N::Int, α::Float64=0.; J=1.0, h=1.0) = longrange_xyzmpo(N, α; Jx=J, Jy=0., Jz=0., hz=h, hx=0.)\n\n\n\n\n\n","category":"function"},{"location":"methods/#MPSDynamics.longrange_xyzmpo","page":"Methods","title":"MPSDynamics.longrange_xyzmpo","text":"longrange_xyzmpo(N::Int, α::Float64=0.; Jx=1.0, Jy=Jx, Jz=Jx, hx=0., hz=0.)\n\nGennerate MPO for the N-spin long-range XYZ model with external field vech=(h_x 0 h_z), , defined by the Hamiltonian\n\n\n\n\n\n","category":"function"},{"location":"methods/#MPSDynamics.measure-Tuple{Any, OneSiteObservable}","page":"Methods","title":"MPSDynamics.measure","text":"measure(A, O; kwargs...)\n\nMeasure observable O on mps state A\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.measure1siteoperator-Tuple{Vector, Any, Vector{Int64}}","page":"Methods","title":"MPSDynamics.measure1siteoperator","text":"measure1siteoperator(A::Vector, O, sites::Vector{Int})\n\nFor a list of tensors A representing a right orthonormalized MPS, compute the local expectation value of a one-site operator O for every site or just one if it is specified.\n\nFor calculating operators on single sites this will be more efficient if the site is on the left of the mps.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.measure1siteoperator-Tuple{Vector, Any}","page":"Methods","title":"MPSDynamics.measure1siteoperator","text":"measure1siteoperator(A::Vector, O)\n\nFor a list of tensors A representing a right orthonormalized MPS, compute the local expectation value of a one-site operator O for every site.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.measure2siteoperator-Tuple{Vector, Any, Any, Int64, Int64}","page":"Methods","title":"MPSDynamics.measure2siteoperator","text":" measure2siteoperator(A::Vector, M1, M2, j1, j2)\n\nCaculate expectation of M1*M2 where M1 acts on site j1 and M2 acts on site j2, assumes A is right normalised.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.modemps","page":"Methods","title":"MPSDynamics.modemps","text":"modemps(N::Int, k::Vector{Int}, numex::Int, chainparams=[fill(1.0,N), fill(1.0,N-1)])\n\nGenerate an MPS with numex excitations of an equal superposition of modes k of a bosonic tight-binding chain.\n\n\n\n\n\n","category":"function"},{"location":"methods/#MPSDynamics.modemps-2","page":"Methods","title":"MPSDynamics.modemps","text":"modemps(N::Int, k::Int, numex::Int, chainparams=[fill(1.0,N), fill(1.0,N-1)])\n\nGenerate an MPS with numex excitations of mode k of a bosonic tight-binding chain. \n\nchainparams takes the form [e::Vector, t::Vector] where e are the on-site energies and t are the hoppping parameters.\n\nThe returned MPS will have bond-dimensions and physical dimensions numex+1\n\n\n\n\n\n","category":"function"},{"location":"methods/#MPSDynamics.mpsembed!-Tuple{Vector, Int64}","page":"Methods","title":"MPSDynamics.mpsembed!","text":"mpsembed(A::Vector, Dmax::Int)\n\nEmbed MPS A in manifold of max bond-dimension Dmax\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.mpsleftnorm!","page":"Methods","title":"MPSDynamics.mpsleftnorm!","text":"mpsleftnorm!(A::Vector, jq::Int=length(A))\n\nLeft orthoganalise MPS A up to site jq.\n\n\n\n\n\n","category":"function"},{"location":"methods/#MPSDynamics.mpsmixednorm!-Tuple{MPSDynamics.TreeNetwork, Int64}","page":"Methods","title":"MPSDynamics.mpsmixednorm!","text":"mpsmixednorm!(A::TreeNetwork, id::Int)\n\nNormalise tree-MPS A such that orthogonality centre is on site id.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.mpsmixednorm!-Tuple{Vector, Int64}","page":"Methods","title":"MPSDynamics.mpsmixednorm!","text":"mpsmixednorm!(A::Vector, OC::Int)\n\nPut MPS A into mixed canonical form with orthogonality centre on site OC.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.mpsmoveoc!-Tuple{MPSDynamics.TreeNetwork, Int64}","page":"Methods","title":"MPSDynamics.mpsmoveoc!","text":"mpsmoveoc!(A::TreeNetwork, id::Int)\n\nMove the orthogonality centre of right normalised tree-MPS A to site id.\n\nThis function will be more efficient than using mpsmixednorm! if the tree-MPS is already right-normalised.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.mpsrightnorm!","page":"Methods","title":"MPSDynamics.mpsrightnorm!","text":"mpsrightnorm!(A::Vector, jq::Int=1)\n\nRight orthoganalise MPS A up to site jq.\n\n\n\n\n\n","category":"function"},{"location":"methods/#MPSDynamics.mpsrightnorm!-Tuple{MPSDynamics.TreeNetwork}","page":"Methods","title":"MPSDynamics.mpsrightnorm!","text":"mpsrightnorm!(A::TreeNetwork)\n\nWhen applied to a tree-MPS, right normalise towards head-node.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.mpsshiftoc!-Tuple{MPSDynamics.TreeNetwork, Int64}","page":"Methods","title":"MPSDynamics.mpsshiftoc!","text":"mpsshiftoc!(A::TreeNetwork, newhd::Int)\n\nShift the orthogonality centre by one site, setting new head-node newhd.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.multiply-Tuple{Vector, Vector}","page":"Methods","title":"MPSDynamics.multiply","text":"multiply(M1::Vector, M2::Vector)\n\nCalculates M1*M2 where M1 and M2 are MPOs\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.nearestneighbourmpo","page":"Methods","title":"MPSDynamics.nearestneighbourmpo","text":"nearestneighbourmpo(N::Int, h0, A, Ad = A')\n\n\n\n\n\n","category":"function"},{"location":"methods/#MPSDynamics.nearestneighbourmpo-2","page":"Methods","title":"MPSDynamics.nearestneighbourmpo","text":"nearestneighbourmpo(tree_::Tree, h0, A, Ad = A')\n\n\n\n\n\n","category":"function"},{"location":"methods/#MPSDynamics.normmps-Tuple{MPSDynamics.TreeNetwork}","page":"Methods","title":"MPSDynamics.normmps","text":"normmps(net::TreeNetwork; mpsorthog=:None)\n\nWhen applied to a tree-MPS mpsorthog=:Left is not defined.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.normmps-Tuple{Vector}","page":"Methods","title":"MPSDynamics.normmps","text":"normmps(A::Vector; mpsorthog=:None)\n\nCalculate norm of MPS A.\n\nSetting mpsorthog=:Right/:Left will calculate the norm assuming right/left canonical form. Setting mpsorthog=OC::Int will cause the norm to be calculated assuming the orthoganility center is on site OC. If mpsorthog is :None the norm will be calculated as an MPS-MPS product.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.orthcentersmps-Tuple{Vector}","page":"Methods","title":"MPSDynamics.orthcentersmps","text":"orthcentersmps(A)\n\nCompute the orthoganality centres of MPS A.\n\nReturn value is a list in which each element is the corresponding site tensor of A with the orthoganility centre on that site. Assumes A is right normalised.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.physdims-Tuple{Vector}","page":"Methods","title":"MPSDynamics.physdims","text":"physdims(M)\n\nReturn the physical dimensions of an MPS or MPO M.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.productstatemps","page":"Methods","title":"MPSDynamics.productstatemps","text":"productstatemps(physdims::Dims, Dmax=1; state=:Vacuum, mpsorthog=:Right)\n\nReturn an MPS representing a product state with local Hilbert space dimensions given by physdims.\n\nBy default all bond-dimensions will be 1 since the state is a product state. However, to embed the product state in a manifold of greater bond-dimension, Dmax can be set accordingly.\n\nThe indvidual states of the MPS sites can be provided by setting state to a list of column vectors. Setting state=:Vacuum will produce an MPS in the vacuum state (where the state of each site is represented by a column vector with a 1 in the first row and zeros elsewhere). Setting state=:FullOccupy will produce an MPS in which each site is fully occupied (ie. a column vector with a 1 in the last row and zeros elsewhere).\n\nThe argument mpsorthog can be used to set the gauge of the resulting MPS.\n\nExample\n\njulia> ψ = unitcol(1,2); d = 6; N = 30; α = 0.1; Δ = 0.0; ω0 = 0.2; s = 1\n\njulia> cpars = chaincoeffs_ohmic(N, α, s)\n\njulia> H = spinbosonmpo(ω0, Δ, d, N, cpars)\n\njulia> A = productstatemps(physdims(H), state=[ψ, fill(unitcol(1,d), N)...]) # MPS representation of |ψ>|Vacuum>\n\n\n\n\n\n","category":"function"},{"location":"methods/#MPSDynamics.productstatemps-2","page":"Methods","title":"MPSDynamics.productstatemps","text":"productstatemps(N::Int, d::Int, Dmax=1; state=:Vacuum, mpsorthog=:Right)\n\nReturn an N-site MPS with all local Hilbert space dimensions given by d. \n\n\n\n\n\n","category":"function"},{"location":"methods/#MPSDynamics.randisometry-Tuple{Type, Int64, Int64}","page":"Methods","title":"MPSDynamics.randisometry","text":"randisometry([T=Float64], dims...)\n\nConstruct a random isometry\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.randmps","page":"Methods","title":"MPSDynamics.randmps","text":"randmps(N::Int, d::Int, Dmax::Int, T=Float64)\n\nConstruct a random, N-site, right-normalised MPS with all local Hilbert space dimensions given by d.\n\n\n\n\n\n","category":"function"},{"location":"methods/#MPSDynamics.randmps-2","page":"Methods","title":"MPSDynamics.randmps","text":"randmps(tree::Tree, physdims, Dmax::Int, T::Type{<:Number} = Float64)\n\nConstruct a random, right-normalised, tree-MPS, with structure given by tree and max bond-dimension given by Dmax.\n\nThe local Hilbert space dimensions are specified by physdims which can either be of type Dims{length(tree)}, specifying the dimension of each site, or of type Int, in which case the same local dimension is used for every site.\n\n\n\n\n\n","category":"function"},{"location":"methods/#MPSDynamics.randmps-Union{Tuple{N}, Tuple{Tuple{Vararg{Int64, N}}, Int64}, Tuple{Tuple{Vararg{Int64, N}}, Int64, Type{<:Number}}} where N","page":"Methods","title":"MPSDynamics.randmps","text":"randmps(physdims::Dims{N}, Dmax::Int, T::Type{<:Number} = Float64) where {N}\n\nConstruct a random, right-normalised MPS with local Hilbert space dimensions given by physdims and max bond-dimension given by Dmax. \n\nT specifies the element type, eg. use T=ComplexF64 for a complex valued MPS.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.randtree-Tuple{Int64, Int64}","page":"Methods","title":"MPSDynamics.randtree","text":"randtree(numnodes::Int, maxdegree::Int)\n\nConstruct a random tree with nummodes modes and max degree maxdegree.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.readchaincoeffs-Tuple{Any, Vararg{Any}}","page":"Methods","title":"MPSDynamics.readchaincoeffs","text":"readchaincoeffs(fdir, params...)\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.rmsd-Tuple{Any, Any}","page":"Methods","title":"MPSDynamics.rmsd","text":"rmsd(dat1::Vector{Float64}, dat2::Vector{Float64})\n\nCalculate the root mean squared difference between two measurements of an observable over the same time period.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.spinbosonmpo-NTuple{5, Any}","page":"Methods","title":"MPSDynamics.spinbosonmpo","text":"spinbosonmpo(ω0, Δ, d, N, chainparams; rwa=false, tree=false)\n\nGenerate MPO for a spin-1/2 coupled to a chain of harmonic oscillators, defined by the Hamiltonian\n\nH = fracω_02σ_z + Δσ_x + c_0σ_x(b_0^dagger+b_0) + sum_i=0^N-1 t_i (b_i+1^dagger b_i +hc) + sum_i=0^N ϵ_ib_i^dagger b_i.\n\nThe spin is on site 1 of the MPS and the bath modes are to the right.\n\nThis Hamiltonain is unitarily equivalent (before the truncation to N sites) to the spin-boson Hamiltonian defined by\n\nH =  fracω_02σ_z + Δσ_x + σ_xint_0^ dωsqrtfracJ(ω)π(b_ω^dagger+b_ω) + int_0^ dω ωb_ω^dagger b_ω.\n\nThe chain parameters, supplied by chainparams=ϵ_0ϵ_1t_0t_1c_0, can be chosen to represent any arbitrary spectral density J(ω) at any temperature.\n\nThe rotating wave approximation can be made by setting rwa=true.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.spinchainmpo-Tuple{Int64}","page":"Methods","title":"MPSDynamics.spinchainmpo","text":"spinchainmpo(N::Int; J=1.0, hz=1.0, hx=0.0, i=div(N,2))\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.svdmps-Tuple{Any}","page":"Methods","title":"MPSDynamics.svdmps","text":"svdmps(A)\n\nFor a right normalised mps A compute the full svd spectrum for a bipartition at every bond.\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.svdtrunc-Tuple{Any}","page":"Methods","title":"MPSDynamics.svdtrunc","text":"U, S, Vd = svdtrunc(A; truncdim = max(size(A)...), truncerr = 0.)\n\nPerform a truncated SVD, with maximum number of singular values to keep equal to truncdim or truncating any singular values smaller than truncerr. If both options are provided, the smallest number of singular values will be kept. Unlike the SVD in Julia, this returns matrix U, a diagonal matrix (not a vector) S, and Vt such that A ≈ U * S * Vt\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.tightbindingmpo-Tuple{Int64, Int64}","page":"Methods","title":"MPSDynamics.tightbindingmpo","text":"tightbindingmpo(N::Int, d::Int; J=1.0, e=1.0)\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.tunnelingmpo-Tuple{Any, Any, Any, Any, Any, Int64, Int64}","page":"Methods","title":"MPSDynamics.tunnelingmpo","text":"tunnelingmpo(ϵ, delta, α, s, β, d::Int, nummodes::Int; tree=false, ωc=1)\n\n\n\n\n\n","category":"method"},{"location":"methods/#MPSDynamics.twobathspinmpo","page":"Methods","title":"MPSDynamics.twobathspinmpo","text":"twobathspinmpo(ω0, Δ, Nl, Nr, dl, dr, chainparamsl=[fill(1.0,N),fill(1.0,N-1), 1.0], chainparamsr=chainparamsl; tree=false)\n\nGenerate MPO for a spin-1/2 coupled to two chains of harmonic oscillators, defined by the Hamiltonian\n\nH = fracω_02σ_z + Δσ_x + c_0^rσ_x(b_0^dagger+b_0) + sum_i=0^N_r-1 t_i^r (b_i+1^dagger b_i +hc) + sum_i=0^N_r ϵ_i^rb_i^dagger b_i + c_0^lσ_x(d_0^dagger+d_0) + sum_i=0^N_l-1 t_i^l (d_i+1^dagger d_i +hc) + sum_i=0^N_l ϵ_i^l d_i^dagger d_i.\n\nThe spin is on site N_l + 1 of the MPS, surrounded by the left chain modes and the right chain modes.\n\nThis Hamiltonain is unitarily equivalent (before the truncation to N sites) to the spin-boson Hamiltonian defined by\n\nH =  fracω_02σ_z + Δσ_x + σ_xint_0^ dωsqrtfracJ(ω)π(b_ω^dagger+b_ω) + int_0^ dω ωb_ω^dagger b_ωi + σ_xint_0^ dωsqrtfracJ^l(ω)π(d_ω^dagger+d_ω) + int_0^ dω ωd_ω^dagger d_ω.\n\nThe chain parameters, supplied by chainparams=ϵ_0ϵ_1t_0t_1c_0, can be chosen to represent any arbitrary spectral density J(ω) at any temperature. The two chains can have a different spectral density.\n\n\n\n\n\n","category":"function"},{"location":"methods/#MPSDynamics.xxzmpo","page":"Methods","title":"MPSDynamics.xxzmpo","text":"xxzmpo(N::Int, Δ = 1.0, J=1.0) = xyzmpo(N; Jx=J, Jy=J, Jz=J*Δ)\n\nGenerate MPO for the N-spin XXZ model, defined by the Hamiltonian\n\nH = sum_n=1^N-1 -J σ_x^n σ_x^n+1 - J σ_y^n σ_y^n+1 - Delta J σ_z^n σ_z^n+1\n\nwith σ_x^n σ_y^n σ_z^n the Pauli spin-1/2 matrices of the n^textth site.\n\n\n\n\n\n","category":"function"},{"location":"methods/#MPSDynamics.xyzmpo-Tuple{Int64}","page":"Methods","title":"MPSDynamics.xyzmpo","text":"xyzmpo(N::Int; Jx=1.0, Jy=Jx, Jz=Jx, hx=0., hz=0.)\n\nGenerate MPO for the N-spin XYZ model with external field vech=(h_x 0 h_z), , defined by the Hamiltonian\n\nH = sum_n=1^N-1 -J_x σ_x^n σ_x^n+1 - J_y σ_y^n σ_y^n+1 - J_z σ_z^n σ_z^n+1 + sum_n=1^N(- h_x σ_x^n - h_z σ_z^n)\n\nwith σ_x^n σ_y^n σ_z^n the Pauli spin-1/2 matrices of the n^textth site.\n\n\n\n\n\n","category":"method"},{"location":"#Introduction","page":"Introduction","title":"Introduction","text":"","category":"section"},{"location":"","page":"Introduction","title":"Introduction","text":"The MPSDynamics.jl package provides an easy to use interface for performing tensor network simulations on matrix product states (MPS) and tree tensor network (TTN) states. Written in the Julia programming language, MPSDynamics.jl is a versatile open-source package providing a choice of several variants of the Time-Dependent Variational Principle (TDVP) method for time evolution.  The package also provides strong support for the measurement of observables, as well as the storing and logging of data, which makes it a useful tool for the study of many-body physics.  The package has been developed with the aim of studying non-Markovian open system dynamics at finite temperature using the state-of-the-art numerically exact Thermalized-Time Evolving Density operator with Orthonormal Polynomials Algorithm (T-TEDOPA) based on environment chain mapping. However the methods implemented can equally be applied to other areas of physics.","category":"page"},{"location":"","page":"Introduction","title":"Introduction","text":"warning: Warning\nThe documentation is currently undergoing massive restructurations/improvement. It's a work in progress until the next release scheduled for May, 2024.","category":"page"},{"location":"#Installation","page":"Introduction","title":"Installation","text":"","category":"section"},{"location":"","page":"Introduction","title":"Introduction","text":"The package may be installed by typing the following into a Julia REPL","category":"page"},{"location":"","page":"Introduction","title":"Introduction","text":"    ] add https://github.com/shareloqs/MPSDynamics.git","category":"page"},{"location":"#Table-of-Contents","page":"Introduction","title":"Table of Contents","text":"","category":"section"},{"location":"","page":"Introduction","title":"Introduction","text":"Pages = [\"index.md\", \"user-guide.md\", \"./examples/sbm.md\", \"./examples/puredephasing.md\", \"theory.md\", \"methods.md\", \"dev.md\"]\nDepth = 3","category":"page"},{"location":"#Citation","page":"Introduction","title":"Citation","text":"","category":"section"},{"location":"","page":"Introduction","title":"Introduction","text":"If you use the package in your research, please consider citing it. You can add the Zenodo record to your BibTex file:","category":"page"},{"location":"","page":"Introduction","title":"Introduction","text":"@misc{mpsdynamics_zenodo2021,\n\ttitle = {shareloqs/{MPSDynamics}},\n\tshorttitle = {{MPSDynamics.jl}},\n\turl = {https://zenodo.org/record/5106435},\n\tabstract = {Tensor network simulations for finite temperature, open quantum system dynamics},\n\tpublisher = {Zenodo},\n\tauthor = {Dunnett, Angus and Lacroix, Thibaut and Le Dé, Brieuc and Riva, Angela},\n\tyear = {2021},\n\tdoi = {10.5281/zenodo.5106435},\n}","category":"page"}]
 }
diff --git a/docs/theory/index.html b/docs/theory/index.html
index 58398db..c5f490d 100644
--- a/docs/theory/index.html
+++ b/docs/theory/index.html
@@ -1,4 +1,4 @@
 <!DOCTYPE html>
 <html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Theoretical Background · MPSDynamics.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../"><img src="../assets/logo.png" alt="MPSDynamics.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">MPSDynamics.jl</span></div><form class="docs-search" action="../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Introduction</a></li><li><a class="tocitem" href="../user-guide/">User Guide</a></li><li><span class="tocitem">Examples</span><ul><li><a class="tocitem" href="../examples/sbm/">The Spin-Boson Model</a></li><li><a class="tocitem" href="../examples/puredephasing/">Pure-Dephasing</a></li></ul></li><li class="is-active"><a class="tocitem" href>Theoretical Background</a><ul class="internal"><li><a class="tocitem" href="#Chain-Mapping-of-bosonic-environments"><span>Chain-Mapping of bosonic environments</span></a></li><li><a class="tocitem" href="#Computation-of-the-chain-coefficients"><span>Computation of the chain coefficients</span></a></li><li><a class="tocitem" href="#Tensor-Networks"><span>Tensor Networks</span></a></li><li><a class="tocitem" href="#Time-Dependent-Variational-Principal"><span>Time-Dependent Variational Principal</span></a></li><li><a class="tocitem" href="#Bibliography"><span>Bibliography</span></a></li></ul></li><li><a class="tocitem" href="../methods/">Methods</a></li><li><a class="tocitem" href="../dev/">Developpers</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Theoretical Background</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Theoretical Background</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/shareloqs/MPSDynamics/blob/master/docs/src/theory.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Theoretical-Background"><a class="docs-heading-anchor" href="#Theoretical-Background">Theoretical Background</a><a id="Theoretical-Background-1"></a><a class="docs-heading-anchor-permalink" href="#Theoretical-Background" title="Permalink"></a></h1><h2 id="Chain-Mapping-of-bosonic-environments"><a class="docs-heading-anchor" href="#Chain-Mapping-of-bosonic-environments">Chain-Mapping of bosonic environments</a><a id="Chain-Mapping-of-bosonic-environments-1"></a><a class="docs-heading-anchor-permalink" href="#Chain-Mapping-of-bosonic-environments" title="Permalink"></a></h2><p>We consider, in the Schrödinger picture, a general Hamiltonian where a non-specified system interacts linearly with a bosonic environments</p><p class="math-container">\[\begin{aligned}
     \hat{H} =&amp; \hat{H}_S + \int_0^{+\infty} \hbar\omega\hat{a}^\dagger_\omega\hat{a}_\omega\ \mathrm{d}\omega + \hat{A}_S\int_0^{+\infty}\sqrt{J(\omega)}\left(\hat{a}_\omega + \hat{a}^\dagger_\omega\right)\mathrm{d}\omega
-\end{aligned}\]</p><p>where <span>$\hat{a}_\omega$</span> (<span>$\hat{a}^\dagger_\omega$</span>) is a bosonic annihilation (creation) operator for a normal mode of the environment of energy <span>$\hbar\omega$</span>, <span>$\hat{A}_S$</span> is a system operator, and <span>$J(\omega) = \sum_k |g_k|^2\delta(\omega - \omega_k)$</span> is the bath spectral density (SD), defined with the microscopic system-environment coupling strength <span>$g_k$</span>. The SD quantifies the coupling strengths of the different normal modes of the environment with the system. Any SD that is not flat corresponds to a non-Markovian environment.</p><h3 id="Zero-Temperature"><a class="docs-heading-anchor" href="#Zero-Temperature">Zero Temperature</a><a id="Zero-Temperature-1"></a><a class="docs-heading-anchor-permalink" href="#Zero-Temperature" title="Permalink"></a></h3><p>Let us consider the Hamiltonian presented in Eq.(1). We can introduce a unitary transformation of the continuous normal modes <span>$\hat{a}_\omega$</span> to an infinite discrete set of interacting modes <span>$\hat{b}_n$</span><sup class="footnote-reference"><a id="citeref-chin_exact_2010" href="#footnote-chin_exact_2010">[chin_exact_2010]</a></sup>.</p><p class="math-container">\[    \hat{a}_\omega = \sum_{n=0}^{+\infty} U_n(\omega)\hat{b}_n = \sum_{n=0}^{+\infty} \sqrt{J(\omega)}P_n(\omega)\hat{b}_n\ ,\]</p><p>where <span>$P_n(\omega)$</span> are orthonormal polynomials such that</p><p class="math-container">\[    \int_{0}^{+\infty}P_n(\omega)P_m(\omega)J(\omega)\mathrm{d}\omega = \delta_{n,m}\ ;\]</p><p>and the inverse transformation is</p><p class="math-container">\[    \hat{b}_n = \int_0^{+\infty} U_n(\omega)\hat{a}_\omega\mathrm{d}\omega\ .\]</p><p>Note that the orthonormality of the polynomials ensures the unitarity of the transformation defined in Eq.(2). The mapping from a continuous set of modes to a (still infinite) discrete set might seem counter-intuitive, however it is a direct consequence of the separability of the underlying Hilbert space.</p><p>Under this transformation, the Hamiltonian in Eq.(1) becomes</p><p class="math-container">\[    \hat{H}= \hat{H}_S + \sum_{n=0}^{+\infty}\varepsilon_n\hat{b}_n^\dagger\hat{b}_n + t_n(\hat{b}_{n+1}^\dagger\hat{b}_n + \mathrm{h.c.}) + \kappa\hat{A}_S(\hat{b}_0 + \hat{b}_0^\dagger)\ .\]</p><p>Hence, this mapping transforms the normal bath Hamiltonian into a tight-binding Hamiltonian with on-site energies <span>$\varepsilon_n$</span> and hopping energies <span>$t_n$</span>. Another important consequence of this mapping is that now the system only interacts with the first mode <span>$n = 0$</span> of the chain-mapped environment. The chain coefficients <span>$\varepsilon_n$</span>, <span>$t_n$</span>, and the coupling <span>$\kappa$</span> depend solely on the SD.</p><p>This makes chain mapping a tool of choice for describing systems coupled to environment with highly structured SD (e.g. experimentally measured or calculated <em>ab initio</em>)<sup class="footnote-reference"><a id="citeref-chin_role_2013" href="#footnote-chin_role_2013">[chin_role_2013]</a></sup><sup class="footnote-reference"><a id="citeref-alvertis_nonequilibrium_2019" href="#footnote-alvertis_nonequilibrium_2019">[alvertis_nonequilibrium_2019]</a></sup><sup class="footnote-reference"><a id="citeref-dunnett_influence_2021" href="#footnote-dunnett_influence_2021">[dunnett_influence_2021]</a></sup><sup class="footnote-reference"><a id="citeref-caycedosoler_exact_2022" href="#footnote-caycedosoler_exact_2022">[caycedosoler_exact_2022]</a></sup>. In this new representation, the Hamiltonian in Eq.(5) has naturally a 1D chain topology. This makes its representation as a Matrix Product Operator (MPO) and the representation of the joint {System + Environment} wave-function as a Matrix Product State (MPS) suited <sup class="footnote-reference"><a id="citeref-orus_practical_2014" href="#footnote-orus_practical_2014">[orus_practical_2014]</a></sup><sup class="footnote-reference"><a id="citeref-paeckel_timeevolution_2019" href="#footnote-paeckel_timeevolution_2019">[paeckel_timeevolution_2019]</a></sup>.</p><p>The orthogonal polynomial-based chain mapping and the subsequent representation of the joint wave-function as a MPS (and the operators as MPO) are the building blocks of the Time-dependent Density operator with Orthonormal Polynomials Algorithm (TEDOPA) one of the state-of-the-art numerically exact method to simulate the dynamics of open quantum systems especially in the non-Markovian, non-perturbative regimes both at zero and finite temperatures <sup class="footnote-reference"><a id="citeref-prior_efficient_2010" href="#footnote-prior_efficient_2010">[prior_efficient_2010]</a></sup><sup class="footnote-reference"><a id="citeref-woods_simulating_2015" href="#footnote-woods_simulating_2015">[woods_simulating_2015]</a></sup><sup class="footnote-reference"><a id="citeref-tamascelli_efficient_2019" href="#footnote-tamascelli_efficient_2019">[tamascelli_efficient_2019]</a></sup><sup class="footnote-reference"><a id="citeref-dunnett_simulating_2021" href="#footnote-dunnett_simulating_2021">[dunnett_simulating_2021]</a></sup><sup class="footnote-reference"><a id="citeref-lacroix_unveiling_2021" href="#footnote-lacroix_unveiling_2021">[lacroix_unveiling_2021]</a></sup>.</p><h3 id="Finite-Temperature"><a class="docs-heading-anchor" href="#Finite-Temperature">Finite Temperature</a><a id="Finite-Temperature-1"></a><a class="docs-heading-anchor-permalink" href="#Finite-Temperature" title="Permalink"></a></h3><p>Explain that by extending the bath to negative frequencies and having temperature-dependent system environment couplings, it is possible to describe the finite temperature case as an effective zero temperature one. Hence, we can keep the pure state description and avoid moving to density matrices at the cost of doubling the size of the environment.</p><h2 id="Computation-of-the-chain-coefficients"><a class="docs-heading-anchor" href="#Computation-of-the-chain-coefficients">Computation of the chain coefficients</a><a id="Computation-of-the-chain-coefficients-1"></a><a class="docs-heading-anchor-permalink" href="#Computation-of-the-chain-coefficients" title="Permalink"></a></h2><p>A useful property of the orthonormal polynomials is that they obey a recurrence relation</p><p class="math-container">\[    P_n(\omega) = (C_{n-1}\omega - A_{n-1})P_{n-1}(\omega) + B_{n-1}P_{n-2}(\omega)\ ,\]</p><p>where <span>$A_n$</span> is related to the first moment of <span>$P_n$</span>, <span>$B_n$</span> and <span>$C_n$</span> to the norms of <span>$P_n$</span> and <span>$P_{n-1}$</span><sup class="footnote-reference"><a id="citeref-appel_mathematics_2007" href="#footnote-appel_mathematics_2007">[appel_mathematics_2007]</a></sup>. This recurrence relation can be used to construct the polynomials with the conditions that <span>$P_0(\omega) = ||p_0||^{-1} = \left(\int_{\mathbb{R}^{+}} J(\omega)\mathrm{d}\omega \right)^{-\frac{1}{2}}$</span> and <span>$P_{-1}(\omega) = 0$</span>, with <span>$||\bullet||$</span> the norm of <span>$\bullet$</span> with respect to the measure <span>$J(\omega)$</span>, and <span>$P_n(\omega) = p_n(\omega)||p_n||^{-1}$</span> ; where the polynomials <span>$\{p_n\}_{n\in\mathbb{N}}$</span> are the so called <em>monic polynomials</em> where the factor <span>$a_n$</span> in front of <span>$\omega^{n}$</span> is equal to 1.</p><p>The energy of the chain mode <span>$n$</span> is given by <span>$\varepsilon_n = A_n C_n^{-1}$</span> and <span>$t_n=C_n^{-1}$</span> is the coupling between mode <span>$n$</span> and <span>$n+1$</span><sup class="footnote-reference"><a id="citeref-chin_exact_2010" href="#footnote-chin_exact_2010">[chin_exact_2010]</a></sup>.</p><p>The system couples <em>only</em> to the first mode with the coupling strength <span>$\kappa = ||p_0||$</span>.</p><p>Explain that for some weight function/SD they are known analytically and that for others we can use the build-in routines inspired by Gautschi or the PolyChaos.jl package.</p><h2 id="Tensor-Networks"><a class="docs-heading-anchor" href="#Tensor-Networks">Tensor Networks</a><a id="Tensor-Networks-1"></a><a class="docs-heading-anchor-permalink" href="#Tensor-Networks" title="Permalink"></a></h2><p>A multipartite quantum state <span>$|\psi\rangle$</span>, e.g. a <span>$N$</span>-site system where the sites can each be in a state <span>$|\phi_i\rangle$</span> belonging to a <span>$d$</span>-dimensional Hilbert space, can be written as follows</p><p class="math-container">\[    |\psi\rangle = \sum_{\{i_k\}}c_{i_1\ldots i_N}|\phi_{i_1}\rangle\otimes\ldots\otimes|\phi_{i_N}\rangle\ ,\]</p><p>where the complex numbers <span>$c_{i_1\ldots i_N}$</span> are the amplitudes of each state <span>$|\phi_{i_1}\rangle\otimes\ldots\otimes|\phi_{i_N}\rangle$</span> whose superpositions form in full generality the state <span>$|\psi\rangle$</span>. Thus the state <span>$|\psi\rangle$</span> can be completely represented by a rank-<span>$N$</span> tensor <span>$c$</span> that is the collection of all possible amplitudes <span>$c_{i_1\ldots i_N}$</span>. Here by the rank of a tensor, we simply mean the number of indices it has.</p><h3 id="MPS"><a class="docs-heading-anchor" href="#MPS">MPS</a><a id="MPS-1"></a><a class="docs-heading-anchor-permalink" href="#MPS" title="Permalink"></a></h3><p>The tensor <span>$c$</span> of a quantum state <span>$|\psi\rangle$</span> corresponding to a one-dimensional system can be decomposed into a product of <span>$N$</span> smaller rank-3 tensors <span>$T_{k}$</span> (except for the first and last sites where the tensors will have a rank-2)</p><p class="math-container">\[    c_{i_1\ldots i_N} = \sum_{\{\alpha\}} T^{\alpha_1}_{i_1}T^{\alpha_1\alpha_2\ }_{i_2}T^{\alpha_2\alpha_3\ }_{i_3}\ldots T^{\alpha_{N-1}}_{i_N} \ .\]</p><p>In this form, the local tensor <span>$T_k$</span> contains the information on the quantum state on site <span>$k$</span> and its relation (especially the entanglement) with the neighbouring sites.</p><p>The decomposition of the tensor of the amplitudes of a quantum state into a product of smaller rank tensors is called a <strong>Matrix Product State</strong> decomposition.</p><p>The contracted indices <span>$\alpha_k$</span> between the tensors are called <em>virtual indices</em> and carry information about the correlations between bi-partitions of the state at bond <span>$k$</span>. The number of different values a virtual index can take is called the <em>bond dimension</em> and is denoted <span>$D$</span>. The free indices <span>$i_k$</span> associated with local quantum states are called <em>physical indices</em>. Thus, they can take <span>$d$</span> values (with <span>$d$</span> the dimension of the local Hilbert space).</p><p>Any state in the Hilbert space of a one-dimensional many-body system can in principle be represented by a MPS by choosing a sufficiently large value for the bond dimension <span>$D$</span> \cite{Orus}. On top of this intellectually satisfying property of MPSs being a dense set of states for a 1d-system, they can also be used as a practical Ansätze for a many-body quantum states by setting a maximal allowed value <span>$\chi$</span> for the bond dimension <span>$D$</span>. In doing so, we restrict ourselves to a corner of the total Hilbert space. The rationale behind this Ansatz is the following: if the initial quantum state of a many-body system has a low bond dimension (typically if the initial state is a product state with <span>$D = 1$</span>), then in a finite time it will only be able to explore a region of the Hilbert space that is not to far away from its starting point. Thus, the bond dimension will not have the time to diverge exponentially \cite{poulin<em>quantum</em>2011}. However, depending on the physical system at hand, this sub-manifold of the Hilbert space could still be &quot;too large&quot;. There is an additional reason that explains why MPSs are good Ansätze for 1d physical systems. Most many-body Hamiltonians we (physicists) are interested in are local, meaning that the interactions they describe involve objects that are &quot;neighbours&quot;. For such Hamiltonians, the ground states (outside of potential critical phases) follow the so called <em>area law</em> for the entanglement entropy.\cite{srednicki<em>entropy</em>1993, vidal<em>entanglement</em>2003, wolf<em>area</em>2008}. This law states that the entanglement entropy <span>$S_{vN}$</span> of a bi-partition of the system is proportional, not to the volume of the partition as one might expect, but to the hyper-surface of the partition&#39;s boundary; hence the name &quot;area law&quot;. For a 3d system this corresponds to an actual surface area <span>$A$</span>, <span>$S_{vN} \sim A$</span>; for a 2d system it corresponds to the length <span>$L$</span> of the partition&#39;s boundary, <span>$S_{vN} \sim L$</span>; and in 1d the boundary reduces to a point, thus the entropy will be independent of the size of the system <span>$S_{vN} \sim \text{constant}$</span>. The MPSs are states that satisfy this area law.</p><p>An application of the <a href="https://en.wikipedia.org/wiki/Singular_value_decomposition">Singular Value Decomposition</a> is to create efficient approximations of quantum states to perform computations. The main idea is to reduce the content of the MPS to keep only the parts that contain the physics of interest. One method to realise this approximation is to do a SVD on each of the tensors of the MPS after each time step of the state time-evolution and to trim the smallest singular values in order to decrease the bond dimension of the MPS down to a chosen maximal value <span>$\chi$</span>. The corresponding columns and rows of the unitary matrices <span>$U$</span> and <span>$V^\dagger$</span> are also removed. Then, the trimmed matrices <span>$\tilde{U}$</span>, <span>$\tilde{S}$</span> and <span>$\tilde{V}^\dagger$</span> are contracted back to give an approximated tensor <span>$T$</span> with a smaller bond dimension. Another way to apply the restricted rank approximation is to restrict oneself into working in a manifold of fixed bond dimension <span>$D$</span> and to use methods that can enforce this constraint.</p><h3 id="MPO"><a class="docs-heading-anchor" href="#MPO">MPO</a><a id="MPO-1"></a><a class="docs-heading-anchor-permalink" href="#MPO" title="Permalink"></a></h3><p>In order to compute expectation values of observables or apply unitary transformations to a quantum state, we need a TN representation of operators. In the same fashion as a one-dimensional quantum state can be represented as a MPS, operators acting on those states can be represented as <strong>Matrix Product Operators</strong> (MPO). For an operator <span>$\hat{O}$</span>, its MPO can be defined as follows</p><p class="math-container">\[    \hat{O} = \sum_{\{i_k\}\{i_k^{&#39;}\} \{w\}} W^{i_1\ i^{&#39;}_1}_{1\ w_0w_1}\ldots  W^{i_N\ i^{&#39;}_N}_{N\ w_{N-1}w_N} |\phi_{i_1^{&#39;}}\ldots \phi_{i_N^{&#39;}}\rangle\langle\phi_{i_1}\ldots \phi_{i_N}| \]</p><p>The contracted indices between the tensors are called <em>virtual indices</em>. The free indices are called <em>physical indices</em> and correspond to the different input and output local quantum states.  They can take <span>$d$</span> values (with <span>$d$</span> the dimension of the local Hilbert space).</p><h3 id="TTN"><a class="docs-heading-anchor" href="#TTN">TTN</a><a id="TTN-1"></a><a class="docs-heading-anchor-permalink" href="#TTN" title="Permalink"></a></h3><p>A natural extension to the MPS is the (loop-free) tree tensor network.  A TTN is a generalisation of the MPS wherein each site, instead of being connected to only one other site to its right, may be connected to any arbitrary number of <em>child</em> sites. Provided the tree does not contain any loops, everything that one can do to an MPS/MPO can be extended straight-forwardly to TTN states and TTN operators.  The generalisation to trees introduces no new conceptual complexity (only implementational complexity). The sites of a TTN are usually referred to as <em>nodes</em>.  For our purposes, every node of a TTN state and operator has one <em>parent</em> leg, and any number (including zero) of child legs.  The first node is known as the head-node and has a dummy parent leg with dimension 1.</p><h2 id="Time-Dependent-Variational-Principal"><a class="docs-heading-anchor" href="#Time-Dependent-Variational-Principal">Time-Dependent Variational Principal</a><a id="Time-Dependent-Variational-Principal-1"></a><a class="docs-heading-anchor-permalink" href="#Time-Dependent-Variational-Principal" title="Permalink"></a></h2><p>The original idea behind TDVP goes back to Dirac \cite{dirac<em>note</em>1930} and Frenkel \cite{frenkel<em>wave</em>1934}. The main point, in the modern tensor networks formulation, is that instead of solving the Schrödinger equation and then truncating the MPS representation of the quantum state, one can solve the equations of motion projected into a space of restricted bond dimension \cite{haegeman<em>time-dependent</em>2011, haegeman<em>unifying</em>2016}.</p><p>The general formulation of the Dirac-Frenkel Variational Principle~\cite{raab<em>diracfrenkelmclachlan</em>2000} is that one looks for a solution <span>$|\varphi\rangle \in \mathcal{M}$</span> of the Schrödinger equation where <span>$\mathcal{M} \subset \mathcal{H}$</span> is a manifold of the total Hilbert space <span>$\mathcal{H}$</span> in which we think that the relevant physical states `live&#39;.</p><p>We define <span>$T_{|\varphi\rangle}\mathcal{M}$</span> the tangent space of <span>$\mathcal{M}$</span> around the state <span>$|\varphi\rangle$</span>. The criterion to find <span>$|\varphi\rangle$</span> is that for every state <span>$|\chi\rangle \in T_{|\varphi\rangle}\mathcal{M}$</span></p><p class="math-container">\[    \langle\chi|\left(\frac{\mathrm{d}}{\mathrm{d}t} - \frac{1}{\mathrm{i}\hbar}\hat{H}\right)|\varphi\rangle =0\ ,\]</p><p>which can be interpreted as saying that the time evolution procedure should keep <span>$|\varphi\rangle$</span> inside of the manifold <span>$\mathcal{M}$</span>.</p><p>The term <em>variational</em> in the name of the method comes from the fact that in practice one aims at minimising the right-hand side of Eq.~(\ref{eq:DiracFrenkel1}) to find <span>$|\varphi\rangle$</span>.</p><p>Introducing <span>$\hat{P}_{T_{|\varphi\rangle}\mathcal{M}}$</span> the projector onto the tangent space <span>$T_{|\varphi\rangle}\mathcal{M}$</span>, we can write the state <span>$|\chi\rangle = \hat{P}_{T_{|\varphi\rangle}\mathcal{M}}|\phi\rangle$</span> with <span>$|\phi\rangle$</span> a state in <span>$\mathcal{H}$</span>. Leading to</p><p class="math-container">\[    \forall |\phi\rangle \in \mathcal{H}, \ \langle\phi|\hat{P}_{T_{|\varphi\rangle}\mathcal{M}}\left(\frac{\mathrm{d}}{\mathrm{d}t} - \frac{1}{\mathrm{i}\hbar}\hat{H}\right)|\varphi\rangle =0\ .\]</p><p>Because the time derivation and the projector commute, we have</p><p class="math-container">\[    \forall |\phi\rangle \in \mathcal{H}, \ \langle\phi|\left(\frac{\mathrm{d}}{\mathrm{d}t} - \frac{1}{\mathrm{i}\hbar}\hat{P}_{T_{|\varphi\rangle}\mathcal{M}}\hat{H}\right)|\varphi\rangle =0\ .\]</p><p>This equation must be true for any <span>$|\phi\rangle \in \mathcal{H}$</span>, Eq.~(\ref{eq:DiracFrenkel1}) can thus be written</p><p class="math-container">\[    \left(\frac{\mathrm{d}}{\mathrm{d}t} - \frac{1}{\mathrm{i}\hbar}\hat{P}_{T_{|\varphi\rangle}\mathcal{M}}\hat{H}\right)|\varphi\rangle =0\ .\]</p><p>In the context of MPS, the manifold <span>$\mathcal{M}$</span> will correspond to the space of full-ranked MPS of a given bond dimension <span>$D$</span>, and the tangent space will be the space spanned by variations of single MPS tensors.</p><p>The major advantage of this method is that it naturally preserves the unitarity of the time evolution and conserves the energy.</p><h2 id="Bibliography"><a class="docs-heading-anchor" href="#Bibliography">Bibliography</a><a id="Bibliography-1"></a><a class="docs-heading-anchor-permalink" href="#Bibliography" title="Permalink"></a></h2><section class="footnotes is-size-7"><ul><li class="footnote" id="footnote-chin_exact_2010"><a class="tag is-link" href="#citeref-chin_exact_2010">chin_exact_2010</a><blockquote><p>Chin, A. W.; Rivas, Á.; Huelga, S. F.; Plenio, M. B. Exact Mapping between System-Reservoir Quantum Models and Semi-Infinite Discrete Chains Using Orthogonal Polynomials. Journal of Mathematical Physics 2010, 51 (9), 092109. https://doi.org/10.1063/1.3490188.</p></blockquote></li><li class="footnote" id="footnote-chin_role_2013"><a class="tag is-link" href="#citeref-chin_role_2013">chin_role_2013</a><blockquote><p>Chin, A. W.; Prior, J.; Rosenbach, R.; Caycedo-Soler, F.; Huelga, S. F.; Plenio, M. B. The Role of Non-Equilibrium Vibrational Structures in Electronic Coherence and Recoherence in Pigment–Protein Complexes. Nature Phys 2013, 9 (2), 113–118. https://doi.org/10.1038/nphys2515.</p></blockquote></li><li class="footnote" id="footnote-alvertis_nonequilibrium_2019"><a class="tag is-link" href="#citeref-alvertis_nonequilibrium_2019">alvertis_nonequilibrium_2019</a><blockquote><p>Alvertis, A. M.; Schröder, F. A. Y. N.; Chin, A. W. Non-Equilibrium Relaxation of Hot States in Organic Semiconductors: Impact of Mode-Selective Excitation on Charge Transfer. J. Chem. Phys. 2019, 151 (8), 084104. https://doi.org/10.1063/1.5115239.</p></blockquote></li><li class="footnote" id="footnote-dunnett_influence_2021"><a class="tag is-link" href="#citeref-dunnett_influence_2021">dunnett_influence_2021</a><blockquote><p>Dunnett, A. J.; Gowland, D.; Isborn, C. M.; Chin, A. W.; Zuehlsdorff, T. J. Influence of Non-Adiabatic Effects on Linear Absorption Spectra in the Condensed Phase: Methylene Blue. J. Chem. Phys. 2021, 155 (14), 144112. https://doi.org/10.1063/5.0062950.</p></blockquote></li><li class="footnote" id="footnote-caycedosoler_exact_2022"><a class="tag is-link" href="#citeref-caycedosoler_exact_2022">caycedosoler_exact_2022</a><blockquote><p>Caycedo-Soler, F.; Mattioni, A.; Lim, J.; Renger, T.; Huelga, S. F.; Plenio, M. B. Exact Simulation of Pigment-Protein Complexes Unveils Vibronic Renormalization of Electronic Parameters in Ultrafast Spectroscopy. Nat Commun 2022, 13 (1), 2912. https://doi.org/10.1038/s41467-022-30565-4.</p></blockquote></li><li class="footnote" id="footnote-orus_practical_2014"><a class="tag is-link" href="#citeref-orus_practical_2014">orus_practical_2014</a><blockquote><p>Orus, R. A Practical Introduction to Tensor Networks: Matrix Product States and Projected Entangled Pair States. Annals of Physics 2014, 349, 117–158. https://doi.org/10.1016/j.aop.2014.06.013.</p></blockquote></li><li class="footnote" id="footnote-paeckel_timeevolution_2019"><a class="tag is-link" href="#citeref-paeckel_timeevolution_2019">paeckel_timeevolution_2019</a><blockquote><p>Paeckel, S.; Köhler, T.; Swoboda, A.; Manmana, S. R.; Schollwöck, U.; Hubig, C. Time-Evolution Methods for Matrix-Product States. Annals of Physics 2019, 411, 167998. https://doi.org/10.1016/j.aop.2019.167998.</p></blockquote></li><li class="footnote" id="footnote-prior_efficient_2010"><a class="tag is-link" href="#citeref-prior_efficient_2010">prior_efficient_2010</a><blockquote><p>Prior, J.; Chin, A. W.; Huelga, S. F.; Plenio, M. B. Efficient Simulation of Strong System-Environment Interactions. Phys. Rev. Lett. 2010, 105 (5), 050404. https://doi.org/10.1103/PhysRevLett.105.050404.</p></blockquote></li><li class="footnote" id="footnote-woods_simulating_2015"><a class="tag is-link" href="#citeref-woods_simulating_2015">woods_simulating_2015</a><blockquote><p>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.</p></blockquote></li><li class="footnote" id="footnote-tamascelli_efficient_2019"><a class="tag is-link" href="#citeref-tamascelli_efficient_2019">tamascelli_efficient_2019</a><blockquote><p>Tamascelli, D.; Smirne, A.; Lim, J.; Huelga, S. F.; Plenio, M. B. Efficient Simulation of Finite-Temperature Open Quantum Systems. Phys. Rev. Lett. 2019, 123 (9), 090402. https://doi.org/10.1103/PhysRevLett.123.090402.</p></blockquote></li><li class="footnote" id="footnote-dunnett_simulating_2021"><a class="tag is-link" href="#citeref-dunnett_simulating_2021">dunnett_simulating_2021</a><blockquote><p>Dunnett, A. J.; Chin, A. W. Simulating Quantum Vibronic Dynamics at Finite Temperatures With Many Body Wave Functions at 0 K. Front. Chem. 2021, 8. https://doi.org/10.3389/fchem.2020.600731.</p></blockquote></li><li class="footnote" id="footnote-lacroix_unveiling_2021"><a class="tag is-link" href="#citeref-lacroix_unveiling_2021">lacroix_unveiling_2021</a><blockquote><p>Lacroix, T.; Dunnett, A.; Gribben, D.; Lovett, B. W.; Chin, A. Unveiling Non-Markovian Spacetime Signaling in Open Quantum Systems with Long-Range Tensor Network Dynamics. Phys. Rev. A 2021, 104 (5), 052204. https://doi.org/10.1103/PhysRevA.104.052204.</p></blockquote></li><li class="footnote" id="footnote-appel_mathematics_2007"><a class="tag is-link" href="#citeref-appel_mathematics_2007">appel_mathematics_2007</a><blockquote><p>Appel, W. Mathematics for Physics and Physicists; Princeton University Press, 2007.</p></blockquote></li></ul></section></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../examples/puredephasing/">« Pure-Dephasing</a><a class="docs-footer-nextpage" href="../methods/">Methods »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Wednesday 17 April 2024 15:15">Wednesday 17 April 2024</span>. Using Julia version 1.7.3.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
+\end{aligned}\]</p><p>where <span>$\hat{a}_\omega$</span> (<span>$\hat{a}^\dagger_\omega$</span>) is a bosonic annihilation (creation) operator for a normal mode of the environment of energy <span>$\hbar\omega$</span>, <span>$\hat{A}_S$</span> is a system operator, and <span>$J(\omega) = \sum_k |g_k|^2\delta(\omega - \omega_k)$</span> is the bath spectral density (SD), defined with the microscopic system-environment coupling strength <span>$g_k$</span>. The SD quantifies the coupling strengths of the different normal modes of the environment with the system. Any SD that is not flat corresponds to a non-Markovian environment.</p><h3 id="Zero-Temperature"><a class="docs-heading-anchor" href="#Zero-Temperature">Zero Temperature</a><a id="Zero-Temperature-1"></a><a class="docs-heading-anchor-permalink" href="#Zero-Temperature" title="Permalink"></a></h3><p>Let us consider the Hamiltonian presented in Eq.(1). We can introduce a unitary transformation of the continuous normal modes <span>$\hat{a}_\omega$</span> to an infinite discrete set of interacting modes <span>$\hat{b}_n$</span><sup class="footnote-reference"><a id="citeref-chin_exact_2010" href="#footnote-chin_exact_2010">[chin_exact_2010]</a></sup>.</p><p class="math-container">\[    \hat{a}_\omega = \sum_{n=0}^{+\infty} U_n(\omega)\hat{b}_n = \sum_{n=0}^{+\infty} \sqrt{J(\omega)}P_n(\omega)\hat{b}_n\ ,\]</p><p>where <span>$P_n(\omega)$</span> are orthonormal polynomials such that</p><p class="math-container">\[    \int_{0}^{+\infty}P_n(\omega)P_m(\omega)J(\omega)\mathrm{d}\omega = \delta_{n,m}\ ;\]</p><p>and the inverse transformation is</p><p class="math-container">\[    \hat{b}_n = \int_0^{+\infty} U_n(\omega)\hat{a}_\omega\mathrm{d}\omega\ .\]</p><p>Note that the orthonormality of the polynomials ensures the unitarity of the transformation defined in Eq.(2). The mapping from a continuous set of modes to a (still infinite) discrete set might seem counter-intuitive, however it is a direct consequence of the separability of the underlying Hilbert space.</p><p>Under this transformation, the Hamiltonian in Eq.(1) becomes</p><p class="math-container">\[    \hat{H}= \hat{H}_S + \sum_{n=0}^{+\infty}\varepsilon_n\hat{b}_n^\dagger\hat{b}_n + t_n(\hat{b}_{n+1}^\dagger\hat{b}_n + \mathrm{h.c.}) + \kappa\hat{A}_S(\hat{b}_0 + \hat{b}_0^\dagger)\ .\]</p><p>Hence, this mapping transforms the normal bath Hamiltonian into a tight-binding Hamiltonian with on-site energies <span>$\varepsilon_n$</span> and hopping energies <span>$t_n$</span>. Another important consequence of this mapping is that now the system only interacts with the first mode <span>$n = 0$</span> of the chain-mapped environment. The chain coefficients <span>$\varepsilon_n$</span>, <span>$t_n$</span>, and the coupling <span>$\kappa$</span> depend solely on the SD.</p><p>This makes chain mapping a tool of choice for describing systems coupled to environment with highly structured SD (e.g. experimentally measured or calculated <em>ab initio</em>)<sup class="footnote-reference"><a id="citeref-chin_role_2013" href="#footnote-chin_role_2013">[chin_role_2013]</a></sup><sup class="footnote-reference"><a id="citeref-alvertis_nonequilibrium_2019" href="#footnote-alvertis_nonequilibrium_2019">[alvertis_nonequilibrium_2019]</a></sup><sup class="footnote-reference"><a id="citeref-dunnett_influence_2021" href="#footnote-dunnett_influence_2021">[dunnett_influence_2021]</a></sup><sup class="footnote-reference"><a id="citeref-caycedosoler_exact_2022" href="#footnote-caycedosoler_exact_2022">[caycedosoler_exact_2022]</a></sup>. In this new representation, the Hamiltonian in Eq.(5) has naturally a 1D chain topology. This makes its representation as a Matrix Product Operator (MPO) and the representation of the joint {System + Environment} wave-function as a Matrix Product State (MPS) suited <sup class="footnote-reference"><a id="citeref-orus_practical_2014" href="#footnote-orus_practical_2014">[orus_practical_2014]</a></sup><sup class="footnote-reference"><a id="citeref-paeckel_timeevolution_2019" href="#footnote-paeckel_timeevolution_2019">[paeckel_timeevolution_2019]</a></sup>.</p><p>The orthogonal polynomial-based chain mapping and the subsequent representation of the joint wave-function as a MPS (and the operators as MPO) are the building blocks of the Time-dependent Density operator with Orthonormal Polynomials Algorithm (TEDOPA) one of the state-of-the-art numerically exact method to simulate the dynamics of open quantum systems especially in the non-Markovian, non-perturbative regimes both at zero and finite temperatures <sup class="footnote-reference"><a id="citeref-prior_efficient_2010" href="#footnote-prior_efficient_2010">[prior_efficient_2010]</a></sup><sup class="footnote-reference"><a id="citeref-woods_simulating_2015" href="#footnote-woods_simulating_2015">[woods_simulating_2015]</a></sup><sup class="footnote-reference"><a id="citeref-tamascelli_efficient_2019" href="#footnote-tamascelli_efficient_2019">[tamascelli_efficient_2019]</a></sup><sup class="footnote-reference"><a id="citeref-dunnett_simulating_2021" href="#footnote-dunnett_simulating_2021">[dunnett_simulating_2021]</a></sup><sup class="footnote-reference"><a id="citeref-lacroix_unveiling_2021" href="#footnote-lacroix_unveiling_2021">[lacroix_unveiling_2021]</a></sup>.</p><h3 id="Finite-Temperature"><a class="docs-heading-anchor" href="#Finite-Temperature">Finite Temperature</a><a id="Finite-Temperature-1"></a><a class="docs-heading-anchor-permalink" href="#Finite-Temperature" title="Permalink"></a></h3><p>Explain that by extending the bath to negative frequencies and having temperature-dependent system environment couplings, it is possible to describe the finite temperature case as an effective zero temperature one. Hence, we can keep the pure state description and avoid moving to density matrices at the cost of doubling the size of the environment.</p><h2 id="Computation-of-the-chain-coefficients"><a class="docs-heading-anchor" href="#Computation-of-the-chain-coefficients">Computation of the chain coefficients</a><a id="Computation-of-the-chain-coefficients-1"></a><a class="docs-heading-anchor-permalink" href="#Computation-of-the-chain-coefficients" title="Permalink"></a></h2><p>A useful property of the orthonormal polynomials is that they obey a recurrence relation</p><p class="math-container">\[    P_n(\omega) = (C_{n-1}\omega - A_{n-1})P_{n-1}(\omega) + B_{n-1}P_{n-2}(\omega)\ ,\]</p><p>where <span>$A_n$</span> is related to the first moment of <span>$P_n$</span>, <span>$B_n$</span> and <span>$C_n$</span> to the norms of <span>$P_n$</span> and <span>$P_{n-1}$</span><sup class="footnote-reference"><a id="citeref-appel_mathematics_2007" href="#footnote-appel_mathematics_2007">[appel_mathematics_2007]</a></sup>. This recurrence relation can be used to construct the polynomials with the conditions that <span>$P_0(\omega) = ||p_0||^{-1} = \left(\int_{\mathbb{R}^{+}} J(\omega)\mathrm{d}\omega \right)^{-\frac{1}{2}}$</span> and <span>$P_{-1}(\omega) = 0$</span>, with <span>$||\bullet||$</span> the norm of <span>$\bullet$</span> with respect to the measure <span>$J(\omega)$</span>, and <span>$P_n(\omega) = p_n(\omega)||p_n||^{-1}$</span> ; where the polynomials <span>$\{p_n\}_{n\in\mathbb{N}}$</span> are the so called <em>monic polynomials</em> where the factor <span>$a_n$</span> in front of <span>$\omega^{n}$</span> is equal to 1.</p><p>The energy of the chain mode <span>$n$</span> is given by <span>$\varepsilon_n = A_n C_n^{-1}$</span> and <span>$t_n=C_n^{-1}$</span> is the coupling between mode <span>$n$</span> and <span>$n+1$</span><sup class="footnote-reference"><a id="citeref-chin_exact_2010" href="#footnote-chin_exact_2010">[chin_exact_2010]</a></sup>.</p><p>The system couples <em>only</em> to the first mode with the coupling strength <span>$\kappa = ||p_0||$</span>.</p><p>Explain that for some weight function/SD they are known analytically and that for others we can use the build-in routines inspired by Gautschi or the PolyChaos.jl package.</p><h2 id="Tensor-Networks"><a class="docs-heading-anchor" href="#Tensor-Networks">Tensor Networks</a><a id="Tensor-Networks-1"></a><a class="docs-heading-anchor-permalink" href="#Tensor-Networks" title="Permalink"></a></h2><p>A multipartite quantum state <span>$|\psi\rangle$</span>, e.g. a <span>$N$</span>-site system where the sites can each be in a state <span>$|\phi_i\rangle$</span> belonging to a <span>$d$</span>-dimensional Hilbert space, can be written as follows</p><p class="math-container">\[    |\psi\rangle = \sum_{\{i_k\}}c_{i_1\ldots i_N}|\phi_{i_1}\rangle\otimes\ldots\otimes|\phi_{i_N}\rangle\ ,\]</p><p>where the complex numbers <span>$c_{i_1\ldots i_N}$</span> are the amplitudes of each state <span>$|\phi_{i_1}\rangle\otimes\ldots\otimes|\phi_{i_N}\rangle$</span> whose superpositions form in full generality the state <span>$|\psi\rangle$</span>. Thus the state <span>$|\psi\rangle$</span> can be completely represented by a rank-<span>$N$</span> tensor <span>$c$</span> that is the collection of all possible amplitudes <span>$c_{i_1\ldots i_N}$</span>. Here by the rank of a tensor, we simply mean the number of indices it has.</p><h3 id="MPS"><a class="docs-heading-anchor" href="#MPS">MPS</a><a id="MPS-1"></a><a class="docs-heading-anchor-permalink" href="#MPS" title="Permalink"></a></h3><p>The tensor <span>$c$</span> of a quantum state <span>$|\psi\rangle$</span> corresponding to a one-dimensional system can be decomposed into a product of <span>$N$</span> smaller rank-3 tensors <span>$T_{k}$</span> (except for the first and last sites where the tensors will have a rank-2)</p><p class="math-container">\[    c_{i_1\ldots i_N} = \sum_{\{\alpha\}} T^{\alpha_1}_{i_1}T^{\alpha_1\alpha_2\ }_{i_2}T^{\alpha_2\alpha_3\ }_{i_3}\ldots T^{\alpha_{N-1}}_{i_N} \ .\]</p><p>In this form, the local tensor <span>$T_k$</span> contains the information on the quantum state on site <span>$k$</span> and its relation (especially the entanglement) with the neighbouring sites.</p><p>The decomposition of the tensor of the amplitudes of a quantum state into a product of smaller rank tensors is called a <strong>Matrix Product State</strong> decomposition.</p><p>The contracted indices <span>$\alpha_k$</span> between the tensors are called <em>virtual indices</em> and carry information about the correlations between bi-partitions of the state at bond <span>$k$</span>. The number of different values a virtual index can take is called the <em>bond dimension</em> and is denoted <span>$D$</span>. The free indices <span>$i_k$</span> associated with local quantum states are called <em>physical indices</em>. Thus, they can take <span>$d$</span> values (with <span>$d$</span> the dimension of the local Hilbert space).</p><p>Any state in the Hilbert space of a one-dimensional many-body system can in principle be represented by a MPS by choosing a sufficiently large value for the bond dimension <span>$D$</span> \cite{Orus}. On top of this intellectually satisfying property of MPSs being a dense set of states for a 1d-system, they can also be used as a practical Ansätze for a many-body quantum states by setting a maximal allowed value <span>$\chi$</span> for the bond dimension <span>$D$</span>. In doing so, we restrict ourselves to a corner of the total Hilbert space. The rationale behind this Ansatz is the following: if the initial quantum state of a many-body system has a low bond dimension (typically if the initial state is a product state with <span>$D = 1$</span>), then in a finite time it will only be able to explore a region of the Hilbert space that is not to far away from its starting point. Thus, the bond dimension will not have the time to diverge exponentially \cite{poulin<em>quantum</em>2011}. However, depending on the physical system at hand, this sub-manifold of the Hilbert space could still be &quot;too large&quot;. There is an additional reason that explains why MPSs are good Ansätze for 1d physical systems. Most many-body Hamiltonians we (physicists) are interested in are local, meaning that the interactions they describe involve objects that are &quot;neighbours&quot;. For such Hamiltonians, the ground states (outside of potential critical phases) follow the so called <em>area law</em> for the entanglement entropy.\cite{srednicki<em>entropy</em>1993, vidal<em>entanglement</em>2003, wolf<em>area</em>2008}. This law states that the entanglement entropy <span>$S_{vN}$</span> of a bi-partition of the system is proportional, not to the volume of the partition as one might expect, but to the hyper-surface of the partition&#39;s boundary; hence the name &quot;area law&quot;. For a 3d system this corresponds to an actual surface area <span>$A$</span>, <span>$S_{vN} \sim A$</span>; for a 2d system it corresponds to the length <span>$L$</span> of the partition&#39;s boundary, <span>$S_{vN} \sim L$</span>; and in 1d the boundary reduces to a point, thus the entropy will be independent of the size of the system <span>$S_{vN} \sim \text{constant}$</span>. The MPSs are states that satisfy this area law.</p><p>An application of the <a href="https://en.wikipedia.org/wiki/Singular_value_decomposition">Singular Value Decomposition</a> is to create efficient approximations of quantum states to perform computations. The main idea is to reduce the content of the MPS to keep only the parts that contain the physics of interest. One method to realise this approximation is to do a SVD on each of the tensors of the MPS after each time step of the state time-evolution and to trim the smallest singular values in order to decrease the bond dimension of the MPS down to a chosen maximal value <span>$\chi$</span>. The corresponding columns and rows of the unitary matrices <span>$U$</span> and <span>$V^\dagger$</span> are also removed. Then, the trimmed matrices <span>$\tilde{U}$</span>, <span>$\tilde{S}$</span> and <span>$\tilde{V}^\dagger$</span> are contracted back to give an approximated tensor <span>$T$</span> with a smaller bond dimension. Another way to apply the restricted rank approximation is to restrict oneself into working in a manifold of fixed bond dimension <span>$D$</span> and to use methods that can enforce this constraint.</p><h3 id="MPO"><a class="docs-heading-anchor" href="#MPO">MPO</a><a id="MPO-1"></a><a class="docs-heading-anchor-permalink" href="#MPO" title="Permalink"></a></h3><p>In order to compute expectation values of observables or apply unitary transformations to a quantum state, we need a TN representation of operators. In the same fashion as a one-dimensional quantum state can be represented as a MPS, operators acting on those states can be represented as <strong>Matrix Product Operators</strong> (MPO). For an operator <span>$\hat{O}$</span>, its MPO can be defined as follows</p><p class="math-container">\[    \hat{O} = \sum_{\{i_k\}\{i_k^{&#39;}\} \{w\}} W^{i_1\ i^{&#39;}_1}_{1\ w_0w_1}\ldots  W^{i_N\ i^{&#39;}_N}_{N\ w_{N-1}w_N} |\phi_{i_1^{&#39;}}\ldots \phi_{i_N^{&#39;}}\rangle\langle\phi_{i_1}\ldots \phi_{i_N}| \]</p><p>The contracted indices between the tensors are called <em>virtual indices</em>. The free indices are called <em>physical indices</em> and correspond to the different input and output local quantum states.  They can take <span>$d$</span> values (with <span>$d$</span> the dimension of the local Hilbert space).</p><h3 id="TTN"><a class="docs-heading-anchor" href="#TTN">TTN</a><a id="TTN-1"></a><a class="docs-heading-anchor-permalink" href="#TTN" title="Permalink"></a></h3><p>A natural extension to the MPS is the (loop-free) tree tensor network.  A TTN is a generalisation of the MPS wherein each site, instead of being connected to only one other site to its right, may be connected to any arbitrary number of <em>child</em> sites. Provided the tree does not contain any loops, everything that one can do to an MPS/MPO can be extended straight-forwardly to TTN states and TTN operators.  The generalisation to trees introduces no new conceptual complexity (only implementational complexity). The sites of a TTN are usually referred to as <em>nodes</em>.  For our purposes, every node of a TTN state and operator has one <em>parent</em> leg, and any number (including zero) of child legs.  The first node is known as the head-node and has a dummy parent leg with dimension 1.</p><h2 id="Time-Dependent-Variational-Principal"><a class="docs-heading-anchor" href="#Time-Dependent-Variational-Principal">Time-Dependent Variational Principal</a><a id="Time-Dependent-Variational-Principal-1"></a><a class="docs-heading-anchor-permalink" href="#Time-Dependent-Variational-Principal" title="Permalink"></a></h2><p>The original idea behind TDVP goes back to Dirac \cite{dirac<em>note</em>1930} and Frenkel \cite{frenkel<em>wave</em>1934}. The main point, in the modern tensor networks formulation, is that instead of solving the Schrödinger equation and then truncating the MPS representation of the quantum state, one can solve the equations of motion projected into a space of restricted bond dimension \cite{haegeman<em>time-dependent</em>2011, haegeman<em>unifying</em>2016}.</p><p>The general formulation of the Dirac-Frenkel Variational Principle~\cite{raab<em>diracfrenkelmclachlan</em>2000} is that one looks for a solution <span>$|\varphi\rangle \in \mathcal{M}$</span> of the Schrödinger equation where <span>$\mathcal{M} \subset \mathcal{H}$</span> is a manifold of the total Hilbert space <span>$\mathcal{H}$</span> in which we think that the relevant physical states `live&#39;.</p><p>We define <span>$T_{|\varphi\rangle}\mathcal{M}$</span> the tangent space of <span>$\mathcal{M}$</span> around the state <span>$|\varphi\rangle$</span>. The criterion to find <span>$|\varphi\rangle$</span> is that for every state <span>$|\chi\rangle \in T_{|\varphi\rangle}\mathcal{M}$</span></p><p class="math-container">\[    \langle\chi|\left(\frac{\mathrm{d}}{\mathrm{d}t} - \frac{1}{\mathrm{i}\hbar}\hat{H}\right)|\varphi\rangle =0\ ,\]</p><p>which can be interpreted as saying that the time evolution procedure should keep <span>$|\varphi\rangle$</span> inside of the manifold <span>$\mathcal{M}$</span>.</p><p>The term <em>variational</em> in the name of the method comes from the fact that in practice one aims at minimising the right-hand side of Eq.~(\ref{eq:DiracFrenkel1}) to find <span>$|\varphi\rangle$</span>.</p><p>Introducing <span>$\hat{P}_{T_{|\varphi\rangle}\mathcal{M}}$</span> the projector onto the tangent space <span>$T_{|\varphi\rangle}\mathcal{M}$</span>, we can write the state <span>$|\chi\rangle = \hat{P}_{T_{|\varphi\rangle}\mathcal{M}}|\phi\rangle$</span> with <span>$|\phi\rangle$</span> a state in <span>$\mathcal{H}$</span>. Leading to</p><p class="math-container">\[    \forall |\phi\rangle \in \mathcal{H}, \ \langle\phi|\hat{P}_{T_{|\varphi\rangle}\mathcal{M}}\left(\frac{\mathrm{d}}{\mathrm{d}t} - \frac{1}{\mathrm{i}\hbar}\hat{H}\right)|\varphi\rangle =0\ .\]</p><p>Because the time derivation and the projector commute, we have</p><p class="math-container">\[    \forall |\phi\rangle \in \mathcal{H}, \ \langle\phi|\left(\frac{\mathrm{d}}{\mathrm{d}t} - \frac{1}{\mathrm{i}\hbar}\hat{P}_{T_{|\varphi\rangle}\mathcal{M}}\hat{H}\right)|\varphi\rangle =0\ .\]</p><p>This equation must be true for any <span>$|\phi\rangle \in \mathcal{H}$</span>, Eq.~(\ref{eq:DiracFrenkel1}) can thus be written</p><p class="math-container">\[    \left(\frac{\mathrm{d}}{\mathrm{d}t} - \frac{1}{\mathrm{i}\hbar}\hat{P}_{T_{|\varphi\rangle}\mathcal{M}}\hat{H}\right)|\varphi\rangle =0\ .\]</p><p>In the context of MPS, the manifold <span>$\mathcal{M}$</span> will correspond to the space of full-ranked MPS of a given bond dimension <span>$D$</span>, and the tangent space will be the space spanned by variations of single MPS tensors.</p><p>The major advantage of this method is that it naturally preserves the unitarity of the time evolution and conserves the energy.</p><h2 id="Bibliography"><a class="docs-heading-anchor" href="#Bibliography">Bibliography</a><a id="Bibliography-1"></a><a class="docs-heading-anchor-permalink" href="#Bibliography" title="Permalink"></a></h2><section class="footnotes is-size-7"><ul><li class="footnote" id="footnote-chin_exact_2010"><a class="tag is-link" href="#citeref-chin_exact_2010">chin_exact_2010</a><blockquote><p>Chin, A. W.; Rivas, Á.; Huelga, S. F.; Plenio, M. B. Exact Mapping between System-Reservoir Quantum Models and Semi-Infinite Discrete Chains Using Orthogonal Polynomials. Journal of Mathematical Physics 2010, 51 (9), 092109. https://doi.org/10.1063/1.3490188.</p></blockquote></li><li class="footnote" id="footnote-chin_role_2013"><a class="tag is-link" href="#citeref-chin_role_2013">chin_role_2013</a><blockquote><p>Chin, A. W.; Prior, J.; Rosenbach, R.; Caycedo-Soler, F.; Huelga, S. F.; Plenio, M. B. The Role of Non-Equilibrium Vibrational Structures in Electronic Coherence and Recoherence in Pigment–Protein Complexes. Nature Phys 2013, 9 (2), 113–118. https://doi.org/10.1038/nphys2515.</p></blockquote></li><li class="footnote" id="footnote-alvertis_nonequilibrium_2019"><a class="tag is-link" href="#citeref-alvertis_nonequilibrium_2019">alvertis_nonequilibrium_2019</a><blockquote><p>Alvertis, A. M.; Schröder, F. A. Y. N.; Chin, A. W. Non-Equilibrium Relaxation of Hot States in Organic Semiconductors: Impact of Mode-Selective Excitation on Charge Transfer. J. Chem. Phys. 2019, 151 (8), 084104. https://doi.org/10.1063/1.5115239.</p></blockquote></li><li class="footnote" id="footnote-dunnett_influence_2021"><a class="tag is-link" href="#citeref-dunnett_influence_2021">dunnett_influence_2021</a><blockquote><p>Dunnett, A. J.; Gowland, D.; Isborn, C. M.; Chin, A. W.; Zuehlsdorff, T. J. Influence of Non-Adiabatic Effects on Linear Absorption Spectra in the Condensed Phase: Methylene Blue. J. Chem. Phys. 2021, 155 (14), 144112. https://doi.org/10.1063/5.0062950.</p></blockquote></li><li class="footnote" id="footnote-caycedosoler_exact_2022"><a class="tag is-link" href="#citeref-caycedosoler_exact_2022">caycedosoler_exact_2022</a><blockquote><p>Caycedo-Soler, F.; Mattioni, A.; Lim, J.; Renger, T.; Huelga, S. F.; Plenio, M. B. Exact Simulation of Pigment-Protein Complexes Unveils Vibronic Renormalization of Electronic Parameters in Ultrafast Spectroscopy. Nat Commun 2022, 13 (1), 2912. https://doi.org/10.1038/s41467-022-30565-4.</p></blockquote></li><li class="footnote" id="footnote-orus_practical_2014"><a class="tag is-link" href="#citeref-orus_practical_2014">orus_practical_2014</a><blockquote><p>Orus, R. A Practical Introduction to Tensor Networks: Matrix Product States and Projected Entangled Pair States. Annals of Physics 2014, 349, 117–158. https://doi.org/10.1016/j.aop.2014.06.013.</p></blockquote></li><li class="footnote" id="footnote-paeckel_timeevolution_2019"><a class="tag is-link" href="#citeref-paeckel_timeevolution_2019">paeckel_timeevolution_2019</a><blockquote><p>Paeckel, S.; Köhler, T.; Swoboda, A.; Manmana, S. R.; Schollwöck, U.; Hubig, C. Time-Evolution Methods for Matrix-Product States. Annals of Physics 2019, 411, 167998. https://doi.org/10.1016/j.aop.2019.167998.</p></blockquote></li><li class="footnote" id="footnote-prior_efficient_2010"><a class="tag is-link" href="#citeref-prior_efficient_2010">prior_efficient_2010</a><blockquote><p>Prior, J.; Chin, A. W.; Huelga, S. F.; Plenio, M. B. Efficient Simulation of Strong System-Environment Interactions. Phys. Rev. Lett. 2010, 105 (5), 050404. https://doi.org/10.1103/PhysRevLett.105.050404.</p></blockquote></li><li class="footnote" id="footnote-woods_simulating_2015"><a class="tag is-link" href="#citeref-woods_simulating_2015">woods_simulating_2015</a><blockquote><p>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.</p></blockquote></li><li class="footnote" id="footnote-tamascelli_efficient_2019"><a class="tag is-link" href="#citeref-tamascelli_efficient_2019">tamascelli_efficient_2019</a><blockquote><p>Tamascelli, D.; Smirne, A.; Lim, J.; Huelga, S. F.; Plenio, M. B. Efficient Simulation of Finite-Temperature Open Quantum Systems. Phys. Rev. Lett. 2019, 123 (9), 090402. https://doi.org/10.1103/PhysRevLett.123.090402.</p></blockquote></li><li class="footnote" id="footnote-dunnett_simulating_2021"><a class="tag is-link" href="#citeref-dunnett_simulating_2021">dunnett_simulating_2021</a><blockquote><p>Dunnett, A. J.; Chin, A. W. Simulating Quantum Vibronic Dynamics at Finite Temperatures With Many Body Wave Functions at 0 K. Front. Chem. 2021, 8. https://doi.org/10.3389/fchem.2020.600731.</p></blockquote></li><li class="footnote" id="footnote-lacroix_unveiling_2021"><a class="tag is-link" href="#citeref-lacroix_unveiling_2021">lacroix_unveiling_2021</a><blockquote><p>Lacroix, T.; Dunnett, A.; Gribben, D.; Lovett, B. W.; Chin, A. Unveiling Non-Markovian Spacetime Signaling in Open Quantum Systems with Long-Range Tensor Network Dynamics. Phys. Rev. A 2021, 104 (5), 052204. https://doi.org/10.1103/PhysRevA.104.052204.</p></blockquote></li><li class="footnote" id="footnote-appel_mathematics_2007"><a class="tag is-link" href="#citeref-appel_mathematics_2007">appel_mathematics_2007</a><blockquote><p>Appel, W. Mathematics for Physics and Physicists; Princeton University Press, 2007.</p></blockquote></li></ul></section></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../examples/puredephasing/">« Pure-Dephasing</a><a class="docs-footer-nextpage" href="../methods/">Methods »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Wednesday 17 April 2024 15:17">Wednesday 17 April 2024</span>. Using Julia version 1.7.3.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
diff --git a/docs/user-guide/index.html b/docs/user-guide/index.html
index 9cf6296..2da4232 100644
--- a/docs/user-guide/index.html
+++ b/docs/user-guide/index.html
@@ -34,4 +34,4 @@
   &quot;nchain&quot;   =&gt; [0.0 0.23466 … 1.84319 1.76098; 0.0 0.00231507 … 0.83105 0.9033…
   &quot;sy&quot;       =&gt; [0.0, -0.0133489, -0.0588887, -0.0858181, -0.0759996, -0.048539…
   &quot;times&quot;    =&gt; [0.0, 0.0005, 0.001, 0.0015, 0.002, 0.0025, 0.003, 0.0035, 0.00…
-</code></pre><section class="footnotes is-size-7"><ul><li class="footnote" id="footnote-Gautschi"><a class="tag is-link" href="#citeref-Gautschi">Gautschi</a><blockquote><p>Gautschi, W. Algorithm 726: ORTHPOL–a package of routines for generating orthogonal polynomials and Gauss-type quadrature rules. ACM Trans. Math. Softw. 20, 21–62 (1994).</p></blockquote></li></ul></section></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Introduction</a><a class="docs-footer-nextpage" href="../examples/sbm/">The Spin-Boson Model »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Wednesday 17 April 2024 15:15">Wednesday 17 April 2024</span>. Using Julia version 1.7.3.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
+</code></pre><section class="footnotes is-size-7"><ul><li class="footnote" id="footnote-Gautschi"><a class="tag is-link" href="#citeref-Gautschi">Gautschi</a><blockquote><p>Gautschi, W. Algorithm 726: ORTHPOL–a package of routines for generating orthogonal polynomials and Gauss-type quadrature rules. ACM Trans. Math. Softw. 20, 21–62 (1994).</p></blockquote></li></ul></section></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Introduction</a><a class="docs-footer-nextpage" href="../examples/sbm/">The Spin-Boson Model »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Wednesday 17 April 2024 15:17">Wednesday 17 April 2024</span>. Using Julia version 1.7.3.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>