Perceval icon indicating copy to clipboard operation
Perceval copied to clipboard

added _is_copyable to Parameter and updated AParametrizedComponent

Open oradomskyi opened this issue 7 months ago • 4 comments

Perceval allows to use same parameter object in multiple components of the circuit to give uniform access to the identical components in the circuit. But when copying the circuit, components are making copies of themselves and copying all of the existing parameters, as a result instead of reference to the common Parameter object each new component receives a unique copy of that, and assembly of the circuit runs into RuntimeError "Two parameters with the same name".

Better description in https://github.com/Quandela/Perceval/issues/414#issuecomment-2267950043

oradomskyi avatar Aug 04 '24 23:08 oradomskyi