Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
leburgel committed Mar 6, 2024
1 parent d671313 commit da192a3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions docs/src/man/tensors.md
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ V3 = U1Space(1/2=>1,-1/2=>1) # restricted space that only uses the `σ_z` rotati
t3 = TensorMap(data, V3 ⊗ V3, V3 ⊗ V3)
for (c,b) in blocks(t3)
println("Data for block $c :")
b |> disp
disp(b)
println()
end
```
Expand Down Expand Up @@ -390,7 +390,7 @@ block(t4, U1Irrep(1)) .= [1;;];
block(t4, U1Irrep(-1)) .= [1;;];
for (c, b) in blocks(t4)
println("Data for block $c :")
b |> disp
disp(b)
println()
end
```
Expand Down Expand Up @@ -429,7 +429,7 @@ for (f₁, f₂) in fusiontrees(t5)
end
for (c, b) in blocks(t5)
println("Data for block $c :")
b |> disp
disp(b)
println()
end
```
Expand Down
2 changes: 1 addition & 1 deletion src/sectors/fermions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Base.convert(::Type{FermionNumber}, a::Int) = FermionNumber(a)
FermionSpin(j::Real)
Represents the fermion spin as the direct product of a ``SU₂`` irrep `j` and a fermion
parity, with the restriction that the fermion parity is odd if and only if ` 2 * j` is odd.
parity, with the restriction that the fermion parity is odd if `2 * j` is odd.
See also: [`SU2Irrep`](@ref), [`FermionParity`](@ref)
"""
Expand Down
2 changes: 1 addition & 1 deletion src/tensors/abstracttensor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ function adjointtensorindices(t::AbstractTensorMap, p::Index2Tuple)
end

@doc """
blocks(t::AbstractTensorMap) -> Dict{<:Sector,<:DenseMatrix}
blocks(t::AbstractTensorMap) -> SectorDict{<:Sector,<:DenseMatrix}
Return an iterator over all blocks of a tensor, i.e. all coupled sectors and their
corresponding blocks.
Expand Down
6 changes: 3 additions & 3 deletions src/tensors/tensor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ sector.
`S<:ElementarySpace`.
If `eltype` is left unspecified, `f` should support the calling syntax `f(::Tuple{Int,Int})`
such that `f((m, n))` returns a `DenseMatrix` with `size(f(m, n)) == (m, n)`. If `eltype` is
such that `f((m, n))` returns a `DenseMatrix` with `size(f((m, n))) == (m, n)`. If `eltype` is
specified, `f` is instead called as `f(eltype, (m, n))`. In the case where `f` is left
unspecified or `undef` is passed explicitly, a `TensorMap` with uninitialized data is
generated.
Expand Down Expand Up @@ -548,7 +548,7 @@ fusiontrees(t::TensorMap) = TensorKeyIterator(t.rowr, t.colr)

"""
Base.getindex(t::TensorMap{<:IndexSpace,N₁,N₂,I},
sectors::Tuple{Vararg{I}}) where {N₁,N₂,I<:Sector}
sectors::NTuple{N₁+N₂,I}) where {N₁,N₂,I<:Sector}
-> StridedViews.StridedView
t[sectors]
Expand All @@ -559,7 +559,7 @@ respectively, then a `StridedViews.StridedView` of size
`(dims(codomain(t), s1)..., dims(domain(t), s2))` is returned.
This method is only available for the case where `FusionStyle(I) isa UniqueFusion`,
since it assumes a well-defined coupled charge.
since it assumes a uniquely defined coupled charge.
"""
@inline function Base.getindex(t::TensorMap{<:IndexSpace,N₁,N₂,I},
sectors::Tuple{Vararg{I}}) where {N₁,N₂,I<:Sector}
Expand Down

0 comments on commit da192a3

Please sign in to comment.