Skip to main contentIBM Quantum Documentation

NormalizeRXAngle

qiskit.transpiler.passes.NormalizeRXAngle(*args, **kwargs)GitHub(opens in a new tab)

Bases: TransformationPass

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(-π)
   └───────┘└─────────┘└────────┘
  1. If the operation is supported by target, convert RX(pi/2) to SX, and RX(pi) to X.
  2. 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.

NormalizeRXAngle initializer.

Parameters

  • target (Target) – The Target representing 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 arbitrary-angle RX)

Attributes

is_analysis_pass

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.

is_transformation_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).


Methods

execute

execute(passmanager_ir, state, callback=None)

Execute optimization task for input Qiskit IR.

Parameters

Returns

Optimized Qiskit IR and state of the workflow.

Return type

tuple(opens in a new tab)[Any(opens in a new tab), qiskit.passmanager.compilation_status.PassManagerState]

name

name()

Name of the pass.

Return type

str(opens in a new tab)

quantize_angles

quantize_angles(qubit, original_angle)

Quantize the RX rotation angles by assigning the same value for the angles that differ within a resolution provided by the user.

Parameters

Returns

Quantized angle.

Return type

float(opens in a new tab)

run

run(dag)

Run the NormalizeRXAngle pass on dag.

Parameters

dag (DAGCircuit) – The DAG to be optimized.

Returns

A DAG with RX gate calibration.

Return type

DAGCircuit

update_status

update_status(state, run_state)

Update workflow status.

Parameters

  • state (PassManagerState) – Pass manager state to update.
  • run_state (RunState) – Completion status of current task.

Returns

Updated pass manager state.

Return type

PassManagerState

Was this page helpful?