benchmark_gate

PulseCompiler.benchmark_gate(gate, **kwargs)

Benchmark the pulse implementation of a single native gate.

Parameters:
  • gate (Gate) – Native Gate to benchmark.

  • **kwargs (Any) – Extra options forwarded to the backend’s gate benchmark (e.g. rotation angle and phase).

Return type:

float

Returns:

Average gate fidelity of the simulated pulse against the ideal gate.

Raises:

BackendError – If backend cannot self-benchmark (e.g. it describes real hardware, with no simulator to compare against).