126 lines
3.6 KiB
Plaintext
126 lines
3.6 KiB
Plaintext
---
|
||
title: RVGate
|
||
description: API reference for qiskit.circuit.library.RVGate
|
||
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.25/qiskit/circuit/library/generalized_gates/rv.py" signature="qiskit.circuit.library.RVGate(v_x, v_y, v_z, basis='U')" modifiers="class">
|
||
Bases: [`Gate`](qiskit.circuit.Gate "qiskit.circuit.gate.Gate")
|
||
|
||
Rotation around arbitrary rotation axis $v$ where $|v|$ is angle of rotation in radians.
|
||
|
||
Can be applied to a [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") with the [`rv()`](qiskit.circuit.QuantumCircuit#rv "qiskit.circuit.QuantumCircuit.rv") method.
|
||
|
||
**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\left(\th\right) -i v_z \sinc\left(\th\right)
|
||
& -(i v_x + v_y) \sinc\left(\th\right) \\
|
||
-(i v_x - v_y) \sinc\left(\th\right)
|
||
& \cos\left(\th\right) + i v_z \sinc\left(\th\right)
|
||
\end{pmatrix}\end{split}
|
||
$$
|
||
|
||
Create new rv single-qubit gate.
|
||
|
||
**Parameters**
|
||
|
||
* **v\_x** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) – x-component
|
||
* **v\_y** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) – y-component
|
||
* **v\_z** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) – z-component
|
||
* **basis** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")*, optional*) – basis (see [`OneQubitEulerDecomposer`](qiskit.quantum_info.OneQubitEulerDecomposer "qiskit.quantum_info.synthesis.one_qubit_decompose.OneQubitEulerDecomposer"))
|
||
|
||
## Attributes
|
||
|
||
### condition\_bits
|
||
|
||
<Attribute id="qiskit.circuit.library.RVGate.condition_bits">
|
||
Get Clbits in condition.
|
||
</Attribute>
|
||
|
||
### 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
|
||
</Attribute>
|
||
|
||
### name
|
||
|
||
<Attribute id="qiskit.circuit.library.RVGate.name">
|
||
Return the name.
|
||
</Attribute>
|
||
|
||
### num\_clbits
|
||
|
||
<Attribute id="qiskit.circuit.library.RVGate.num_clbits">
|
||
Return the number of clbits.
|
||
</Attribute>
|
||
|
||
### num\_qubits
|
||
|
||
<Attribute id="qiskit.circuit.library.RVGate.num_qubits">
|
||
Return the number of qubits.
|
||
</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>
|
||
|
||
## Methods
|
||
|
||
### inverse
|
||
|
||
<Function id="qiskit.circuit.library.RVGate.inverse" signature="inverse()">
|
||
Invert this gate.
|
||
</Function>
|
||
|
||
### to\_matrix
|
||
|
||
<Function id="qiskit.circuit.library.RVGate.to_matrix" signature="to_matrix()">
|
||
Return a numpy.array for the R(v) gate.
|
||
</Function>
|
||
</Class>
|
||
|