Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with optimization with Optim.GradientDescent #1018

Closed
STaherpour opened this issue Nov 9, 2022 · 1 comment
Closed

Problem with optimization with Optim.GradientDescent #1018

STaherpour opened this issue Nov 9, 2022 · 1 comment

Comments

@STaherpour
Copy link

STaherpour commented Nov 9, 2022

Hi, I'm trying to use Optim.jl in Optimization of a State-to-State Transfer in a Two-Level-System.

Actually I want to learn working with Optim.jl and my main issue is working with Optim.GradientDescent.

When I use
`opt_result_OptimGD = QuantumControlBase.optimize(

problem,
method = :grape,
info_hook = chain_infohooks(
    QuantumControl.GRAPE.print_table,
    store_pulses
),
optimizer = Optim.GradientDescent(;
    #alphaguess=LineSearches.InitialStatic(alpha=0.2),
    alphaguess = LineSearches.InitialPrevious(alphamin=0.2),
    linesearch = LineSearches.HagerZhang(alphamax=2.0)
)

);`

I face with this error: type GradientDescentState has no field g_previous, and I don't know why it happens. There is no g_previous in the Optim.GradientDescent.

Would you please help me in this regard?

@pkofod
Copy link
Member

pkofod commented Nov 23, 2022

could you show the full stack trace? I think that maybe QuantumControl tries to access a field that does not exist.

@pkofod pkofod closed this as completed Jan 26, 2024
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

No branches or pull requests

2 participants