Repro in Python:
import qsharp
qsharp.init(target_profile=qsharp.TargetProfile.Base)
qsharp.eval("let y = x;")
Expected: Qsc.Resolve.NotFound (so far this is OK)
in a separate REPL / notebook line:
PANIC
thread '<unnamed>' panicked at source/compiler/qsc_rca/src/applications.rs:610:14:
local compute kind does not exist
If the same code is run in the Unrestricted
profile, you'll get an expected runtime error:
module.QSharpError: Qsc.Eval.UnboundName
× runtime error
╰─▶ name is not bound
╭─[line_1:1:1]
1 │ y
· ─
╰────
We dodge this panic when we're in unrestricted, because we don't run FIR passes when we're in unrestricted.
Repros in qsharp
1.20.0