dwave-system
dwave-system copied to clipboard
Abstract anneal_offset parameter
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.
yes!!!
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.
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 theDWaveSampler
as well, or handleflux_biases
andanneal_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"