From 4badf05e57db9cd89d402b22e37fc54bb212e776 Mon Sep 17 00:00:00 2001 From: Aaron Trowbridge Date: Mon, 18 Dec 2023 22:43:01 -0500 Subject: [PATCH] Add leakage penalty to multilevel_transmon example --- docs/src/generated/examples/multilevel_transmon.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/src/generated/examples/multilevel_transmon.md b/docs/src/generated/examples/multilevel_transmon.md index 71afecb9..d4124ef6 100644 --- a/docs/src/generated/examples/multilevel_transmon.md +++ b/docs/src/generated/examples/multilevel_transmon.md @@ -140,8 +140,11 @@ plot(prob.trajectory, [:a]; As can bee seen in the plot above, although the fidelity is high, the $f$ level of the transmon is highly populated throughout the evolution. This is suboptimal, but we can account for this by penalizing the leakage elements of the unitary, namely those elements of the form $U_{f, i}$ where $i \neq f$. We utilize an $L_1$ penalty on these elements, which is implemented in the [`UnitarySmoothPulseProblem`](@ref) type as the `leakage_penalty` keyword argument. ````@example multilevel_transmon +# get the indices of the leakage subspace of the isomorphic vector representation +# of the unitary leakage_indices = subspace_leakage_indices(levels) +# set the leakage penalty R_leakage = 1.0e0 new_prob = UnitarySmoothPulseProblem(