Giter Club home page Giter Club logo

quantumcontrol.jl's Issues

Simple example of optimization with dissipation.

@goerz I want to find ε1(t), but I am not understanding how to fit the examples to the following Hamiltonian:

H(t) = H0 + ε1(t)H1,

d/dt ρ(t) = -i[H(t), ρ(t)] + L ρ(t) L† - 0.5 L†L ρ(t) - 0.5 ρ(t) L†L

Where H0, H1, L are time independents. Do you or anyone else have any examples?

How to set individual bounds for a GRAPE optimization problem

Hi, I'm working on an quantum gate optimization problem and I found this package very useful to me.

Now I have a problem with the constraints for the control sequences. In the document I noticed that one needs to work with pulse_options to set the boundary. However, there is no explanation about the type or how to assign values to upper_bounds properly.

More precisely, I have a Hamiltonian which is hamiltonian(Hamiltonian0, (HamiltonianDelta, DeltaAt), (HamiltonianOmega, OmegaAt)) in my codes.
I want to know how to set boundaries for control sequence DeltaAt and OmegaAt by passing values into optimize function or ControlProblem function. (I don't need global bounds and I want to set individual bounds for each sequence)

State-dependent running costs

In the article published on Quantum state-dependent running costs are taken into account. How can this be done using this (collection of) package?

:TDSE or :LvN?

Hi Goerz. When I solve a Liouville equation with dissipation, I use the convention :TDSE in liouvillian(H, c_ops; convention=:TDSE). Why can't I use the :LvN option? When I do, it doesn't seem to work. I have already done today's update.

Optimizer options interface

Hey,

I would like to solve some quantum control problems via GRAPE but I need high precision with regard to stationarity. Unfortunately, I can't use Optim.jl because I have bounds on the control drives and it seems I am also not able to strengthen the convergence criteria in the L-BFGS-B default flexibly enough. I think that is the case at least? The GrapeResult object does not carry gradient information so I assume cannot use that to define my own convergence criterion and the corresponding LBFGSB.jl optionpgtol = 1e-5 appears to be hardcoded (see https://github.com/JuliaQuantumControl/GRAPE.jl/blob/83295ce48621430db739ce2cdee4afba5b9ee41e/src/backend_lbfgsb.jl#L8).

Am I missing a way to set the convergence criterion? If not, what's the better way to address that issue? Support bounds for Optim.jl optimizers, pass gradient information to the result object, or admit kwargs to set options for the default optimizer?

Thanks!
Flemming

`ParametrizedAmplitude` cannot be instantiated without shape

julia> using QuantumControl.PulseParametrizations: SquareParametrization, ParametrizedAmplitude
julia> a = ParametrizedAmplitude(t->1.0; parametrization=SquareParametrization())
ERROR: A ParametrizedAmplitude control must either be a vector of values or a callable

The cause is a typo in the code (control being confused with shape)

How to use LockedAmplitude?

I noticed that there are ShapedAmplitude and LockedAmplitude described in the documentation. I happen to calculate a optimization problem in which there is one time-dependent parameter that I don't want to optimize. So I defined this parameter as

shape(t) = blackman(t, TimeList[1], TimeList[end]) * Omega
OmegaAmp = LockedAmplitude(shape, TimeList)

And I have another time-dependent parameter to be optimized

shape(t) = -cos(2pi * t / FinalTime) * 0.2 + 0.3
DeltaAmp = ShapedAmplitude(t -> Delta, TimeList; shape=shape)

The I throw them into the Hamiltonian which is

hamiltonian(HStatic, (HOmega, Omega), (HDelta, Delta))

When I defined the problem, there is a warning says that

┌ Warning: Collected amplitudes are of disparate types
└ @ QuantumPropagators.Generators C:\Users\mrs504aa\.julia\packages\QuantumPropagators\Ndzht\src\generators.jl:388

And when I run the optimization, an error message shows up

┌ Error: `get_control_derivs(generator, controls)` must be defined.
│   exception =
│    type LockedPulseAmplitude has no field control
│    Stacktrace:
│     [1] getproperty
│       @ .\Base.jl:37 [inlined]
│     [2] get_control_deriv(ampl::QuantumPropagators.Amplitudes.LockedPulseAmplitude, control::Vector{Float64})
│       @ QuantumControlBase C:\Users\mrs504aa\.julia\packages\QuantumControlBase\WEAnn\src\derivs.jl:101
│     [3] get_control_deriv(generator::QuantumPropagators.Generators.Generator{Matrix{ComplexF64}, Any}, control::Vector{Float64})
│       @ QuantumControlBase C:\Users\mrs504aa\.julia\packages\QuantumControlBase\WEAnn\src\derivs.jl:61
│     [4] get_control_derivs(generator::QuantumPropagators.Generators.Generator{Matrix{ComplexF64}, Any}, controls::Tuple{Vector{Float64}})
│       @ QuantumControlBase C:\Users\mrs504aa\.julia\packages\QuantumControlBase\WEAnn\src\derivs.jl:20
│     [5] check_generator(generator::QuantumPropagators.Generators.Generator{Matrix{ComplexF64}, Any}; state::Vector{ComplexF64}, tlist::Vector{Float64}, for_mutable_state::Bool, for_immutable_state::Bool, for_expval::Bool, for_gradient_optimization::Bool, atol::Float64, quiet::Bool, _message_prefix::String)
│       @ QuantumControlBase C:\Users\mrs504aa\.julia\packages\QuantumControlBase\WEAnn\src\check_generator.jl:75
└ @ QuantumControlBase C:\Users\mrs504aa\.julia\packages\QuantumControlBase\WEAnn\src\check_generator.jl:90

My question is that did I mis-understand the usage of LockedAmplitude?
Is there any way to put in a time-dependent parameter which should not be optimized?

Releases

This is an ongoing issue to trigger package registration

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Objectives penalizing e.g. the amplitude of the pulse

Hello, I have been really enjoying this package! I have what is probably a quick question. In addition to Objectives that ensure that the initial states reach the target states, I'd also like to use objectives that penalize the amplitude of the pulse, or penalize deviations of the pulse from zero amplitude at the beginning or the end, etc. I didn't see an example of such an Objective in your examples, and it wasn't immediately obvious to me how it would be implemented (fwiw I'm more interested in GRAPE than Krotov). Thanks!

Can't Install Quantum Control Package

Hello,
I simply tried the following:
1)Press ]
2) add Quantum Control and I got the following error:
Resolving package versions...
ERROR: Unsatisfiable requirements detected for package QuantumControl [8a270532]:
QuantumControl [8a270532] log:
├─possible versions are: [0.0.1-0.0.4, 0.1.0, 0.2.0] or uninstalled
├─restricted to versions * by an explicit requirement, leaving only versions [0.0.1-0.0.4, 0.1.0, 0.2.0]
└─restricted by julia compatibility requirements to versions: uninstalled — no versions left

My julia version is 1.4
I also tried the following method:
1)using Pkg
2)Pkg.add("QuantumControl")

How can I install QuantumControl package?
Thanks,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.