I want to execute my operation.

hyunji kim 65 Reputation points
2023-12-22T04:17:47.85+00:00

I wanna run my operation, but there is an error.

Error QS4004: Statements can only occur within a callable or specialization declaration.

User's image

And I can simulate my operation using the magic line..command

I tried to apply another solution, but that did not work.

please help me..

Azure Quantum
Azure Quantum
An Azure service that provides quantum computing and optimization solutions.
60 questions
{count} votes

Accepted answer
  1. Prrudram-MSFT 22,381 Reputation points
    2023-12-29T08:17:01.66+00:00

    Hi @hyunji kim

    Thank you for reaching out to the Microsoft Q&A platform.

    Replacing “TEST();” with “%simulate TEST” should address this error. The simulate command is documented here. It looks like the customer has tried this already and it worked for them. It would help if you can clarify how you want to run this operation if simulation isn’t enough to for you?

    Please Accept Answer and hit Yes for "was this answer helpful" if this helps

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful