Skip to content

Commit bf60e7f

Browse files
committed
some constructor fixes
1 parent 40e74d7 commit bf60e7f

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,9 @@
66
__pycache__
77
.ipynb*
88
Manifest.toml
9-
.vscode
9+
.vscode
10+
benchmark
11+
experimental
12+
refs
13+
*.mathcha
14+

src/fusiontrees/fusiontrees.jl

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,11 @@ function FusionTree{I}(uncoupled::NTuple{N}, coupled=one(I),
8686
_abelianinner(map(s -> convert(I, s),
8787
(uncoupled..., dual(coupled)))))
8888
end
89-
function FusionTree(uncoupled::Tuple{I,Vararg{I}}, coupled::I=one(I),
89+
function FusionTree(uncoupled::NTuple{N,I}, coupled::I,
9090
isdual=ntuple(n -> false, length(uncoupled))) where {I<:Sector}
91-
FusionStyle(I) isa UniqueFusion ||
92-
error("fusion tree requires inner lines if `FusionStyle(I) <: MultipleFusion`")
93-
return FusionTree{I}(uncoupled, coupled, isdual,
94-
_abelianinner((uncoupled..., dual(coupled))))
91+
return FusionTree{I}(uncoupled, coupled, isdual)
9592
end
93+
FusionTree(uncoupled::Tuple{I,Vararg{I}}) where {I<:Sector} = FusionTree(uncoupled, one(I))
9694

9795
# Properties
9896
sectortype(::Type{<:FusionTree{I}}) where {I<:Sector} = I

src/tensors/linalg.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ the spacetype does not have a Euclidean inner product, an error will be thrown.
120120
121121
See also [`isomorphism`](@ref) and [`isometry`](@ref).
122122
"""
123-
function unitary(::Type{A}, V::TensorMapSpace{S,N₁,N₂}) where {A<:VecOrNumber,S,N₁,N₂}
123+
function unitary(::Type, V::TensorMapSpace{S,N₁,N₂}) where {S,N₁,N₂}
124124
InnerProductStyle(S) === EuclideanInnerProduct() || throw_invalid_innerproduct(:unitary)
125125
return isomorphism(A, V)
126126
end
@@ -155,8 +155,7 @@ for morphism in (:isomorphism, :unitary, :isometry)
155155
@eval begin
156156
$morphism(V::TensorMapSpace) = $morphism(Float64, V)
157157
$morphism(codomain::TensorSpace, domain::TensorSpace) = $morphism(codomain domain)
158-
function $morphism(::Type{T}, codomain::TensorSpace,
159-
domain::TensorSpace) where {T<:VecOrNumber}
158+
function $morphism(::Type, codomain::TensorSpace, domain::TensorSpace)
160159
return $morphism(T, codomain domain)
161160
end
162161
$morphism(t::AbstractTensorMap) = $morphism(storagetype(t), space(t))

0 commit comments

Comments
 (0)