Installation

Install an authorized Python wheel containing Light / Heavy, or build the public algorithms and numerical executor from source.

On this page

Licensing before use

Source code that the company is entitled to license uses the Arclight Non-Commercial Source-Available License 1.0, which prohibits commercial use and closed-source integration and is not OSI-approved. Commercial use requires separate authorization. Light / Heavy dynamic libraries are separately licensed; the source license does not authorize their use or distribution. Third-party dependencies and versions previously licensed under MIT / Apache retain their respective rights. See licensing and permitted use and the license text and third-party/historical notices in the ArcTN repository.

Requirements

Component Minimum requirements Notes
Python package Python 3.9 or later · NumPy 1.23 or later Wheel must match Python version, operating system, and CPU architecture; installation does not require Rust
Rust source build Rust 1.82 Public algorithms and native CPU execution
Python source build Rust 1.83 · Python 3.9 Build the public extension through PyO3
MPI System MPI + Cargo feature mpi Required when enabling the mpi feature and building tnmpi

Installing the Python package

The complete-wheel instructions below apply only to authorized internal packages. The public source release and wheels built from it do not include the Light / Heavy engines. After obtaining an authorized package containing these compiled libraries, install it in a virtual environment, replacing the path below with the actual file:

bash
python -m venv .venv
source .venv/bin/activate
python -m pip install /path/to/arctn-version-platform-tag.whl

On Windows, activate with .venv\Scripts\activate. Python-version and platform tags in the wheel filename are generated during the build; do not rename the wheel manually.

The complete wheel includes the Rust CPU executor and Light / Heavy compiled libraries. Importing arctn automatically finds the bundled libraries without a library-path setting. After installation, run the quick start. The complete package is currently for internal use only; no public download or PyPI release is available.

To use ArcTN in Quimb, also install the frontend and tree-interface dependencies:

bash
python -m pip install quimb cotengra opt_einsum

Install CuPy, PyTorch, JAX, and other array libraries separately for the required backend.

Building the Rust crate from source

bash
git clone https://github.com/Quill-ArcLight/arctn-public.git
cd arctn-public
cargo build --release --locked
cargo test --locked --test correctness

The public source includes standalone path-search algorithms, slicing, and numerical execution, but excludes Light / Heavy implementations and compiled libraries. The repository is currently private and cloning requires access. Ordinary single-host execution does not need MPI; --locked uses the repository Cargo.lock.

Building the Python wheel from source

bash
cd arctn-public/pybind
python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install "maturin>=1.9.3,<2.0"
python -m maturin build --release --locked --out target/wheels
python -m pip install --force-reinstall target/wheels/arctn-*.whl
python -c "import arctn; print(arctn.__version__)"

Wheels built from public source do not bundle Light / Heavy compiled libraries. Features such as execution of existing paths and network simplification work independently; calling Light / Heavy also requires a separately supplied compatible library.

Configuring a separate Light / Heavy library

This step is needed only for source-built versions, Rust interfaces, or command-line tools. On Linux:

bash
export ARCTN_ENGINE_LIBRARY=/absolute/path/to/libarctn_engine.so

Use libarctn_engine.dylib on macOS and arctn_engine.dll on Windows. The library must match the operating system, CPU architecture, and interface version. An explicit ARCTN_ENGINE_LIBRARY setting takes precedence over the Python-bundled library; an invalid path raises an error instead of falling back to another library.

Light / Heavy dynamic libraries are separately licensed; the Arclight Non-Commercial Source-Available License 1.0 does not authorize their use or distribution. Once you have the required authorization and a compatible library, ordinary users need neither compile it nor change calls using preset="light" or preset="heavy".

Enabling MPI

bash
cargo build --release --locked --features mpi --bin tnmpi
mpirun -n 4 target/release/tnmpi --help

tnmpi loads an existing path and slicing set and executes the sliced contraction. --dtype supports f32, f64, complex64, and complex128, defaulting to f64. See MPI execution.