Getting started

Quanty is a text based program that allows you to write scripts to do calculations in quantum mechanics. (If you want a graphical interface have a look at CTM4 and Crispy which both contain graphical interfaces that can run Quanty as a kernel.) Installation is simple as one just needs to copy the precompiled binary into a folder that is contained in the search path of your computer. Once the program is installed one can run Quanty by typing Quanty [Filename.Quanty] in a terminal. [Filename.Quanty] can be any name of a text file that contains the commands you want to execute.

Hello World example

In order to understand the commands you can give in the text file this site provides many examples. The example that prints the text Hello World in the terminal is

print("Hello World")

In order to run it you need to create a text file that contains the text written above. A simple way to do so is to click on the text HelloWorld.Quanty. This will download a text file containing the example. Next you need to save this file, open a terminal, change to the directory where you saved this file and type: Quanty HelloWorld.Quanty

The output will be:

====    written by Maurits W. Haverkort                  ====
====    with contributions from:                         ====
====    Yi Lu, Robert Green and Sebastian Macke          ====
====    (C) 1995-2015   All rights reserved              ====
====                                   ====
====    Beta version, be critical and report errors!!!   ====
====    Version compiled at: Mar  2 2017 at 15:45:38     ====
====    When used in scientific publications please cite ====
====    Phys. Rev. B 85, 165113 (2012)                   ====
====    Phys. Rev. B 90, 085102 (2014)                   ====
====    Euro Phys. Lett. 108, 57004 (2014)               ====
Program executed on: Mon Mar 27 15:04:30 2017
Running on host    :
number of available processors              : 0
maximum number of threads in parallel region: 0
Smallest positive float  : 2.225074E-308 
Smallest deviation from 1: 2.220446E-16
Hello World

In a terminal (Mac or linux) this looks like:

Where to go from here

A good place to start is to look some small programs written in Quanty. Here you find 4 programs that actually do some calculations. In order to run these programs you need to save the text file with the extension .Quanty as well as the file in the same directory. Next you execute the text file with the extension .Quanty (i.e. for the first example you type Quanty Operators_as_Matrices.Quanty. In order to change the calculation done you can modify the file These files show some of the basic properties of many body physics and although they give a good feeling of what can be done I would not recommend to look at the source code here to much.

After this first example you can have a look at the introduction to Quanty in order to go step by step through several functions in Quanty.

A Quick entrance into the basic idea of Quanty can be found in the section Basic Components which contains several examples showing how to do calculations with Quanty. Note that many of these examples define objects (wave-functions or operators) but do not print anything to the screen. You can always print a variable (VarName) with the command print(VarName).

The language reference gives you a full list of all available functions. Please note that we try to add the documentation the moment we implement new functions. Before these are released in public versions some time might pass. (We try to release a new version every year, but we do want to do a full bug test before we give the code away) If you find documented functions that do not work in your version please check if the compile date (shown on execution) is older than the date that the documentation is created (in small font the date is given on the bottom of each page).

Have fun!

Table of contents