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

# GRZ

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

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

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

Global RZ gate.

**Circuit symbol:**

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

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

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

$$
GRZ(\phi) = \exp(-i \sum_{i=1}^{n} Z_i \phi)
$$

**Expanded Circuit:**

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

Create a new Global RZ (GRZ) gate.

**Parameters**

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

## Attributes

### name

Type: [`str`](https://docs.python.org/3/library/stdtypes.html#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
```
