pub struct QuantBlock {
pub encoding: Option<String>,
pub observable: Option<String>,
pub qubits: Option<i64>,
pub depth: Option<i64>,
pub bandwidth: Option<f64>,
pub reupload: Option<i64>,
pub effect: String,
pub body: Vec<FlowStep>,
pub loc: Loc,
}Expand description
v2.4.0 — the quant cognitive primitive block surface
(papers/paper_primitiva_quant.md; enterprise v2.4.0).
quant projects an MEK semantic tensor into a complex Hilbert space,
evolves it under a variational / kernel-feature map, and collapses back to
classical silicon. The attribute header is OPTIONAL — the bare quant { … }
form (the paper’s example) leaves every attribute defaulted. The richer form
quant(encoding: amplitude, observable: M, qubits: 10, depth: 4, bandwidth: 0.5, backend: quant_sim) { … } pins the encoding scheme (D2),
the Pauli-sum observable (D5), the register width / circuit depth, the
projected-kernel bandwidth γ (D7), and the algebraic-effect backend (D1/D9).
v2.4.0 ships the SURFACE only. The Continuous Type Invariant over body
(v2.4.0), the typed continuous grammar incl. typed let + Observable
(v2.4.0), and the quant_sim/qpu_native effect injection + yield
measurement point (v2.4.0) land in subsequent steps.
Fields§
§encoding: Option<String>encoding: — amplitude (default) or angle (shallow). None = the
compiler default (amplitude). Carried as the surface spelling; v2.4.0
validates against the closed scheme set.
observable: Option<String>observable: — the name of a declared Observable (Pauli-sum, D5).
None if unspecified (v2.4.0 resolves + Hermiticity-checks it).
qubits: Option<i64>qubits: — the register width n (D = 2ⁿ). None = inferred from the
encoded tensor dimensionality. The OSS reference backend caps n ≤ 10
(D1); that bound is enforced at v2.4.0, not here.
depth: Option<i64>depth: — the variational circuit depth L. None = backend default.
bandwidth: Option<f64>bandwidth: — the projected-quantum-kernel bandwidth γ (D7). None =
backend default.
reupload: Option<i64>v2.23.0 — reupload: L, the number of DATA RE-UPLOADING layers. None
or 1 = no re-uploading (the data enters once → a quadratic form, provably
classical for amplitude+Pauli, v2.23.0). L ≥ 2 interleaves the data
encoding with entangling layers L times — the ONLY provable escape from the
quadratic bound (Havlíček-style; canonical with encoding: angle). The
resulting kernel must still pass an Advantage Witness to be deployed
claiming advantage (v2.23.0).
effect: StringThe algebraic-effect backend tag: quant_sim (default) or qpu_native
(D1/D9). Stored as the bare backend name; v2.4.0 injects the full
ots:backend:<tag> effect into the enclosing flow’s effect row.
body: Vec<FlowStep>The nested flow-body statements (parsed like par branches, so v2.4.0
can apply the Continuous Type Invariant to real AST). Empty for an
empty quant {}.
loc: Loc