Skip to content

Commit 3fadf2a

Browse files
committed
Int -> Integer
1 parent 62a613f commit 3fadf2a

File tree

10 files changed

+40
-287
lines changed

10 files changed

+40
-287
lines changed

src/Backend/beliefpropagationcache.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ function loop_correlation(bpc::BeliefPropagationCache, loop::Vector{<:NamedEdge}
181181
end
182182

183183
#Calculate the correlations flowing around each of the primitive loops of the BP cache
184-
function loop_correlations(bpc::BeliefPropagationCache, smallest_loop_size::Int; kwargs...)
184+
function loop_correlations(bpc::BeliefPropagationCache, smallest_loop_size::Integer; kwargs...)
185185
g = underlying_graph(bpc)
186186
cycles = NamedGraphs.cycle_to_path.(NamedGraphs.unique_simplecycles_limited_length(g, smallest_loop_size))
187187
corrs = []

src/Backend/boundarympscache.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ struct BoundaryMPSCache{V, N <: AbstractDataGraph{V}, M <: Union{ITensor, Vector
88
messages::Dictionary{NamedEdge, M}
99
supergraph::PartitionedGraph
1010
sorted_edges::Dictionary{PartitionEdge, Vector{NamedEdge}}
11-
mps_bond_dimension::Int
11+
mps_bond_dimension::Integer
1212
end
1313

1414
default_update_alg(bmps_cache::BoundaryMPSCache) = "bp"
@@ -137,7 +137,7 @@ end
137137

138138
function BoundaryMPSCache(
139139
tn::Union{TensorNetworkState, ITensorNetwork, BilinearForm, QuadraticForm},
140-
mps_bond_dimension::Int;
140+
mps_bond_dimension::Integer;
141141
partition_by = "row",
142142
gauge_state = true
143143
)
@@ -469,7 +469,7 @@ function update_message!(
469469
alg::Algorithm"ITensorMPS",
470470
bmps_cache::BoundaryMPSCache,
471471
pe::PartitionEdge;
472-
maxdim::Int = mps_bond_dimension(bmps_cache),
472+
maxdim::Integer = mps_bond_dimension(bmps_cache),
473473
)
474474
prev_pe = prev_partitionedge(bmps_cache, pe)
475475
O = ITensorMPS.MPO(bmps_cache, src(pe))

src/Backend/loopcorrection.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ using ITensorNetworks: underlying_graph
33

44
function loopcorrected_partitionfunction(
55
bp_cache::BeliefPropagationCache,
6-
max_configuration_size::Int,
6+
max_configuration_size::Integer,
77
)
88
zbp = partitionfunction(bp_cache)
99
bp_cache = rescale(bp_cache)

src/expect.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ function expect(
138138
observable::Union{Tuple, Vector{<:Tuple}};
139139
cache_update_kwargs = default_bmps_update_kwargs(ψ),
140140
partition_by = boundarymps_partitioning(observable),
141-
mps_bond_dimension::Int,
141+
mps_bond_dimension::Integer,
142142
kwargs...,
143143
)
144144

src/inner.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ end
2323
- `"boundarymps"`: Boundary MPS approximation (requires `mps_bond_dimension`).
2424
- `"loopcorrections"`: Loop corrections to belief propagation.
2525
- Extra kwargs for `alg = "boundarymps"`:
26-
- `mps_bond_dimension::Int`: The bond dimension for the boundary MPS approximation.
26+
- `mps_bond_dimension::Integer`: The bond dimension for the boundary MPS approximation.
2727
- `partition_by`: How to partition the graph for boundary MPS (default is `"row"`).
2828
- `cache_update_kwargs`: Additional keyword arguments for updating the cache.
2929
- Extra kwargs for `alg = "bp"` or `"loopcorrections"`:
@@ -84,7 +84,7 @@ function ITensors.inner(alg::Union{Algorithm"bp", Algorithm"loopcorrections"},
8484
return inner(alg, ψϕ_bpc; kwargs...)
8585
end
8686

87-
function ITensors.inner(alg::Algorithm"boundarymps", ψ::TensorNetworkState, ϕ::TensorNetworkState; mps_bond_dimension::Int, partition_by = "row", cache_update_kwargs = (;), kwargs...)
87+
function ITensors.inner(alg::Algorithm"boundarymps", ψ::TensorNetworkState, ϕ::TensorNetworkState; mps_bond_dimension::Integer, partition_by = "row", cache_update_kwargs = (;), kwargs...)
8888
ψϕ_bmps = BoundaryMPSCache(BilinearForm(ψ, ϕ), mps_bond_dimension; partition_by)
8989
maxiter = get(cache_update_kwargs, :maxiter, default_bp_maxiter(ψϕ_bmps))
9090
cache_update_kwargs = (; cache_update_kwargs..., maxiter)

src/norm_sqr.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ end
1818
- `"loopcorrections"`: Loop corrections to belief propagation (requires `max_configuration_size`).
1919
# Keyword Arguments
2020
- For `alg = "boundarymps"`:
21-
- `mps_bond_dimension::Int`: The bond dimension for the boundary MPS approximation.
21+
- `mps_bond_dimension::Integer`: The bond dimension for the boundary MPS approximation.
2222
- `partition_by`: How to partition the graph for boundary MPS (default is `"row"`).
2323
- `cache_update_kwargs`: Additional keyword arguments for updating the cache.
2424
- For `alg = "bp"` or `"loopcorrections"`:
@@ -75,7 +75,7 @@ function norm_sqr(alg::Union{Algorithm"bp", Algorithm"loopcorrections"}, ψ::Ten
7575
return norm_sqr(alg, ψ_bpc; kwargs...)
7676
end
7777

78-
function norm_sqr(alg::Algorithm"boundarymps", ψ::TensorNetworkState; mps_bond_dimension::Int, partition_by = "row", cache_update_kwargs = default_bmps_update_kwargs(ψ), kwargs...)
78+
function norm_sqr(alg::Algorithm"boundarymps", ψ::TensorNetworkState; mps_bond_dimension::Integer, partition_by = "row", cache_update_kwargs = default_bmps_update_kwargs(ψ), kwargs...)
7979
ψ_bmps = BoundaryMPSCache(ψ, mps_bond_dimension; partition_by)
8080
maxiter = get(cache_update_kwargs, :maxiter, default_bp_maxiter(ψ_bmps))
8181
cache_update_kwargs = (; cache_update_kwargs..., maxiter)

src/sample.jl

Lines changed: 0 additions & 247 deletions
This file was deleted.

0 commit comments

Comments
 (0)