Migrate to SymbolicUtils v4.17 / Symbolics v7.13#171
Merged
Krastanov merged 2 commits intoQuantumSavory:mainfrom Feb 5, 2026
Merged
Migrate to SymbolicUtils v4.17 / Symbolics v7.13#171Krastanov merged 2 commits intoQuantumSavory:mainfrom
Krastanov merged 2 commits intoQuantumSavory:mainfrom
Conversation
SymbolicUtils v4 removed `Symbolic{T}` and changed tree walkers to only
operate on `BasicSymbolic{T}`. This adapts QuantumSymbolics with minimal
changes by:
- Defining a local `abstract type Symbolic{T} end` preserving the type
hierarchy
- Adding `vartype` fallback for `@rule` pattern matching compatibility
- Writing custom `_prewalk`/`_fixpoint_prewalk` tree walkers since
SymbolicUtils v4's `Prewalk`/`Postwalk` no-op on non-BasicSymbolic types
- Adding `Symbolic{Complex}` scalar arithmetic types (SScaledComplex,
SAddComplex, SMulComplex) replacing functionality previously inherited
from `Symbolic{<:Number}`
- Extending `SymbolicUtils.substitute` for our types
- Updating `Term(f, [args])` to `SymbolicUtils.term(f, args...)`
- Updating scalar coefficient dispatch to use
`Union{Number, BasicSymbolic, Symbolic{Complex}}`
Test results: 401 pass, 2 broken (pre-existing in test_gabs.jl).
One previously broken fock test now passes with the new tree walker.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #171 +/- ##
==========================================
- Coverage 76.85% 75.42% -1.44%
==========================================
Files 21 21
Lines 877 948 +71
==========================================
+ Hits 674 715 +41
- Misses 203 233 +30 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Member
|
done with same prompt as #151, but with the skills from https://github.com/Krastanov/JuliaLLMAgentSkills (probably not much of a change though) and a newer version of claude code. Same model |
This was referenced Feb 5, 2026
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
Symbolic{T}as symtype) to v4 (BasicSymbolic{T}with vartype) and Symbolics v6 to v7.13abstract type Symbolic{T} endto preserve the existing type hierarchy with minimal changes_prewalk/_fixpoint_prewalk) since SymbolicUtils v4'sPrewalk/Postwalkonly walkBasicSymbolictreesSymbolic{Complex}scalar arithmetic types (SScaledComplex,SAddComplex,SMulComplex) to replace functionality previously inherited fromSymbolic{<:Number}SymbolicUtils.substitutefor our types soSymbolics.substituteworks on quantum expressionsTerm(f, [args])→SymbolicUtils.term(f, args...)API changedagger(displace)*Create*displace) now passes with the new tree walkerTest plan
🤖 Generated with Claude Code