Closed johnzl-777 closed 1 year ago
I suspect this probably has something to do with this python limitation: https://pyjulia.readthedocs.io/en/stable/limitations.html#mismatch-in-valid-set-of-identifiers (not juliacall docs but I could definitely understand the same limitation across the board) in which case, is there a possible workaround without having to rewrite the function with ASCII-only (or at least, Python unicode friendly) keyword arguments?
Indeed it's the same issue as with PyJulia - python normalises unicode identifiers. I think strings aren't normalised like this so you can do
jl.Bloqade.rydberg_h(atoms, **{'Ω': 4*2*pi, 'Δ': 10*2*pi, 'ϕ': 0.0})
This works perfectly, thanks!
Affects: JuliaCall
Describe the bug The Bloqade.jl library has a function
rydberg_h
that has several keyword arguments using unicode characters.The following bug was discovered where one of those keyword arguments is a
U+03D5
phi but at some point juliacall seems to turn that into aU+03C6
phi, causing Julia to complain that theres no function that matchesrydberg_h
.A minimal working example would be the following (assuming
Bloqade.jl
is already installed in the Julia environment):Which produces the following error:
Your system
conda list
juliapkg.status()
Additional context I'm testing this in a Jupyter Notebook in VSCode with conda but the bug was originally discovered while being used in Pycharm with conda.