From 94747e013f46048a35de60da868456c9caa301ef Mon Sep 17 00:00:00 2001 From: liwt31 Date: Fri, 28 Jun 2024 09:17:25 +0800 Subject: [PATCH] add google analytics --- doc/source/conf.py | 8 +++++++- doc/source/tutorials/compress_mps.ipynb | 10 +++++----- requirements.txt | 7 ++++--- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 4b87fc8a..5b140b68 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -64,7 +64,7 @@ # General information about the project. project = 'Renormalizer' -copyright = '2022, Shuaigroup' +copyright = '2024, Shuaigroup' author = 'Shuaigroup' # The version info for the project you're documenting, acts as replacement for @@ -184,3 +184,9 @@ autodoc_default_options = { 'undoc-members': True, } + + +# -- Google Analytics ----------------------------------------------------- +if os.getenv("GITHUB_ACTIONS"): + extensions.append("sphinxcontrib.googleanalytics") + googleanalytics_id = "G-VMR8V3W3BR" diff --git a/doc/source/tutorials/compress_mps.ipynb b/doc/source/tutorials/compress_mps.ipynb index e3c25ba0..6afd2f70 100644 --- a/doc/source/tutorials/compress_mps.ipynb +++ b/doc/source/tutorials/compress_mps.ipynb @@ -274,7 +274,7 @@ "id": "2e572f67-21f0-4256-b527-eb4433ee23a7", "metadata": {}, "source": [ - "Then compress `mps2` by SVD truncation to a fixed bond dimension of $M=5$. Note that right now `mps2` is not canonicalised, so it has to be canonicalised before SVD compression.\n", + "Then compress `mps2` by SVD truncation to a fixed bond dimension of $M=5$. Note that as the product of an MPO and an MPS, `mps2` is not canonicalised, so it has to be canonicalised before SVD compression.\n", "\n", "After the compression, the size of the matrices in `mps2` is greatly reduced." ] @@ -314,7 +314,7 @@ "id": "4d0852f0-c31c-4917-903d-3ec01324f837", "metadata": {}, "source": [ - "We next measure the information loss based on the difference of energy expectations, which is relatively small." + "We can see that the information loss, measured by the difference of energy expectations, is relatively small." ] }, { @@ -345,7 +345,7 @@ "id": "109d0adb-1e37-47e2-9684-2c710a069b4a", "metadata": {}, "source": [ - "> As a result of the random generation of the MPS, the compress accuracy is not very impressive. Much higher efficiency can be expected for the real wavefunction for a number of quantum models." + "> As a result of the random generation of the MPS, the compress accuracy is not very impressive. Much higher efficiency can be expected for the real wavefunction of quantum systems." ] }, { @@ -384,7 +384,7 @@ "id": "9d968790-43e8-4929-8634-72b520510f00", "metadata": {}, "source": [ - "Here the compress criteria is set to the singular value threshold, which is set to 1e-5. In other words, all states with singular value small than 1e-3 is discarded.\n", + "Here the compress criteria is set to the singular value threshold, which is set to 1e-5.\n", "\n", "`CompressCriteria` is an `Enum` class for all possible compression strategies. Currently there're three different strategies." ] @@ -417,7 +417,7 @@ "source": [ "> Using `CompressCriteria` might seem to be a overkill compared to an implementation using simple strings. \n", "However, when it comes to time evolution configurations, since there're a lot of different algorithms and some of them have rather long names,\n", - "the `Enum` class can help manage the different algorithms. So here compression uses the same implementation, also for forward compatibility.\n", + "the `Enum` class can help manage the different algorithms. So here the compression configuration uses the same implementation. This is also for forward compatibility.\n", "\n", "We next compress `mps3` using the compress configuration associated with the `mps3` object. $10^{-5}$ is a relatively tight threshold, so the bond dimension is higher than 5." ] diff --git a/requirements.txt b/requirements.txt index c736f3dd..3dec7156 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,9 +4,10 @@ sympy==1.11.* pytest==6.2.* h5py==3.1.* PyYAML==5.4.* -recommonmark==0.7.* -furo==2022.9.* -nbsphinx==0.8.* opt_einsum==3.3.* qutip==4.6.* print-tree2==0.9.10 +recommonmark==0.7.* +furo==2022.9.* +nbsphinx==0.8.* +sphinxcontrib-googleanalytics==0.4