Currently ProdEFLayer and EFProdReparam is only designed for two same inputs (underlying constraint is same suff stats).
This makes the product of 3 circuit impossible, i.e., the product of two is different from the third (yet 4 arranged in a balanced binary tree can still work)
This should be fixed and included in the tests.
Example test case based on test_product.py:
# imbalanced, currently fails
product_circuit = circuit1 @ circuit2 @ circuit3 @ circuit4
# balanced, currently works
product_circuit = (circuit1 @ circuit2) @ (circuit3 @ circuit4)
This also relates to #210. Maybe we should consider overhaul the ProdEFLayer and this may automatically fixed after refactoring the design as discussed in #210
Currently
ProdEFLayer
andEFProdReparam
is only designed for two same inputs (underlying constraint is same suff stats). This makes the product of 3 circuit impossible, i.e., the product of two is different from the third (yet 4 arranged in a balanced binary tree can still work)This should be fixed and included in the tests. Example test case based on
test_product.py
:This also relates to #210. Maybe we should consider overhaul the
ProdEFLayer
and this may automatically fixed after refactoring the design as discussed in #210