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

Different scope product #183

Closed IrwinChay closed 9 months ago

IrwinChay commented 9 months ago

UPDATE: corrected EFProductReparam and functional.py and is_compatible() in region_graph.py (added: do not check compatibility when a partition is included in another partition)

Tests for same scope product added partition function for product added

TODO: fix reset_parameters, only reset the current level parameters, instead of "deep reset" (Current version: all parameters would be re-initialized whenever product is called)

TODO: in prod_ef.py, need to support product of multiple circuits, which is just extending ef1 and ef2 into a list of efs

TODO: To actually support different scope product, we need scope renaming (urgent), e.g. circuit_1 have scope {0,1,2,3}; circuit_2 have scope {0,1,4,5}; , e.g. forward() in tensorized_circuit.py, currently it is indexing by scope (so not supporting circuit with scope {0,1,4,5}) Better to discuss the class structure since it includes modifying a couple things

TODO: add to pyproject.toml in test.py