chain_break_method

How to use the MinimizeEnergy chain_break_method correctly?

Given a bqm I am trying to use it this way:

from dwave.embedding.chain_breaks import MinimizeEnergy
sampler = DWaveCliqueSampler()
result = sampler.sample(bqm=bqm, chain_break_method=MinimizeEnergy)

However, the method is given chains and samples (which would be correct for the .__call__) and not a bqm and embedding that .__init__  needs.

Is the workflow or the call wrong from my side?

0

Comments

1 comment
  • I found a way to make it work, but one needs to have an embedding already:

    min_nrg = MinimizeEnergy(bqm, embedding).__call__
    fixed_sampler = FixedEmbeddingComposite(DWaveSampler(), embedding=embedding)
    sample_set = fixed_sampler.sample(bqm, chain_break_method=min_nrg)
    0
    Comment actions Permalink

Please sign in to leave a comment.

Didn't find what you were looking for?

New post