Flux biases
We are trying out embedding a problem but we seem to get flux biases which we want to offset. Is there a way to do this with EmbeddingComposite(sampler). We have to pass h and J to the annealer before we get a chance to work out the flux bias offsets. So far we have
sampler = DWaveSampler(solver={'qpu': True})
sampler_embedded = EmbeddingComposite(sampler)
bqm = dimod.BinaryQuadraticModel.from_ising(h, J)
h0 = bqm.to_ising()[0]
J0 = bqm.to_ising()[1]
anneal_params = dict(anneal_schedule = forward_schedule, h_gain_schedule = h_schedule)
answer = sampler_embedded.sample_ising(h0, J0, num_reads=nrshots, answer_mode='histogram',**anneal_params)
At this point we see a large bias in the results, so how can we add flux bias offset to this?
Comments
One way to do this is to return the embedding from the EmbeddingComposite and then use a FixedEmbeddingComposite when you want to set the anneal offsets. Here's a code sample
In the example above, the anneal_offsets won't have any impact on the results, as they are set to 0.
Hi Alex - thanks for the help -- !! I'll try with the fixed embedding. ...
Please sign in to leave a comment.