Skip to content

Commit 352b407

Browse files
authored
[Docs] Fix linking to CCQ logo (#1634)
1 parent a1a4eee commit 352b407

File tree

5 files changed

+295
-282
lines changed

5 files changed

+295
-282
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ benchmark/mult
1010
benchmark/*.json
1111
docs/Manifest.toml
1212
docs/build/
13+
docs/src/index.md
1314
NDTensors/Manifest.toml
1415
NDTensors/test/Manifest.toml
1516
precompile/tmp

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ITensors"
22
uuid = "9136182c-28ba-11e9-034c-db9fb085ebd5"
33
authors = ["Matthew Fishman <[email protected]>", "Miles Stoudenmire <[email protected]>"]
4-
version = "0.8.7"
4+
version = "0.8.8"
55

66
[deps]
77
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"

README.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.md

Lines changed: 280 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,280 @@
1+
# ITensors.jl
2+
3+
ITensor is a library for rapidly creating correct and efficient
4+
tensor network algorithms.
5+
6+
| **Documentation**|**Citation**|
7+
|:----------------:|:----------:|
8+
|[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://itensor.github.io/ITensors.jl/stable/) [![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://itensor.github.io/ITensors.jl/dev/)|[![SciPost](https://img.shields.io/badge/SciPost-10.21468-blue.svg)](https://scipost.org/SciPostPhysCodeb.4) [![arXiv](https://img.shields.io/badge/arXiv-2007.14822-b31b1b.svg)](https://arxiv.org/abs/2007.14822)|
9+
10+
|**Version**|**Download Statistics**|**Style Guide**|**License**|
11+
|:---------:|:---------------------:|:-------------:|:---------:|
12+
|[![version](https://juliahub.com/docs/ITensors/version.svg)](https://juliahub.com/ui/Packages/ITensors/P3pqL)|[![ITensor Downloads](https://img.shields.io/badge/dynamic/json?url=http%3A%2F%2Fjuliapkgstats.com%2Fapi%2Fv1%2Fmonthly_downloads%2FITensors&query=total_requests&suffix=%2Fmonth&label=Downloads)](http://juliapkgstats.com/pkg/ITensors)|[![Code Style: Blue](https://img.shields.io/badge/code%20style-blue-4495d1.svg)](https://github.com/invenia/BlueStyle)|[![license](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://github.com/ITensor/ITensors.jl/blob/main/LICENSE)|
13+
14+
The source code for ITensors.jl can be found [on Github](https://github.com/ITensor/ITensors.jl).
15+
16+
Additional documentation can be found on the ITensor website [itensor.org](https://itensor.org).
17+
18+
An ITensor is a tensor whose interface
19+
is independent of its memory layout. ITensor indices are
20+
objects which carry extra information and which
21+
'recognize' each other (compare equal to each other).
22+
23+
The [ITensorMPS.jl library](https://github.com/ITensor/ITensorMPS.jl)
24+
includes composable and extensible algorithms for optimizing and transforming
25+
tensor networks, such as matrix product state and matrix product operators, such as
26+
the DMRG algorithm. If you are looking for information on running finite MPS/MPO
27+
calculations such as DMRG, take a look at the [ITensorMPS.jl documentation](https://itensor.github.io/ITensorMPS.jl).
28+
29+
## Support
30+
31+
<img src="docs/src/assets/CCQ.png" width="20%" alt="Flatiron Center for Computational Quantum Physics logo.">
32+
33+
ITensors.jl is supported by the Flatiron Institute, a division of the Simons Foundation.
34+
35+
## News
36+
37+
- March 22, 2025: As part of the latest release of ITensors.jl (v0.8.3), all documentation related to MPS/MPO functionality has been moved to the [ITensorMPS.jl documentation](https://itensor.github.io/ITensorMPS.jl).
38+
39+
- February 22, 2025: Please note that there were issues installing the latest version of ITensors.jl (ITensors.jl v0.8) in older versions of Julia v1.10 and v1.11 ([https://github.com/ITensor/ITensors.jl/issues/1618](https://github.com/ITensor/ITensors.jl/issues/1618), [https://itensor.discourse.group/t/typeparameteraccessors-not-found-error-on-julia-v-1-10-0/2260](https://itensor.discourse.group/t/typeparameteraccessors-not-found-error-on-julia-v-1-10-0/2260)). This issue has been fixed in [NDTensors.jl v0.4.4](https://github.com/ITensor/ITensors.jl/pull/1623), so please try updating your packages if you are using older versions of Julia v1.10 or v1.11 and running into issues installing ITensors.jl.
40+
41+
- February 3, 2025: ITensors.jl v0.8 has been released. This release should not be breaking to the average user using documented features of the library. This removes internal submodules that held experimental code for rewriting the internals of NDTensors.jl/ITensors.jl, which have now been turned into separate packages for future development. It is marked as breaking since ITensorMPS.jl was making use of some of that experimental code, and will be updated accordingly. Also note that it fixes an issue that existed in some more recent versions of NDTensors.jl v0.3/ITensors.jl v0.7 where loading ITensors.jl in combination with some packages like LinearMaps.jl caused very long load/compile times ([https://itensor.discourse.group/t/linearmaps-and-itensors-incompatibility/2216](https://itensor.discourse.group/t/linearmaps-and-itensors-incompatibility/2216)), so if you are seeing that issue when using ITensors.jl v0.7 you should upgrade to this version.
42+
43+
- October 25, 2024: ITensors.jl v0.7 has been released. This is a major breaking change, since all of the MPS/MPO functionality from this package has been moved to [ITensorMPS.jl](https://github.com/ITensor/ITensorMPS.jl), along with all of the functionality of [ITensorTDVP.jl](https://github.com/ITensor/ITensorTDVP.jl). If you want to use MPS/MPO types and related functionality, such as `MPS`, `MPO`, `dmrg`, `siteinds`, `OpSum`, `op`, etc. you now must install and load the ITensorMPS.jl package. Additionally, if you are using ITensorTDVP.jl in your code, please change `using ITensorTDVP` to `using ITensorMPS`. ITensorMPS.jl has all of the same functionality as ITensorTDVP.jl, and ITensorTDVP.jl will be deprecated in favor of ITensorMPS.jl. **Note:** If you are using `ITensors.compile`, you must now install and load the ITensorMPS.jl package in order to trigger it to load properly, since it relies on running MPS/MPO functionality as example code for Julia to compile.
44+
45+
- May 9, 2024: A new package [ITensorMPS.jl](https://github.com/ITensor/ITensorMPS.jl) has been released. We plan to move all of the MPS/MPO functionality in [ITensors.jl](https://github.com/ITensor/ITensors.jl) to [ITensorMPS.jl](https://github.com/ITensor/ITensorMPS.jl). For now, ITensorMPS.jl just re-exports the MPS/MPO functionality of ITensors.jl (as well as of [ITensorTDVP.jl](https://github.com/ITensor/ITensorTDVP.jl)), such as `dmrg`, `siteinds`, `MPS`, `MPO`, etc. To prepare for the change over to ITensorMPS.jl, please change `using ITensors` to `using ITensors, ITensorMPS` in any code that makes use of MPS/MPO functionality, and if you are using ITensorTDVP.jl change `using ITensorTDVP` to `using ITensorMPS` in your code.
46+
47+
- May 8, 2024: ITensors.jl v0.6 has been released. This version deletes the experimental "combine-contract" contraction backend, which was enabled by `ITensors.enable_combine_contract()`. This feature enabled performing ITensor contractions by first combining indices and then performing contractions as matrix multiplications, which potentially could lead to speedups for certain contractions involving higher-order QN-conserving tensors. However, the speedups weren't consistent with the current implementation, and this feature will be incorporated into the library in a more systematic way when we release our new non-abelian symmetric tensor backend.
48+
49+
- May 2, 2024: ITensors.jl v0.5 has been released. This version removes PackageCompiler.jl as a dependency and moves the package compilation functionality into a package extension. In order to use the `ITensors.compile()` function going forward, you need to install the PackageCompiler.jl package with `using Pkg: Pkg; Pkg.add("PackageCompiler")` and put `using PackageCompiler` together with `using ITensors` in your code.
50+
51+
- April 16, 2024: ITensors.jl v0.4 has been released. This version removes HDF5.jl as a dependency and moves the HDF5 read and write functions for ITensor, MPS, MPO, and other associated types into a package extension. To enable ITensor HDF5 features, install the HDF5.jl package with `using Pkg: Pkg; Pkg.add("HDF5")` and put `using HDF5` together with `using ITensors` in your code. Other recent changes include support for multiple GPU backends using package extensions.
52+
53+
- March 25, 2022: ITensors.jl v0.3 has been released. The main breaking change is that we no longer support versions of Julia below 1.6. Julia 1.6 is the long term support version of Julia (LTS), which means that going forward versions below Julia 1.6 won't be as well supported with bug fixes and improvements. Additionally, Julia 1.6 introduced many improvements including syntax improvements that we would like to start using with ITensors.jl, which becomes challenging if we try to support Julia versions below 1.6. See [here](https://www.oxinabox.net/2021/02/13/Julia-1.6-what-has-changed-since-1.0.html) and [here](https://julialang.org/blog/2021/03/julia-1.6-highlights/) for some nice summaries of the Julia 1.6 release.
54+
55+
- Jun 09, 2021: ITensors.jl v0.2 has been released, with a few breaking changes as well as a variety of bug fixes
56+
and new features. Take a look at the [upgrade guide](https://itensor.github.io/ITensors.jl/stable/UpgradeGuide_0.1_to_0.2.html)
57+
for help upgrading your code.
58+
59+
## Installation
60+
61+
The ITensors package can be installed with the Julia package manager.
62+
From the Julia REPL, type `]` to enter the Pkg REPL mode and run:
63+
64+
```
65+
~ julia
66+
```
67+
68+
```julia
69+
julia> ]
70+
71+
pkg> add ITensors
72+
```
73+
74+
Or, equivalently, via the `Pkg` API:
75+
76+
```julia
77+
julia> import Pkg; Pkg.add("ITensors")
78+
```
79+
Please note that right now, ITensors.jl requires that you use Julia v1.3 or later (since ITensors.jl relies on a feature that was introduced in Julia v1.3).
80+
81+
We recommend using ITensors.jl with Intel MKL in order to get the best possible performance. If you have not done so already, you can replace your current BLAS and LAPACK implementation with MKL by using the MKL.jl package. Please follow the instructions [here](https://github.com/JuliaComputing/MKL.jl).
82+
83+
## Documentation
84+
85+
- [**LATEST**](https://itensor.github.io/ITensors.jl/dev/) -- *documentation of the latest version.*
86+
87+
## Citation
88+
89+
If you use ITensor in your work, please cite the [ITensor Paper](https://www.scipost.org/SciPostPhysCodeb.4):
90+
91+
```bib
92+
@article{ITensor,
93+
title={{The ITensor Software Library for Tensor Network Calculations}},
94+
author={Matthew Fishman and Steven R. White and E. Miles Stoudenmire},
95+
journal={SciPost Phys. Codebases},
96+
pages={4},
97+
year={2022},
98+
publisher={SciPost},
99+
doi={10.21468/SciPostPhysCodeb.4},
100+
url={https://scipost.org/10.21468/SciPostPhysCodeb.4},
101+
}
102+
```
103+
104+
and associated "Codebase Release" for the version you have used. The current one is
105+
106+
```bib
107+
@article{ITensor-r0.3,
108+
title={{Codebase release 0.3 for ITensor}},
109+
author={Matthew Fishman and Steven R. White and E. Miles Stoudenmire},
110+
journal={SciPost Phys. Codebases},
111+
pages={4-r0.3},
112+
year={2022},
113+
publisher={SciPost},
114+
doi={10.21468/SciPostPhysCodeb.4-r0.3},
115+
url={https://scipost.org/10.21468/SciPostPhysCodeb.4-r0.3},
116+
}
117+
```
118+
119+
## ITensor Code Samples
120+
121+
### Basic Overview
122+
123+
ITensor construction, setting of elements, contraction, and addition.
124+
Before constructing an ITensor, one constructs Index objects
125+
representing tensor indices.
126+
127+
```julia
128+
using ITensors
129+
let
130+
i = Index(3)
131+
j = Index(5)
132+
k = Index(2)
133+
l = Index(7)
134+
135+
A = ITensor(i,j,k)
136+
B = ITensor(j,l)
137+
138+
# Set elements of A
139+
A[i=>1,j=>1,k=>1] = 11.1
140+
A[i=>2,j=>1,k=>2] = -21.2
141+
A[k=>1,i=>3,j=>1] = 31.1 # can provide Index values in any order
142+
# ...
143+
144+
# Contract over shared index j
145+
C = A * B
146+
147+
@show hasinds(C,i,k,l) # = true
148+
149+
D = random_itensor(k,j,i) # ITensor with random elements
150+
151+
# Add two ITensors
152+
# must have same set of indices
153+
# but can be in any order
154+
R = A + D
155+
156+
nothing
157+
end
158+
159+
# output
160+
161+
hasinds(C, i, k, l) = true
162+
```
163+
164+
165+
### Singular Value Decomposition (SVD) of a Matrix
166+
167+
In this example, we create a random 10x20 matrix
168+
and compute its SVD. The resulting factors can
169+
be simply multiplied back together using the
170+
ITensor `*` operation, which automatically recognizes
171+
the matching indices between U and S, and between S and V
172+
and contracts (sums over) them.
173+
174+
```julia
175+
using ITensors
176+
let
177+
i = Index(10) # index of dimension 10
178+
j = Index(20) # index of dimension 20
179+
M = random_itensor(i,j) # random matrix, indices i,j
180+
U,S,V = svd(M,i) # compute SVD with i as row index
181+
@show M U*S*V # = true
182+
183+
nothing
184+
end
185+
186+
# output
187+
188+
M U * S * V = true
189+
```
190+
191+
### Singular Value Decomposition (SVD) of a Tensor
192+
193+
In this example, we create a random 4x4x4x4 tensor
194+
and compute its SVD, temporarily treating the indices i and k
195+
together as the "row" index and j and l as the "column" index
196+
for the purposes of the SVD. The resulting factors can
197+
be simply multiplied back together using the
198+
ITensor `*` operation, which automatically recognizes
199+
the matching indices between U and S, and between S and V
200+
and contracts (sums over) them.
201+
202+
![](svd_tensor.png)
203+
204+
```julia
205+
using ITensors
206+
let
207+
i = Index(4,"i")
208+
j = Index(4,"j")
209+
k = Index(4,"k")
210+
l = Index(4,"l")
211+
T = random_itensor(i,j,k,l)
212+
U,S,V = svd(T,i,k) # compute SVD with (i,k) as row indices (indices of U)
213+
@show hasinds(U,i,k) # = true
214+
@show hasinds(V,j,l) # = true
215+
@show T U*S*V # = true
216+
217+
nothing
218+
end
219+
220+
# output
221+
222+
hasinds(U, i, k) = true
223+
hasinds(V, j, l) = true
224+
T U * S * V = true
225+
```
226+
227+
### Tensor Indices: Tags and Prime Levels
228+
229+
Before making an ITensor, you have to define its indices.
230+
Tensor Index objects carry extra information beyond just their dimension.
231+
232+
All Index objects carry a permanent, immutable id number which is
233+
determined when it is constructed, and allow it to be matched
234+
(compare equal) with copies of itself.
235+
236+
Additionally, an Index can have up to four tag strings, and an
237+
integer primelevel. If two Index objects have different tags or
238+
different prime levels, they do not compare equal even if they
239+
have the same id.
240+
241+
Tags are also useful for identifying Index objects when printing
242+
tensors, and for performing certain Index manipulations (e.g.
243+
priming indices having certain sets of tags).
244+
245+
```julia
246+
using ITensors
247+
let
248+
i = Index(3) # Index of dimension 3
249+
@show dim(i) # = 3
250+
@show id(i) # = 0x5d28aa559dd13001 or similar
251+
252+
ci = copy(i)
253+
@show ci == i # = true
254+
255+
j = Index(5,"j") # Index with a tag "j"
256+
257+
@show j == i # = false
258+
259+
s = Index(2,"n=1,Site") # Index with two tags,
260+
# "Site" and "n=1"
261+
@show hastags(s,"Site") # = true
262+
@show hastags(s,"n=1") # = true
263+
264+
i1 = prime(i) # i1 has a "prime level" of 1
265+
# but otherwise same properties as i
266+
@show i1 == i # = false, prime levels do not match
267+
268+
nothing
269+
end
270+
271+
# output
272+
273+
dim(i) = 3
274+
id(i) = 0x5d28aa559dd13001
275+
ci == i = true
276+
j == i = false
277+
hastags(s, "Site") = true
278+
hastags(s, "n=1") = true
279+
i1 == i = false
280+
```

docs/settings.jl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,19 @@ using ITensors
55
# https://github.com/JuliaDocs/Documenter.jl/issues/1734
66
DocMeta.setdocmeta!(ITensors, :DocTestSetup, :(using ITensors); recursive=true)
77

8+
readme_ccq_logo = """<img src="docs/src/assets/CCQ.png" width="20%" alt="Flatiron Center for Computational Quantum Physics logo.">"""
9+
index_ccq_logo = """
10+
```@raw html
11+
<img src="assets/CCQ.png" width="20%" alt="Flatiron Center for Computational Quantum Physics logo.">
12+
```
13+
"""
14+
15+
readme_str = read(joinpath(@__DIR__, "..", "README.md"), String)
16+
write(
17+
joinpath(@__DIR__, "src", "index.md"),
18+
replace(readme_str, readme_ccq_logo => index_ccq_logo),
19+
)
20+
821
sitename = "ITensors.jl"
922

1023
settings = Dict(

0 commit comments

Comments
 (0)