Skip to content

Index

barrier

barrier(*qargs: Qubit) -> None

Barrier synchronization across a set of qubits.

Parameters:

Name Type Description Default
qargs Qubit

The qubits to synchronize.

()
Source code in .venv/lib/python3.12/site-packages/bloqade/qasm3/_wrappers.py
199
200
201
202
203
204
205
206
@wraps(core.Barrier)
def barrier(*qargs: Qubit) -> None:
    """Barrier synchronization across a set of qubits.

    Args:
        qargs: The qubits to synchronize.
    """
    ...

bitreg

bitreg(n_bits: int) -> BitReg

Create a new classical bit register.

Parameters:

Name Type Description Default
n_bits int

The number of bits in the register.

required
Source code in .venv/lib/python3.12/site-packages/bloqade/qasm3/_wrappers.py
17
18
19
20
21
22
23
24
@wraps(core.BitRegNew)
def bitreg(n_bits: int) -> BitReg:
    """Create a new classical bit register.

    Args:
        n_bits: The number of bits in the register.
    """
    ...

cx

cx(ctrl: Qubit, qarg: Qubit) -> None

Apply the CNOT (CX) gate.

Parameters:

Name Type Description Default
ctrl Qubit

The control qubit.

required
qarg Qubit

The target qubit.

required
Source code in .venv/lib/python3.12/site-packages/bloqade/qasm3/_wrappers.py
150
151
152
153
154
155
156
157
158
@wraps(uop.CX)
def cx(ctrl: Qubit, qarg: Qubit) -> None:
    """Apply the CNOT (CX) gate.

    Args:
        ctrl: The control qubit.
        qarg: The target qubit.
    """
    ...

cy

cy(ctrl: Qubit, qarg: Qubit) -> None

Apply the Controlled-Y gate.

Parameters:

Name Type Description Default
ctrl Qubit

The control qubit.

required
qarg Qubit

The target qubit.

required
Source code in .venv/lib/python3.12/site-packages/bloqade/qasm3/_wrappers.py
161
162
163
164
165
166
167
168
169
@wraps(uop.CY)
def cy(ctrl: Qubit, qarg: Qubit) -> None:
    """Apply the Controlled-Y gate.

    Args:
        ctrl: The control qubit.
        qarg: The target qubit.
    """
    ...

cz

cz(ctrl: Qubit, qarg: Qubit) -> None

Apply the Controlled-Z gate.

Parameters:

Name Type Description Default
ctrl Qubit

The control qubit.

required
qarg Qubit

The target qubit.

required
Source code in .venv/lib/python3.12/site-packages/bloqade/qasm3/_wrappers.py
172
173
174
175
176
177
178
179
180
@wraps(uop.CZ)
def cz(ctrl: Qubit, qarg: Qubit) -> None:
    """Apply the Controlled-Z gate.

    Args:
        ctrl: The control qubit.
        qarg: The target qubit.
    """
    ...

h

h(qarg: Qubit) -> None

Apply the Hadamard gate.

Parameters:

Name Type Description Default
qarg Qubit

The qubit to apply the gate to.

required
Source code in .venv/lib/python3.12/site-packages/bloqade/qasm3/_wrappers.py
51
52
53
54
55
56
57
58
@wraps(uop.H)
def h(qarg: Qubit) -> None:
    """Apply the Hadamard gate.

    Args:
        qarg: The qubit to apply the gate to.
    """
    ...

measure

measure(qarg: Qubit, carg: Bit) -> None

Measure a qubit and store the result in a classical bit.

Parameters:

Name Type Description Default
qarg Qubit

The qubit to measure.

required
carg Bit

The classical bit to store the result in.

required
Source code in .venv/lib/python3.12/site-packages/bloqade/qasm3/_wrappers.py
37
38
39
40
41
42
43
44
45
@wraps(core.Measure)
def measure(qarg: Qubit, carg: Bit) -> None:
    """Measure a qubit and store the result in a classical bit.

    Args:
        qarg: The qubit to measure.
        carg: The classical bit to store the result in.
    """
    ...

pi

pi() -> float

Return the constant PI.

Source code in .venv/lib/python3.12/site-packages/bloqade/qasm3/_wrappers.py
212
213
214
215
@wraps(expr.ConstPI)
def pi() -> float:
    """Return the constant PI."""
    ...

qreg

qreg(n_qubits: int) -> QReg

Create a new quantum register.

Parameters:

Name Type Description Default
n_qubits int

The number of qubits in the register.

required
Source code in .venv/lib/python3.12/site-packages/bloqade/qasm3/_wrappers.py
 7
 8
 9
10
11
12
13
14
@wraps(core.QRegNew)
def qreg(n_qubits: int) -> QReg:
    """Create a new quantum register.

    Args:
        n_qubits: The number of qubits in the register.
    """
    ...

reset

reset(qarg: Qubit) -> None

Reset the qubit to the |0> state.

Parameters:

Name Type Description Default
qarg Qubit

The qubit to reset.

required
Source code in .venv/lib/python3.12/site-packages/bloqade/qasm3/_wrappers.py
27
28
29
30
31
32
33
34
@wraps(core.Reset)
def reset(qarg: Qubit) -> None:
    """Reset the qubit to the |0> state.

    Args:
        qarg: The qubit to reset.
    """
    ...

rx

rx(qarg: Qubit, theta: float) -> None

Apply the RX rotation gate.

Parameters:

Name Type Description Default
qarg Qubit

The qubit to apply the gate to.

required
theta float

The rotation angle.

required
Source code in .venv/lib/python3.12/site-packages/bloqade/qasm3/_wrappers.py
114
115
116
117
118
119
120
121
122
@wraps(uop.RX)
def rx(qarg: Qubit, theta: float) -> None:
    """Apply the RX rotation gate.

    Args:
        qarg: The qubit to apply the gate to.
        theta: The rotation angle.
    """
    ...

ry

ry(qarg: Qubit, theta: float) -> None

Apply the RY rotation gate.

Parameters:

Name Type Description Default
qarg Qubit

The qubit to apply the gate to.

required
theta float

The rotation angle.

required
Source code in .venv/lib/python3.12/site-packages/bloqade/qasm3/_wrappers.py
125
126
127
128
129
130
131
132
133
@wraps(uop.RY)
def ry(qarg: Qubit, theta: float) -> None:
    """Apply the RY rotation gate.

    Args:
        qarg: The qubit to apply the gate to.
        theta: The rotation angle.
    """
    ...

rz

rz(qarg: Qubit, theta: float) -> None

Apply the RZ rotation gate.

Parameters:

Name Type Description Default
qarg Qubit

The qubit to apply the gate to.

required
theta float

The rotation angle.

required
Source code in .venv/lib/python3.12/site-packages/bloqade/qasm3/_wrappers.py
136
137
138
139
140
141
142
143
144
@wraps(uop.RZ)
def rz(qarg: Qubit, theta: float) -> None:
    """Apply the RZ rotation gate.

    Args:
        qarg: The qubit to apply the gate to.
        theta: The rotation angle.
    """
    ...

s

s(qarg: Qubit) -> None

Apply the S gate.

Parameters:

Name Type Description Default
qarg Qubit

The qubit to apply the gate to.

required
Source code in .venv/lib/python3.12/site-packages/bloqade/qasm3/_wrappers.py
91
92
93
94
95
96
97
98
@wraps(uop.S)
def s(qarg: Qubit) -> None:
    """Apply the S gate.

    Args:
        qarg: The qubit to apply the gate to.
    """
    ...

t

t(qarg: Qubit) -> None

Apply the T gate.

Parameters:

Name Type Description Default
qarg Qubit

The qubit to apply the gate to.

required
Source code in .venv/lib/python3.12/site-packages/bloqade/qasm3/_wrappers.py
101
102
103
104
105
106
107
108
@wraps(uop.T)
def t(qarg: Qubit) -> None:
    """Apply the T gate.

    Args:
        qarg: The qubit to apply the gate to.
    """
    ...

u

u(
    qarg: Qubit, theta: float, phi: float, lam: float
) -> None

Apply a general single-qubit unitary U(theta, phi, lam).

Parameters:

Name Type Description Default
qarg Qubit

The qubit to apply the gate to.

required
theta float

The theta parameter.

required
phi float

The phi parameter.

required
lam float

The lambda parameter.

required
Source code in .venv/lib/python3.12/site-packages/bloqade/qasm3/_wrappers.py
186
187
188
189
190
191
192
193
194
195
196
@wraps(uop.UGate)
def u(qarg: Qubit, theta: float, phi: float, lam: float) -> None:
    """Apply a general single-qubit unitary U(theta, phi, lam).

    Args:
        qarg: The qubit to apply the gate to.
        theta: The theta parameter.
        phi: The phi parameter.
        lam: The lambda parameter.
    """
    ...

x

x(qarg: Qubit) -> None

Apply the X (Pauli-X) gate.

Parameters:

Name Type Description Default
qarg Qubit

The qubit to apply the gate to.

required
Source code in .venv/lib/python3.12/site-packages/bloqade/qasm3/_wrappers.py
61
62
63
64
65
66
67
68
@wraps(uop.X)
def x(qarg: Qubit) -> None:
    """Apply the X (Pauli-X) gate.

    Args:
        qarg: The qubit to apply the gate to.
    """
    ...

y

y(qarg: Qubit) -> None

Apply the Y (Pauli-Y) gate.

Parameters:

Name Type Description Default
qarg Qubit

The qubit to apply the gate to.

required
Source code in .venv/lib/python3.12/site-packages/bloqade/qasm3/_wrappers.py
71
72
73
74
75
76
77
78
@wraps(uop.Y)
def y(qarg: Qubit) -> None:
    """Apply the Y (Pauli-Y) gate.

    Args:
        qarg: The qubit to apply the gate to.
    """
    ...

z

z(qarg: Qubit) -> None

Apply the Z (Pauli-Z) gate.

Parameters:

Name Type Description Default
qarg Qubit

The qubit to apply the gate to.

required
Source code in .venv/lib/python3.12/site-packages/bloqade/qasm3/_wrappers.py
81
82
83
84
85
86
87
88
@wraps(uop.Z)
def z(qarg: Qubit) -> None:
    """Apply the Z (Pauli-Z) gate.

    Args:
        qarg: The qubit to apply the gate to.
    """
    ...