QuantumBFS/Yao.jl

Incorrect Definition for ishermitian for ChainBlock

cameton opened this issue · 1 comments

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))

Thank you very much for reporting the issue, it will be fixed by #409