132 lines
3.4 KiB
Plaintext
132 lines
3.4 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.21/qiskit/circuit/library/generalized_gates/rv.py" signature="RVGate(v_x, v_y, v_z, basis='U')" modifiers="class">
|
||
Bases: [`qiskit.circuit.gate.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{\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`](qiskit.quantum_info.OneQubitEulerDecomposer "qiskit.quantum_info.synthesis.one_qubit_decompose.OneQubitEulerDecomposer"))
|
||
|
||
## Methods Defined Here
|
||
|
||
### inverse
|
||
|
||
<Function id="qiskit.circuit.library.RVGate.inverse" signature="RVGate.inverse()">
|
||
Invert this gate.
|
||
</Function>
|
||
|
||
### 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
|
||
|
||
### condition\_bits
|
||
|
||
<Attribute id="qiskit.circuit.library.RVGate.condition_bits">
|
||
Get Clbits in condition.
|
||
|
||
**Return type**
|
||
|
||
`List`\[[`Clbit`](qiskit.circuit.Clbit "qiskit.circuit.classicalregister.Clbit")]
|
||
</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
|
||
|
||
**Return type**
|
||
|
||
`str`
|
||
</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>
|
||
</Class>
|
||
|