Skip to content

Document problem templates #184

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ jobs:
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v2
- uses: codecov/codecov-action@v3
with:
files: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
docs:
name: Documentation
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "QuantumCollocation"
uuid = "0dc23a59-5ffb-49af-b6bd-932a8ae77adf"
authors = ["Aaron Trowbridge <[email protected]> and contributors"]
version = "0.6.0"
version = "0.6.1"

[deps]
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Expand All @@ -26,7 +26,7 @@ ExponentialAction = "0.2"
Interpolations = "0.15"
JLD2 = "0.5"
LinearAlgebra = "1.10, 1.11"
NamedTrajectories = "0.2"
NamedTrajectories = "0.3"
PiccoloQuantumObjects = "0.3"
QuantumCollocationCore = "0.3"
Random = "1.10, 1.11"
Expand Down
6 changes: 2 additions & 4 deletions src/problem_templates/_problem_templates.jl
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
module ProblemTemplates

using ..DirectSums
using ..Rollouts
using ..TrajectoryInitialization
using ..Losses

using Distributions
using TrajectoryIndexingUtils
using NamedTrajectories
using QuantumCollocationCore
using PiccoloQuantumObjects

using Distributions
using LinearAlgebra
using SparseArrays
using ExponentialAction
Expand Down
10 changes: 5 additions & 5 deletions src/problem_templates/unitary_direct_sum_problem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ between each neighbor of the provided `probs`.

"""
function UnitaryDirectSumProblem(
probs::AbstractVector{<:QuantumControlProblem},
probs::AbstractVector{QuantumControlProblem},
final_fidelity::Real;
prob_labels::AbstractVector{<:String}=[string(i) for i ∈ 1:length(probs)],
prob_labels::AbstractVector{String}=[string(i) for i ∈ 1:length(probs)],
graph::Union{Nothing, AbstractVector{<:Tuple{String, String}}, AbstractVector{<:Tuple{Symbol, Symbol}}}=nothing,
boundary_values::Union{AbstractDict{<:String, <:AbstractArray}, AbstractDict{<:Symbol, <:AbstractArray}}=Dict{String, Array}(),
boundary_values::Union{AbstractDict{String, <:AbstractArray}, AbstractDict{Symbol, <:AbstractArray}}=Dict{String, Array}(),
control_name::Symbol=:a,
Q::Union{Float64, Vector{Float64}}=100.0,
Q_symb::Symbol=:dda,
Expand All @@ -59,7 +59,7 @@ function UnitaryDirectSumProblem(
drive_derivative_σ::Float64=0.01,
drive_reset_ratio::Float64=0.50,
fidelity_cost::Bool=false,
subspace::Union{AbstractVector{<:Integer}, Nothing}=nothing,
subspace::Union{AbstractVector{Int}, Nothing}=nothing,
ipopt_options::IpoptOptions=deepcopy(probs[1].ipopt_options),
piccolo_options::PiccoloOptions=deepcopy(probs[1].piccolo_options),
kwargs...
Expand Down Expand Up @@ -185,7 +185,7 @@ end

@testitem "Construct direct sum problem" begin
using QuantumCollocationCore
using PiccoloQuantumObjects
using NamedTrajectories
sys = QuantumSystem(0.01 * GATES[:Z], [GATES[:X], GATES[:Y]])
U_goal1 = GATES[:X]
U_ε = haar_identity(2, 0.33)
Expand Down
7 changes: 1 addition & 6 deletions src/trajectory_initialization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,13 @@ export unitary_linear_interpolation
export initialize_trajectory

using NamedTrajectories
using PiccoloQuantumObjects

using Distributions
using ExponentialAction
using LinearAlgebra
using TestItems

using ..Isomorphisms
using ..QuantumSystems
using ..Rollouts
using ..EmbeddedOperators
using ..DirectSums


# ----------------------------------------------------------------------------- #
# Initial states #
Expand Down
Loading