[Feature]: Leakage suppression objective#207
Conversation
| version = "0.7.2" | ||
|
|
||
| [deps] | ||
| CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0" |
There was a problem hiding this comment.
We don't want to add a Makie dependence to keep build times fast.
Makie is an extension package of NamedTrajectory and is used by PiccoloPlots, only.
| Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" | ||
| LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" | ||
| NamedTrajectories = "538bc3a1-5ab9-4fc3-b776-35ca1e893e08" | ||
| Piccolo = "c4671d76-df94-11ed-2057-43d4fd632fad" |
There was a problem hiding this comment.
This is a circular dependency (QuantumCollocation is a subpackage of Piccolo)
| using NamedTrajectories | ||
| using PiccoloQuantumObjects | ||
| using DirectTrajOpt | ||
| using QuantumCollocation |
There was a problem hiding this comment.
The package we are testing is QuantumCollocation, so we can't be using QuantumCollocation
Local modules can be added, if necessary (take a look at _problem_templates.jl to see how)
|
|
||
| # Dummy system with leakage indices | ||
| struct DummySystem end | ||
| PiccoloQuantumObjects.EmbeddedOperators.get_leakage_indices(::DummySystem) = [(1,2), (2,3)] |
| where `I_leakage` is given by `get_leakage_indices(system)`. | ||
| """ | ||
| function LeakageSuppressionObjective(system, name::Symbol, traj; norm_type=:fro, kwargs...) | ||
| leakage_inds = get_leakage_indices(system) |
There was a problem hiding this comment.
i like the idea of having system's that know about their leakage subspace, but maybe we can simplify: make leakage indices an argument to the objective.
There was a problem hiding this comment.
(instead of passing the system)
| sum_{(i,j) ∈ I_leakage} norm(U[i, j], norm_type) | ||
| where `I_leakage` is given by `get_leakage_indices(system)`. | ||
| """ | ||
| function LeakageSuppressionObjective(system, name::Symbol, traj; norm_type=:fro, kwargs...) |
There was a problem hiding this comment.
Add types to the args for the compiler, where possible.
andgoldschmidt
left a comment
There was a problem hiding this comment.
adding "request changes"
|
Thanks for the feedback @andgoldschmidt I have just pushed the requested changes, let me know if it looks good! |
andgoldschmidt
left a comment
There was a problem hiding this comment.
i think we're basically ready here, just some cosmetics
| using DirectTrajOpt | ||
| using TestItems | ||
|
|
||
| # using PiccoloQuantumObjects.EmbeddedOperators: get_leakage_indices |
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know! |
|
@andgoldschmidt I have removed comments as requested. Hope we can close by the deadline in 9 hours :) |
|
@martin-klacan it's ok, as long as the PR is submitted, we have this week to polish off any last details. We'll have no trouble meeting that timeline. |
|
Oh I see, perfect then! Let me know if any further changes are necessary |
This PR fixes issue #203
Implemented LeakageSuppressionObjective function inside quantum_objectives.jl
Created testitem to test this function.