Incorrect Definition for ishermitian for ChainBlock
cameton opened this issue · 1 comments
cameton commented
In Yao.jl/lib/YaoBlocks/src/composite/chain.jl, the definition for ishermitian seems to be the same as isreflexive, rather than actually checking if the ChainBlock is hermitian.
YaoAPI.isreflexive(c::ChainBlock) = (iscommute(c.blocks...) && all(isreflexive, c.blocks)) || isreflexive(mat(c))
LinearAlgebra.ishermitian(c::ChainBlock) = (all(isreflexive, c.blocks) && iscommute(c.blocks...)) || isreflexive(mat(c))