primitive · G10
Quantum Signal Processing — execution layer
Single signal qubit. U(x) = eiφ0Z · Πk[ W(x) · eiφkZ ] with W(x) = ei·acos(x)·X. Hand-chosen phase sequence φ = (π/3, π/3, π/3, π/3) — d = 3, no phase finder. The host computes P(0) = |⟨0|U|0⟩|² exactly via NumPy 2×2 multiplication; Selene gives the empirical rate.
qsp_verified · worst |Δ| = 0.0176 · 2048 shots × 8 x-points
Measured vs reference P(measure = 0)
Per-x table
| x | measured P(0) | reference P(0) | Δ |
|---|---|---|---|
| -1.000 | 1.0000 | 1.0000 | 0.0000 |
| -0.500 | 0.5605 | 0.5781 | -0.0176 |
| -0.250 | 0.1665 | 0.1760 | -0.0095 |
| 0.000 | 0.0000 | 0.0000 | -0.0000 |
| 0.250 | 0.1670 | 0.1760 | -0.0090 |
| 0.500 | 0.5737 | 0.5781 | -0.0044 |
| 0.750 | 0.9204 | 0.9163 | 0.0042 |
| 1.000 | 1.0000 | 1.0000 | 0.0000 |
Kernel snippet (x = 0.5)
open in Playpond ↗
from quantum.nadarasa_g10_lib import (
guppy, qubit, h, rx, rz, measure, result, angle,
)
@guppy
def program() -> None:
s = qubit()
rz(s, angle(-0.6666666666666666))
rx(s, angle(-0.6666666666666667))
rz(s, angle(-0.6666666666666666))
rx(s, angle(-0.6666666666666667))
rz(s, angle(-0.6666666666666666))
rx(s, angle(-0.6666666666666667))
rz(s, angle(-0.6666666666666666))
result("s", measure(s))