dwave-system icon indicating copy to clipboard operation
dwave-system copied to clipboard

Abstract anneal_offset parameter

Open arcondello opened this issue 5 years ago • 3 comments

The anneal_offset parameter "[should be] an array of anneal offset values, in normalized offset units, for all qubits, working or not." This is similar to flux_biases.

We should allow the user to provide them as a sparse dictionary rather than a list with missing values.

arcondello avatar Aug 09 '19 17:08 arcondello

yes!!!

conta877 avatar Aug 09 '19 17:08 conta877

A dict would indeed be preferable. Eg., {qubit_name: offset}, where qubit_name is the variable name in the BQM and any qubits not included in the dict are inferred to be zero.

jberwald avatar Aug 09 '19 17:08 jberwald

Ok, I took a deeper look, it appears that we currently only accept flux_biases as a qubit-linked list. But we do the abstraction in VirtualGraphComposite.

Proposal Move the flux_biases abstraction to DWaveSampler and apply it to anneal_offsets as well.

Additional Context

  • The initial_state parameter is handled in the cloud-client. See https://github.com/dwavesystems/dwave-cloud-client/pull/231, https://github.com/dwavesystems/dwave-cloud-client/pull/233, https://github.com/dwavesystems/dwave-cloud-client/pull/295 so for consistency we should perhaps move that into the DWaveSampler as well, or handle flux_biases and anneal_offset in the cloud-client. My preference is for the former because the cloud-client is supposed to be "a minimal implementation of the REST interface"

arcondello avatar Aug 09 '19 17:08 arcondello