119 lines
2.8 KiB
Plaintext
119 lines
2.8 KiB
Plaintext
---
|
||
title: RXGate
|
||
description: API reference for qiskit.circuit.library.RXGate
|
||
in_page_toc_min_heading_level: 1
|
||
python_api_type: class
|
||
python_api_name: qiskit.circuit.library.RXGate
|
||
---
|
||
|
||
# RXGate
|
||
|
||
<Class id="qiskit.circuit.library.RXGate" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.19/qiskit/circuit/library/standard_gates/rx.py" signature="RXGate(theta, label=None)" modifiers="class">
|
||
Bases: `qiskit.circuit.gate.Gate`
|
||
|
||
Single-qubit rotation about the X axis.
|
||
|
||
**Circuit symbol:**
|
||
|
||
```python
|
||
┌───────┐
|
||
q_0: ┤ Rx(ϴ) ├
|
||
└───────┘
|
||
```
|
||
|
||
**Matrix Representation:**
|
||
|
||
$$
|
||
\begin{align}\begin{aligned}\newcommand{\th}{\frac{\theta}{2}}\\\begin{split}RX(\theta) = exp(-i \th X) =
|
||
\begin{pmatrix}
|
||
\cos{\th} & -i\sin{\th} \\
|
||
-i\sin{\th} & \cos{\th}
|
||
\end{pmatrix}\end{split}\end{aligned}\end{align}
|
||
$$
|
||
|
||
Create new RX gate.
|
||
|
||
## Methods Defined Here
|
||
|
||
### control
|
||
|
||
<Function id="qiskit.circuit.library.RXGate.control" signature="RXGate.control(num_ctrl_qubits=1, label=None, ctrl_state=None)">
|
||
Return a (multi-)controlled-RX gate.
|
||
|
||
**Parameters**
|
||
|
||
* **num\_ctrl\_qubits** (*int*) – number of control qubits.
|
||
* **label** (*str or None*) – An optional label for the gate \[Default: None]
|
||
* **ctrl\_state** (*int or str or None*) – control state expressed as integer, string (e.g. ‘110’), or None. If None, use all 1s.
|
||
|
||
**Returns**
|
||
|
||
controlled version of this gate.
|
||
|
||
**Return type**
|
||
|
||
[ControlledGate](qiskit.circuit.ControlledGate "qiskit.circuit.ControlledGate")
|
||
</Function>
|
||
|
||
### inverse
|
||
|
||
<Function id="qiskit.circuit.library.RXGate.inverse" signature="RXGate.inverse()">
|
||
Return inverted RX gate.
|
||
|
||
$RX(\lambda)^{\dagger} = RX(-\lambda)$
|
||
</Function>
|
||
|
||
## Attributes
|
||
|
||
### condition\_bits
|
||
|
||
<Attribute id="qiskit.circuit.library.RXGate.condition_bits">
|
||
Get Clbits in condition.
|
||
|
||
**Return type**
|
||
|
||
`List`\[`Clbit`]
|
||
</Attribute>
|
||
|
||
### decompositions
|
||
|
||
<Attribute id="qiskit.circuit.library.RXGate.decompositions">
|
||
Get the decompositions of the instruction from the SessionEquivalenceLibrary.
|
||
</Attribute>
|
||
|
||
### definition
|
||
|
||
<Attribute id="qiskit.circuit.library.RXGate.definition">
|
||
Return definition in terms of other basic gates.
|
||
</Attribute>
|
||
|
||
### duration
|
||
|
||
<Attribute id="qiskit.circuit.library.RXGate.duration">
|
||
Get the duration.
|
||
</Attribute>
|
||
|
||
### label
|
||
|
||
<Attribute id="qiskit.circuit.library.RXGate.label">
|
||
Return instruction label
|
||
|
||
**Return type**
|
||
|
||
`str`
|
||
</Attribute>
|
||
|
||
### params
|
||
|
||
<Attribute id="qiskit.circuit.library.RXGate.params">
|
||
return instruction params.
|
||
</Attribute>
|
||
|
||
### unit
|
||
|
||
<Attribute id="qiskit.circuit.library.RXGate.unit">
|
||
Get the time unit of duration.
|
||
</Attribute>
|
||
</Class>
|
||
|