FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Issue · GitHub

domain == codomain is not checked in project_(anti)hermitian #388

Description

Currently project_(anti)hermitian for TensorMaps does not verify that codomain == domain for the input, and continues when domain == codomain'. For example,

julia> using TensorKit, MatrixAlgebraKit

julia> a = randn(ℂ^3 → (ℂ^3)')
3←3 TensorMap{Float64, ComplexSpace, 1, 1, Vector{Float64}}:
 codomain: ⊗((ℂ^3)')
 domain: ⊗(ℂ^3)
 blocks: 
 * Trivial() => 3×3 reshape(view(::Vector{Float64}, 1:9), 3, 3) with eltype Float64:
 -1.1574    -0.507056   -1.3797
 -1.30112    0.316528   -0.687373
 -0.619306  -0.0116334   0.515426

julia> a2 = project_hermitian(a)
3←3 TensorMap{Float64, ComplexSpace, 1, 1, Vector{Float64}}:
 codomain: ⊗((ℂ^3)')
 domain: ⊗(ℂ^3)
 blocks: 
 * Trivial() => 3×3 reshape(view(::Vector{Float64}, 1:9), 3, 3) with eltype Float64:
 -1.1574    -0.904089  -0.999501
 -0.904089   0.316528  -0.349503
 -0.999501  -0.349503   0.515426

julia> ishermitian(a2)
false

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL