1. QTCAD

This section describes how to install QTCAD® and its dependencies.

1.1. Software requirements

QTCAD consists of Python libraries and thus requires a properly working Python installation. The recommended Python distribution for QTCAD is Miniconda, which may be installed using the instructions on the official conda website. This includes both Python and conda, the preferred package management tool for QTCAD installation.

QTCAD also uses mesh files as input. These mesh files can be produced with Gmsh. Following the conda QTCAD installation instructions below ensures that Gmsh is properly installed in the QTCAD virtual environment. In any situation where this is not possible, Gmsh may be installed by following the instructions on the official Gmsh website or in the next section. The official Gmsh website also contains Gmsh tutorials. Video tutorials on how to use Gmsh can also easily be found on YouTube.

Similarly, 3D meshes and geometry files may be generated from 2D layouts using the Python API coded in the QTCAD Builder module of QTCAD, which provides significant flexibility in defining complex 3D geometries using operations emulating device fabrication. Alternatively, you may use our legacy package devicegen. The installation of devicegen is explained in the devicegen installation page.

Remark that while QTCAD is a commercial proprietary software, all its dependencies specified above are available for free.

1.2. Hardware requirements

Precise hardware requirements are strongly dependent on the complexity of the problem being solved both in terms of size of the mesh and solvers being employed. Therefore, it is quite non-trivial to provide universal hardware requirements for QTCAD.

Instead, below, we give two examples of systems on which QTCAD simulations may be run successfully. The first system is a laptop which may be used to run basic simulations for meshes with up to approximately 200,000 nodes that define simple devices with one or two quantum dots. This system uses a processor that dates back from 2015 and should be interpreted as a minimal setup. The second system is a more advanced desktop workstation which we routinely use for complex simulations using meshes with up to approximately 2,000,000 nodes.

These configurations should be understood as typical system examples, and not as hard requirements. We have indeed successfully run QTCAD on a wide variety of systems (Windows, Mac, or Linux laptops, desktop workstations, cloud computing services, HPC clusters, etc.). Since computation times depend non-trivially on many factors such as the hardware being used, number of cores employed, solver, mesh dimension, convergence properties of the problem being studied, tolerance of the solvers, or basis-set dimension (in the case of the many-body solver), they are not given here. Instead, we encourage users to experiment on their machine with our tutorials and practical applications for spin qubits, or with our tutorials for superconducting circuits. Nevertheless, for simulations of typical few-electron single or double quantum-dot devices, a laptop or a desktop computer should suffice, and HPC clusters should not be necessary.

1.2.1. System 1 (laptop)

CPU

6th Gen Intel® Core™ i5-6300U @ 2.40GHz |br| (4 threads)

GPU

No discrete GPU, only integrated graphics |br| (GPU is used only for plotting in ParaView and mesh rendering in Gmsh)

RAM

8 GB

HDD

256 GB (SSD)

OS

Windows 10

1.2.2. System 2 (desktop)

CPU

13th Gen Intel® Core™ i9-13900K @ 3.00 GHz |br| (32 threads)

GPU

None

RAM

128 GB

HDD

1 TB (SSD)

OS

Linux (Ubuntu distribution)

1.2.3. Operating system

We officially support the following operating systems:

  • Windows

  • Linux

  • macOS

1.3. Downloading QTCAD

To download QTCAD, please visit the Nanoacademic client portal at

https://portal.nanoacademic.com/

If you already have a Nanoacademic account, please log in using your password.

Otherwise, please create your account, and then log in.

If this was not already done, please proceed to fill in the required user profile information (name, email address, institution, phone number, etc.).

Once you have a valid profile, please click on the “Products” section and select QTCAD. You should then see the following page:

Getting a free trial version

Fig. 1.3.1 Getting a free QTCAD trial version

Click on “Start your free trial”.

You will then see the following page which will allow you to download your license.

Downloading a free trial license of QTCAD

Fig. 1.3.2 Downloading a free trial license of QTCAD

This will produce a file called license.lic which we discuss further in the License Activation page.

Alternatively, you can use the qtcadcli tool to automatically download your license and install it in the default location on your machine. This method is described in the Activating the license section. Before using qtcadcli, make sure you have completed the installation steps so that the tool is available from your terminal.

1.4. Package installation with conda

1.4.1. Setting up conda

Assuming that Miniconda (or Anaconda) is installed on your machine as recommended in the Software requirements section, it is good practice to make sure that you are using the latest version of conda. This will help speed up environment resolution. If you already have conda installed, please make sure that the following command is run in your terminal:

conda update -n base conda

Depending on the version of conda installed on your machine, this command may not update the environment as expected. If your conda environment is not updated, please reinstall conda, version 23.10 or later.

QTCAD is distributed as a Conda package. Choose the installation method that corresponds to your distribution source.

1.4.2. Method 1: Remote Installation (Cloud Channel)

To install directly from the Nanoacademic cloud repository, use the following command. Replace <user> and <token> with your provided credentials. These are available on the QTCAD product page of the Nanoacademic portal once you have purchased a license or started a free trial (see the figure below).

QTCAD product page on the Nanoacademic portal

Fig. 1.4.1 The QTCAD product page on the Nanoacademic portal displays the <user> and <token> required for remote installation.

For Linux/Windows systems use:

conda create -n qtcad -y -c "<user>:<token>@channel.nanoacademic.ca" -c conda-forge qtcad

If you are using a Mac with an Arm processor (Apple Silicon), please install Rosetta before proceeding with the creation of an osx-64 environment, since some packages do not fully support Arm processors:

softwareupdate --install-rosetta
** RESTART YOUR SHELL **
CONDA_SUBDIR=osx-64 conda create -n qtcad -y -c "<user>:<token>@channel.nanoacademic.ca" -c conda-forge qtcad

1.4.3. Method 2: Local Installation (Client Portal ZIP)

If you have received a ZIP distribution from the Nanoacademic web portal, follow these steps to install QTCAD.

1. Extract the ZIP archive

Replace <qtcad_zip> with the name of the file you downloaded.

  • Linux / macOS (Bash/Zsh):

    unzip <qtcad_zip>.zip -d <qtcad_zip>
    
  • Windows (PowerShell):

    Expand-Archive -Path <qtcad_zip>.zip
    

2. Navigate to the root directory

Enter the directory created after extraction:

cd <qtcad_zip>

3. Create the conda environment

Execute the command corresponding to your terminal:

Linux (Bash/Zsh) / Windows (PowerShell):

conda create -n qtcad -y -c "$PWD/channel" -c conda-forge qtcad

Windows (Command Prompt):

conda create -n qtcad -y -c "%CD%\channel" -c conda-forge qtcad

macOS (Bash/Zsh):

If you are using a Mac with an Arm processor (Apple Silicon), please install Rosetta before proceeding with the creation of an osx-64 environment, since some packages do not fully support Arm processors:

softwareupdate --install-rosetta
** RESTART YOUR SHELL **
CONDA_SUBDIR=osx-64 conda create -n qtcad -y -c "$PWD/channel" -c conda-forge qtcad

1.4.4. Post-Installation (Windows Only)

After creating the environment on Windows, you must set the following environment variable to avoid conflicts between OpenMP runtimes:

conda env config vars set KMP_DUPLICATE_LIB_OK="TRUE" -n qtcad

Note

This is necessary because Gmsh and QTCAD may rely on different OpenMP implementations on Windows. By default, environments do not support multiple implementations of OpenMP in the same process. Setting KMP_DUPLICATE_LIB_OK=TRUE allows both libraries to coexist without causing a fatal error.

1.5. Getting Started

Follow these steps to initialize your QTCAD environment and activate your license.

1.5.1. Step 1: Activate the Environment

conda activate qtcad

1.5.2. Step 2: Initialize License and Assets

Run the QTCAD CLI (Command Line Interface) to complete the setup:

qtcadcli

From the interactive menu (shown in the figure below):

QTCAD CLI interactive menu

Fig. 1.5.1 The QTCAD CLI interactive menu

  • Select Download License to authenticate and retrieve your license. Alternatively, you can manually download your license from the Nanoacademic portal (more details at Activating the license).

  • (Optional) Select Copy Examples to populate your current directory with tutorials and sample projects.

It is recommended to copy the examples to a working directory of your choice (e.g., your Documents folder) rather than the installation directory. Once the examples are copied, you can also copy the README.md file to your working directory for quick reference.

1.5.3. Additional installation instructions for Quantum Metal

In order to use QTCAD in the Quantum Metal (previously known as Qiskit Metal) workflow, you need to first complete the steps outlined above in the QTCAD installation-instructions section (Package installation with conda) and then proceed with the steps below.

Note

Please note that to run the code with the Quantum Metal workflow, instead of activating the qtcad environment, you will need to activate the Quantum Metal environment, named quantum-metal in the instructions below.

Also note that you are free to select a different environment name instead of “quantum-metal” in step 3 in the instructions below. However, the QTCAD renderer of Quantum Metal assumes that the name “qtcad” for the environment created when installing QTCAD (Package installation with conda) is left unchanged. You can find instructions on how to use the QTCAD renderer if the name of QTCAD’s environment has been modified in this tutorial.

  1. Clone the fork of the Quantum Metal repository, modified by Nanoacademic to support QTCAD as one of the renderers. The clone of the repository is assumed to be placed in some target installation directory (represented here by installation_path_qm).

    git clone --depth 1 https://github.com/nanoacademic/quantum-metal.git installation_path_qm/quantum-metal
    
  2. Enter the quantum-metal directory inside the installation directory.

    cd installation_path_qm/quantum-metal
    
  3. Create the virtual environment that will be used to run Quantum Metal.

    conda env update -f environment.yml -n quantum-metal
    
  4. Activate the virtual environment.

    conda activate quantum-metal
    
  5. Install Quantum Metal.

    pip install --no-deps .
    

You can now run the tutorials found in Quantum Metal workflow or your own scripts that depend on Quantum Metal features.

1.6. Troubleshooting

If you encounter any issues during the installation process, please contact Nanoacademic for support. We will be happy to help you resolve any problems you may encounter. You may also first look at the Installation Questions page to see if your issue is already addressed.