Hypercausal Node#
Hypercausal Node#
Triadic forward propagation linking past, present, and projected future states.
Each node binds a QuantumBackend (which handles state evolution) and an
optional ProjectionPolicy (which determines how multiple candidate futures
are aggregated into a single representative future).
Implements the HypercausalNode protocol.
- class qmlhc.hc.node.HCNode(backend, policy=None, config=None)[source]#
Bases:
HypercausalNodeConcrete implementation of a hypercausal node.
This node combines a
QuantumBackend, which generates both the current and future states, together with an optionalProjectionPolicythat aggregates multiple candidate futures into a single representative vector.Notes
The
forwardmethod implements the triadic relation:(past ↔ present ↔ projected futures).- __init__(backend, policy=None, config=None)[source]#
Initialize a hypercausal node.
- Parameters:
backend (QuantumBackend) – Quantum backend responsible for computing state transitions.
policy (ProjectionPolicy or None, optional) – Strategy for selecting a representative future. If
None, the mean across branches is used.config (NodeConfig or None, optional) – Static configuration object, by default
NodeConfig().
- forward(x_t, s_tm1, branches=2)[source]#
Perform one forward pass through the node.
Steps#
Encode the current input
x_tinto the backend.Execute the backend to compute the current compact state
S_t.Generate K candidate futures
F = {S_{t+1}^k}.Select a representative future
Ŝ_{t+1}using the policy.
- type x_t:
- param x_t:
Current input at time
t.- type x_t:
TensorLike
- type s_tm1:
- param s_tm1:
Previous state at time
t-1(may beNonefor the first step).- type s_tm1:
TensorLike or None
- type branches:
- param branches:
Number of candidate futures to generate, by default
2.- type branches:
int, optional
- returns:
(S_t, Ŝ_{t+1}, info)where: -S_t: Array Current state vector. -Ŝ_{t+1}: Array Aggregated representative future. -info: dict Additional metadata including: -s_tm1: previous state (if provided) -branches: matrix of candidate futures -policy: policy name -diagnostics: policy diagnostics or aggregation info- rtype:
tuple