Draft · v0.2 · Unreviewed
← Index/Project · Nadarasa ReductionDraft · v0.2 · Selene Emulator

primitive · G9

LCU block-encoding of H = c0·I + c1·X

Smallest-honest Linear-Combinations-of-Unitaries: one prep ancilla + one data qubit. PREP = Ry(2θ), SELECT = CX, UNPREP = Ry(-2θ). Post-selecting on prep = |0⟩ projects the data register onto (c0·I + c1·X)|ψ⟩ with c0 = cos²(θ), c1 = sin²(θ).

lcu_block_encoding_verified · worst |Δ P(prep=0)| = 0.0088 · worst |Δ P(d=1|prep=0)| = 0.0121

← frontier card

P(prep = 0) — post-selection success rate

P(data = 1 | prep = 0) — block-encoded output

Kernel snippet (θ = π/4, ψ = |0⟩)

open in Playpond ↗

from quantum.nadarasa_g9_lib import (
    guppy, qubit, h, x, cx, rx, ry, rz, measure, result, angle,
)

@guppy
def program() -> None:
    prep = qubit()
    data = qubit()
    # data starts in |0>
    # PREP
    ry(prep, angle(0.5))
    # SELECT: controlled-X
    cx(prep, data)
    # UNPREP
    ry(prep, angle(-0.5))
    result("prep", measure(prep))
    result("data", measure(data))
Smallest-honest LCU block-encoding: 1 prep ancilla + 1 data qubit encoding H = cos²(θ)·I + sin²(θ)·X via PREP=Ry(2θ), SELECT=CX, UNPREP=Ry(-2θ). After post-selecting on prep = |0⟩, the data register holds (c0·I + c1·X)|ψ⟩ / λ. For each (θ, ψ) the host compares the empirical P(prep=0) and P(data=1 | prep=0) to a closed-form classical prediction. Verdict = verified if the worst-case |observed − predicted| stays below 0.04 across the θ × ψ grid.