Skip to content

Mixing of LockedAmplitude and ShapedAmplitude #80

Closed

Description

@mabuni1998

I have an optimization problem where I have three time-dependent fields. The first field is my control, the second is a LockedAmplitude (not optimized), and the third should be the product of the two. However, it is not clear to me how I should define that?

As an example, it could be:

Tend = 10
times = range(0, Tend, step=0.01)
shape(t) =  QuantumControl.Shapes.flattop(t, T=Tend, t_rise=0.3, func=:blackman);
optimized_field = QuantumControl.Controls.ShapedAmplitude(t -> 1, times; shape) #Should be optimized

constant_ampl = QuantumControl.Controls.LockedAmplitude(t->t^2, times) #Amplitude that should not be optimized. In reality the time dependence is more complicated

#Cross term that is the product of the two fields
cross_term = optimized_field*constant_ampl #This obviously does not work, but I am unsure how to define an equivalent function.

#The Hamiltonian should look like
H = hamiltonian((h1,constant_ampl),(h2,optimized_field),(h3,cross_term)) 

I considered whether I should refer to optimized_field.control, since this vector is mutated in the optimization, but it is not entirely clear to me whether this will work.

Activity

  1. locked and limited conversation to collaborators on Feb 10, 2025
  2. converted this issue into a discussion #82 on Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions