API Reference: qiskit.circuit.QuantumCircuit.rx

API Reference: qiskit.circuit.QuantumCircuit.rx

The QuantumCircuit.rx method appends a parameterized rotation around the X axis of the Bloch sphere. The main parameters are theta, representing the rotation angle in radians, and qubit, representing the qubit to which the operation is applied.

The mathematical form of the operation is \(R_X(\theta)=e^{-i\theta X/2}\). When the angle is supplied as a symbolic parameter, the circuit can be bound later during optimization, making this method useful for VQE, QAOA, and gradient-based circuit training.

Parameters

Parameter Name Type Description
theta float | ParameterExpression The rotation angle in radians.
qubit int | Qubit The target qubit that receives the X-axis rotation.
from qiskit import QuantumCircuit
qc = QuantumCircuit(1)
theta = 1.57079632679
qc.rx(theta, 0)

Example Output

{
  "status": "success",
  "operation": "RXRotation",
  "theta": 1.57079632679,
  "target": 0
}

Used In Technical Article

Mathematical Formulation of Variational Quantum Eigensolver

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top