From c86762e5dda31a90b05798c596136b223a309136 Mon Sep 17 00:00:00 2001 From: Joseph Weston <joseph@weston.cloud> Date: Tue, 16 Jul 2019 11:48:30 +0200 Subject: [PATCH] add thebelab buttons to the tutorials --- doc/source/tutorial/discretize.rst | 6 ++++++ doc/source/tutorial/faq.rst | 6 ++++++ doc/source/tutorial/first_steps.rst | 6 ++++++ doc/source/tutorial/graphene.rst | 6 ++++++ doc/source/tutorial/kpm.rst | 6 ++++++ doc/source/tutorial/magnetic_field.rst | 6 ++++++ doc/source/tutorial/operators.rst | 6 ++++++ doc/source/tutorial/plotting.rst | 6 ++++++ doc/source/tutorial/spectrum.rst | 6 ++++++ doc/source/tutorial/spin_potential_shape.rst | 6 ++++++ doc/source/tutorial/superconductors.rst | 6 ++++++ 11 files changed, 66 insertions(+) diff --git a/doc/source/tutorial/discretize.rst b/doc/source/tutorial/discretize.rst index 51f94b79..dabb96f7 100644 --- a/doc/source/tutorial/discretize.rst +++ b/doc/source/tutorial/discretize.rst @@ -16,6 +16,12 @@ The `~kwant.continuum` sub-package aims to be a solution to this problem. It is a collection of tools for working with continuum models and for discretizing them into tight-binding models. +.. seealso:: + You can execute the code examples live in your browser by + activating thebelab: + + .. thebe-button:: Activate Thebelab + .. seealso:: The complete source code of this tutorial can be found in :jupyter-download:script:`discretize` diff --git a/doc/source/tutorial/faq.rst b/doc/source/tutorial/faq.rst index ec52448d..22f0ad71 100644 --- a/doc/source/tutorial/faq.rst +++ b/doc/source/tutorial/faq.rst @@ -5,6 +5,12 @@ questions that are discussed there. The `Kwant paper <https://downloads.kwant-project.org/doc/kwant-paper.pdf>`_ also digs deeper into Kwant's structure. +.. seealso:: + You can execute the code examples live in your browser by + activating thebelab: + + .. thebe-button:: Activate Thebelab + .. jupyter-execute:: :hide-code: diff --git a/doc/source/tutorial/first_steps.rst b/doc/source/tutorial/first_steps.rst index f509aaa0..801bb3e5 100644 --- a/doc/source/tutorial/first_steps.rst +++ b/doc/source/tutorial/first_steps.rst @@ -60,6 +60,12 @@ simplicity, we choose to work in such units that :math:`t = a = 1`. Transport through a quantum wire ................................ +.. seealso:: + You can execute the code examples live in your browser by + activating thebelab: + + .. thebe-button:: Activate Thebelab + .. seealso:: The complete source code of this example can be found in :jupyter-download:script:`quantum_wire` diff --git a/doc/source/tutorial/graphene.rst b/doc/source/tutorial/graphene.rst index 6eaa93d6..4243b7ff 100644 --- a/doc/source/tutorial/graphene.rst +++ b/doc/source/tutorial/graphene.rst @@ -3,6 +3,12 @@ Beyond square lattices: graphene -------------------------------- +.. seealso:: + You can execute the code examples live in your browser by + activating thebelab: + + .. thebe-button:: Activate Thebelab + .. seealso:: The complete source code of this example can be found in :jupyter-download:script:`graphene` diff --git a/doc/source/tutorial/kpm.rst b/doc/source/tutorial/kpm.rst index a5b2461b..10e451d6 100644 --- a/doc/source/tutorial/kpm.rst +++ b/doc/source/tutorial/kpm.rst @@ -15,6 +15,12 @@ expansion of the density of states. It can also be used to calculate the spectral density of arbitrary operators. Kwant has an implementation of the KPM method `kwant.kpm`, that is based on the algorithms presented in Ref. [1]_. +.. seealso:: + You can execute the code examples live in your browser by + activating thebelab: + + .. thebe-button:: Activate Thebelab + .. seealso:: The complete source code of this example can be found in :jupyter-download:script:`kernel_polynomial_method` diff --git a/doc/source/tutorial/magnetic_field.rst b/doc/source/tutorial/magnetic_field.rst index db4753cd..66bfb805 100644 --- a/doc/source/tutorial/magnetic_field.rst +++ b/doc/source/tutorial/magnetic_field.rst @@ -4,6 +4,12 @@ Adding magnetic field Computing Landau levels in a harmonic oscillator basis ...................................................... +.. seealso:: + You can execute the code examples live in your browser by + activating thebelab: + + .. thebe-button:: Activate Thebelab + .. seealso:: The complete source code of this example can be found in :jupyter-download:script:`landau-levels` diff --git a/doc/source/tutorial/operators.rst b/doc/source/tutorial/operators.rst index 897c919c..ed346f17 100644 --- a/doc/source/tutorial/operators.rst +++ b/doc/source/tutorial/operators.rst @@ -11,6 +11,12 @@ In this tutorial we will see how we can calculate more general quantities than simple densities by studying spin transport in a system with a magnetic texture. +.. seealso:: + You can execute the code examples live in your browser by + activating thebelab: + + .. thebe-button:: Activate Thebelab + .. seealso:: The complete source code of this example can be found in :jupyter-download:script:`magnetic_texture` diff --git a/doc/source/tutorial/plotting.rst b/doc/source/tutorial/plotting.rst index 64957a54..fc4b65c8 100644 --- a/doc/source/tutorial/plotting.rst +++ b/doc/source/tutorial/plotting.rst @@ -10,6 +10,12 @@ these options can be used to achieve various very different objectives. 2D example: graphene quantum dot ................................ +.. seealso:: + You can execute the code examples live in your browser by + activating thebelab: + + .. thebe-button:: Activate Thebelab + .. seealso:: The complete source code of this example can be found in :jupyter-download:script:`plot_graphene` diff --git a/doc/source/tutorial/spectrum.rst b/doc/source/tutorial/spectrum.rst index b2cbc51d..5e70ba9b 100644 --- a/doc/source/tutorial/spectrum.rst +++ b/doc/source/tutorial/spectrum.rst @@ -4,6 +4,12 @@ Beyond transport: Band structure and closed systems Band structure calculations ........................... +.. seealso:: + You can execute the code examples live in your browser by + activating thebelab: + + .. thebe-button:: Activate Thebelab + .. seealso:: The complete source code of this example can be found in :jupyter-download:script:`band_structure` diff --git a/doc/source/tutorial/spin_potential_shape.rst b/doc/source/tutorial/spin_potential_shape.rst index 770ba4a5..05aad2e6 100644 --- a/doc/source/tutorial/spin_potential_shape.rst +++ b/doc/source/tutorial/spin_potential_shape.rst @@ -9,6 +9,12 @@ very simple examples of the previous section. Matrix structure of on-site and hopping elements ................................................ +.. seealso:: + You can execute the code examples live in your browser by + activating thebelab: + + .. thebe-button:: Activate Thebelab + .. seealso:: The complete source code of this example can be found in :jupyter-download:script:`spin_orbit` diff --git a/doc/source/tutorial/superconductors.rst b/doc/source/tutorial/superconductors.rst index 78f004d3..9e0b1d7a 100644 --- a/doc/source/tutorial/superconductors.rst +++ b/doc/source/tutorial/superconductors.rst @@ -1,6 +1,12 @@ Superconductors: orbital degrees of freedom, conservation laws and symmetries ----------------------------------------------------------------------------- +.. seealso:: + You can execute the code examples live in your browser by + activating thebelab: + + .. thebe-button:: Activate Thebelab + .. seealso:: The complete source code of this example can be found in :jupyter-download:script:`superconductor` -- GitLab