Registry / ai-ml / cutensornet-cu12

cutensornet-cu12

JSON →
library2.12.2pypypiunverified

cuTensorNet is a component of NVIDIA cuQuantum SDK for tensor network computations, enabling efficient contraction of tensor networks on GPUs. This package (cutensornet-cu12) targets CUDA 12.x. Current version: 24.10.0. It is part of the cuQuantum Python ecosystem, maintained by NVIDIA with quarterly releases.

pip install cutensornet-cu12
INSTALL
IMPORT
SIG · CUTENSORNET-CU12
C
cutensornet-cu12
ai-mlpythonv2.12.2
Install
8.1s avg
Import
Disk
570MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.12.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
build_error
glibc
py 3.103.95 runs
installs and imports cleanly · install 8.1s · import 0.000s · 572MB
570MB installed
● package 570MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

NetworkOperator
from cuquantum import NetworkOperator
from cuquantum import NetworkOperator

Minimal example: define a tensor network, optimize its contraction path, and contract.

import cupy as cp from cuquantum import NetworkOperator, ContractionOptimizer # Define tensor network expr = 'ij,jk,kl->il' operands = [ cp.random.rand(2, 3), cp.random.rand(3, 4), cp.random.rand(4, 2) ] # Create network operator net = NetworkOperator(expr, *operands) # Optimize contraction path optimizer = ContractionOptimizer(net) path, cost = optimizer.optimize() # Contract tn_result = net.contract(path) print(tn_result)
Debug
Known issues
breakingThe import path for the main API changed from `cutensornet` to `cuquantum` starting in version 22.x. Code using `import cutensornet` will break.
fix
Change imports to `from cuquantum import ...`.
affects: <=21.x
gotchaThe `cutensornet-cu12` PyPI package only provides the C/CUDA native library. The Python bindings are in `cuquantum-python-cu12`. Installing only `cutensornet-cu12` is insufficient; you must also install `cuquantum-python-cu12`.
fix
Install both: `pip install cutensornet-cu12 cuquantum-python-cu12`.
affects: all
deprecatedThe `cuquantum` Python package now recommends using `NetworkOperator` instead of the older `einsum` style interface. The old `cutensornet.contract` function is deprecated.
fix
Replace `cutensornet.contract(...)` with `NetworkOperator` and `ContractionOptimizer`.
affects: >=22.03
gotchaTensor operands must be on the GPU (CuPy or similar). Passing NumPy arrays will raise an error.
fix
Convert NumPy arrays to CuPy arrays before passing to `NetworkOperator`.
affects: all
Upgrade
Version history
2.12.2latest on PyPI · released Apr 30, 2026
Audit
Dependencies
cuquantum-python-cu12requiredProvides the higher-level Python API (`cuquantum` module) that wraps cuTensorNet functionality.
cupy-cuda12xoptionalMost examples use CuPy as a GPU array backend for tensor data.
Agent activity
44 hits · last 30 days
node
34
OpenAI (training)
1
Resources
cutensornet-cu12 — pip install cutensornet-cu12 · libregistry