QuantumBFS / Yao.jl

Extensible, Efficient Quantum Algorithm Design for Humans.
https://yaoquantum.org
Other
918 stars 119 forks source link

label not found #438

Closed erlebach closed 1 year ago

erlebach commented 1 year ago

I am running the tutorial 5-more-gate in Pluto.jl, and am getting an error on the following cell:

let
    S_Gate = chain(1, put(1 => label(shift(π/2), "S"))) #The S gate
    plot(S_Gate)
end

UndefVarError: label not defined

top-level scope@[Local: 2](http://localhost:1234/edit?id=82eb9892-58a1-11ed-05a7-5133c803f9c8#)

I could of course remove the `label`. However, I expect other tutorials to break. Has `label` been removed? I searched the source code for Yao.jl and did not find reference to `label`.  Perhaps reference to `label` should  be removed from the tutorials? Thanks!
GiggleLiu commented 1 year ago

It is another outdated tutorial, the function name has been changed to “addlabel”, sorry for that. We should have added a deprecation warning. https://github.com/QuantumBFS/YaoPlots.jl/blob/0157a3e8d57113d6219a8dba9d2f320f99fc1395/src/helperblock.jl#L34

erlebach commented 1 year ago

Thanks. I don't recall finding addLabel either. But I will try this out.