Closed hros closed 2 years ago
I just checked again the following works, It seems to me that you didn't using Yao
to get the definition of focus!
function?
julia> using Yao, SymEngine
julia> ket"110" + 2ket"111"
|110⟩ + 2.0|111⟩
julia> r = ket"110" + 2ket"111"
|110⟩ + 2.0|111⟩
julia> ket"100" + ket"111" |> focus!(1:2)
|100⟩ + |111⟩
I did use the package with using Yao
, otherwise I wouldn't have gotten the help message for @ket_str
I can confirm that the command accepts ranges, though for some reason the error message in the doc for @ket_str
is still there
Which version are you using?
The error message in the help os both in the stable and the dev versions
can you point out how to reproduce this? I'm not able to reproduce this in any recent versions or on master branch. I just double-checked error message ERROR: UndefVarError: focus! not defined
doesn't exists anywhere in our documentation, so I'm wondering what's the full stacktrace of this and how did you reproduce this?
I can not reproduce the error neither.
I have reinstalled both versions (0.6.2, and 0.7.4) and now the error message is not showing anymore Probably some quirk with Julia's package manager (I had installed the stable version globally, and the dev version in a project directory). Since it is now working correctly, I see no reason for further investigation. Thanks for you help
the doc for
@ket_str
macro:It seems that
focus!
no longer accepts ranges, only a tuple of indices The docs for@ket_str
should be updated accordingly, or reimplement the support for ranges infocus!