Transpiler plugin

class qiskit_aqt_provider.transpiler_plugin.AQTSchedulingPlugin[source]

Bases: PassManagerStagePlugin

Scheduling stage plugin for the qiskit.transpiler.

Register the following passes to conclude transpilation, irrespective of the optimization level: 1. WrapRxxAngles pass to wrap Rxx angles to [0, π/2]. 2. Pass for the wrapped RXX gates decomposition. 3. Single-qubit gates decomposition. It uses a RR decomposition, which emits code that requires two pulses per single-qubit gates run. Since Z gates are virtual, a ZXZ decomposition is better, because it only requires a single pulse. 4. RewriteRxAsR pass to rewrite RX → R, also wrapping the angles to match the API constraints. 5. Remove redundant final measurements and raise error for mid-circuit measurements.

Note: This plugin was originally created for Qiskit 1. Qiskit 2 introduces a transpiler pass WrapAngles for wrapping angles and it may be possible to find a better solution based on it.

__init__()
classmethod __new__(*args, **kwargs)
class qiskit_aqt_provider.transpiler_plugin.RewriteRxAsR[source]

Bases: TransformationPass

Rewrite Rx(θ) and R(θ, φ) as R(θ, φ) with θ ∈ [0, π] and φ ∈ [0, 2π].

Since the pass needs to determine if the relevant angles are in range, target circuits must have all these angles bound when applying the pass.

__init__()
classmethod __new__(*args, **kwargs)
class qiskit_aqt_provider.transpiler_plugin.WrapRxxAngles[source]

Bases: TransformationPass

Wrap Rxx angles to [0, π/2].

__init__()
classmethod __new__(*args, **kwargs)