BloqDocSpec#

qualtran.BloqDocSpec

A collection of bloq examples and specifications for documenting a bloq class.

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:

  1. The bloq class’s documentation. We render bloq_cls’s docstring to a markdown cell.

  2. Example instance construction. We use the examples to render code cells that construct the examples for use by further sections.

  3. 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.

  4. Call graph. We display one of the example’s call graph.

bloq_cls

The class we’re documenting.

import_line

How to import the bloq.

examples

An iterable of BloqExample to use as example instances in the notebook.

call_graph_example

The example to use to show the call graph, or None to omit a call graph. Note that this example must be included in examples.

bloq_cls

 

call_graph_example

 

examples

 

import_line

 

Methods#

__ne__

Check equality and either forward a NotImplemented or return the result negated.

__eq__

Method generated by attrs for class BloqDocSpec.