Gate
cx
cx(control: Qubit, target: Qubit) -> None
Apply a controlled-X gate to a pair of qubits.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
controls
|
Qubit
|
Control qubit. |
required |
targets
|
Qubit
|
Target qubit. |
required |
Source code in .venv/lib/python3.12/site-packages/bloqade/squin/stdlib/simple/gate.py
182 183 184 185 186 187 188 189 190 | |
cy
cy(control: Qubit, target: Qubit) -> None
Apply a controlled-Y gate to a pair of qubits.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
controls
|
Qubit
|
Control qubit. |
required |
targets
|
Qubit
|
Target qubit. |
required |
Source code in .venv/lib/python3.12/site-packages/bloqade/squin/stdlib/simple/gate.py
193 194 195 196 197 198 199 200 201 | |
cz
cz(control: Qubit, target: Qubit) -> None
Apply a controlled-Z gate to a pair of qubits.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
controls
|
Qubit
|
Control qubit. |
required |
targets
|
Qubit
|
Target qubit. |
required |
Source code in .venv/lib/python3.12/site-packages/bloqade/squin/stdlib/simple/gate.py
204 205 206 207 208 209 210 211 212 | |
h
h(qubit: Qubit) -> None
Apply a Hadamard gate to a qubit.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
qubit
|
Qubit
|
Target qubit. |
required |
Source code in .venv/lib/python3.12/site-packages/bloqade/squin/stdlib/simple/gate.py
39 40 41 42 43 44 45 46 | |
rx
rx(angle: float, qubit: Qubit) -> None
Apply an RX rotation gate to a qubit.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
angle
|
float
|
Rotation angle in radians. |
required |
qubit
|
Qubit
|
Target qubit. |
required |
Source code in .venv/lib/python3.12/site-packages/bloqade/squin/stdlib/simple/gate.py
149 150 151 152 153 154 155 156 157 | |
ry
ry(angle: float, qubit: Qubit) -> None
Apply an RY rotation gate to a qubit.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
angle
|
float
|
Rotation angle in radians. |
required |
qubit
|
Qubit
|
Target qubit. |
required |
Source code in .venv/lib/python3.12/site-packages/bloqade/squin/stdlib/simple/gate.py
160 161 162 163 164 165 166 167 168 | |
rz
rz(angle: float, qubit: Qubit) -> None
Apply an RZ rotation gate to a qubit.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
angle
|
float
|
Rotation angle in radians. |
required |
qubit
|
Qubit
|
Target qubit. |
required |
Source code in .venv/lib/python3.12/site-packages/bloqade/squin/stdlib/simple/gate.py
171 172 173 174 175 176 177 178 179 | |
s
s(qubit: Qubit) -> None
Apply an S gate to a qubit.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
qubit
|
Qubit
|
Target qubit. |
required |
Source code in .venv/lib/python3.12/site-packages/bloqade/squin/stdlib/simple/gate.py
59 60 61 62 63 64 65 66 | |
s_adj
s_adj(qubit: Qubit) -> None
Apply the adjoint of an S gate to a qubit.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
qubit
|
Qubit
|
Target qubit. |
required |
Source code in .venv/lib/python3.12/site-packages/bloqade/squin/stdlib/simple/gate.py
109 110 111 112 113 114 115 116 | |
shift
shift(angle: float, qubit: Qubit) -> None
Apply a phase shift to the |1> state of a qubit. Args: angle (float): Phase shift angle in radians. qubit (Qubit): Target qubit.
Source code in .venv/lib/python3.12/site-packages/bloqade/squin/stdlib/simple/gate.py
235 236 237 238 239 240 241 242 | |
sqrt_x
sqrt_x(qubit: Qubit) -> None
Apply a Sqrt(X) gate to a qubit.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
qubit
|
Qubit
|
Target qubit. |
required |
Source code in .venv/lib/python3.12/site-packages/bloqade/squin/stdlib/simple/gate.py
69 70 71 72 73 74 75 76 | |
sqrt_x_adj
sqrt_x_adj(qubit: Qubit) -> None
Apply the adjoint of a Sqrt(X) gate to a qubit.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
qubit
|
Qubit
|
Target qubit. |
required |
Source code in .venv/lib/python3.12/site-packages/bloqade/squin/stdlib/simple/gate.py
119 120 121 122 123 124 125 126 | |
sqrt_y
sqrt_y(qubit: Qubit) -> None
Apply a Sqrt(Y) gate to a qubit.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
qubit
|
Qubit
|
Target qubit. |
required |
Source code in .venv/lib/python3.12/site-packages/bloqade/squin/stdlib/simple/gate.py
79 80 81 82 83 84 85 86 | |
sqrt_y_adj
sqrt_y_adj(qubit: Qubit) -> None
Apply the adjoint of a Sqrt(Y) gate to a qubit.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
qubit
|
Qubit
|
Target qubit. |
required |
Source code in .venv/lib/python3.12/site-packages/bloqade/squin/stdlib/simple/gate.py
129 130 131 132 133 134 135 136 | |
sqrt_z
sqrt_z(qubit: Qubit) -> None
Apply a Sqrt(Z) gate to a qubit.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
qubit
|
Qubit
|
Target qubit. |
required |
Source code in .venv/lib/python3.12/site-packages/bloqade/squin/stdlib/simple/gate.py
89 90 91 92 93 94 95 96 | |
sqrt_z_adj
sqrt_z_adj(qubit: Qubit) -> None
Apply the adjoint of a Sqrt(Z) gate to a qubit.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
qubit
|
Qubit
|
Target qubit. |
required |
Source code in .venv/lib/python3.12/site-packages/bloqade/squin/stdlib/simple/gate.py
139 140 141 142 143 144 145 146 | |
t
t(qubit: Qubit) -> None
Apply a T gate to a qubit.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
qubit
|
Qubit
|
Target qubit. |
required |
Source code in .venv/lib/python3.12/site-packages/bloqade/squin/stdlib/simple/gate.py
49 50 51 52 53 54 55 56 | |
t_adj
t_adj(qubit: Qubit) -> None
Apply the adjoint of a T gate to a qubit.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
qubit
|
Qubit
|
Target qubit. |
required |
Source code in .venv/lib/python3.12/site-packages/bloqade/squin/stdlib/simple/gate.py
99 100 101 102 103 104 105 106 | |
u3
u3(theta: float, phi: float, lam: float, qubit: Qubit)
Apply the U3 gate of a qubit.
The applied gate is represented by the unitary matrix given by:
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
theta
|
float
|
Rotation around Y axis (radians). |
required |
phi
|
float
|
Global phase shift component (radians). |
required |
lam
|
float
|
Z rotations in decomposition (radians). |
required |
qubit
|
Qubit
|
Target qubit. |
required |
Source code in .venv/lib/python3.12/site-packages/bloqade/squin/stdlib/simple/gate.py
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 | |
x
x(qubit: Qubit) -> None
Apply a Pauli-X gate to a qubit.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
qubit
|
Qubit
|
Target qubit. |
required |
Source code in .venv/lib/python3.12/site-packages/bloqade/squin/stdlib/simple/gate.py
9 10 11 12 13 14 15 16 | |
y
y(qubit: Qubit) -> None
Apply a Pauli-Y gate to a qubit.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
qubit
|
Qubit
|
Target qubit. |
required |
Source code in .venv/lib/python3.12/site-packages/bloqade/squin/stdlib/simple/gate.py
19 20 21 22 23 24 25 26 | |
z
z(qubit: Qubit) -> None
Apply a Pauli-Z gate to a qubit.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
qubit
|
Qubit
|
Target qubit. |
required |
Source code in .venv/lib/python3.12/site-packages/bloqade/squin/stdlib/simple/gate.py
29 30 31 32 33 34 35 36 | |