Closed almosnow closed 2 years ago
Hi again, can you help me a bit w/ this? I wouldn't mind reading docs if it's there somewhere,
Thanks.
The rest api documentation is here: https://docs.dwavesys.com/docs/latest/doc_rest_api.html
let us know if you aren't able to find what you're looking for in the docs
Hi Fiona, thanks,
I am not able to find anything that has to do with the "shifting" that I observe between the submitted qubit indexes and the ones I get back in the answer of the problem,
Perhaps I'm missing something about how the solvers work behind the scenes?
My bad everyone,
The lin property on the data object contains the indexes of an enumeration of all the qubits from a solver, not the actual qubit number, for instance (qubit index) 0 -> means -> (actual qubit #) 30 on this particular topology (Advantage_system4.1).
Now that I re-read the docs, this,
One value per working qubit in the same order as solver’s qubits property
makes a lot of sense, but on a first glance I didn't get it. Perhaps it could be reworded in a more explicit way for future readers.
thanks for the suggestion
Hi all,
I'm using the Solver API to return information about a previously completed problem on your Leap platform. To do this I am querying the /problems//info endpoint and I get back the usual object w/ data, params, answer, etc...
On data, there's an object with all the properties from the submitted problem, with a key called lin that according to your docs is:
Which seems to be right and I'm able to get a list of the active qubits just by querying which ones are not NaN and retrieving their index, in one particular problem that I'll be using as an example, this list has 35 elements, and it looks like this:
OTOH, on answer, there's an object that describes the solution of the sampling task, with a key called active_variables that contains:
When I parse this data I get another list of indices which, in my example, also has 35 elements and looks like this:
I presume that both lists should be equivalent, as they both refer to the qubits that were active during the sampling, but as you can see the indices do not correspond to each other. Not only that but if you sort them and compute the difference between each list there appears to be two groups of them which are shifted by a fixed number from one another, see pic:
I'd like to understand why is this happening, so that I'm able to map back qubits from the answer back to the initial embedding I specified on the problem definition. I know this is handled by your SDK but I am building my own custom client based on your API (as some sort of learning experience) and would like to replicate some features like this one on my own code.
Hope you can throw some clarity into this for me,
Thanks!