Skip to content

Commit 4f1fca0

Browse files
committed
Apply autosummary template to embedding and utilities
1 parent 72e64cb commit 4f1fca0

File tree

8 files changed

+42
-79
lines changed

8 files changed

+42
-79
lines changed

docs/embedding.rst

Lines changed: 29 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -65,76 +65,57 @@ Minor-embedding in :term:`Zephyr`-structured target graphs.
6565
Utilities
6666
=========
6767

68+
The following **modules** provide functions for embedding and chains; for
69+
example, functions such as :func:`~dwave.embedding.transforms.embed_bqm`,
70+
:func:`~dwave.embedding.utils.chain_break_frequency` and
71+
:func:`~dwave.embedding.chain_strength.uniform_torque_compensation`.
6872

6973
.. autosummary::
74+
:recursive:
7075
:toctree: generated/
76+
:template: autosummary_module_functions.rst
7177

72-
embed_bqm
73-
embed_ising
74-
embed_qubo
75-
unembed_sampleset
78+
chain_breaks
79+
chain_strength
80+
transforms
81+
utils
7682

77-
Diagnostics
78-
===========
79-
80-
.. autosummary::
81-
:toctree: generated/
82-
83-
chain_break_frequency
84-
diagnose_embedding
85-
is_valid_embedding
86-
verify_embedding
87-
88-
Chain Strength
89-
==============
83+
Classes
84+
-------
9085

91-
.. automodule:: dwave.embedding.chain_strength
92-
.. currentmodule:: dwave.embedding
86+
The following classes are provided.
9387

9488
.. autosummary::
95-
:toctree: generated/
96-
97-
chain_strength.uniform_torque_compensation
98-
chain_strength.scaled
99-
100-
Chain-Break Resolution
101-
======================
102-
103-
.. automodule:: dwave.embedding.chain_breaks
104-
.. currentmodule:: dwave.embedding
105-
106-
Generators
107-
----------
89+
:recursive:
90+
:nosignatures:
91+
:toctree: generated
92+
:template: autosummary_class.rst
10893

109-
.. autosummary::
110-
:toctree: generated/
94+
EmbeddedStructure
95+
~chain_breaks.MinimizeEnergy
11196

112-
chain_breaks.discard
113-
chain_breaks.majority_vote
114-
chain_breaks.weighted_random
97+
Diagnostic Functions
98+
--------------------
11599

116-
Callable Objects
117-
----------------
100+
These diagnostics functions are also provided.
118101

119102
.. autosummary::
120103
:toctree: generated/
121104

122-
chain_breaks.MinimizeEnergy
105+
chain_break_frequency
106+
diagnose_embedding
107+
is_valid_embedding
108+
verify_embedding
123109

124110
Exceptions
125111
==========
126112

127113
.. autosummary::
128114
:toctree: generated/
129115

130-
exceptions.EmbeddingError
131-
exceptions.MissingChainError
132116
exceptions.ChainOverlapError
133117
exceptions.DisconnectedChainError
118+
exceptions.EmbeddingError
134119
exceptions.InvalidNodeError
135-
exceptions.MissingEdgeError
136-
137-
Classes
138-
=======
139-
140-
.. autoclass:: EmbeddedStructure
120+
exceptions.MissingChainError
121+
exceptions.MissingEdgeError

docs/utilities.rst

Lines changed: 5 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,39 +4,16 @@
44
Utilities
55
=========
66

7-
.. automodule:: dwave.system.utilities
8-
97
.. currentmodule:: dwave.system
108

119
.. autosummary::
10+
:recursive:
1211
:toctree: generated/
12+
:template: autosummary_module_functions.rst
1313

14-
~utilities.anneal_schedule_with_offset
15-
~utilities.common_working_graph
16-
~coupling_groups.coupling_groups
17-
~utilities.energy_scales_custom_schedule
18-
19-
Temperature and Unit-Conversion Utilities
20-
-----------------------------------------
21-
22-
.. automodule:: dwave.system.temperatures
23-
24-
.. currentmodule:: dwave.system.temperatures
25-
26-
.. autosummary::
27-
:toctree: generated/
28-
29-
background_susceptibility_bqm
30-
background_susceptibility_ising
31-
effective_field
32-
fast_effective_temperature
33-
fluxbias_to_h
34-
freezeout_effective_temperature
35-
h_to_fluxbias
36-
Ip_in_units_of_B
37-
maximum_pseudolikelihood
38-
maximum_pseudolikelihood_temperature
39-
14+
coupling_groups
15+
utilities
16+
temperatures
4017

4118
.. [Chat2007]
4219
Chatterjee, Sourav.

dwave/embedding/chain_breaks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
"""Unembedding samples with broken chains."""
15+
"""Provides functions that unembed samples with broken chains."""
1616

1717
from collections.abc import Callable
1818
from heapq import heapify, heappop

dwave/embedding/transforms.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14+
"""Provides utility functions for minor embedding and unembedding."""
1415

1516
import collections.abc as abc
1617
import itertools

dwave/embedding/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14+
"""Provides utility functions related to minor embedding and chains."""
1415

1516
import dimod
1617
import numpy as np

dwave/system/coupling_groups.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14+
"""Provides functions related to the ``per_group_coupling_range`` property."""
1415

1516
import dwave_networkx as dnx
1617

dwave/system/temperatures.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
r"""Some notes on the parameter-estimation methods provided below:
15+
r"""Provides temperature estimation and flux-bias offset utility functions.
16+
17+
Some notes on the parameter-estimation methods provided below:
1618
1719
- :func:`fluxbias_to_h` and :func:`h_to_fluxbias`
1820

dwave/system/utilities.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
"""Utility functions."""
15+
"""Provides general utility functions."""
1616

1717
import os
1818
import json

0 commit comments

Comments
 (0)