How Do I Add a Problem Label To My Problem Submission?

A problem label can be added to any problem that's sampled directly by our QPU or hybrid solvers. 

Here are some examples of how you would add a problem label to a problem solved on the QPU. These examples assume that you imported the necessary packages from the Ocean SDK and defined the BQM or QUBO.

sampler = DWaveSampler()

# Add a problem label to a BQM submission
sampleset = sampler.sample(bqm, num_reads=100, label="My BQM Problem")

# Add a problem label to a QUBO submission
sampleset = sampler.sample_qubo(Q, num_reads=100, label="My QUBO Problem")


Likewise, a problem label can be added to hybrid BQM and DQM problems as shown below:

# Hybrid BQM Problem Label Example
sampleset = LeapHybridSampler().sample(bqm, label="Hybrid BQM Problem")

# Hybrid DQM Problem Label Example
sampleset =LeapHybridDQMSampler().sample_dqm(dqm, label="Hybrid DQM Problem")


You can also add a label to your Kerberos workflows. 

# Kerberos Problem Label Example
= KerberosSampler().sample(bqm, qpu_params={'label': 'Kerberos Problem'})

Problem labels must be strings and can have a maximum of 1024 characters. Empty strings are not accepted.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request



Please sign in to leave a comment.