diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index d1efef8..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,76 +0,0 @@ -# Changelog - -All notable changes to QuestBase.jl will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [Unreleased] - -### Fixed - -- `simplify_exp_products` left `exp(a)*exp(a)` alone. A product stores a repeated factor as a power, so the term arrives as the single factor `exp(a)^2` and the `isexp` test skipped it. -- `collapse_pythagorean` took the first squared trig factor it found in a summand, so a summand carrying two of them, such as `cos(3t)^2*sin(t)^2*a`, failed to pair up with its partner. Every way of splitting a summand is now a candidate. -- `declare_variable` bound its result inside `QuestBase` with `@eval`. Nothing read that binding, and evaluating into a closed module prevents a downstream package from precompiling a workload that declares variables. - -### Performance - -- `fraction_free_linear_solve` splits the system into the independent subsystems its sparsity pattern allows and eliminates each on its own. The coefficient matrix of an n-harmonic ansatz is n uncoupled 2x2 blocks; solved whole, every solution came out over the determinant of the full matrix. Over six representative systems `rearrange_standard` drops from 134.2 MiB to 10.1 MiB and from 0.114 s to 0.028 s. -- Sums and products are rebuilt with SymbolicUtils' n-ary `add_worker`/`mul_worker` instead of being folded with `sum`/`prod`/`+=`, which is quadratic in the number of terms. -- `trig_reduce` no longer calls `expand_all`. Its extra `Postwalk(expand_exp_power)` was the most expensive step of the averaging, and the following `simplify_exp_products` already normalises `exp(a)^n` at every node it reaches. -- `is_rearranged` decides whether a derivative appears on the left-hand side by walking the expression tree rather than rendering both sides to strings. - -## [0.5.0] - -### Breaking - -A `HarmonicEquation` no longer has to come from a second-order `DifferentialEquation`. It can -now be derived from, for example, `QuantumCumulants.MeanfieldEquations`. Getting there changed -the type and its constructors: - -- `HarmonicEquation` is now parametrised on the type of the system it was derived from: `HarmonicEquation{T}`. Code annotating the type in a struct field or type parameter has to account for the extra parameter. -- The `natural_equation::DifferentialEquation` field was replaced by `source_equations::T`. Use `QuestBase.source(eom)` instead of `eom.natural_equation`. -- The field order changed: `jacobian` now precedes `source_equations`. The five-argument constructor is `HarmonicEquation(equations, variables, parameters, jacobian, source_equations)` and takes the source system explicitly, where it previously defaulted to an empty `DifferentialEquation()`. - -### Added - -- `QuestBase.source(eom)` returns the system of equations of motion a `HarmonicEquation` was derived from. -- `QuestBase.source_type(eom)` returns that system's type, for dispatching on the origin of a `HarmonicEquation`. - -## [0.4.0] - 2026-03-10 - -### Breaking - -- Upgraded dependency bounds to SymbolicUtils.jl v4 and Symbolics.jl v7. Downstream packages must be compatible with these versions. -- Dropped support for SymbolicUtils.jl v3 and Symbolics.jl v6. - -### Changed - -- Replaced all uses of SymbolicUtils internals (`@compactified`, direct field access like `.base`, `.exp`, `.num`, `.den`, `.f`, `.arguments`, `.coeff`, `.name`) with public API (`isadd`, `ismul`, `isdiv`, `ispow`, `isterm`, `issym`, `operation`, `arguments`, `nameof`, `unwrap_const`). -- Replaced `Symbolics._toexpr` with the public `Symbolics.tosymbol` in `var_name`. -- Replaced `Symbolics.isterm`/`Symbolics.issym`/`Symbolics.is_derivative` with imports from SymbolicUtils/Symbolics rather than qualified calls. -- Removed dependency on `SymbolicUtils.Unityper` (removed in SymbolicUtils v4). -- Removed use of `frac_maketerm` in `add_div` (deleted in SymbolicUtils v4). -- Adapted `substitute_all` to handle Symbolics v7's change where `substitute` no longer recurses into `Differential` arguments; added `include_derivatives` keyword. -- Adapted `_parameters` in `HarmonicEquation` to handle `Symbolics.get_variables` returning `Set{BasicSymbolic}` instead of `Vector{Num}`, and to filter out derivative terms now returned by `get_variables` in v7. -- Adapted `rearrange!` in `DifferentialEquation` for v7's `get_variables` treating derivatives as variables. -- Adapted `trig_to_exp` to work at the `BasicSymbolic` level to avoid `Complex{Num}` issues with v7's `exp(im * Num)`. -- Adapted `exp_to_trig` to handle `Const`-wrapped zero arguments (`exp(Const(0)) = 1`). -- Adapted `_has_negative_coefficient` to unwrap `Const`-wrapped numeric coefficients in SymbolicUtils v4. -- Adapted `power_of`, `simplify_exp_products_mul`, and `trig_to_exp` to use `unwrap_const` for `Const`-wrapped numeric values in expression arguments. - -### Performance - -Benchmarks show significant improvements from SymbolicUtils v4 / Symbolics v7: - -- **Fourier pipeline**: 3--5x faster (`fourier_cos_term`, `fourier_sin_term`, `trig_reduce`, `trig_to_exp`, `exp_to_trig`) -- **Power operations**: 3--4x faster (`max_power`, `drop_powers` with multiple variables) -- **Exponential simplification**: ~2x faster (`expand_exp_power`, `simplify_exp_products`) -- **Harmonic checks**: ~5x faster (`is_harmonic`) -- **Construction**: ~1.5x faster (`DifferentialEquation`) -- **Substitution**: 1.3--3x faster (`substitute_all`) -- Minor regressions on sub-millisecond operations (`expand_fraction`, `_apply_termwise` on `Div`, `drop_powers` with single variable) - -### Added - -- Benchmark suite in `benchmark/` for tracking performance across versions.