fiqci.ems.transpiler_passes.zne_circuits

fiqci.ems.transpiler_passes.zne_circuits#

Classes

ZNECircuits(*args, **kwargs)

A pass to generate circuits for zero-noise extrapolation (ZNE) by folding gates.

class ZNECircuits(*args, **kwargs)#

Bases: TransformationPass

A pass to generate circuits for zero-noise extrapolation (ZNE) by folding gates.

__init__(fold_gates: Iterable[str] | None = None, scale_factor: int = 1, folding_method: str = 'local')#

Initialize the ZNECircuits pass.

Parameters:
  • fold_gates – An optional iterable of gate names to fold. If None, all gates will be folded.

  • scale_factor – The factor by which to scale the circuit.

  • folding_method – The method to use for folding gates (“local” or “global”).

run(dag: DAGCircuit) DAGCircuit#

Run the ZNECircuits pass on the given DAGCircuit.

Parameters:

dag – The input DAGCircuit to transform.

Returns:

A new DAGCircuit with folded gates for ZNE.