Answered
Where has my flux bias gone?
I think my flux capacitor fell out. This code (from the AND gate embedding example):
embedding = {'x1': {1}, 'x2': {5}, 'z': {0, 4}}
sampler = VirtualGraphComposite(DWaveSampler(), embedding)
Yields this warning:
/usr/local/lib/python3.7/site-packages/dwave/system/flux_bias_offsets/flux_bias_offsets.py:20: UserWarning: Package dwave-system-tuning not found. Flux biases will not be used.
The results look good, but this mysterious warning is mysterious.
Comments
A comment on the results. The response.samples() seems to be returning only unique results, and not the complete set of samples. (https://docs.ocean.dwavesys.com/en/stable/examples/and.html) I don't know if this is related to the flux bias issue, but it does prevent me from seeing the results distribution.
I found these dead links:
https://pypi.org/project/dwave-system-tuning/#files
github dwave_system_tuning
Is dwave-system-tuning an obsolete package?
[VirtualGraphComposite](https://docs.ocean.dwavesys.com/en/stable/docs_system/reference/composites.html#dwave.system.composites.VirtualGraphComposite) requires `dwave-drivers` (proprietary package, previously named `dwave-system-tuning`) to be installed in order to:
> [..] calibrate the qubits in a chain to compensate for the effects of biases that may be introduced as a result of strong couplings.
(quote from docs)
The solution is to install `dwave-drivers` package, as described on [Install page](https://docs.ocean.dwavesys.com/en/stable/overview/install.html).
In your particular case, you should also upgrade the `dwave-system` package.
So, the solution is to run:
pip install --upgrade dwave-system[drivers] --extra-index-url https://pypi.dwavesys.com/simple
(note we added `--upgrade` there).
Note on unique samples -- number of occurrences for each unique sample is available in `num_occurrences`. That's basically the distribution you're looking for (but it has nothing to do with this error, or `dwave-drivers`).
Thanks, Radomir. The drivers upgrade got my flux back in order.
Regarding the num_occurances, it took some digging to get that figured out. I was not able to locate an explicit reference to num_occurances in the docs, but found the SampleSet.data() method in the dimod.SampleSet -> SampleSet.data() documentation (https://docs.ocean.dwavesys.com/en/stable/docs_dimod/reference/generated/dimod.SampleSet.data.html) and dumped the data to see num_occurances in the output. While I now see num_occurances in my output, it is not mentioned in the sample output on the docs page. I am guessing that page is out of date?
The example in docs is for the `ExactSolver`, which doesn't return num_occurrences, so technically it's not out of date.
But you are right, we should be more explicit about specific data vectors available in `dimod.SampleSet`. Will fix that, thanks!
Please sign in to leave a comment.