pyjuice.deepcopy
- pyjuice.deepcopy(root_ns: CircuitNodes, tie_params: bool = False, max_block_size: int | None = None, var_mapping: Dict[int, int] | None = None) CircuitNodes
Create a deepcopy of the input PC.
- Parameters:
root_ns (CircuitNodes) – the input PC
tie_params (bool) – whether to tie the parameters between the original PC and the copied PC (if tied, their parameters will always be the same)
max_block_size (Optional[int]) – the maximum block size of the copied PC
var_mapping (Optional[Dict[int,int]]) – a mapping dictionary between the variables of the original PC and the copied PC
- Returns:
a copied PC