BloqDocSpec#
qualtran.BloqDocSpec
View source on GitHub
|
A collection of bloq examples and specifications for documenting a bloq class.
qualtran.BloqDocSpec(
*,
bloq_cls,
examples=NOTHING,
import_line=NOTHING,
call_graph_example=NOTHING
)
This collects all the metadata and examples for a given bloq class. It is used to configure automatic documentation generation. The autogenerated notebooks currently contain the following sections:
The bloq class’s documentation. We render
bloq_cls’s docstring to a markdown cell.Example instance construction. We use the
examplesto render code cells that construct the examples for use by further sections.Graphical signature. We display the bloq in a graphical form. This is prior to decomposition, so it shows the bloq’s name and input/output registers i.e. its signature.
Call graph. We display one of the example’s call graph.
Args
bloq_clsThe class we’re documenting.
import_lineHow to import the bloq.
examplesAn iterable of
BloqExampleto use as example instances in the notebook.call_graph_exampleThe example to use to show the call graph, or
Noneto omit a call graph. Note that this example must be included inexamples.
Attributes
Methods#
__ne__
__ne__(
other
)
Check equality and either forward a NotImplemented or return the result negated.
__eq__
__eq__(
other
)
Method generated by attrs for class BloqDocSpec.
View source on GitHub