137 lines
3.1 KiB
Plaintext
137 lines
3.1 KiB
Plaintext
---
|
||
title: RYGate
|
||
description: API reference for qiskit.circuit.library.RYGate
|
||
in_page_toc_min_heading_level: 1
|
||
python_api_type: class
|
||
python_api_name: qiskit.circuit.library.RYGate
|
||
---
|
||
|
||
# RYGate
|
||
|
||
<Class id="qiskit.circuit.library.RYGate" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.20/qiskit/circuit/library/standard_gates/ry.py" signature="RYGate(theta, label=None)" modifiers="class">
|
||
Bases: `qiskit.circuit.gate.Gate`
|
||
|
||
Single-qubit rotation about the Y axis.
|
||
|
||
**Circuit symbol:**
|
||
|
||
```python
|
||
┌───────┐
|
||
q_0: ┤ Ry(ϴ) ├
|
||
└───────┘
|
||
```
|
||
|
||
**Matrix Representation:**
|
||
|
||
$$
|
||
\begin{align}\begin{aligned}\newcommand{\th}{\frac{\theta}{2}}\\\begin{split}RY(\theta) = exp(-i \th Y) =
|
||
\begin{pmatrix}
|
||
\cos{\th} & -\sin{\th} \\
|
||
\sin{\th} & \cos{\th}
|
||
\end{pmatrix}\end{split}\end{aligned}\end{align}
|
||
$$
|
||
|
||
Create new RY gate.
|
||
|
||
## Methods Defined Here
|
||
|
||
### control
|
||
|
||
<Function id="qiskit.circuit.library.RYGate.control" signature="RYGate.control(num_ctrl_qubits=1, label=None, ctrl_state=None)">
|
||
Return a (multi-)controlled-RY 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.RYGate.inverse" signature="RYGate.inverse()">
|
||
Return inverted RY gate.
|
||
|
||
$RY(\lambda){\dagger} = RY(-\lambda)$
|
||
</Function>
|
||
|
||
## Attributes
|
||
|
||
### condition\_bits
|
||
|
||
<Attribute id="qiskit.circuit.library.RYGate.condition_bits">
|
||
Get Clbits in condition.
|
||
|
||
**Return type**
|
||
|
||
`List`\[`Clbit`]
|
||
</Attribute>
|
||
|
||
### decompositions
|
||
|
||
<Attribute id="qiskit.circuit.library.RYGate.decompositions">
|
||
Get the decompositions of the instruction from the SessionEquivalenceLibrary.
|
||
</Attribute>
|
||
|
||
### definition
|
||
|
||
<Attribute id="qiskit.circuit.library.RYGate.definition">
|
||
Return definition in terms of other basic gates.
|
||
</Attribute>
|
||
|
||
### duration
|
||
|
||
<Attribute id="qiskit.circuit.library.RYGate.duration">
|
||
Get the duration.
|
||
</Attribute>
|
||
|
||
### label
|
||
|
||
<Attribute id="qiskit.circuit.library.RYGate.label">
|
||
Return instruction label
|
||
|
||
**Return type**
|
||
|
||
`str`
|
||
</Attribute>
|
||
|
||
### name
|
||
|
||
<Attribute id="qiskit.circuit.library.RYGate.name">
|
||
Return the name.
|
||
</Attribute>
|
||
|
||
### num\_clbits
|
||
|
||
<Attribute id="qiskit.circuit.library.RYGate.num_clbits">
|
||
Return the number of clbits.
|
||
</Attribute>
|
||
|
||
### num\_qubits
|
||
|
||
<Attribute id="qiskit.circuit.library.RYGate.num_qubits">
|
||
Return the number of qubits.
|
||
</Attribute>
|
||
|
||
### params
|
||
|
||
<Attribute id="qiskit.circuit.library.RYGate.params">
|
||
return instruction params.
|
||
</Attribute>
|
||
|
||
### unit
|
||
|
||
<Attribute id="qiskit.circuit.library.RYGate.unit">
|
||
Get the time unit of duration.
|
||
</Attribute>
|
||
</Class>
|
||
|