quri_parts.circuit.transpile.identity_manipulation module#

class quri_parts.circuit.transpile.identity_manipulation.IdentityInsertionTranspiler#

Bases: CircuitTranspilerProtocol

If there are qubits to which any gate has not been applied, Identity gates are added for those qubits.

The application of this transpiler ensures that every qubit has at least one gate acting on it.

class quri_parts.circuit.transpile.identity_manipulation.IdentityEliminationTranspiler(*args, **kwargs)#

Bases: CircuitTranspilerProtocol

Generate a new circuit by removing all Identity gates from the given circuit.