Skip to content

Commit 81c920c

Browse files
Update docs: change control variable from 'a' to 'u' everywhere
- Updated all manual pages and examples to use u, du, ddu naming - Changed .trajectory.a → .trajectory.u - Updated function parameters: a_bound → u_bound, da_bound → du_bound, etc. - Updated regularizers: R_a → R_u, R_da → R_du, R_dda → R_ddu - Updated math notation in index.md: a_t → u_t - Consistent with source code refactoring
1 parent d8cde7c commit 81c920c

5 files changed

Lines changed: 26 additions & 26 deletions

File tree

docs/literate/examples/multilevel_transmon.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ levels = 5
4444
δ = 0.2
4545

4646
## add a bound to the controls
47-
a_bound = 0.2
47+
u_bound = 0.2
4848

4949
## create the system
5050
sys = TransmonSystem(levels=levels, δ=δ)
@@ -75,7 +75,7 @@ get_subspace_identity(op) |> sparse
7575
# We can then pass this embedded operator to the `UnitarySmoothPulseProblem` template to create the problem
7676

7777
## create the problem
78-
prob = UnitarySmoothPulseProblem(sys, op, T, Δt; a_bound=a_bound)
78+
prob = UnitarySmoothPulseProblem(sys, op, T, Δt; u_bound=u_bound)
7979

8080
## solve the problem
8181
solve!(prob; max_iter=50)
@@ -98,8 +98,8 @@ plot_unitary_populations(prob.trajectory; fig_size=(900, 700))
9898
## create the a leakage suppression problem, initializing with the previous solution
9999

100100
prob_leakage = UnitarySmoothPulseProblem(sys, op, T, Δt;
101-
a_bound=a_bound,
102-
a_guess=prob.trajectory.a[:, :],
101+
u_bound=u_bound,
102+
u_guess=prob.trajectory.u[:, :],
103103
piccolo_options=PiccoloOptions(
104104
leakage_constraint=true,
105105
leakage_constraint_value=1e-2,

docs/literate/examples/two_qubit_gates.jl

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@
1313
# Specifically, for a simple two-qubit system in a rotating frame, we have
1414

1515
# ```math
16-
# H = J_{12} \sigma_1^x \sigma_2^x + \sum_{i \in {1,2}} a_i^R(t) {\sigma^x_i \over 2} + a_i^I(t) {\sigma^y_i \over 2}.
16+
# H = J_{12} \sigma_1^x \sigma_2^x + \sum_{i \in {1,2}} u_i^R(t) {\sigma^x_i \over 2} + u_i^I(t) {\sigma^y_i \over 2}.
1717
# ```
1818

1919
# where
2020

2121
# ```math
2222
# \begin{align*}
2323
# J_{12} &= 0.001 \text{ GHz}, \\
24-
# |a_i^R(t)| &\leq 0.1 \text{ GHz} \\
24+
# |u_i^R(t)| &\leq 0.1 \text{ GHz} \\
2525
# \end{align*}
2626
# ```
2727

@@ -53,7 +53,7 @@ Id = GATES[:I]
5353

5454
## Define the parameters of the Hamiltonian
5555
J_12 = 0.001 # GHz
56-
a_bound = 0.100 # GHz
56+
u_bound = 0.100 # GHz
5757

5858
## Define the drift (coupling) Hamiltonian
5959
H_drift = J_12 * (σx σx)
@@ -62,9 +62,9 @@ H_drift = J_12 * (σx ⊗ σx)
6262
H_drives = [σx_1 / 2, σy_1 / 2, σx_2 / 2, σy_2 / 2]
6363

6464
## Define control (and higher derivative) bounds
65-
a_bound = 0.1
66-
da_bound = 0.0005
67-
dda_bound = 0.0025
65+
u_bound = 0.1
66+
du_bound = 0.0005
67+
ddu_bound = 0.0025
6868

6969
## Scale the Hamiltonians by 2π
7070
H_drift *= 2π
@@ -95,11 +95,11 @@ prob = UnitarySmoothPulseProblem(
9595
U_goal,
9696
T,
9797
Δt;
98-
a_bound=a_bound,
99-
da_bound=da_bound,
100-
dda_bound=dda_bound,
101-
R_da=0.01,
102-
R_dda=0.01,
98+
u_bound=u_bound,
99+
du_bound=du_bound,
100+
ddu_bound=ddu_bound,
101+
R_du=0.01,
102+
R_ddu=0.01,
103103
Δt_max=Δt_max,
104104
piccolo_options=PiccoloOptions(bound_state=true),
105105
)
@@ -166,11 +166,11 @@ prob = UnitarySmoothPulseProblem(
166166
U_goal,
167167
T,
168168
Δt;
169-
a_bound=a_bound,
170-
da_bound=da_bound,
171-
dda_bound=dda_bound,
172-
R_da=0.01,
173-
R_dda=0.01,
169+
u_bound=u_bound,
170+
du_bound=du_bound,
171+
ddu_bound=ddu_bound,
172+
R_du=0.01,
173+
R_ddu=0.01,
174174
Δt_max=Δt_max,
175175
piccolo_options=PiccoloOptions(bound_state=true),
176176
)

docs/literate/man/ket_problem_templates.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ solve!(state_prob, max_iter=100, verbose=true, print_level=1);
3939
println("After: ", rollout_fidelity(state_prob.trajectory, system))
4040

4141
# _extract the control pulses_
42-
state_prob.trajectory.a |> size
42+
state_prob.trajectory.u |> size
4343

4444
# -----
4545

docs/literate/man/unitary_problem_templates.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ The `NamedTrajectory` object stores the control pulse, state variables, and the
4141
=#
4242

4343
# _extract the control pulses_
44-
prob.trajectory.a |> size
44+
prob.trajectory.u |> size
4545

4646
# -----
4747

docs/src/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,26 +36,26 @@ Unitary Problem Templates:
3636

3737
*Problem Templates* are reusable design patterns for setting up and solving common quantum control problems.
3838

39-
For example, a *UnitarySmoothPulseProblem* is tasked with generating a *pulse* sequence $a_{1:T-1}$ in orderd to minimize infidelity, subject to constraints from the Schroedinger equation,
39+
For example, a *UnitarySmoothPulseProblem* is tasked with generating a *pulse* sequence $u_{1:T-1}$ in order to minimize infidelity, subject to constraints from the Schroedinger equation,
4040
```math
4141
\begin{aligned}
4242
\arg \min_{\mathbf{Z}}\quad & |1 - \mathcal{F}(U_T, U_\text{goal})| \\
4343
\nonumber \text{s.t.}
44-
\qquad & U_{t+1} = \exp\{- i H(a_t) \Delta t_t \} U_t, \quad \forall\, t \\
44+
\qquad & U_{t+1} = \exp\{- i H(u_t) \Delta t_t \} U_t, \quad \forall\, t \\
4545
\end{aligned}
4646
```
4747
while a *UnitaryMinimumTimeProblem* minimizes time and constrains fidelity,
4848
```math
4949
\begin{aligned}
5050
\arg \min_{\mathbf{Z}}\quad & \sum_{t=1}^T \Delta t_t \\
51-
\qquad & U_{t+1} = \exp\{- i H(a_t) \Delta t_t \} U_t, \quad \forall\, t \\
51+
\qquad & U_{t+1} = \exp\{- i H(u_t) \Delta t_t \} U_t, \quad \forall\, t \\
5252
\nonumber & \mathcal{F}(U_T, U_\text{goal}) \ge 0.9999
5353
\end{aligned}
5454
```
5555

5656
-----
5757

58-
In each case, the dynamics between *knot points* $(U_t, a_t)$ and $(U_{t+1}, a_{t+1})$ are enforced as constraints on the states, which are free variables in the solver; this optimization framework is called *direct trajectory optimization*.
58+
In each case, the dynamics between *knot points* $(U_t, u_t)$ and $(U_{t+1}, u_{t+1})$ are enforced as constraints on the states, which are free variables in the solver; this optimization framework is called *direct trajectory optimization*.
5959

6060
-----
6161

0 commit comments

Comments
 (0)