106 lines
2.6 KiB
Plaintext
106 lines
2.6 KiB
Plaintext
---
|
||
title: RVGate (v0.29)
|
||
description: API reference for qiskit.circuit.library.RVGate in qiskit v0.29
|
||
in_page_toc_min_heading_level: 1
|
||
python_api_type: class
|
||
python_api_name: qiskit.circuit.library.RVGate
|
||
---
|
||
|
||
# RVGate
|
||
|
||
<Class id="qiskit.circuit.library.RVGate" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.18/qiskit/circuit/library/generalized_gates/rv.py" signature="RVGate(v_x, v_y, v_z, basis='U')" modifiers="class">
|
||
Bases: `qiskit.circuit.gate.Gate`
|
||
|
||
Rotation around arbitrary rotation axis $v$ where $|v|$ is angle of rotation in radians.
|
||
|
||
**Circuit symbol:**
|
||
|
||
```python
|
||
┌─────────────────┐
|
||
q_0: ┤ RV(v_x,v_y,v_z) ├
|
||
└─────────────────┘
|
||
```
|
||
|
||
**Matrix Representation:**
|
||
|
||
$$
|
||
\begin{split}\newcommand{\th}{|\vec{v}|}
|
||
\newcommand{\sinc}{\text{sinc}}
|
||
R(\vec{v}) = e^{-i \vec{v}\cdot\vec{\sigma}} =
|
||
\begin{pmatrix}
|
||
\cos{\th} -i v_z \sinc(\th) & -(i v_x + v_y) \sinc(\th) \\
|
||
-(i v_x - v_y) \sinc(\th) & \cos(\th) + i v_z \sinc(\th)
|
||
\end{pmatrix}\end{split}
|
||
$$
|
||
|
||
Create new rv single-qubit gate.
|
||
|
||
**Parameters**
|
||
|
||
* **v\_x** (*float*) – x-component
|
||
* **v\_y** (*float*) – y-component
|
||
* **v\_z** (*float*) – z-component
|
||
* **basis** (*str, optional*) – basis (see `OneQubitEulerDecomposer`)
|
||
|
||
## Methods Defined Here
|
||
|
||
<span id="qiskit-circuit-library-rvgate-inverse" />
|
||
|
||
### inverse
|
||
|
||
<Function id="qiskit.circuit.library.RVGate.inverse" signature="RVGate.inverse()">
|
||
Invert this gate.
|
||
</Function>
|
||
|
||
<span id="qiskit-circuit-library-rvgate-to-matrix" />
|
||
|
||
### to\_matrix
|
||
|
||
<Function id="qiskit.circuit.library.RVGate.to_matrix" signature="RVGate.to_matrix()">
|
||
Return a numpy.array for the R(v) gate.
|
||
</Function>
|
||
|
||
## Attributes
|
||
|
||
### decompositions
|
||
|
||
<Attribute id="qiskit.circuit.library.RVGate.decompositions">
|
||
Get the decompositions of the instruction from the SessionEquivalenceLibrary.
|
||
</Attribute>
|
||
|
||
### definition
|
||
|
||
<Attribute id="qiskit.circuit.library.RVGate.definition">
|
||
Return definition in terms of other basic gates.
|
||
</Attribute>
|
||
|
||
### duration
|
||
|
||
<Attribute id="qiskit.circuit.library.RVGate.duration">
|
||
Get the duration.
|
||
</Attribute>
|
||
|
||
### label
|
||
|
||
<Attribute id="qiskit.circuit.library.RVGate.label">
|
||
Return instruction label
|
||
|
||
**Return type**
|
||
|
||
`str`
|
||
</Attribute>
|
||
|
||
### params
|
||
|
||
<Attribute id="qiskit.circuit.library.RVGate.params">
|
||
return instruction params.
|
||
</Attribute>
|
||
|
||
### unit
|
||
|
||
<Attribute id="qiskit.circuit.library.RVGate.unit">
|
||
Get the time unit of duration.
|
||
</Attribute>
|
||
</Class>
|
||
|