QuaCCAToo is a Python library for simulating and analyzing spin dynamics of color centers for quantum technology applications.
The library provides several predefined pulsed sequences, analysis methods and quantum systems divided into four integrated modules: qsys, pulsed_sim, analysis and exp_data.
The systems' time evolution under pulsed experiments are calculated through quantum master equations based on the provided Hamiltonian, with realistic pulses in the laboratory frame without rotating frame approximations.
The software is built on top of QuTip, inheriting its object-oriented framework and the Qobj class.
The code is continously improved and maintained using pytest, ruff, pylint and ty.
For learning more about the package, we recommend first checking the tutorials section.
If you used QuaCCAToo in your work, please cite Digital Twin Simulations Toolbox of the Nitrogen-Vacancy Center in Diamond.
- Repository: https://github.com/QISS-HZB/QuaCCAToo
- Documentation: https://qiss-hzb.github.io/QuaCCAToo/
- PyPI: https://pypi.org/project/QuaCCAToo/
We strongly recommend using a virtual environment (use whichever tool like venv/conda/uv that you prefer) so that the system Python remains untouched.
pip install quaccatooCheck here for detailed installation instructions.
QuaCCAToo is best optimized to run on GNU/Linux systems. More specifically, the parallel_map method from
QuTip, which QuaCCAToo heavily relies on, does not work properly on Windows. This leads to severe slow downs
in simulations and even crashes in some hardware. macOS machines have not been tested by us.
- L. Tsunaki, A. Singh, S. Trofimov, & B. Naydenov. (2025). Digital Twin Simulations Toolbox of the Nitrogen-Vacancy Center in Diamond. Advanced Quantum Technologies, e00691. doi: 10.1002/qute.202500691.
- L. Tsunaki, A. Singh, K. Volkova, S. Trofimov, T. Pregnolato, T. Schröder, & B. Naydenov. (2025). Ambiguous resonances in multipulse quantum sensing with nitrogen-vacancy centers. Physical Review A, 111(2), 022606. doi: 10.1103/PhysRevA.111.022606.
- L. Tsunaki, M. Dotan, K. Volkova, & B. Naydenov. (2025). Quantum Gates via Dynamical Decoupling of Central Qubit on IBMQ and 15NV Center in Diamond. doi: arXiv:2509.22107 quant-ph.
- S. Trofimov, C. Thessalonikios, V. Deinhart, A. Spyrantis, L. Tsunaki, K. Volkova, K. Höflich, & B. Naydenov. (2026). Local nanoscale probing of electron spins using NV centers in diamond. 10.1016/j.diamond.2026.113530.
If you used QuaCCAToo in your work, please let us know so we can add it to the list!
QuaCCAToo is an object-oriented package organized with the following classes:
-
QSysdefines the quantum system of the problem. It has an obligatory intrinsic internal Hamiltonian$H_0$ , optional initial state, observable and a set of collapse operators. OnQSys, calculates the eigenstates and eigenvalues of the system and has methods for truncating the systems and adding other spins. QuaCCAToo providesNVas a predefined system for nitrogen vacancy centers in diamonds, more systems will be provided soon. -
PulsedSimcontains the logic for performing the simulation of pulsed experiments upon aQSysobject. It has attributes of a pulse sequence containing a set of pulses and free evolutions, control Hamiltonian$H_1$ , experiment variable and simulation results. Many predefined common pulse sequences are given inpredef_seqsandpredef_dd_seqsmodules. Different pulse shapes are predefined in thepulse_shapesmodule. -
ExpDatais a class to load experimental data and perform basic data processing, such as rescaling, subtracting columns or performing polynomial baseline corrections. -
Analysiscan be used either on simulation or experimental results, with a series of methods like for fitting (based onlmfit), Fourier transforms and data comparison. The class can also used for plotting the results in multiple forms, including density matrix histograms and Bloch spheres. Several fit models and functions relevant for analysis of color centers are provided in thefit_functionsmodule.
Any contribution or bug report are welcome.
- To contribute, fork the main branch and make a pull request.
- We use
hatch/hatchlingas the build backend. The other development dependencies includepytest,ruff,pylintandty. They can be installed by runningpip install -e '.[dev]'from within the cloned repository. See here for details. - Properly document everything in details following the
numpydocstring format. - Test your branch by running
pytestand the tutorial notebooks. - Add corresponding tests to every new method, function or functionality in general.
- Run
pylint quaccatoowithin the directory to check for code quality and ensure no new warnings are introduced. - Please pay attention to linter warnings (
ruff check) and format your code withruff format. Also recommended is to runty checkfor type hints. - Module level refactors require corresponding changes in the
sphinxsetup, too. - Use US-English, not British-English. Eg: analyze instead of analyse, color instead of colour, center instead of centre.