Skip to content

Commit fabeec7

Browse files
committed
Make QuantumPropagators an indirect dependency
1 parent c0095c5 commit fabeec7

File tree

5 files changed

+14
-19
lines changed

5 files changed

+14
-19
lines changed

Project.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@ version = "0.1.0+dev"
66
[deps]
77
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
88
QuantumControlBase = "f10a33bc-5a64-497c-be7b-6f86b4f0c2aa"
9-
QuantumPropagators = "7bf12567-5742-4b91-a078-644e72a65fc1"
109
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
1110

1211
[compat]
13-
QuantumPropagators = ">=0.3.1"
1412
QuantumControlBase = ">=0.7.0"
1513
julia = "1.6"

src/evaluate.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import QuantumPropagators.Controls: evaluate, evaluate!
1+
import QuantumControlBase.QuantumPropagators.Controls: evaluate, evaluate!
22

33

44
function evaluate(O::GradgenOperator, args...; kwargs...)

src/grad_generator.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import QuantumPropagators
21
using QuantumControlBase: get_control_derivs
3-
import QuantumPropagators.Controls: get_controls
2+
import QuantumControlBase.QuantumPropagators.Controls: get_controls
3+
import QuantumControlBase.QuantumPropagators: _exp_prop_convert_operator
44

55

66
@doc raw"""Extended generator for the standard dynamic gradient.
@@ -50,4 +50,4 @@ function get_controls(gradgen::GradGenerator)
5050
end
5151

5252

53-
QuantumPropagators._exp_prop_convert_operator(::GradGenerator) = Matrix{ComplexF64}
53+
_exp_prop_convert_operator(::GradGenerator) = Matrix{ComplexF64}

src/grad_vector.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import QuantumPropagators
1+
import QuantumControlBase.QuantumPropagators: _exp_prop_convert_state
22

33

44
@doc raw"""Extended state-vector for the dynamic gradient.
@@ -75,4 +75,4 @@ function resetgradvec!(Ψ̃::GradVector{num_controls,T}, Ψ::T) where {num_contr
7575
end
7676

7777

78-
QuantumPropagators._exp_prop_convert_state(::GradVector) = Vector{ComplexF64}
78+
_exp_prop_convert_state(::GradVector) = Vector{ComplexF64}

src/gradgen_operator.jl

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import QuantumPropagators
2-
import QuantumPropagators.Controls: get_controls
1+
import QuantumControlBase.QuantumPropagators: has_real_eigvals, _exp_prop_convert_operator
2+
import QuantumControlBase.QuantumPropagators.Controls: get_controls
3+
import QuantumControlBase.QuantumPropagators.SpectralRange: random_state
34

45

56
"""Static generator for the dynamic gradient.
@@ -30,19 +31,15 @@ end
3031
# Upper triangular block matrices have eigenvalues only from the diagonal
3132
# blocks. This is an example for a matrix that has real eigenvalues despite not
3233
# being Hermitian
33-
QuantumPropagators.has_real_eigvals(G::GradgenOperator) =
34-
QuantumPropagators.has_real_eigvals(G.G)
34+
has_real_eigvals(G::GradgenOperator) = has_real_eigvals(G.G)
3535

3636

37-
function QuantumPropagators.SpectralRange.random_state(H::GradgenOperator)
38-
state = QuantumPropagators.SpectralRange.random_state(H.G)
37+
function random_state(H::GradgenOperator)
38+
state = random_state(H.G)
3939
num_controls = length(H.control_deriv_ops)
40-
grad_states = [
41-
QuantumPropagators.SpectralRange.random_state(H.G) for
42-
i eachindex(H.control_deriv_ops)
43-
]
40+
grad_states = [random_state(H.G) for i eachindex(H.control_deriv_ops)]
4441
return GradVector{num_controls,typeof(state)}(state, grad_states)
4542
end
4643

4744

48-
QuantumPropagators._exp_prop_convert_operator(::GradgenOperator) = Matrix{ComplexF64}
45+
_exp_prop_convert_operator(::GradgenOperator) = Matrix{ComplexF64}

0 commit comments

Comments
 (0)