Hi Yinjia,
a circuit that mimics an HMM should have DenseLayer as sum layers and HadamardLayer as product layers, so I think there is no need to specify sum and product factories in the from_hmm method. I believe you can remove them and add a dense_weight_factory to enable the user to optionally parameterize the dense layers differently. For example, see here:
https://github.com/april-tools/cirkit/blob/main/cirkit/symbolic/circuit.py#L291
from_hmm modified, sum and prod factory inputs removed. But I kept the input factory input, since I suggest that other input factories can also be useful here?
(The Merge action above is my accidental click)
Hi Yinjia, a circuit that mimics an HMM should have DenseLayer as sum layers and HadamardLayer as product layers, so I think there is no need to specify sum and product factories in the
from_hmm
method. I believe you can remove them and add adense_weight_factory
to enable the user to optionally parameterize the dense layers differently. For example, see here: https://github.com/april-tools/cirkit/blob/main/cirkit/symbolic/circuit.py#L291Thanks!