Getting chain break frequency from SampleSet

Hello,

I'd like to get chain break frequency from a SampleSet using :

dwave.embedding.chain_break_frequency
 
When I submit my bqm or qubo to DWaveSample by doing:
qpu_advantage2 = DWaveSampler(solver={'topology__type': 'zephyr'}, token=token)
sampler = FixedEmbeddingComposite(qpu_advantage2, embedding=emb)
response = sampler.sample(bqm, num_reads=1000, chain_strength=0.1, chain_break_method=None, return_embedding=True, answer_mode='raw')
 
response returns variable states but not "physical qubits" states, which I does not allow me to use dwave.embedding.chain_break_frequency(response, emb) (I receive a key error).
 
What is the correct way to get chain break frequencies ? 
 
Thank you.
Best regards.
Julien.
0

Comments

1 comment
  • Hi Julien,
    You can directly read out the chain break fraction from the Sample_Set object. I believe the correct code should be as follows:

    response.record['chain_break_fraction']
    This should output the chain break fractions of each sample as a list. If you have any more questions, please don't hesitate to reach out!

    Sergio

    0
    Comment actions Permalink

Please sign in to leave a comment.

Didn't find what you were looking for?

New post