From 10635c70a9d5a3432af538f979652de0225d7be8 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Wed, 6 Nov 2024 06:39:36 +0000 Subject: [PATCH] build based on a160d52 --- dev/.documenter-siteinfo.json | 2 +- dev/contribution_guide/index.html | 2 +- dev/generated/examples/multilevel_transmon/index.html | 6 +++--- dev/generated/examples/two_qubit_gates/index.html | 2 +- dev/generated/man/embedded_operators/index.html | 2 +- dev/generated/man/problem_templates/index.html | 2 +- dev/generated/quickstart/index.html | 6 +++--- dev/index.html | 2 +- dev/lib/index.html | 2 +- dev/release_notes/index.html | 2 +- 10 files changed, 14 insertions(+), 14 deletions(-) diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 777d3ae1..3cd1476a 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.6","generation_timestamp":"2024-11-06T06:35:12","documenter_version":"1.7.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-11-06T06:39:29","documenter_version":"1.7.0"}} \ No newline at end of file diff --git a/dev/contribution_guide/index.html b/dev/contribution_guide/index.html index 84614e39..35c1a843 100644 --- a/dev/contribution_guide/index.html +++ b/dev/contribution_guide/index.html @@ -12,4 +12,4 @@ solve!(prob, max_iter=100) @test unitary_fidelity(prob) > 0.99 -end

Individual tests will populate in the Testing panel in VSCode. All tests are integrated into the base test system for CI, which occurs at each PR submission.

We organize our tests in two ways:

  1. Modules in single files (e.g. quantum_utils.jl, direct_sums.jl) should have a single test file in the test/ directory.
  2. Module directories containing templates (e.g. quantum_system_templates/, problem_templates/) should include tests in the same file that the template is defined, so problem_templates/unitary_smooth_pulse_problem.jl includes the test items for UnitarySmoothPulseProblem.

Reporting Issues

Issue templates are available on GitHub. We are happy to take feature requests!

+end

Individual tests will populate in the Testing panel in VSCode. All tests are integrated into the base test system for CI, which occurs at each PR submission.

We organize our tests in two ways:

  1. Modules in single files (e.g. quantum_utils.jl, direct_sums.jl) should have a single test file in the test/ directory.
  2. Module directories containing templates (e.g. quantum_system_templates/, problem_templates/) should include tests in the same file that the template is defined, so problem_templates/unitary_smooth_pulse_problem.jl includes the test items for UnitarySmoothPulseProblem.

Reporting Issues

Issue templates are available on GitHub. We are happy to take feature requests!

diff --git a/dev/generated/examples/multilevel_transmon/index.html b/dev/generated/examples/multilevel_transmon/index.html index a3712991..aa156f88 100644 --- a/dev/generated/examples/multilevel_transmon/index.html +++ b/dev/generated/examples/multilevel_transmon/index.html @@ -167,7 +167,7 @@ Number of equality constraint Jacobian evaluations = 51 Number of inequality constraint Jacobian evaluations = 0 Number of Lagrangian Hessian evaluations = 0 -Total seconds in IPOPT = 7.802 +Total seconds in IPOPT = 8.567 EXIT: Maximum Number of Iterations Exceeded.

Let's look at the fidelity in the subspace

println("Fidelity: ", unitary_fidelity(prob; subspace=op.subspace_indices))
Fidelity: 0.9969628457842681

and plot the result using the plot_unitary_populations function.

plot_unitary_populations(prob; fig_size=(900, 700))
Example block output

Leakage suppresion

As can be seen from the above plot, there is a substantial amount of leakage into the higher levels during the evolution. To mitigate this, we have implemented the ability to add a cost to populating the leakage levels, in particular this is an $L_1$ norm cost, which is implemented via slack variables and should ideally drive those leakage populations down to zero. To implement this, pass leakage_suppresion=true and R_leakage={value} to the UnitarySmoothPulseProblem template.

# create the a leakage suppression problem, initializing with the previous solution
 
@@ -288,6 +288,6 @@
 Number of equality constraint Jacobian evaluations   = 51
 Number of inequality constraint Jacobian evaluations = 0
 Number of Lagrangian Hessian evaluations             = 0
-Total seconds in IPOPT                               = 2.576
+Total seconds in IPOPT                               = 2.568
 
-EXIT: Maximum Number of Iterations Exceeded.

Let's look at the fidelity in the subspace

println("Fidelity: ", unitary_fidelity(prob_leakage; subspace=op.subspace_indices))
Fidelity: 0.9965280827857547

and plot the result using the plot_unitary_populations function.

plot_unitary_populations(prob_leakage; fig_size=(900, 700))
Example block output

Here we can see that the leakage populations have been driven substantially down.


This page was generated using Literate.jl.

+EXIT: Maximum Number of Iterations Exceeded.

Let's look at the fidelity in the subspace

println("Fidelity: ", unitary_fidelity(prob_leakage; subspace=op.subspace_indices))
Fidelity: 0.9965280827857547

and plot the result using the plot_unitary_populations function.

plot_unitary_populations(prob_leakage; fig_size=(900, 700))
Example block output

Here we can see that the leakage populations have been driven substantially down.


This page was generated using Literate.jl.

diff --git a/dev/generated/examples/two_qubit_gates/index.html b/dev/generated/examples/two_qubit_gates/index.html index 16f9e2d2..a210470e 100644 --- a/dev/generated/examples/two_qubit_gates/index.html +++ b/dev/generated/examples/two_qubit_gates/index.html @@ -106,4 +106,4 @@ solve!(min_time_prob; max_iter=300) -unitary_fidelity(min_time_prob)
0.9990000104741177

And let's plot this solution

plot_unitary_populations(min_time_prob)
Example block output

It looks like our pulse derivative bounds are holding back the solution, but regardless, the duration has decreased:

get_duration(prob.trajectory) - get_duration(min_time_prob.trajectory)
45.640997330434686

This page was generated using Literate.jl.

+unitary_fidelity(min_time_prob)
0.9990000104741177

And let's plot this solution

plot_unitary_populations(min_time_prob)
Example block output

It looks like our pulse derivative bounds are holding back the solution, but regardless, the duration has decreased:

get_duration(prob.trajectory) - get_duration(min_time_prob.trajectory)
45.640997330434686

This page was generated using Literate.jl.

diff --git a/dev/generated/man/embedded_operators/index.html b/dev/generated/man/embedded_operators/index.html index 9b11f3ca..3ba68531 100644 --- a/dev/generated/man/embedded_operators/index.html +++ b/dev/generated/man/embedded_operators/index.html @@ -60,4 +60,4 @@ 1 2 4 - 5

This page was generated using Literate.jl.

+ 5

This page was generated using Literate.jl.

diff --git a/dev/generated/man/problem_templates/index.html b/dev/generated/man/problem_templates/index.html index 6ba345c9..04e4ac2b 100644 --- a/dev/generated/man/problem_templates/index.html +++ b/dev/generated/man/problem_templates/index.html @@ -28,4 +28,4 @@ \text{ subject to } & \quad \vb{P}^{(n)}\qty(\vec{\tilde{U}}_{t+1}, \vec{\tilde{U}}_t, a_t, \Delta t_t) = 0 \\ & c(\vec{\tilde{U}}, a, \dot{a}, \ddot{a}) = 0 \\ & \quad \Delta t_{\text{min}} \leq \Delta t_t \leq \Delta t_{\text{max}} \\ -\end{aligned}\]

Arguments

Keyword Arguments

source

This page was generated using Literate.jl.

+\end{aligned}\]

Arguments

Keyword Arguments

source

This page was generated using Literate.jl.

diff --git a/dev/generated/quickstart/index.html b/dev/generated/quickstart/index.html index 33dd932a..29db892c 100644 --- a/dev/generated/quickstart/index.html +++ b/dev/generated/quickstart/index.html @@ -118,7 +118,7 @@ Number of equality constraint Jacobian evaluations = 31 Number of inequality constraint Jacobian evaluations = 0 Number of Lagrangian Hessian evaluations = 0 -Total seconds in IPOPT = 0.751 +Total seconds in IPOPT = 0.556 EXIT: Maximum Number of Iterations Exceeded.

The above output comes from the Ipopt.jl solver. To see the final fidelity we can use the unitary_fidelity function exported by QuantumCollocation.jl.

println("Final fidelity: ", unitary_fidelity(prob))
Final fidelity: 0.9906508098404887

We can also easily plot the solutions using the plot function exported by NamedTrajectories.jl.

plot(prob.trajectory, [:Ũ⃗, :a])
Example block output

Minimum Time Problems

We can also easily set up and solve a minimum time problem, where we enforce a constraint on the final fidelity:

\[\mathcal{F}(U_T, U_{\text{goal}}) \geq \mathcal{F}_{\text{min}}\]

Using the problem we just solved we can do the following:

# final fidelity constraint
 final_fidelity = 0.99
@@ -218,7 +218,7 @@
 Number of equality constraint Jacobian evaluations   = 31
 Number of inequality constraint Jacobian evaluations = 31
 Number of Lagrangian Hessian evaluations             = 0
-Total seconds in IPOPT                               = 1.878
+Total seconds in IPOPT                               = 2.040
 
 EXIT: Maximum Number of Iterations Exceeded.

We can see that the final fidelity is indeed greater than the minimum fidelity we set.

println("Final fidelity:    ", unitary_fidelity(prob_min_time))
Final fidelity:    0.9922538969404451

and that the duration of the pulse has decreased.

initial_dur = get_times(prob.trajectory)[end]
 min_time_dur = get_times(prob_min_time.trajectory)[end]
@@ -227,4 +227,4 @@
 println("Minimum duration:  ", min_time_dur)
 println("Duration decrease: ", initial_dur - min_time_dur)
Initial duration:  8.523534294756429
 Minimum duration:  4.950774757531843
-Duration decrease: 3.572759537224586

We can also plot the solutions for the minimum time problem.

plot(prob_min_time.trajectory, [:Ũ⃗, :a])
Example block output

This page was generated using Literate.jl.

+Duration decrease: 3.572759537224586

We can also plot the solutions for the minimum time problem.

plot(prob_min_time.trajectory, [:Ũ⃗, :a])
Example block output

This page was generated using Literate.jl.

diff --git a/dev/index.html b/dev/index.html index e5ed328c..272670bc 100644 --- a/dev/index.html +++ b/dev/index.html @@ -8,4 +8,4 @@ f(U_{t+1}, U_t, a_t, \Delta t_t) &= U_{t+1} - \exp(-i \Delta t_t H(a_t)) U_t \\ &\approx U_{t+1} - B^{-1}(a_t, \Delta t_t) F(a_t, \Delta t_t) U_t \\ &= B(a_t, \Delta t_t) U_{t+1} - F(a_t, \Delta t_t) U_t \\ -\end{aligned}\]

where $B(a_t)$ and $F(a_t)$ are the backward and forward Pade operators and are just polynomials in $H(a_t)$.

This implementation is possible because direct collocation allows for the dynamics to be implicit. Since numerically calculating matrix exponentials inherently requires an approximation – the Padé approximant is commonly used – utilizing this formulation significantly improves performance, as, at least here, no matrix inversion is required.

Index

+\end{aligned}\]

where $B(a_t)$ and $F(a_t)$ are the backward and forward Pade operators and are just polynomials in $H(a_t)$.

This implementation is possible because direct collocation allows for the dynamics to be implicit. Since numerically calculating matrix exponentials inherently requires an approximation – the Padé approximant is commonly used – utilizing this formulation significantly improves performance, as, at least here, no matrix inversion is required.

Index

diff --git a/dev/lib/index.html b/dev/lib/index.html index 6d3e3cfd..f6944cc9 100644 --- a/dev/lib/index.html +++ b/dev/lib/index.html @@ -125,4 +125,4 @@ U_init::AbstractMatrix, U_goal::AbstractMatrix, samples::Int -)

Compute a linear interpolation of unitary operators with samples samples.

source

Trajectory Interpolations

+)

Compute a linear interpolation of unitary operators with samples samples.

source

Trajectory Interpolations

diff --git a/dev/release_notes/index.html b/dev/release_notes/index.html index 787b6e96..01934653 100644 --- a/dev/release_notes/index.html +++ b/dev/release_notes/index.html @@ -1,2 +1,2 @@ -Release Notes · QuantumCollocation.jl

Release Notes

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[v0.3.1] - 2024-10-17

Fixed

[v0.3.0] - 2024-10-10

Added

Changed

  • Refactored trajectory initialization functions
  • Improved documentation
  • Typo fixes

[v0.2.0] - 2024-02-22

Added

  • EmbeddedOperator to handle subspace gate optimization and leakage suppression
  • Plotting methods for unitary populations

Changed

  • New quantum systems interface
    • Transmon system template
  • Restructured the code base for easier quantum system and problem template development

Removed

  • Stale examples

Fixed

  • Robustness improvements objective test fixes
+Release Notes · QuantumCollocation.jl

Release Notes

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[v0.3.1] - 2024-10-17

Fixed

[v0.3.0] - 2024-10-10

Added

Changed

  • Refactored trajectory initialization functions
  • Improved documentation
  • Typo fixes

[v0.2.0] - 2024-02-22

Added

  • EmbeddedOperator to handle subspace gate optimization and leakage suppression
  • Plotting methods for unitary populations

Changed

  • New quantum systems interface
    • Transmon system template
  • Restructured the code base for easier quantum system and problem template development

Removed

  • Stale examples

Fixed

  • Robustness improvements objective test fixes