Skip to content

Commit f731a06

Browse files
mtfishmangithub-actions[bot]
authored andcommitted
Format .jl files (Runic)
1 parent 3ae1202 commit f731a06

File tree

111 files changed

+8398
-8393
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+8398
-8393
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ITensorNetworks"
22
uuid = "2919e153-833c-4bdc-8836-1ea460a35fc7"
3+
version = "0.14.3"
34
authors = ["Matthew Fishman <[email protected]>, Joseph Tindall <[email protected]> and contributors"]
4-
version = "0.14.2"
55

66
[deps]
77
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"

docs/make.jl

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@ using ITensorNetworks: ITensorNetworks
22
using Documenter: Documenter, DocMeta, deploydocs, makedocs
33

44
DocMeta.setdocmeta!(
5-
ITensorNetworks, :DocTestSetup, :(using ITensorNetworks); recursive=true
5+
ITensorNetworks, :DocTestSetup, :(using ITensorNetworks); recursive = true
66
)
77

88
include("make_index.jl")
99

1010
makedocs(;
11-
modules=[ITensorNetworks],
12-
authors="ITensor developers <[email protected]> and contributors",
13-
sitename="ITensorNetworks.jl",
14-
format=Documenter.HTML(;
15-
canonical="https://itensor.github.io/ITensorNetworks.jl",
16-
edit_link="main",
17-
assets=["assets/favicon.ico", "assets/extras.css"],
18-
),
19-
pages=["Home" => "index.md", "Reference" => "reference.md"],
20-
warnonly=true,
11+
modules = [ITensorNetworks],
12+
authors = "ITensor developers <[email protected]> and contributors",
13+
sitename = "ITensorNetworks.jl",
14+
format = Documenter.HTML(;
15+
canonical = "https://itensor.github.io/ITensorNetworks.jl",
16+
edit_link = "main",
17+
assets = ["assets/favicon.ico", "assets/extras.css"],
18+
),
19+
pages = ["Home" => "index.md", "Reference" => "reference.md"],
20+
warnonly = true,
2121
)
2222

2323
deploydocs(;
24-
repo="github.com/ITensor/ITensorNetworks.jl", devbranch="main", push_preview=true
24+
repo = "github.com/ITensor/ITensorNetworks.jl", devbranch = "main", push_preview = true
2525
)

docs/make_index.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@ using Literate: Literate
22
using ITensorNetworks: ITensorNetworks
33

44
function ccq_logo(content)
5-
include_ccq_logo = """
5+
include_ccq_logo = """
66
```@raw html
77
<img class="display-light-only" src="assets/CCQ.png" width="20%" alt="Flatiron Center for Computational Quantum Physics logo."/>
88
<img class="display-dark-only" src="assets/CCQ-dark.png" width="20%" alt="Flatiron Center for Computational Quantum Physics logo."/>
99
```
1010
"""
11-
content = replace(content, "{CCQ_LOGO}" => include_ccq_logo)
12-
return content
11+
content = replace(content, "{CCQ_LOGO}" => include_ccq_logo)
12+
return content
1313
end
1414

1515
Literate.markdown(
16-
joinpath(pkgdir(ITensorNetworks), "examples", "README.jl"),
17-
joinpath(pkgdir(ITensorNetworks), "docs", "src");
18-
flavor=Literate.DocumenterFlavor(),
19-
name="index",
20-
postprocess=ccq_logo,
16+
joinpath(pkgdir(ITensorNetworks), "examples", "README.jl"),
17+
joinpath(pkgdir(ITensorNetworks), "docs", "src");
18+
flavor = Literate.DocumenterFlavor(),
19+
name = "index",
20+
postprocess = ccq_logo,
2121
)

docs/make_readme.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@ using Literate: Literate
22
using ITensorNetworks: ITensorNetworks
33

44
function ccq_logo(content)
5-
include_ccq_logo = """
5+
include_ccq_logo = """
66
<picture>
77
<source media="(prefers-color-scheme: dark)" width="20%" srcset="docs/src/assets/CCQ-dark.png">
88
<img alt="Flatiron Center for Computational Quantum Physics logo." width="20%" src="docs/src/assets/CCQ.png">
99
</picture>
1010
"""
11-
content = replace(content, "{CCQ_LOGO}" => include_ccq_logo)
12-
return content
11+
content = replace(content, "{CCQ_LOGO}" => include_ccq_logo)
12+
return content
1313
end
1414

1515
Literate.markdown(
16-
joinpath(pkgdir(ITensorNetworks), "examples", "README.jl"),
17-
joinpath(pkgdir(ITensorNetworks));
18-
flavor=Literate.CommonMarkFlavor(),
19-
name="README",
20-
postprocess=ccq_logo,
16+
joinpath(pkgdir(ITensorNetworks), "examples", "README.jl"),
17+
joinpath(pkgdir(ITensorNetworks));
18+
flavor = Literate.CommonMarkFlavor(),
19+
name = "README",
20+
postprocess = ccq_logo,
2121
)

examples/README.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# > or for us to clearly announce parts of the code we are changing.
1212

1313
# # ITensorNetworks.jl
14-
#
14+
#
1515
# [![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://itensor.github.io/ITensorNetworks.jl/stable/)
1616
# [![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://itensor.github.io/ITensorNetworks.jl/dev/)
1717
# [![Build Status](https://github.com/ITensor/ITensorNetworks.jl/actions/workflows/Tests.yml/badge.svg?branch=main)](https://github.com/ITensor/ITensorNetworks.jl/actions/workflows/Tests.yml?query=branch%3Amain)

ext/ITensorNetworksEinExprsExt/ITensorNetworksEinExprsExt.jl

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,57 +2,57 @@ module ITensorNetworksEinExprsExt
22

33
using ITensors: Index, ITensor, @Algorithm_str, inds, noncommoninds
44
using ITensorNetworks:
5-
ITensorNetworks,
6-
ITensorList,
7-
ITensorNetwork,
8-
vertextype,
9-
vertex_data,
10-
contraction_sequence
5+
ITensorNetworks,
6+
ITensorList,
7+
ITensorNetwork,
8+
vertextype,
9+
vertex_data,
10+
contraction_sequence
1111
using EinExprs: EinExprs, EinExpr, einexpr, SizedEinExpr
1212

1313
function to_einexpr(ts::ITensorList)
14-
IndexType = Any
14+
IndexType = Any
1515

16-
tensor_exprs = EinExpr{IndexType}[]
17-
inds_dims = Dict{IndexType,Int}()
16+
tensor_exprs = EinExpr{IndexType}[]
17+
inds_dims = Dict{IndexType, Int}()
1818

19-
for tensor_v in ts
20-
inds_v = collect(inds(tensor_v))
21-
push!(tensor_exprs, EinExpr{IndexType}(; head=inds_v))
22-
merge!(inds_dims, Dict(inds_v .=> size(tensor_v)))
23-
end
19+
for tensor_v in ts
20+
inds_v = collect(inds(tensor_v))
21+
push!(tensor_exprs, EinExpr{IndexType}(; head = inds_v))
22+
merge!(inds_dims, Dict(inds_v .=> size(tensor_v)))
23+
end
2424

25-
externalinds_tn = reduce(noncommoninds, ts)
26-
return SizedEinExpr(sum(tensor_exprs; skip=externalinds_tn), inds_dims)
25+
externalinds_tn = reduce(noncommoninds, ts)
26+
return SizedEinExpr(sum(tensor_exprs; skip = externalinds_tn), inds_dims)
2727
end
2828

2929
function tensor_inds_to_vertex(ts::ITensorList)
30-
IndexType = Any
31-
VertexType = Int
30+
IndexType = Any
31+
VertexType = Int
3232

33-
mapping = Dict{Set{IndexType},VertexType}()
33+
mapping = Dict{Set{IndexType}, VertexType}()
3434

35-
for (v, tensor_v) in enumerate(ts)
36-
inds_v = collect(inds(tensor_v))
37-
mapping[Set(inds_v)] = v
38-
end
35+
for (v, tensor_v) in enumerate(ts)
36+
inds_v = collect(inds(tensor_v))
37+
mapping[Set(inds_v)] = v
38+
end
3939

40-
return mapping
40+
return mapping
4141
end
4242

4343
function ITensorNetworks.contraction_sequence(
44-
::Algorithm"einexpr", tn::ITensorList; optimizer=EinExprs.Exhaustive()
45-
)
46-
expr = to_einexpr(tn)
47-
path = einexpr(optimizer, expr)
48-
return to_contraction_sequence(path, tensor_inds_to_vertex(tn))
44+
::Algorithm"einexpr", tn::ITensorList; optimizer = EinExprs.Exhaustive()
45+
)
46+
expr = to_einexpr(tn)
47+
path = einexpr(optimizer, expr)
48+
return to_contraction_sequence(path, tensor_inds_to_vertex(tn))
4949
end
5050

5151
function to_contraction_sequence(expr, tensor_inds_to_vertex)
52-
EinExprs.nargs(expr) == 0 && return tensor_inds_to_vertex[Set(expr.head)]
53-
return map(
54-
expr -> to_contraction_sequence(expr, tensor_inds_to_vertex), EinExprs.args(expr)
55-
)
52+
EinExprs.nargs(expr) == 0 && return tensor_inds_to_vertex[Set(expr.head)]
53+
return map(
54+
expr -> to_contraction_sequence(expr, tensor_inds_to_vertex), EinExprs.args(expr)
55+
)
5656
end
5757

5858
end

ext/ITensorNetworksGraphsFlowsExt/ITensorNetworksGraphsFlowsExt.jl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ using ITensorNetworks: ITensorNetworks
55
using NDTensors.AlgorithmSelection: @Algorithm_str
66

77
function ITensorNetworks.mincut(
8-
::Algorithm"GraphsFlows",
9-
graph::AbstractGraph,
10-
source_vertex,
11-
target_vertex;
12-
capacity_matrix,
13-
alg=GraphsFlows.PushRelabelAlgorithm(),
14-
)
15-
# TODO: Replace with `Backend(backend)`.
16-
return GraphsFlows.mincut(graph, source_vertex, target_vertex, capacity_matrix, alg)
8+
::Algorithm"GraphsFlows",
9+
graph::AbstractGraph,
10+
source_vertex,
11+
target_vertex;
12+
capacity_matrix,
13+
alg = GraphsFlows.PushRelabelAlgorithm(),
14+
)
15+
# TODO: Replace with `Backend(backend)`.
16+
return GraphsFlows.mincut(graph, source_vertex, target_vertex, capacity_matrix, alg)
1717
end
1818

1919
end

0 commit comments

Comments
 (0)