Skip to content

Glob

QASM2 extension for global gates.

u

u(
    theta: float,
    phi: float,
    lam: float,
    registers: ilist.IList[QReg, Any] | list,
) -> None

Apply a U gate to all qubits in the input registers.

Parameters:

Name Type Description Default
theta float

The angle theta.

required
phi float

The angle phi.

required
lam float

The angle lam.

required
registers IList[QReg] | list[QReg]

The registers to apply the gate to.

required
Source code in src/bloqade/qasm2/glob.py
12
13
14
15
16
17
18
19
20
21
22
23
24
@wraps(glob.UGate)
def u(
    theta: float, phi: float, lam: float, registers: ilist.IList[QReg, Any] | list
) -> None:
    """Apply a U gate to all qubits in the input registers.

    Args:
        theta (float): The angle theta.
        phi (float): The angle phi.
        lam (float): The angle lam.
        registers (IList[QReg] | list[QReg]): The registers to apply the gate to.

    """