Conventions used
There are a number of text conventions used throughout this book.
CodeInText
: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, and user input. Here is an example: "We could create a GroverOptimizer
object and directly use its solve
method with qp
."
A block of code is set as follows:
import dimod J = {(0,1):1, (0,2):1} h = {} problem = dimod.BinaryQuadraticModel(h, J, 0.0, dimod.SPIN) print("The problem we are going to solve is:") print(problem)
Any command-line input or output is written as follows:
$ python3 script.py
Important ideas are highlighted in boxes like the following:
Important note
I am a box. I feel important. That's because I am important.
We sometimes include material for those of you who want to learn more. We format it as follows:
To learn more…
You don't have to read me if you don't want to.
There are a few exercises in the text, which are displayed as follows:
Exercise 0.1
Prove that every even number greater than two can be written as the sum of two prime numbers.