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

reorder! does not seem to work properly

GiggleLiu opened this issue · comments

julia> reg = product_state(bit"010101")
ArrayReg{2, ComplexF64, Array...}
    active qubits: 6/6
    nlevel: 2

julia> reorder!(reg, (1,3,5,2,4,6))
ArrayReg{2, ComplexF64, Array...}
    active qubits: 6/6
    nlevel: 2

julia> measure(reg; nshots=3)
3-element Vector{BitBasis.BitStr64{6}}:
 011001 ₍₂₎
 011001 ₍₂₎
 011001 ₍₂₎

Ah, this is actually correct, our convension is different from the permutedims.