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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
pi
pi() -> float
Return the constant PI.
Source code in .venv/lib/python3.12/site-packages/bloqade/qasm3/_wrappers.py
212 213 214 215 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |