Likely cause: map_input_pattern_to_input_expressions returns one argument per top-level element of the parameter pattern rather than one per flattened leaf.
- Crate:
qsc_rca
- Panic: lib.rs:351, in
generate_application_compute_kind
- Stage / profile: compiling the source (harness
eval step, runtime capabilities analysis), Base, Adaptive_RI, Adaptive_RIF and Adaptive
- Message:
application generator recorded 4 parameter applications for 3 runtime arguments
namespace Test {
operation F((a : Int, (b : Int, c : Int)), q : Qubit) : Unit {
if a + b + c > 2 { X(q); }
}
@EntryPoint(Adaptive_RI)
operation Main() : Result {
use q = Qubit();
H(q);
let r = MResetZ(q) == One ? 1 | 0;
let t = (r, (2, r));
F(t, q);
MResetZ(q)
}
}
A lambda with a single tuple parameter panics at core.rs:2899 in map_input_pattern_to_input_expressions (expected tuple pattern for lambda receiving multiple arguments):
@EntryPoint(Adaptive_RIF)
operation Main() : Result {
use q = Qubit();
let h = t -> t == (1, 2);
if h((1, 2)) { X(q); }
MResetZ(q)
}
Likely cause:
map_input_pattern_to_input_expressionsreturns one argument per top-level element of the parameter pattern rather than one per flattened leaf.qsc_rcagenerate_application_compute_kindevalstep, runtime capabilities analysis), Base, Adaptive_RI, Adaptive_RIF and Adaptiveapplication generator recorded 4 parameter applications for 3 runtime argumentsA lambda with a single tuple parameter panics at core.rs:2899 in
map_input_pattern_to_input_expressions(expected tuple pattern for lambda receiving multiple arguments):