This page does not contain any Ocean content - it is used for testing aspects of the theme.
Inline Markup¶
Paragraphs contain text and may contain inline markup: emphasis, strong emphasis, inline literals
,
standalone hyperlinks (http://www.python.org), external hyperlinks (Python), internal cross-references (Title),
external hyperlinks with embedded URIs (Python web site), footnote references
(manually numbered 1, anonymous auto-numbered 3, labeled auto-numbered 2, or symbolic *), and
citation references (12). Character-level inline markup is also possible
(although exceedingly ugly!) in reStructured
Text. Problems are indicated by |problematic|
text (generated by processing errors; this one is intentional).
Footnotes¶
- 1(1,2)
A footnote contains body elements, consistently indented by at least 3 spaces.
This is the footnote’s second paragraph.
- 2(1,2)
Footnotes may be numbered, either manually (as in 1) or automatically using a “#”-prefixed label. This footnote has a label so it can be referred to from multiple places, both as a footnote reference (2) and as a hyperlink reference (label).
- 3
This footnote is numbered automatically and anonymously using a label of “#” only.
- *
Footnotes may also use symbols, specified with a “*” label. Here’s a reference to the next footnote: †.
- †
This footnote shows the next symbol in the sequence.
- 4
Here’s an unreferenced footnote, with a reference to a nonexistent footnote: [5]_.
Citations¶
- 11
This is the citation I made, let’s make this extremely long so that we can tell that it doesn’t follow the normal responsive table stuff.
- 12
This citation has some
code blocks
in it, maybe some bold and italics too. Heck, lets put a link to a meta citation 13 too.- 13
This citation will have two backlinks.
Math¶
This is a test. Here is an equation: \(X_{0:5} = (X_0, X_1, X_2, X_3, X_4)\). Here is another:
You can add a link to equations like the one above (1) by using :eq:
.
Admonitions¶
Attention
Directives at large.
Caution
Don’t take any wooden nickels.
Danger
Mad scientist at work!
Error
Does not compute.
Hint
It’s bigger than a bread box.
Important
Wash behind your ears.
Clean up your room.
Including the closet.
The bathroom too.
Take the trash out of the bathroom.
Clean the sink.
Call your mother.
Back up your data.
Note
This is a note. Equations within a note: \(G_{\mu\nu} = 8 \pi G (T_{\mu\nu} + \rho_\Lambda g_{\mu\nu})\).
Tip
15% if the service is good.
Example |
---|
Thing1 |
Thing2 |
Thing3 |
Warning
Strong prose may provoke extreme mental exertion. Reader discretion is strongly advised.
And, by the way…
You can make up your own admonition too.
Deprecations¶
New in version v0.1: This is a version added message.
Changed in version v0.2: This is a version changed message.
Deprecated since version v0.3: This is a deprecation message.
Autosphinx¶
- class BinaryQuadraticModel(*args, offset: Optional[Union[float, numpy.floating, numpy.integer]] = None, vartype: Optional[Union[dimod.vartypes.Vartype, str, frozenset]] = None, dtype: Union[numpy.dtype, None, type, numpy.typing._dtype_like._SupportsDType[numpy.dtype], str, Tuple[Any, int], Tuple[Any, Union[typing_extensions.SupportsIndex, Sequence[typing_extensions.SupportsIndex]]], List[Any], numpy.typing._dtype_like._DTypeDict, Tuple[Any, Any]] = None)[source]¶
Binary quadratic model.
Binary quadratic models (BQMs) are problems of the form:
\[E(\bf{v}) = \sum_{i=1} a_i v_i + \sum_{i<j} b_{i,j} v_i v_j + c \qquad\qquad v_i \in\{-1,+1\} \text{ or } \{0,1\}\]where \(a_{i}, b_{ij}, c\) are real values.
This class encodes Ising and quadratic unconstrained binary optimization (QUBO) models used by samplers such as the D-Wave system.
With one or more of the following parameters,
vartype
: The valid variable types for binary quadratic models, is one of:bqm
: An existing BQM.n
: Required number of variables.quadratic
: Quadratic biases, as a dictionary of form{(u, v): b, ...}
or a square array_like.linear
: Linear biases, as a dictionary of the form{v: b, ...}
or a one-dimensional array_like.offset
: Offset as a number.
you can create BQMs in several ways:
BinaryQuadraticModel(vartype)
with no variables or interactions.BinaryQuadraticModel(bqm)
from an existing BQM. The resulting BQM has the same variables, linear biases, quadratic biases and offset asbqm
.BinaryQuadraticModel(bqm, vartype)
from an existing BQM, changing to the specifiedvartype
if necessary.BinaryQuadraticModel(n, vartype)
withn
variables, indexed linearly from zero, setting all biases to zero.BinaryQuadraticModel(quadratic, vartype)
from quadratic biases. When formed with SPIN-variables, biases on the diagonal are added to the offset.BinaryQuadraticModel(linear, quadratic, vartype)
from linear and quadratic biases.BinaryQuadraticModel(linear, quadratic, offset, vartype)
from linear and quadratic biases and an offset.
- Parameters
*args – See above.
offset – Offset (see above) may be supplied as a keyword argument.
vartype – Variable type (see above) may be supplied as a keyword argument.
dtype – Data type.
numpy.float32
andnumpy.float64
are supported. Defaults tonumpy.float64
.
Methods/Attributes¶
|
Number of variables in the model. |
|
Get the linear bias of a variable. |