Regarding Qubit utilization

I am running the simple example from DWAVE (color map) and wonder how do I know what are the resources used in the computation. Execution code is printed below:

# Set up a solver using the local system’s default D-Wave Cloud Client configuration file
# and sample 50 times
sampler = EmbeddingComposite(DWaveSampler())         # doctest: +SKIP
response = sampler.sample(bqm, num_reads=50)         # doctest: +SKIP

I am keen to know how many QPU qubits are used for computation so that I can gauge how much can I scale the complexity of the problem

0

Comments

1 comment
  • Hello,

    For the code example you provided, the problem described by the bqm will be minor-embedded onto the QPU represented in the DWaveSampler object. This means that the number of variables in the bqm might increase in number when represented as actual qubits on a given QPU. This will also vary between embeddings and systems. 

    You can add the return_embedding = True parameter to the sample call in your code example above.

    The returned embedding dictionary will have keys representing the pre-embedding variables and values representing the qubits that are used to represent those values on the QPU. You will need to count all of the variables to determine how many qubits were used.

    Another way of doing this and the most reliable way to use the same number of qubits is to use the FixedEmbeddingComposite on a single QPU solver. The embeddings produced in this manner will vary slightly in efficiency, but this shouldn't be a big factor in the general case.

    You would need to take the embedding returned from the find_embedding function and count the number of values in a similar way to the embedding mentioned above.

    Alternatively you can go to the Problem in the Problem Status section of the Leap Dashboard, click on the problem, and then click the "Copy Values" under Data. The first two columns can be the same value, indicating a linear term, or different, indicating a quadratic term. Counting the number of unique values in the first two columns will tell you how many qubits were used. 

    Please let us know if you have any questions. 

    0
    Comment actions Permalink

Please sign in to leave a comment.

Didn't find what you were looking for?

New post