If we try to create a symbolic circuit containing a Kronecker layer whose input units have different dimensionality, the current implementation throws an exception after checking that these sizes are different.
The problem is the code below, which seems to be a stub remaining from when there was no distinction between symbolic and compiled circuits.
|
if any(sl.num_input_units != num_units for num_units in sl_ins_units): |
|
raise ValueError( |
|
f"{sl}: expected number of input units {sl.num_input_units}, " |
|
f"but found input layers {sl_ins}" |
|
) |
The symbolic Circuit should construct the circuit without issues. The check should therefore be done at compilation time as it is a limitation of the current torch backend and the way folding is handled at the moment.
If we try to create a symbolic circuit containing a Kronecker layer whose input units have different dimensionality, the current implementation throws an exception after checking that these sizes are different.
The problem is the code below, which seems to be a stub remaining from when there was no distinction between symbolic and compiled circuits.
cirkit/cirkit/symbolic/circuit.py
Lines 265 to 269 in dee8f1d
The symbolic Circuit should construct the circuit without issues. The check should therefore be done at compilation time as it is a limitation of the current torch backend and the way folding is handled at the moment.