Skip to main content

General questions and feedback on Microsoft's Quantum Developer Kit

Bug in BindAImpl (body part)

The following code causes a Runtime exception:

operation ExampleBindAFails() : Bool {
body {
mutable result = false;
using (qubits = Qubit[6]) {
let Hs = ApplyToEachA(H, _);
let Zs = ApplyToEachA(Z, _);

With(BindA([Hs; Zs; Hs]), Hs, qubits);
}
return result;
}
}

And driver:

var r = ExampleBindAFails.Run(sim).Result;

Runtime exception is:

System.MissingMethodException: 'Constructor on type 'System.ValueTuple`2[[Microsoft.Quantum.Simulation.Core.QArray`1[[Microsoft.Quantum.Simulation.Core.ICallable, Microsoft.Quantum.Simulation.Core, Version=0.1.1801.1707, Culture=neutral, PublicKeyToken=40866b40fd95c7f5]], Microsoft.Quantum.Simulation.Core, Version=0.1.1801.1707, Culture=neutral, PublicKeyToken=40866b40fd95c7f5],[Microsoft.Quantum.Simulation.Core.QArray`1[[Microsoft.Quantum.Simulation.Core.Qubit, Microsoft.Quantum.Simulation.Core, Version=0.1.1801.1707, Culture=neutral, PublicKeyToken=40866b40fd95c7f5]], Microsoft.Quantum.Simulation.Core, Version=0.1.1801.1707, Culture=neutral, PublicKeyToken=40866b40fd95c7f5]]' not found.'

If I don't request the result, i.e., the driver code is

ExampleBindAFails.Run(sim);

no exception is thrown in

Bind.qs at line 56. If we past lines 11-14 from Bind.qs in that location instead of calling the operation, no runtime exception is thrown.

1 vote
Sign in
Signed in as (Sign out)

We’ll send you updates on this idea

Mathias Soeken shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

0 comments

Sign in
Signed in as (Sign out)
Submitting...

Feedback and Knowledge Base