Package: pyCTQW
Fortran library and Python module to calculate continuous-time quantum walksThis is intended to provide a framework to quickly and easily work with quantum
walkers, take advantage of high performance computing, and allow easy visualisation.For more information on how to use this package, please see theonline documentationFeaturesFortran and Python bindings (in the form of a library and module respectively)Supports MPI through the use of the PETSc and SLEPc high-performance sparse
matrix libraries (CUDA support planned)Has in-built support for infinite-line hamiltoniansImport and export matrices/states in binary or textCan import custom adjancency matricesSupports both one and two walkers (non-interacting)Import and export matrices/states in binary, text or matlab formatPython module supports plotting and visualisation using matplotlib and networkxEntanglement calculationsAbility to place diagonal defects/barriers on graph verticesMPI graph isomorphism methods, for both 2 and 3 interacting particlesTODOCUDA supportCalculation of transmissionAdd fallback modes when PETSc/SLEPc are not presentDependenciesIn addition to an MPI implementation (e.g.MPICHorOpen MPI), the pythonpyCTQW.MPImodule depends on the following components:Python>= 2.7NumPy>= 1.6.0PETSc>= 3.4.2SLEPc>= 3.4.1petsc4py 3.4 or petsc4py-devmpi4py(recommended, used for some plotting)matplotlib(recommended, for node plotting and graph visualisation)SciPy(recommended, for some I/O operations)NetworkX(recommended, graph visualisation)Installation usingpipAfter ensuring NumPy and petsc4py are installed (and all PETSc, SLEPc and MPI environment variables are properly set), pyCTQW can be installed usingpip:$pipinstallpyCTQWInstallation from source codeAlternatively, the source code can be downloaded and compiled manually:Ensure all dependencies required above are installedExtract thepyCTQWfolder, andcdinto the extracted directory:$tarxvzfpyctqw-1.1.0.tar.gz$cdpyctqw-1.1.0Ensure that your PETSc and SLEPc environment variables are correctly set; for example,$exportPETSC_DIR=/path/to/petsc$exportPETSC_ARCH=linux-gnu$exportSLEPC_DIR=/path/to/slepcIf you are unsure what your PETSc or SLEPc variables should be, please refer to their documentation.ImportantIf you plan to installpyCTQW.MPIusingrootto asystemdirectory, the PETSc and SLEPc environment variables must be available to the root user.Compile the Python modulepyCTQW.MPIby running$pythonsetup.pybuildSystem-wide install:$sudo-Epythonsetup.pyinstallwhere the command-Eensures that the environment variables set in step 3 are passed to the root.NoteIf you do not have root access, or the above command does not appear to work, you can install the package locally by running$pythonsetup.pyinstall--userNow, have a go running some of the examples!Optional: compilinglibctqwMPIIn addition to an MPI implementation (e.g.MPICHorOpen MPI), the Fortran librarylibctqwMPIdepends on the following components:
-PETSc>= 3.4.2
-SLEPc>= 3.4.1Once these dependencies are installed, simply open a terminal in the root directory ofpyCTQW-X.Yand run$makefortran[options]where available options includeOptionValuesDescriptionshared_lib0 (default), 1whether to buildlibctqwMPIas a shared library (shared_lib=1, producinglibctqwMPI.so) or a static library (shared_lib=0(default), producinglibctqwMPI.a).If built as a shared library, compiled programs will be smaller, butlibctqwMPI.sowill need to be added to a directory used byld(either by setting the environment variableLD_LIBRARY_PATHor by placinglibctqwMPI.soin/usr/local/libetc).The fortran library (libctqwMPI.soorlibctqwMPI.a) can be found in thepyCTQW-X.Y/libdirectory, with required module files found in thepyCTQW-X.Y/includedirectory.Optional:build documentationIfSphinxis installed, the documentation can be compiled by running$pipinstall-rdocs/requirements.txt$makedocsDocumentationFor more information on how to use this package, please see theonline documentationAcknowledgementsThe graph isomorphism subroutineGraphISCertuses the external subroutined_refsor, a highly optimised Fortran sorting implementation written by Michel Olagnon and part of theORDERPACK 2.0suite of ranking and sorting algorithms for Fortran 90.