pyjuice.structural_properties

class pyjuice.structural_properties(allow_nonsmooth=False, allow_nondecomposable=False)

Context-manager that controls the assertions of circuit structural properties, including smoothness and decomposability.

Parameters:
  • allow_nonsmooth (bool) – whether to allow non-smooth circuits

  • allow_nondecomposable (bool) – whether to allow non-decomposable circuits

Example::
>>> with pyjuice.structural_properties(allow_nonsmooth = True):
...     nis = pyjuice.inputs(var = 0, num_node_blocks = 4, dist = Categorical(num_cats = 20))
...     ....
__init__(allow_nonsmooth=False, allow_nondecomposable=False)