Add exact persistent representation broker routes - #62
Draft
Inserian wants to merge 271 commits into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
QSA exact-representation progression remains on this draft/unmerged staging PR.
Accepted authorities:
423be022f348f102d700dbcc368a7545744419f6f723ea81bd0374f13eca4869118f195550c08c3230b0cbbc4617058947ea9b6099c8881068a4fe6b487858b1baea9eb9604a79fc973409f05eb53f33Accepted factor broker order remains:
ChainTransfer -> AffineXOR -> DecisionDiagram -> VariableEliminationPublic
ExactFactorBrokerRoutevalues remain stable:ChainTransfer=0,DecisionDiagram=1,VariableElimination=2,AffineXOR=3.Direct TTN — accepted direct representation
TreeTensorStateis accepted as a persistent exact state representation for branching entanglement.Accepted TTN contract:
OperationCodedispatch for X/Y/Z/H/S/Sdg/T/Tdg/Rx/Ry/Rz and exact CNOT/CZ;All 17 exact-head workflows were green on direct authority
f723ea81bd0374f13eca4869118f195550c08c32.Decision-bearing direct TTN evidence: run
31642042492, artifact9159238027, ZIP digestsha256:aedbebf6e9c10926c883cd85b610016e6632585fe25656866e5e362cf7664225, embedded evidence SHA-2567441c9cda7611222a0b7ddcfd9acad5f5cbb03ca2aea20c5795969cdc9f71630.Accepted direct evidence:
0.012339 msvs dense setup2.452984 ms; prepared TTN query0.02588327 ms; plan18,120bytes; workspace14,352bytes; amplitude error2.78e-17; marginal error0;2.739705 ms; selected-block marginal query7.6754504 ms; plan4,636,680bytes; workspace3,674,112bytes; selected probability0.0119166075286; independent block-control error2.75e-15.QRegister amplitude comparisons use QSA's established physical-state equivalence up to one global phase; marginal probabilities remain strict. TTN is exact and topology/workload-specific. Repeated overlapping paths can grow bonds exponentially and must fail closed. No universal or quantum-advantage claim is made.
TTN marginal resource certificate — accepted
TreeTensorMarginalPlanis accepted as a bounded preconstruction resource certificate and prepared marginal wrapper. It builds bounded O(n) topology/resource vectors but does not allocate TTN amplitude/tensor storage during certification; it is not described as allocation-free.The certificate predicts and verifies the accepted executor's qubit/node counts, state scalar count, maximum bond dimension, controlled-gate count, maximum controlled path length, generation count and double-layer marginal-workspace scalar requirement. It fails closed on any prediction/executor disagreement.
Focused certificate run
31643019804is green on Ubuntu 24.04, Windows 2022, macOS full-core and ASan/UBSan. All 18 exact-head workflows were green on30b0cbbc4617058947ea9b6099c8881068a4fe6b.The focused gate includes the independent workspace boundary: in the repeated 4-qubit cross-root carrier, TTN state storage is exactly
228scalars while marginal workspace requires259; cap259succeeds, cap258still permits direct state construction but direct marginal rejects, while the certificate rejects before TTN construction/query.Marginal-only TTN execution broker — accepted
ExactPreparedProbabilityPlannow appends public execution routeTreeTensor=8without renumbering existing routes:Register=0,CausalPauli=1,TensorNetwork=2,PersistentMPS=3,PhaseGraph=4,UniformMagnitude=5,BasisPermutation=6,Stabilizer=7.Promotion scope is deliberately narrow:
marginal_probability_from_zero;BasisPermutation -> UniformMagnitude -> Stabilizer -> PersistentMPSmarginal authority remains ahead of TTN;QRegisterfallback;The production promotion itself is compact:
include/qubit/qbroker.hppadds 4 lines andsrc/qbroker.cppadds 22 lines, with zero production deletions relative to the accepted certificate authority. The remainder is focused tests and evidence carriers.All 20 exact-head workflows are green on
487858b1baea9eb9604a79fc973409f05eb53f33, including Build/Test, full Runtime Evidence, inherited Exact Execution Broker, TTN direct/QRegister/certificate gates, Tensor, factor routes, Causal, Pauli, Structural, Dense COW and Brain Recovery. The focused marginal-TTN broker gate is green on Ubuntu 24.04, Windows 2022, macOS and ASan/UBSan.Decision-bearing broker evidence: run
31645271142, artifact9160517879, ZIP digestsha256:c3830b40182be055f0a0636b5c2110c0094a7803d7edc536075e527f510d0d9a, embedded evidence SHA-256642bcfb882e605811b4b8bcc252d9415f5e9553fa6d183db7f20367d0ac2d63f. GitHub metadata, the independently downloaded ZIP and the embedded receipt were reconciled.Accepted broker evidence:
TreeTensor; broker setup0.011996 msvs direct TTN0.010943 ms; broker query0.02077274 msvs direct TTN0.01973342 ms; broker plan19,611bytes vs direct18,271; error6.94e-18;TreeTensor; broker setup2.993234 msvs direct TTN2.530621 ms; broker query6.7874135 msvs direct TTN5.7179153 ms; broker plan4,638,171bytes vs direct4,636,831; selected/control probability0.0119166075286; error2.75e-15.The measured routing wrapper is not free: about
9.62%setup /5.27%query overhead on the 16-qubit carrier and18.28%setup /18.70%query overhead on the 4,096-qubit carrier, with a fixed1,340-byte retained-plan delta in these measurements. Direct TTN remains the stronger path when the caller already knows the representation. Broker value is exact eligibility/route selection and fail-closed fallback, not a claim that indirection is faster.Next bounded phase — direct exact QTT functional representation
The next new representation frontier is QTT/tensor-train scoring for exponentially indexed but low-rank structured functions. Keep this phase direct-only first; do not add it to
ExactExecutionBrokeruntil independent evidence earns promotion.Initial contract:
2^nindex into tensor-train cores;TreeTransfer remains rejected/parked. Prior accepted Tensor, ChainTransfer, DecisionDiagram, AffineXOR, TTN direct/certificate/broker and cost-aware tensor-planning mechanisms remain closed unless new evidence exposes a distinct mechanism failure.
Keep PR #62 draft and unmerged. Do not merge without explicit authorization.