Normalize theta parameter of RXGate instruction.
The parameter normalization is performed with following steps.
1) Wrap RX Gate theta into [0, pi]. When theta is negative value, the gate is decomposed into the following sequence.
┌───────┐┌─────────┐┌────────┐ q: ┤ Rz(π) ├┤ Rx(|θ|) ├┤ Rz(-π) ├ └───────┘└─────────┘└────────┘
- If the operation is supported by target, convert RX(pi/2) to SX, and RX(pi) to X.
- Quantize theta value according to the user-specified resolution.
This will help reduce the size of calibration data sent over the wire, and allow us to exploit the more accurate, hardware-calibrated pulses. Note that pulse calibration might be attached per each rotation angle.
- target (Target) – The
Targetrepresenting the target backend. If the target contains SX and X calibrations, this pass will replace the corresponding RX gates with SX and X gates.
- resolution_in_radian (float (opens in a new tab)) – Resolution for RX rotation angle quantization. If set to zero, this pass won’t modify the rotation angles in the given DAG. (=Provides aribitary-angle RX)
Check if the pass is an analysis pass.
If the pass is an AnalysisPass, that means that the pass can analyze the DAG and write the results of that analysis in the property set. Modifications on the DAG are not allowed by this kind of pass.
Check if the pass is a transformation pass.
If the pass is a TransformationPass, that means that the pass can manipulate the DAG, but cannot modify the property set (but it can be read).
execute(passmanager_ir, state, callback=None)
Execute optimization task for input Qiskit IR.
- passmanager_ir (Any (opens in a new tab)) – Qiskit IR to optimize.
- state (PassManagerState) – State associated with workflow execution by the pass manager itself.
- callback (Callable (opens in a new tab) | None) – A callback function which is caller per execution of optimization task.
Optimized Qiskit IR and state of the workflow.
Name of the pass.
Quantize the RX rotation angles by assigning the same value for the angles that differ within a resolution provided by the user.
- qubit (Qubit) – This will be the dict key to access the list of quantized rotation angles.
- original_angle (float (opens in a new tab)) – Original rotation angle, before quantization.
Run the NormalizeRXAngle pass on
dag (DAGCircuit) – The DAG to be optimized.
A DAG with RX gate calibration.
Update workflow status.
- state (PassManagerState) – Pass manager state to update.
- run_state (RunState) – Completion status of current task.
Updated pass manager state.