1
$\begingroup$

I am following this MS tutorial to add functionality to my Q#/C#host project.

However, I get two errors on my operations:

The type or namespace name 'Result' could not be found (are you missing a using directive or an assembly reference?) [host]csharp(CS0246)

The type or namespace name 'IQArray<>' could not be found (are you missing a using directive or an assembly reference?) [host]csharp(CS0246)

What am I missing or doing wrong?

enter image description here

$\endgroup$

1 Answer 1

2
$\begingroup$

I think these two types come from Microsoft.Quantum.Simulation.Core namespace, so if you add using Microsoft.Quantum.Simulation.Core; to the directives in the C# code, it should work.

$\endgroup$
2
  • $\begingroup$ Spot on! Adding using Microsoft.Quantum.Simulation.Core to my host Program.cs directives fixed it. Many thanks ツ $\endgroup$
    – Muhy
    Mar 21, 2022 at 10:09
  • 1
    $\begingroup$ Thank you for bringing this up! I'm following up internally to have this fixed in the documentation $\endgroup$ Mar 21, 2022 at 19:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.