docs
docs copied to clipboard
Add information about local simulation of QUBO on section Using a Classical Solver
In the documentation for the classical simulation (Getting Started -> Initial Setup -> Using a Classical Solver), there is only an example about an Ising problem. This pull request adds an example about local classical simulation of a QUBO problem and adds minor changes to the text.
These changes are meant to make it easier for the reader to try out classical simulation of the examples that appear later on, in the documentation. These examples are frequently formulated as QUBO problems, such as the Boolean NOT Gate (https://docs.ocean.dwavesys.com/en/latest/examples/not.html#not).
@JoelPasvolsky , thank you for the comments! I missed this information about solving QUBO problems via classical simulation while working through some examples at https://docs.ocean.dwavesys.com/en/latest/getting_started.html#examples . And I thought updating https://docs.ocean.dwavesys.com/en/latest/overview/cpu.html would be a good idea, since this was the only section mentioning the classical solver in Ocean Documentation. But your comments made me realize it was not the main point of that section, and it seems too early to present this information there.
I'll check the other links you sent
- https://docs.dwavesys.com/docs/latest/c_handbook_3.html#native-formulations-ising-and-qubo-and-mis
- https://docs.ocean.dwavesys.com/projects/dimod/en/latest/reference/utilities.html#vartype-conversion to see if there is any need to add information or examples.
Do you think it would be useful to include a subsection inside "Examples" about classical simulation of QUBO? I though about something along the lines of :
- Examples
- Classical Simulation
- Beginner-Level Examples
- Intermediate-Level Examples
- Advanced-Level Examples
Or, perhaps, to include this example on classical simulation as one of the beginner-level examples. What do you think?
@giovanipollachini, thank you for following up on this. Currently the examples under https://docs.ocean.dwavesys.com/en/latest/getting_started.html#examples begin with classical sampling in the 2nd and 3rd beginners' examples:
- Vertex Color: https://docs.ocean.dwavesys.com/en/latest/examples/min_vertex.html#solving-classically-on-a-cpu
- Constrained Scheduling: https://docs.ocean.dwavesys.com/en/latest/examples/scheduling.html#solving-classically-on-a-cpu
A new user going through the Getting Started examples experiences a learning trajectory of using (1) a hybrid sampler that abstracts the underlying hardware (2) the interchangeability of dimod samplers (classical and quantum) (3) QPU/hybrid usage
From our discussion I understand that what is missing for you is the separate aspect of applying different problem formulations, Ising and QUBO, to the sampling, which could be classical or quantum. Considering two places for that info: (1) a sixth beginners' example (2) providing the Ising formulation in the https://docs.ocean.dwavesys.com/en/latest/examples/not.html#not example, my preference is for (2) in order to not dilute the functioning of these examples as entry points of various programming models: CS, math, physics. Another point to keep in mind is that the overall purpose is to encourage quantum programming, not classical :-).
Would you like update your PR accordingly? You could add a section, say "Alternative Formulation: Ising" between sections https://docs.ocean.dwavesys.com/en/latest/examples/not.html#solve-the-problem-by-sampling and https://docs.ocean.dwavesys.com/en/latest/examples/not.html#summary, where you's reuse your proposed content for QUBO --> Ising translation ("change of variables :math:a = 2r-1
and :math:b = 2s-1
") and maybe even use a classical sampler (e.g., neal rather than the earlier dimod) instead of the QPU used for the QUBO.
See also something similar I did for the Leap Quantum Coding Challenge back in February: https://support.dwavesys.com/hc/en-us/community/posts/360027456373-Problem-5-Find-the-Ising-Equivalent-of-a-QUBO-Representing-a-NOT-Gate