QuantumBFS / Yao.jl

Extensible, Efficient Quantum Algorithm Design for Humans.

Home Page:https://yaoquantum.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect Definition for ishermitian for ChainBlock

cameton opened this issue · 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