Skip to content

Commit

Permalink
fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
hczhai committed Aug 8, 2024
1 parent 2940ae6 commit 59179c6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ One can install ``block2`` using ``pip`` (note: for very new Python versions, th
pip install block2==<version> --extra-index-url=https://block-hczhai.github.io/block2-preview/pypi/
pip install block2-mpi==<version> --extra-index-url=https://block-hczhai.github.io/block2-preview/pypi/

where ``<version>`` can be some development version number like ``0.5.3rc15`` (see https://github.com/block-hczhai/block2-preview/tags for a complete list of version numbers. The letter ``p`` is not needed). To force reinstalling an updated version, you may consider ``pip`` options ``--upgrade --force-reinstall --no-deps --no-cache-dir``.
where ``<version>`` can be some development version number like ``0.5.3rc17`` (see https://github.com/block-hczhai/block2-preview/tags for a complete list of version numbers. The letter ``p`` is not needed). To force reinstalling an updated version, you may consider ``pip`` options ``--upgrade --force-reinstall --no-deps --no-cache-dir``.

The detailed instructions on manual installation can be found [here](https://block2.readthedocs.io/en/latest/user/installation.html#manual-installation).

Expand All @@ -78,6 +78,8 @@ Documentation: https://block2.readthedocs.io/en/latest/

Tutorial (python interface): https://block2.readthedocs.io/en/latest/tutorial/qc-hamiltonians.html

Example script for models: [Fermi-Hubbard](https://block2.readthedocs.io/en/latest/tutorial/hubbard.html), [Bose-Hubbard](https://block2.readthedocs.io/en/latest/tutorial/custom-hamiltonians.html#Bose-Hubbard-Model), [Hubbard-Holstein](https://block2.readthedocs.io/en/latest/tutorial/custom-hamiltonians.html#The-Hubbard-Holstein-Model), [SU(2) Heisenberg](https://block2.readthedocs.io/en/latest/tutorial/heisenberg.html), [SU(3) Heisenberg](https://block2.readthedocs.io/en/latest/tutorial/custom-hamiltonians.html#SU(3)-Heisenberg-Model), [t-J](https://block2.readthedocs.io/en/latest/tutorial/custom-hamiltonians.html#SU(2)-t-J-Model).

Source code: https://github.com/block-hczhai/block2-preview

For a simplified implementation of ab initio DMRG, see [pyblock3](https://github.com/block-hczhai/pyblock3-preview). Data can be imported and exported between ``block2`` and ``pyblock3``, see https://github.com/block-hczhai/block2-preview/discussions/35.
Expand Down
4 changes: 2 additions & 2 deletions docs/source/tutorial/custom-hamiltonians.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -570,8 +570,8 @@
" basis = [(Q(i), 1) for i in range(NB_MAX + 1)] # [012..NB_MAX]\n",
" ops = {\n",
" \"\": np.identity(NB_MAX + 1), # identity\n",
" \"C\": np.diag(np.sqrt(np.arange(1, NB_MAX + 1)), k=-1), # ph+\n",
" \"D\": np.diag(np.sqrt(np.arange(1, NB_MAX + 1)), k=1), # ph\n",
" \"C\": np.diag(np.sqrt(np.arange(1, NB_MAX + 1)), k=-1), # b+\n",
" \"D\": np.diag(np.sqrt(np.arange(1, NB_MAX + 1)), k=1), # b\n",
" \"N\": np.diag(np.arange(0, NB_MAX + 1), k=0), # particle number\n",
" }\n",
" site_basis.append(basis)\n",
Expand Down
5 changes: 4 additions & 1 deletion docs/source/user/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ One can install ``block2`` using ``pip``:
If these binaries have some problems, you can use the ``--no-binary`` option of ``pip`` to force building from source
(for example, ``pip install block2 --no-binary block2``).

* For very new Python versions (3.12) and Windows, the ``--extra-index-url`` option of ``pip`` is required, see below for installing the developement version of ``block2``.

* One should only install one of ``block2`` and ``block2-mpi``. ``block2-mpi`` covers all features in ``block2``,
but its dependence on mpi library can sometimes be difficult to deal with.
Some guidance for resolving environment problems can be found in github issue
Expand All @@ -33,7 +35,8 @@ One can install ``block2`` using ``pip``:
pip install block2==<version> --extra-index-url=https://block-hczhai.github.io/block2-preview/pypi/
pip install block2-mpi==<version> --extra-index-url=https://block-hczhai.github.io/block2-preview/pypi/

where ``<version>`` can be some development version number like ``0.5.2rc13``. To force reinstalling an updated version, you may consider ``pip`` options ``--upgrade --force-reinstall --no-deps --no-cache-dir``.
where ``<version>`` can be some development version number like ``0.5.2rc17`` (see https://github.com/block-hczhai/block2-preview/tags for a complete list of version numbers. The letter ``p`` is not needed).
To force reinstalling an updated version, you may consider ``pip`` options ``--upgrade --force-reinstall --no-deps --no-cache-dir``.

Manual Installation
-------------------
Expand Down

0 comments on commit 59179c6

Please sign in to comment.