---
title: GR (v2.1)
description: API reference for qiskit.circuit.library.GR in qiskit v2.1
source: https://eu-de.quantum.cloud.ibm.com/docs/en/api/qiskit/2.1/qiskit.circuit.library.GR
---

# GR

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

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/2.1/qiskit/circuit/library/generalized_gates/gr.py#L19-L71)

Bases: [`QuantumCircuit`](/docs/api/qiskit/2.1/qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit")

Global R gate.

**Circuit symbol:**

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

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

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

$$
GR(\theta, \phi) = \exp(-i \sum_{i=1}^{n} (\cos(\phi)X_i + \sin(\phi)Y_i) \theta/2)
$$

**Expanded Circuit:**

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

Create a new Global R (GR) 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 axis determined by phi
- **phi** ([*float*](https://docs.python.org/3/library/functions.html#float)) – angle of rotation axis in xy-plane

## 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
```
