Skip to content
Merged
Changes from 2 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
89841c1
interface changes
aarontrowbridge Mar 10, 2025
879c9de
refactor: update density operator problem and coherent ket function f…
aarontrowbridge Mar 10, 2025
c0e35d5
refactor: replace hardcoded integrator with parameterized ket_integra…
aarontrowbridge Mar 12, 2025
b1a0831
refactor: simplify unitary smooth pulse problem tests and normalize i…
aarontrowbridge Mar 12, 2025
8fac1f5
refactor: improve logging options and enhance infidelity loss calcula…
aarontrowbridge Mar 12, 2025
89cb570
prune piccolo options
andgoldschmidt Mar 12, 2025
e551bb7
refactor: rename and simplify infidelity loss functions for improved …
aarontrowbridge Mar 12, 2025
3920ad9
refactor: add quantum constraints module and update problem templates…
andgoldschmidt Mar 13, 2025
cac7c64
Merge branch 'refactor/direct-collocation-backend' of github.com:harm…
andgoldschmidt Mar 13, 2025
e756e92
patch: drop density include
andgoldschmidt Mar 13, 2025
4f8730d
update min time for flipped inequality constraint
andgoldschmidt Mar 13, 2025
06d2c09
stop reexporting PQO
andgoldschmidt Mar 13, 2025
ec4d294
remove stale usings
andgoldschmidt Mar 13, 2025
6ed7d7e
add unitary problem templates to docs
andgoldschmidt Mar 14, 2025
7daf7eb
state templates in docs
andgoldschmidt Mar 14, 2025
e855307
add using PQO because of removal of reexport
jack-champagne Mar 14, 2025
e1374ee
patch: missing single state min time method
andgoldschmidt Mar 14, 2025
8ef5fbd
Added Adjoint Integrator
BBhattacharyya1729 Mar 21, 2025
2b09f27
Fixed Adjoint
BBhattacharyya1729 Mar 22, 2025
a53ed73
Fixed Adjoint
BBhattacharyya1729 Mar 26, 2025
a722833
Final Adjoint
BBhattacharyya1729 Mar 27, 2025
dbc8777
in progress variational problem template
andgoldschmidt Apr 1, 2025
3be4102
variational PT, replace terminal loss -> terminal obj (bump DTO 0.2)
andgoldschmidt Apr 1, 2025
f77e763
document PT
andgoldschmidt Apr 1, 2025
4f31751
enhance sensitivity handling with scaling
andgoldschmidt Apr 3, 2025
0d07f47
var symb name
andgoldschmidt Apr 3, 2025
c637f7b
add variational PT test
andgoldschmidt Apr 3, 2025
3a580a0
fix: G_vars integration typing
andgoldschmidt Apr 7, 2025
e4516c8
scale -> scales for each variational state
andgoldschmidt Apr 9, 2025
10f2189
fix tests
andgoldschmidt Apr 9, 2025
d286130
Merge commit 'e1374ee98539373120cddb6a7e6f293ea539a298' into feature/…
andgoldschmidt Apr 15, 2025
4c79e88
docs for var prob
andgoldschmidt Apr 15, 2025
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
24 changes: 6 additions & 18 deletions src/quantum_objectives.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,20 @@ function unitary_infidelity_loss(
return abs(1 - ℱ)
end

function unitary_subspace_infidelity_loss(
function unitary_infidelity_loss(
Ũ⃗::AbstractVector,
U_goal::AbstractMatrix{<:Complex{Float64}},
subspace::AbstractVector{Int}
op::EmbeddedOperator
)
U = iso_vec_to_operator(Ũ⃗)[subspace, subspace]
n = length(subspace)
U_goal = unembed(op)
U = iso_vec_to_operator(Ũ⃗)[op.subspace, op.subspace]
n = length(op.subspace)
M = U_goal'U
ℱ = 1 / (n * (n + 1)) * (abs(tr(M'M)) + abs2(tr(M)))
return abs(1 - ℱ)
end

function UnitaryInfidelityLoss(
U_goal::AbstractMatrix{<:Complex{Float64}},
U_goal::AbstractPiccoloOperator,
Ũ⃗_name::Symbol,
traj::NamedTrajectory;
Q=100.0
Expand All @@ -72,18 +72,6 @@ function UnitaryInfidelityLoss(
return TerminalLoss(ℓ, Ũ⃗_name, traj; Q=Q)
end

function UnitaryInfidelityLoss(
op::EmbeddedOperator,
Ũ⃗_name::Symbol,
traj::NamedTrajectory;
Q=100.0
)
U_goal = unembed(op)
ℓ = Ũ⃗ -> unitary_subspace_infidelity_loss(Ũ⃗, U_goal, op.subspace)
return TerminalLoss(ℓ, Ũ⃗_name, traj; Q=Q)
end


# ---------------------------------------------------------
# Density Matrices
# ---------------------------------------------------------
Expand Down
Loading