Run known estimates

Aikaterini Gratsea 30 Reputation points
2024-07-23T10:57:31.17+00:00

Hi,

I am trying to run this tutorial here, but if i run the python script with the code shown there

logical_counts = LogicalCounts({
    'numQubits': 12581,
    'tCount': 12,
    'rotationCount': 12,
    'rotationDepth': 12,
    'cczCount': 3731607428,
    'measurementCount': 1078154040})

logical_counts.estimate(params)

I get the following error: NameError: name 'LogicalCounts' is not defined.

Any suggestions how to fix that?

Azure Quantum
Azure Quantum
An Azure service that provides quantum computing and optimization solutions.
70 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. KarishmaTiwari-MSFT 19,952 Reputation points Microsoft Employee
    2024-08-12T21:54:22.3666667+00:00

    @Aikaterini Gratsea

    It looks like the LogicalCounts class is part of the Azure Quantum library, which you need to import before using it. Here’s how you can fix the error:

    1. Install the Azure Quantum Library: If you haven’t already, you need to install the Azure Quantum library. You can do this using pip: pip install azure-quantum
    2. Import the Required Class: Make sure to import the LogicalCounts class from the appropriate module. Based on the tutorial, it should look something like this:
      from azure.quantum import LogicalCounts

    Try this and let me know if you have any questions in the comments.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.