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
§Fase 51.a — the quant cognitive primitive block surface
(docs/papers/paper_primitiva_quant.md; enterprise §Fase 51).
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).
§51.a ships the SURFACE only. The Continuous Type Invariant over body
(§51.b), the typed continuous grammar incl. typed let + Observable
(§51.c), and the quant_sim/qpu_native effect injection + yield
measurement point (§51.d) land in subsequent sub-fases.
Fields§
§encoding: Option<String>encoding: — amplitude (default) or angle (shallow). None = the
compiler default (amplitude). Carried as the surface spelling; §51.c
validates against the closed scheme set.
observable: Option<String>observable: — the name of a declared Observable (Pauli-sum, D5).
None if unspecified (§51.c 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 §51.e, 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>§Fase 69.c — 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, §69.b). 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 (§69.a/b).
effect: StringThe algebraic-effect backend tag: quant_sim (default) or qpu_native
(D1/D9). Stored as the bare backend name; §51.d 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 §51.b
can apply the Continuous Type Invariant to real AST). Empty for an
empty quant {}.
loc: LocTrait Implementations§
Source§impl Debug for QuantBlock
impl Debug for QuantBlock
Source§impl Default for QuantBlock
impl Default for QuantBlock
Source§fn default() -> QuantBlock
fn default() -> QuantBlock
Auto Trait Implementations§
impl Freeze for QuantBlock
impl RefUnwindSafe for QuantBlock
impl Send for QuantBlock
impl Sync for QuantBlock
impl Unpin for QuantBlock
impl UnsafeUnpin for QuantBlock
impl UnwindSafe for QuantBlock
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more