By Anthony DAVID
Repository of the code used in the paper “Geometrical effects on the downstream conductance in quantum-Hall--superconductor hybrid systems” available on arXiv and published in Phys. Rev. B. A documentation of the code is available on Read the Docs.
- calculations.py: run calculations.
- manuscript_figures.py: generate manuscript figures.
- documentation: documentation of the code.
- files: data and plots generated by calculations.py.
- modules: python modules to run the simulations.
- figures: figures as used in the manuscript.
Here we explain how to run the scripts. After following the steps below try to run some calculations with the script calculations.py or reproduce the manuscript figures with the script manuscript_figures.py.
First install miniconda.
Clone the repository, unzip it and
and cd
into the root directory 2deg_QH_SC-main from the terminal.
Then create the Conda environment that contains all dependencies with
conda env create -f environment.yml
You can now use this environment to run the scripts. Below is detailed how to run the scripts using the command line, Pycharm or Visual Studio Code.
To run a script from the terminal use the following command line:
<path_to_python_exe> <path_to_python_script>
The python executable should be located at :
~/opt/miniconda3/envs/2deg_QH-SC/bin/python (macOS)
~/miniconda3/envs/2deg_QH-SC/bin/python (Linux)
~/miniconda3/envs/2deg_QH-SC/python (Windows)
For example, if you are on macOS and you want to run the script calculations.py (while being in the root directory of the repo), use
~/opt/miniconda3/envs/2deg_QH_SC/bin/python calculations.py
Note
You can use a global shell variable to create a shortcut to the Python executable path. For that, open a terminal and modify the bash configuration file (.bashrc, .bash_profile, or .profile) located in your HOME directory (the directory in which you are when you open the terminal). For example on macOS
nano .bash_profile
Add the following in the file
export mypython=~/opt/miniconda3/envs/2deg_QH-SC/bin/python
and save it with Ctrl+X
and Y
and Enter
.
Then close the terminal and open a new one to make the modification effective.
You can now use the variable $mypython
for the path such that the above example reads
$mypython calculations.py
With PyCharm you can follow these steps :
Launch PyCharm and choose
Create New Project
Locate the project at the root directory 2deg_QH_SC-main.
Mark
Existing interpreter
(orPreviously configured interpreter
) and click on the selection icon...
Select
Conda Environment
and choose the location of the python executable. It should be located at :/opt/miniconda3/envs/2deg_QH-SC/bin/python (macOS)
/miniconda3/envs/2deg_QH-SC/bin/python (Linux)
/miniconda3/envs/2deg_QH-SC/python (Windows)
Click on
Ok
then onCreate
and selectCreate from existing sources
You are ready to run the scripts!
(Optional) You can see progress bars during the calculations by activating the
Emulate terminal in output console
option. For that, got toRun->Edit Configurations
and check the option.
With Visual Studio Code you can follow these steps :
- Launch Visual Studio Code and install the Python extension if it is not done yet.
- From the main page choose
Open...
, select the root directory 2deg_QH_SC-main, and click onYes, I trust the authors
- Open the Command Palette with
Ctrl+Shift+P
, searchPython: Select Interpreter
and choose the one associated to the '2deg_QH-SC' environment. - You are ready to run the scripts!
The documentation directory contains a pdf
and a local html
version of the documentation.
They can respectively be found at documentation/build/latex/2deg_qh-sc.pdf
and documentation/build/html/index.html. You can update them by using
conda activate 2deg_QH-SC cd documentation make html make latexpdf
Note
When you compile the documentation it runs the python scripts so make sure
the calculations are commented before using make html
or make latexpdf
.
See the LICENSE file for license rights and limitations (MIT).