Summary
Following up on this discussion: unitary/isomorphism produce a non-unitary map when the domain is a SumSpace, even though the total and per-sector dimensions match exactly between domain and codomain.
MWE
using TensorKit, BlockTensorKit, LinearAlgebra
V1 = Rep[U₁](0 => 2, 1 => 1)
V2 = Rep[U₁](0 => 2, 1 => 1)
Vsum = V1 ⊞ V2
Vflat = oplus(Vsum)
@show dim(Vsum), dim(Vflat) # equal
for c in blocksectors(Vsum)
@show c, dim(Vsum, c), dim(Vflat, c) # equal, sector by sector
end
u = unitary(ComplexF64, Vflat, Vsum)
@show norm(u' * u - id(Vsum)) # expected ~0, got 1.7320508075688772
Expected behavior
norm(u' * u - id(Vsum)) should be ~0.
Actual behavior
Large nonzero residual — u has linearly dependent columns despite matching dimensions everywhere.
Summary
Following up on this discussion:
unitary/isomorphismproduce a non-unitary map when the domain is aSumSpace, even though the total and per-sector dimensions match exactly between domain and codomain.MWE
Expected behavior
norm(u' * u - id(Vsum))should be ~0.Actual behavior
Large nonzero residual —
uhas linearly dependent columns despite matching dimensions everywhere.