Problem
The integrator-struct refactor (c9fdeb7) dropped the historical BilinearIntegrator(G, traj, xs::AbstractVector{Symbol}, u) constructor. Today's only constructor takes a single x::Symbol, so any caller stacking multiple named components — concretely Piccolo's exported VariationalKetIntegrator / VariationalUnitaryIntegrator, which pass vcat(ψ̃, ψ̃_variations...) — throws MethodError on every call. Tracked as Piccolo #300; the variational integrators have had zero working callers since the Rollouts-era import, which is why nothing fired until the Piccolo coverage campaign found it.
Approach
Additive restore, matching the multi-name convention the codebase already carries (solve.jl's get_nonlinear_constraints already dispatches on x_names; Piccolissimo's exponential family uses it):
- Struct gains
x_names::Vector{Symbol}; x_name::Symbol stays as the primary (first) name for display and back-compat field access.
- New constructor
BilinearIntegrator(G, xs::AbstractVector{Symbol}, u, traj); the single-name constructor delegates via [x].
evaluate! / eval_jacobian / eval_hessian_of_lagrangian gather the stacked state from all names.
get_nonlinear_constraints: check x_names before x_name so a both-fields integrator sums the full stack (single-name behavior unchanged — x_names = [x]).
Scope
In: the above, plus a multi-name testitem (stacked two-component trajectory vs. a single concatenated-component equivalent). Out: Piccolo-side variational integrator tests (ride Piccolo's 2.0.3, ref Piccolo #300).
Acceptance criteria
BilinearIntegrator(G, [:a, :b], :u, traj) constructs and integrates a stacked state correctly (test: matches a single-component trajectory whose data is the vcat of the two).
get_nonlinear_constraints returns the stacked dimension for multi-name integrators.
- Existing single-name behavior unchanged (full suite green).
- Piccolo's
VariationalKetIntegrator/VariationalUnitaryIntegrator construct without MethodError (verified from Piccolo's test PR).
Versioning
DTO 0.10.1 (additive; the field is new, .x_name access still works). Piccolo 2.0.3 follows with the variational tests.
Refs: Piccolo #300 · coverage campaign cluster D (Piccolo #294)
Problem
The integrator-struct refactor (c9fdeb7) dropped the historical
BilinearIntegrator(G, traj, xs::AbstractVector{Symbol}, u)constructor. Today's only constructor takes a singlex::Symbol, so any caller stacking multiple named components — concretely Piccolo's exportedVariationalKetIntegrator/VariationalUnitaryIntegrator, which passvcat(ψ̃, ψ̃_variations...)— throwsMethodErroron every call. Tracked as Piccolo #300; the variational integrators have had zero working callers since the Rollouts-era import, which is why nothing fired until the Piccolo coverage campaign found it.Approach
Additive restore, matching the multi-name convention the codebase already carries (
solve.jl'sget_nonlinear_constraintsalready dispatches onx_names; Piccolissimo's exponential family uses it):x_names::Vector{Symbol};x_name::Symbolstays as the primary (first) name for display and back-compat field access.BilinearIntegrator(G, xs::AbstractVector{Symbol}, u, traj); the single-name constructor delegates via[x].evaluate!/eval_jacobian/eval_hessian_of_lagrangiangather the stacked state from all names.get_nonlinear_constraints: checkx_namesbeforex_nameso a both-fields integrator sums the full stack (single-name behavior unchanged —x_names = [x]).Scope
In: the above, plus a multi-name testitem (stacked two-component trajectory vs. a single concatenated-component equivalent). Out: Piccolo-side variational integrator tests (ride Piccolo's 2.0.3, ref Piccolo #300).
Acceptance criteria
BilinearIntegrator(G, [:a, :b], :u, traj)constructs and integrates a stacked state correctly (test: matches a single-component trajectory whose data is the vcat of the two).get_nonlinear_constraintsreturns the stacked dimension for multi-name integrators.VariationalKetIntegrator/VariationalUnitaryIntegratorconstruct withoutMethodError(verified from Piccolo's test PR).Versioning
DTO 0.10.1 (additive; the field is new,
.x_nameaccess still works). Piccolo 2.0.3 follows with the variational tests.Refs: Piccolo #300 · coverage campaign cluster D (Piccolo #294)