Skip to content

Conversation

@andgoldschmidt
Copy link
Member

  • coherent fidelity objective for operations specified by actions on states
  • error transparency objective

aarontrowbridge and others added 30 commits October 28, 2025 19:50
…instead of timesteps; refactor integrator functions for consistency
…ps; update system initialization parameters for consistency across tests.
… use N instead of T for consistency; update integrator functions accordingly.
…l problems

- Changed control variable name from `a` to `u` across multiple problem templates:
  - `unitary_sampling_problem.jl`
  - `unitary_smooth_pulse_problem.jl`
  - `unitary_variational_problem.jl`

- Updated associated bounds and regularization weights to reflect the new naming convention.

- Enhanced trajectory initialization functions to support new control variable naming and added documentation for new methods.

- Introduced new functions for generating initial unitary and control trajectories with detailed docstrings.
* update readme for docs building instructions
* use new docs CI separate from rest
* use PiccoloDocsTemplate
* minor docs fixes

---------

Co-authored-by: Gennadi Ryan <gennadiryan@gmail.com>
Co-authored-by: Gennadi Ryan <41800392+gennadiryan@users.noreply.github.com>
* feat: add julia 1.12 to test matrix and update compat

* chore: use 'pre' Julia version in nightly.yml
- Updated all manual pages and examples to use u, du, ddu naming
- Changed .trajectory.a → .trajectory.u
- Updated function parameters: a_bound → u_bound, da_bound → du_bound, etc.
- Updated regularizers: R_a → R_u, R_da → R_du, R_dda → R_ddu
- Updated math notation in index.md: a_t → u_t
- Consistent with source code refactoring
- Created comprehensive comparison table of all 8 problem templates
- Added selection guide for choosing the right template
- Documented key differences: Unitary vs Ket, Smooth vs MinTime, etc.
- Listed common parameters with examples
- Updated make.jl to include overview as first manual page
- Created "Working with Solutions" guide covering:
  * Solving problems with solve!() options
  * Extracting controls, states, and time data
  * Fidelity evaluation (direct vs rollout)
  * Saving/loading trajectories
  * Post-processing and exporting for experiments
  * Best practices and debugging tips

- Created "PiccoloOptions Reference" documenting:
  * All available options with examples
  * Common configuration patterns
  * Leakage suppression setup
  * When to use bound_state, geodesic, etc.
  * Tips and tricks for each option

- Updated docs structure to include new manual pages
- Updated QuantumSystem constructors to include required T_max and drive_bounds
- Updated VariationalQuantumSystem constructor with required parameters
- Simplified solve!() calls (removed verbose and print_level to avoid issues)
- Fixed all driftless_system instantiations in examples
- Ensures all code blocks execute without UndefVarError or MethodError
- Added required T_max (10.0) and drive_bounds ([1.0, 1.0]) parameters
- Updated all QuantumSystem calls with drift Hamiltonian
- Fixed in: ket_problem_templates, unitary_problem_templates,
  working_with_solutions, and piccolo_options
- Matches updated PiccoloQuantumObjects API signature
- Use EmbeddedOperator for matrix goals with QuantumSystem
- Changed (system, matrix, T, Δt) → (system, EmbeddedOperator(matrix, system), T)
- Removed Δt parameter (not used in current API, calculated from T and T_max)
- Fixed in ket_problem_templates, unitary_problem_templates,
  working_with_solutions, and piccolo_options
- Matches actual function signatures in problem templates
- Add unitary_trajectory(sys, U_goal, N) for unitary gate synthesis
  - Takes goal unitary as positional arg, initial defaults to identity
  - Supports geodesic interpolation and custom timestep bounds

- Add ket_trajectory(sys, ψ_init(s), ψ_goal(s), N) for quantum state transfer
  - Supports single state or multiple states with shared controls
  - Auto-generates state names (:ψ̃1, :ψ̃2) or accepts custom names
  - Convenience constructor for single state: ket_trajectory(sys, ψ_init, ψ_goal, N)

- Add density_trajectory(sys, ρ_init, ρ_goal, N) for open system evolution
  - Direct positional arguments for initial and goal density matrices

All functions:
- Accept Δt_min and Δt_max kwargs for timestep bounds
- Support free_time flag to toggle between variable/fixed timesteps
- Build NamedTrajectory directly without calling existing initialize_trajectory
- Properly convert sys.drive_bounds from Vector{Tuple} to (lower, upper) format

Added comprehensive tests for all functions including:
- Default parameters
- Fixed vs free time
- Custom timestep bounds
- Multiple states (for ket_trajectory)
- Custom state names
aarontrowbridge and others added 16 commits October 31, 2025 17:02
- Introduced the `QuantumTrajectories` module with three main trajectory types: `UnitaryTrajectory`, `KetTrajectory`, and `DensityTrajectory`.
- Each trajectory type encapsulates quantum-specific metadata and provides high-level constructors for easy initialization.
- Implemented accessor functions for trajectory properties and integrated with existing quantum systems.
- Added tests for each trajectory type to ensure correct functionality and integration with quantum systems.
- Created a new test suite for default integrators and smooth pulse problems, demonstrating the use of the new trajectory types.
- Implemented UnitaryMinimumTimeProblem for minimum-time unitary control optimization.
- Developed UnitarySamplingProblem for robust control pulse generation across multiple quantum systems.
- Created UnitarySmoothPulseProblem for free-time unitary gate problems with smooth control pulses.
- Introduced UnitaryVariationalProblem for optimizing quantum control trajectories with variational parameters.
- Added QuantumControlProblem wrapper to combine quantum trajectory information with optimization problems.
- Included comprehensive documentation for each problem type and their respective arguments.
- Implemented tests for various problem scenarios to ensure functionality and correctness.
- Updated test_load.jl to verify the availability of new problem types in the QuantumCollocation module.
…jective type check in SmoothPulseProblem tests; add empty sampling_problem.jl file
…and Clarity

- Updated SmoothPulseProblem to streamline control derivative handling and integrate new PiccoloQuantumObjects functions.
- Improved integrator initialization logic to support both single and multiple integrators more intuitively.
- Added support for SamplingTrajectory and EnsembleTrajectory in BilinearIntegrator, allowing for dynamic handling of multiple systems and state variables.
- Introduced new KetInfidelityObjective variants to accommodate shared goals across multiple state variables in ensemble contexts.
- Enhanced tests for various trajectory types, ensuring robust validation of integrator functionality and objective definitions.
@andgoldschmidt andgoldschmidt marked this pull request as draft December 30, 2025 20:17
@andgoldschmidt
Copy link
Member Author

Looks like knot point objectives stack names for the function argument, but knot point constraints keep names separate. Should pick the latter interface for both. A quick way to accomplish this is to wrap inside DTO with the _partitions function used here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants