Skip to content

Commit

Permalink
fix doctests
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-champagne committed Nov 12, 2024
1 parent 1c4d641 commit f712b40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/literate/man/ipopt_callbacks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ prob = QuantumStateSmoothPulseProblem(

# The callback function can be used to monitor the optimization progress, save intermediate results, or modify the optimization process.
# For example, the following callback function saves the optimization trajectory at each iteration:
callback, trajectory_history = Callbacks.callback_get_trajectory_history(prob)
callback, trajectory_history = Callbacks.trajectory_history_callback(prob)
# using the get_history_callback function to save the optimization trajectory at each iteration into the trajectory_history
solve!(prob, max_iter=20, callback=callback)

Expand All @@ -80,7 +80,7 @@ prob2 = QuantumStateSmoothPulseProblem(
piccolo_options=PiccoloOptions(verbose=false)
)

best_trajectory_callback, best_trajectory_list = callback_get_best_iterate(prob2)
best_trajectory_callback, best_trajectory_list = best_rollout_fidelity_callback(prob2)
solve!(prob2, max_iter=20, callback=best_trajectory_callback)
# fidelity of the last iterate
@show Losses.fidelity(prob2)
Expand Down

0 comments on commit f712b40

Please sign in to comment.