---
title: GRY (latest version)
description: API reference for qiskit.circuit.library.GRY in the latest version of qiskit
source: https://eu-de.quantum.cloud.ibm.com/docs/en/api/qiskit/qiskit.circuit.library.GRY
---

# GRY

*class* `qiskit.circuit.library.GRY(num_qubits, theta)`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/2.5/qiskit/circuit/library/generalized_gates/gr.py#L122-L168)

Bases: [`GR`](/docs/api/qiskit/qiskit.circuit.library.GR "qiskit.circuit.library.generalized_gates.gr.GR")

Global RY gate.

**Circuit symbol:**

```text
     ┌──────────┐
q_0: ┤0         ├
     │          │
q_1: ┤1  GRY(ϴ) ├
     │          │
q_2: ┤2         ├
     └──────────┘
```

The global RY gate is native to atomic systems (ion traps, cold neutrals). The global RY can be applied to multiple qubits simultaneously.

In the one-qubit case, this is equivalent to an RY(theta) operation, and is thus reduced to the RYGate. The global RY gate is a direct sum of RY operations on all individual qubits.

$$
GRY(\theta) = \exp(-i \sum_{i=1}^{n} Y_i \theta/2)
$$

**Expanded Circuit:**

![Diagram illustrating the previously described circuit.](https://eu-de.quantum.cloud.ibm.com/docs/images/api/qiskit/qiskit-circuit-library-GRY-1.avif)

Create a new Global RY (GRY) gate.

**Parameters**

- **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int)) – number of qubits.
- **theta** ([*float*](https://docs.python.org/3/library/functions.html#float)) – rotation angle about y-axis

## Attributes

### name

Type: `str`

A human-readable name for the circuit.

**Example**

```python
from qiskit import QuantumCircuit

qc = QuantumCircuit(2, 2, name="my_circuit")
print(qc.name)
```

```text
my_circuit
```
