mindquantum.algorithm.compiler.SimpleNeighborCanceler

mindquantum.algorithm.compiler.SimpleNeighborCanceler#

class mindquantum.algorithm.compiler.SimpleNeighborCanceler#

Merge two nearby gate if possible.

do(dag_circuit: DAGCircuit) bool#

Apply neighbor canceler compiler rule.

Parameters:

dag_circuit (DAGCircuit) – The DAG graph of quantum circuit.