Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not deepcopy operations in Unroll3qOrMore (#10702)
In the Unroll3qOrMore pass internally is quite simple it iterates over every operation in the circuit and for any operation that uses >= 3 qubits and recursively decompsing it into all 1 and 2 qubit operations, converting it to a DAGCircuit and substituting the >=3 qubit gates with the equivalent circuit. However, during this DAGCircuit conversion step we're spending a large amount deep copying the operation objects. However, we don't need to do this because nothing in the circuit will be reused with shared references so we can skip the copying and just pass the operation objects by reference onto the DAG (as that's all we need). This commit makes that change by using the `copy_operations` flag we introduced in #9848 on circuit_to_dag() to disable the internal copying.
- Loading branch information