Reference: Reflect Qubricks
Contents
Reflect Class
psiqworkbench.qubricks.qbk_reflect.Reflect
Bases: Qubrick
Qubrick for Reflection (as the reflection about the mean in Grover's algorithm).
compute
compute(
target_qreg: Qubits,
theta: float
| RotationAngle
| tuple[int, int]
| None = None,
ctrl: Qubits | int = 0,
basis: str | None = None,
error_param: float = 0.0,
)
Perform a reflection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
target_qreg
|
Qubits
|
The register to operate on. |
required |
theta
|
float | RotationAngle | tuple or None
|
Phase reflect angle in degrees (or (theta * units.rad) for radians, or (num,denom) for fraction of pi). Defaults to 180 degrees. |
None
|
ctrl
|
Qubits or None
|
Optional quantum control. |
0
|
basis
|
str
|
The reflection basis 'x', 'y', 'z'. Defaults to 'z'. |
None
|
error_param
|
float
|
A parameter to control the precision of the angle. Defaults to 0 (no error). |
0.0
|
Note
For more details, see Built-in Qubricks tutorial.