Contribution

code

Uploading a New Tutorial

How to install Quarto

For installing and using Quarto correctly, please refer to the following resources:

  • Installation: https://quarto.org/docs/get-started/
  • Quarto basics: https://quarto.org/docs/get-started/hello/rstudio.html

How to set up the environment and compile the blog

  1. Clone from source
  2. Create a conda environment with the name ‘unitaria_tutorials’ (concrete: opt/anaconda3/envs/unitaria_tutorials/bin/python3):
  • conda create -n unitaria_tutorials python=3.9
  • conda env list
  • python -m ipykernel install –user –name=unitaria_tutorials
  • conda install ipykernel
  • conda activate unitaria_tutorials
  1. Install the dependencies as well as everything needed regarding Jupyter and the unitaria_tutorials Kernel: In particular the following ones:
  • conda create -n unitaria_tutorials python=3.9
  • pip install pyyaml
  • pip install nbformat
  • pip install nbclient
  • pip install numpy
  • pip install scipy
  • pip install matplotlib
  • pip install tequila-basic
  • pip install qulacs
  • pip install pyscf

Also, these packages are necessary for the Documentation:

  • pip install sphinx
  • pip install sphinxcontrib
  • pip install sphinxcontrib-programoutput
  • pip install sphinx-rtd-theme
  1. Preview with “quarto preview”

How to add your contribution

Notice that only ipynb-files or quarto-files are allowed as tutorials or research pages for the website. Within these, the following HTML parameters can be placed in a separate markdown at the top, before the actual content begins:


title: "Any titel"
author: "Your full name"
date: "yyyy-mm-dd"
categories: [code]
image: "Preview_Image.png"
image-width: "1cm"
image-height: "1cm"
format:
    html:
        code-fold: false
        eval: true
jupyter: unitaria

Begin and end this section with three hyphens (—)

How to submit

  1. Create a fork of unitaria to your own github account.
  2. Before uploading your contribution, ensure that your fork is up to date with the main github repository.
  3. Navigate to the unitaria-tutorials/tutorials folder and create your own subfolder, which should be named after your tutorial, e.g. unitaria-tutorials/tutorials/my_tutorial. This subfolder should include your ipynb/quarto-file as well as other necessary files, such as png-files for importing images and a preview.png file for a cover image in the tutorials page.
  4. Log into github and create a pull request to the main github repository. Make sure to specify your target branch as the gh-pages branch, as this is where the website resides.

If you plan to introduce major changes to the base library it can be beneficial to contact us first. This way we might be able to avoid conflicts before they arise.

If you used unitaria for your research, feel free to include your algorithms in a tutorial one this website.