fix-mps-encoding-non-factorizing: requirements change - #47
Merged
Conversation
The shipped rung-1 hierarchical-polysemy example uses an MPS
staircase that has Schmidt rank 2 but whose Gram still factorizes
as ⟨c_i|c_j⟩ = ∏_k cos((θ_{i,k} − θ_{j,k})/2) — identical to the
rung-0 product-state Gram with the same angles. The four-tier
hierarchy emerges from angle design, not entanglement.
This OpenSpec change documents the bug and proposes a cross-
coupled-by-sum encoding `Ry(q0,a); CNOT; Ry(q1,a+b); CNOT;
Ry(q2,b+c)` that preserves Schmidt rank 2 *and* produces a
non-factorized Gram (diff ≈ 0.32 vs. same-angle product-state).
The compiler helper generalizes its effect-shape detector to
accept linear-combination angle expressions (option 2a).
Files: proposal.md, design.md (3 alternatives + post-mortem text),
tasks.md (29 tasks across 8 sections), specs/language/spec.md
(MODIFIED hierarchical-example requirement adds non-factorization
criterion + scenario), specs/compiler/spec.md (MODIFIED helper
requirement accepts linear-combination angles).
`openspec validate --strict` passes.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Summary
⟨c_i|c_j⟩ = ∏_k cos((θ_{i,k} − θ_{j,k})/2)— identical to the rung-0 product-state Gram with the same angles. The four-tier hierarchy comes from angle design, not entanglement.Ry(q0,a); CNOT; Ry(q1,a+b); CNOT; Ry(q2,b+c)that preserves Schmidt rank 2 and produces a non-factorized Gram (diff ≈ 0.32 vs. same-angle product-state).language(Hierarchical Polysemantic Example Patternadds a non-factorization criterion) andcompiler(MPS Concept Gram Matrix Analysis Helperaccepts linear-combination angle expressions, option 2a).This is a requirements-only change. No example, helper, demo, or docs are touched in this PR — those are the 29 tasks in
tasks.mdto be implemented in a follow-up PR.Test plan
openspec validate fix-mps-encoding-non-factorizing --strictpassesopenspec listshows the change as pending (0/29 tasks)add-mps-concept-encoding/design.md🤖 Generated with Claude Code