Offline post-processing

I'd like to know if there is a way of running a SampleSet through post-processing, either optimization or sample, after it has been received from the machine.

Right now the only way to use post-processing is to enable it when calling sample()



1 comment
  • Hello,

    Unfortunately there is no way of running the post-processing offline.

    We are looking into including it in future projects, which would be available offline.

    For the time being, you could resubmit the solutions as reverse annealing problems, and set s=1, which will not change the values, and enable post-processing.

    The initial_state would be your solution data from the previous problem submission.

    However, this will use QPU time.

    The code would look something like this:

    sampler = EmbeddingComposite(DWaveSampler())

    result = sampler.sample_qubo(Q, chain_strength=3, num_reads=1)

    schedule=[[0.0, 1.0],[1.0, 1.0]]
    initial_sample = next(iter(
    initial = dict(initial_sample[0])
    reverse_anneal_params = dict(anneal_schedule=schedule, initial_state=initial, reinitialize_state=False)
    reverse_answer = sampler.sample_qubo(Q, num_reads=1, answer_mode='raw', postprocess="optimization", **reverse_anneal_params)

    Here is some more information in the documentation about reverse annealing:

    There is a new Jupyter Notebook on reverse annealing.
    Here is a link talking about its release:

    I hope this was helpful!

    Comment actions Permalink

Please sign in to leave a comment.

Didn't find what you were looking for?

New post