Skip to content

Commit

Permalink
add google analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
liwt31 committed Jun 28, 2024
1 parent 0c2f2b4 commit 94747e0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
8 changes: 7 additions & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
10 changes: 5 additions & 5 deletions doc/source/tutorials/compress_mps.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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."
]
Expand Down Expand Up @@ -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."
]
},
{
Expand Down Expand Up @@ -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."
]
},
{
Expand Down Expand Up @@ -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."
]
Expand Down Expand Up @@ -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."
]
Expand Down
7 changes: 4 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 94747e0

Please sign in to comment.