#spin #quantum #simulation #cce #epr

bin+lib clue_oxide

CluE Oxide (Cluster Evolution Oxide) is a spin dynamics simulation program for electron spin decoherence

2 releases

0.2.1 Aug 20, 2024
0.2.0 Jul 9, 2024

#584 in Command line utilities

Download history 118/week @ 2024-07-08 158/week @ 2024-08-19 3/week @ 2024-08-26

161 downloads per month

GPL-3.0 license

735KB
15K SLoC

CluE

CluE (Cluester Evolution) is a quantum spin dynamics program to simulate central spin decoherence, CluE implements Yang and Liu's cluster correlation expansion [1,2]. For usage information please refer to the manual.

Installation

The installation process has been tested on several Linux distributions and on Windows 10, but not macOS. Before installing, make sure you have the latest version of Rust[3] installed.

Before compiling CluE, it is a good idea to check that everything is working properly by running the tests.

cargo test

To build Clue, run the following

cargo build --release

This will build the binary in clue_oxide/target/release; to make clue globally available either add this directory to your system path or establish as alias. In Bash, add

alias clue="path/to/clue/target/release/clue_oxide"

to your .bash_aliases file.

pyCluE

Within the CluE source directory, navigate to the pyclue directory.

cd pyclue

The Python interface uses maturin[4] to compile. To install maturin in a Python virtual environment use the following.

python3 -m venv <path/to/virtual/environment>
source <path/to/virtual/environment/bin/activate >
pip install maturin

And the use the following to build the Python interface.

maturin build

One potential issue is that when maturin tries to compile CluE, it can fail to see the operating system unique flags, and will try to use them all. To account for this, open CluE’s Cargo.toml file and comment out everything under the unneeded operating system section. For example, to compile on Linux add comments as shown below.

[target.'cfg(unix)'.dependencies]
ndarray -linalg = { version = "0.15", features = ["openblas -static"] }

#[target.'cfg(windows) '.dependencies.ndarray -linalg]
#version = '0.15.0 '
#features = ['intel -mkl ']

Once built, navigate to target/wheels, source the desired Python environment, and use pip to install the wheel.

cd target/wheels
source <path/to/installation/environment/bin/activate >
pip install <pyclue.whl>

References

Yang, W.; Liu, R. B. Decoherence of Coupled Electron Spins via Nuclear Spin Dynamics in Quantum Dots. Phys. Rev. B 2008, 77 (8), 085302. https://doi.org/10.1103/PhysRevB.77.085302.

Yang, W.; Liu, R.-B. Quantum Many-Body Theory of Qubit Decoherence in a Finite-Size Spin Bath. II. Ensemble Dynamics. Phys. Rev. B 2009, 79 (11), 115320. https://doi.org/10.1103/PhysRevB.79.115320.

Foundation, R. Rust A language empowering everyone to build reliable and efficient software. https://www.rust-lang.org/.

PyO3 PyO3/maturin https://github.com/PyO3/maturin.

Dependencies

~69MB
~895K SLoC