pyqonvert.optimization.eliminate_identities
- pyqonvert.optimization.eliminate_identities(circuit, identity_tolerance)
Optimize circuit by eliminating identity gates.
- Parameters:
circuit (Circuit) -- The circuit that is optimized.
identity_tolerance (float) -- Tolerance for identifying a single qubit gate with identity. If gate.alpha_r <= identity_tolerance the gate is taken to be the identity.
- Returns:
without identity gates.
- Return type:
Circuit
- Raises:
ValueError -- The input cannot be converted to a Circuit.
RuntimeError -- Error during optimization.