april-tools / cirkit

a python framework to build, learn and reason about probabilistic circuits and tensor networks
https://cirkit-docs.readthedocs.io/en/latest/
GNU General Public License v3.0
71 stars 1 forks source link

Refactor `ScopeLayer` etc #146

Closed lkct closed 4 months ago

lkct commented 11 months ago

Ref https://github.com/april-tools/cirkit/pull/142#discussion_r1385239018

The new Layer __init__ signature should provide a more unified interface for all layers, but some are not yet fitted to it because they don't have all the properties. We need to define the values in those cases.

For ScopeLayer specifically, it's essentially a product layer but written only for input. With some changes to bookkeeping it can be transformed into a general product layer and more properties will become meaningful.