cuquantum-python-jax 0.0.2__tar.gz → 0.0.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. {cuquantum_python_jax-0.0.2/cuquantum_python_jax.egg-info → cuquantum_python_jax-0.0.4}/PKG-INFO +24 -39
  2. {cuquantum_python_jax-0.0.2 → cuquantum_python_jax-0.0.4}/README.md +21 -36
  3. cuquantum_python_jax-0.0.4/cuquantum/densitymat/jax/__init__.py +18 -0
  4. {cuquantum_python_jax-0.0.2 → cuquantum_python_jax-0.0.4}/cuquantum/densitymat/jax/cppsrc/cudensitymat_jax.cpp +229 -123
  5. cuquantum_python_jax-0.0.4/cuquantum/densitymat/jax/operator_action.py +323 -0
  6. cuquantum_python_jax-0.0.4/cuquantum/densitymat/jax/pysrc/__init__.py +8 -0
  7. {cuquantum_python_jax-0.0.2 → cuquantum_python_jax-0.0.4}/cuquantum/densitymat/jax/pysrc/base.py +11 -2
  8. {cuquantum_python_jax-0.0.2 → cuquantum_python_jax-0.0.4}/cuquantum/densitymat/jax/pysrc/context.py +36 -31
  9. cuquantum_python_jax-0.0.4/cuquantum/densitymat/jax/pysrc/elementary_operator.py +248 -0
  10. cuquantum_python_jax-0.0.4/cuquantum/densitymat/jax/pysrc/matrix_operator.py +188 -0
  11. cuquantum_python_jax-0.0.4/cuquantum/densitymat/jax/pysrc/operator.py +343 -0
  12. cuquantum_python_jax-0.0.4/cuquantum/densitymat/jax/pysrc/operator_action_prim.py +429 -0
  13. cuquantum_python_jax-0.0.4/cuquantum/densitymat/jax/pysrc/operator_term.py +509 -0
  14. cuquantum_python_jax-0.0.4/cuquantum/densitymat/jax/utils.py +73 -0
  15. {cuquantum_python_jax-0.0.2 → cuquantum_python_jax-0.0.4/cuquantum_python_jax.egg-info}/PKG-INFO +24 -39
  16. {cuquantum_python_jax-0.0.2 → cuquantum_python_jax-0.0.4}/cuquantum_python_jax.egg-info/SOURCES.txt +6 -2
  17. {cuquantum_python_jax-0.0.2 → cuquantum_python_jax-0.0.4}/cuquantum_python_jax.egg-info/requires.txt +2 -2
  18. cuquantum_python_jax-0.0.4/pyproject.toml +3 -0
  19. {cuquantum_python_jax-0.0.2 → cuquantum_python_jax-0.0.4}/setup.py +68 -20
  20. cuquantum_python_jax-0.0.2/cuquantum/densitymat/jax/__init__.py +0 -11
  21. cuquantum_python_jax-0.0.2/cuquantum/densitymat/jax/operator_action.py +0 -178
  22. cuquantum_python_jax-0.0.2/cuquantum/densitymat/jax/pysrc/__init__.py +0 -0
  23. cuquantum_python_jax-0.0.2/cuquantum/densitymat/jax/pysrc/operator_action.py +0 -324
  24. cuquantum_python_jax-0.0.2/cuquantum/densitymat/jax/pysrc/operators.py +0 -634
  25. cuquantum_python_jax-0.0.2/pyproject.toml +0 -3
  26. {cuquantum_python_jax-0.0.2 → cuquantum_python_jax-0.0.4}/LICENSE +0 -0
  27. {cuquantum_python_jax-0.0.2 → cuquantum_python_jax-0.0.4}/MANIFEST.in +0 -0
  28. {cuquantum_python_jax-0.0.2 → cuquantum_python_jax-0.0.4}/cuquantum/densitymat/jax/cppsrc/CMakeLists.txt +0 -0
  29. {cuquantum_python_jax-0.0.2 → cuquantum_python_jax-0.0.4}/cuquantum/densitymat/jax/cppsrc/cudensitymat_jax.h +0 -0
  30. {cuquantum_python_jax-0.0.2 → cuquantum_python_jax-0.0.4}/cuquantum/densitymat/jax/cppsrc/pybind.cpp +0 -0
  31. {cuquantum_python_jax-0.0.2 → cuquantum_python_jax-0.0.4}/cuquantum/densitymat/jax/cppsrc/utils.h +0 -0
  32. {cuquantum_python_jax-0.0.2 → cuquantum_python_jax-0.0.4}/cuquantum_python_jax.egg-info/dependency_links.txt +0 -0
  33. {cuquantum_python_jax-0.0.2 → cuquantum_python_jax-0.0.4}/cuquantum_python_jax.egg-info/not-zip-safe +0 -0
  34. {cuquantum_python_jax-0.0.2 → cuquantum_python_jax-0.0.4}/cuquantum_python_jax.egg-info/top_level.txt +0 -0
  35. {cuquantum_python_jax-0.0.2 → cuquantum_python_jax-0.0.4}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cuquantum-python-jax
3
- Version: 0.0.2
3
+ Version: 0.0.4
4
4
  Summary: NVIDIA cuQuantum Python JAX
5
5
  Home-page: https://developer.nvidia.com/cuquantum-sdk
6
6
  Author: NVIDIA Corporation
@@ -20,9 +20,9 @@ Classifier: Environment :: GPU :: NVIDIA CUDA :: 12
20
20
  Requires-Python: >=3.11.0
21
21
  Description-Content-Type: text/markdown
22
22
  License-File: LICENSE
23
- Requires-Dist: cuquantum-python-cu12~=25.09
24
- Requires-Dist: jax[cuda12-local]<0.7,>=0.5
25
23
  Requires-Dist: pybind11
24
+ Requires-Dist: cuquantum-python-cu12~=26.1.0
25
+ Requires-Dist: jax[cuda12-local]<0.7,>=0.5
26
26
  Dynamic: author
27
27
  Dynamic: author-email
28
28
  Dynamic: classifier
@@ -47,20 +47,22 @@ Please visit the [NVIDIA cuQuantum Python documentation](https://docs.nvidia.com
47
47
 
48
48
  ### Requirements
49
49
 
50
- The install-time dependencies of the cuQuantum Python package include:
50
+ The install-time dependencies of the cuQuantum Python JAX package include:
51
51
 
52
- * cuquantum-python-cu12~=25.09
53
- * setuptools>=77.0.3
54
- * jax[cuda12]>=0.5,<0.7 or jax[cuda12-local]>=0.5,<0.7
52
+ * cuquantum-python-cu12~=26.1.0 for CUDA 12 or cuquantum-python-cu13~=26.1.0 for CUDA 13
53
+ * jax[cuda12-local]>=0.5,<0.7 for CUDA 12 or jax[cuda13-local]>=0.8,<0.9 for CUDA 13
55
54
  * pybind11
55
+ * setuptools>=77.0.3
56
56
 
57
- Note: cuQuantum Python JAX is only supported with CUDA 12.
57
+ Note:
58
+ 1. cuQuantum Python JAX is only supported with CUDA 12 and CUDA 13.
59
+ 2. cuQuantum Python JAX installation does not support build isolation. The user needs to pass in `--no-build-isolation` to `pip` when installing cuQuantum Python JAX.
58
60
 
59
- #### Installation using `jax[cuda12-local]`
61
+ #### Installation using `jax[cudaXX-local]`
60
62
 
61
- `cuquantum-python-jax` depends explicitly on `jax[cuda12-local]`. `pip install cuquantum-python-jax` will install `jax[cuda12-local]`.
63
+ `cuquantum-python-jax` depends explicitly on `jax[cudaXX-local]`. `pip install cuquantum-python-jax` will install `jax[cudaXX-local]`.
62
64
 
63
- Using `jax[cuda12-local]` assumes the user provides both cuDNN and the CUDA Toolkit. cuDNN is not a part of the CUDA Toolkit and requires an additional installation. The user must also specify `LD_LIBRARY_PATH`, including the library folders containing `libcudnn.so` and `libcupti.so`.
65
+ Using `jax[cudaXX-local]` assumes the user provides both cuDNN and the CUDA Toolkit. cuDNN is not a part of the CUDA Toolkit and requires an additional installation. The user must also specify `LD_LIBRARY_PATH`, including the library folders containing `libcudnn.so` and `libcupti.so`.
64
66
 
65
67
  `libcupti.so` is provided by the CUDA Toolkit. If the CUDA Toolkit is installed under `/usr/local/cuda`, `libcupti.so` is located under `/usr/local/cuda/extras/CUPTI/lib64` and `LD_LIBRARY_PATH` should contain this path.
66
68
 
@@ -73,41 +75,24 @@ pip install nvidia-cudnn-cu12
73
75
  pip install nvidia-cuda-cupti-cu12
74
76
  ```
75
77
 
76
- After installing cuDNN and cuPTI, the user may install `cuquantum-python-jax` using `pip` using either:
78
+ After installing cuDNN and cuPTI, the user may install `cuquantum-python-jax` with `pip` using either:
77
79
 
78
80
  ```
79
- pip install cuquantum-python-jax
81
+ pip install --no-build-isolation cuquantum-python-jax
80
82
  ```
81
83
 
82
- or
84
+ in which case the CUDA version will be detected, or one of
83
85
 
84
86
  ```
85
- pip install cuquantum-python-cu12[jax]
87
+ pip install --no-build-isolation cuquantum-python-cu12[jax]
88
+ pip install --no-build-isolation cuquantum-python-cu13[jax]
86
89
  ```
87
90
 
88
- Note: if cuDNN and cuPTI are installed with `pip`, the user does not need to specify library folders in `LD_LIBRARY_PATH`.
89
-
90
- #### Installation using `jax[cuda12]`
91
-
92
- Alternatively, the user may
93
-
94
- ```
95
- pip install jax[cuda12] # install cuPTI and cuDNN together with CUDA-enabled JAX
96
- ```
97
-
98
- and either
99
-
100
- ```
101
- pip install cuquantum-python-jax
102
- ```
103
-
104
- or
105
-
106
- ```
107
- pip install cuquantum-python-cu12[jax]
108
- ```
91
+ where the CUDA version is explicitly specified on cuquantum-python.
109
92
 
110
- Warning: if the user has an installation of CUDA outside of `pip`, this may create conflicts and undefined behavior.
93
+ Note:
94
+ 1. If cuDNN and cuPTI are installed with `pip`, the user does not need to specify library folders in `LD_LIBRARY_PATH`.
95
+ 2. When the latter command `pip install --no-build-isolation cuquantum-python-cu12[jax]`/`pip install --no-build-isolation cuquantum-python-cu13[jax]` is used, `--no-build-isolation` applies to both cuquantum-python and cuquantum-python-jax. The user needs to ensure cuquantum-python's build dependencies are installed before the installation.
111
96
 
112
97
  #### Installing from source
113
98
 
@@ -127,8 +112,8 @@ Where `CUDENSITYMAT_ROOT` is the path to the libraries parent directory. For exa
127
112
  Runtime dependencies of the cuQuantum Python package include:
128
113
 
129
114
  * An NVIDIA GPU with compute capability 7.5+
130
- * cuquantum-python-cu12~=25.09
131
- * jax[cuda12]>=0.5,<0.7 or jax[cuda12-local]>=0.5,<0.7
115
+ * cuquantum-python-cu12~=26.1.0 for CUDA 12 or cuquantum-python-cu13~=26.1.0 for CUDA 13
116
+ * jax[cuda12-local]>=0.5,<0.7 for CUDA 12 or jax[cuda13-local]>=0.8,<0.9 for CUDA 13
132
117
  * pybind11
133
118
 
134
119
  ## Developer Notes
@@ -10,20 +10,22 @@ Please visit the [NVIDIA cuQuantum Python documentation](https://docs.nvidia.com
10
10
 
11
11
  ### Requirements
12
12
 
13
- The install-time dependencies of the cuQuantum Python package include:
13
+ The install-time dependencies of the cuQuantum Python JAX package include:
14
14
 
15
- * cuquantum-python-cu12~=25.09
16
- * setuptools>=77.0.3
17
- * jax[cuda12]>=0.5,<0.7 or jax[cuda12-local]>=0.5,<0.7
15
+ * cuquantum-python-cu12~=26.1.0 for CUDA 12 or cuquantum-python-cu13~=26.1.0 for CUDA 13
16
+ * jax[cuda12-local]>=0.5,<0.7 for CUDA 12 or jax[cuda13-local]>=0.8,<0.9 for CUDA 13
18
17
  * pybind11
18
+ * setuptools>=77.0.3
19
19
 
20
- Note: cuQuantum Python JAX is only supported with CUDA 12.
20
+ Note:
21
+ 1. cuQuantum Python JAX is only supported with CUDA 12 and CUDA 13.
22
+ 2. cuQuantum Python JAX installation does not support build isolation. The user needs to pass in `--no-build-isolation` to `pip` when installing cuQuantum Python JAX.
21
23
 
22
- #### Installation using `jax[cuda12-local]`
24
+ #### Installation using `jax[cudaXX-local]`
23
25
 
24
- `cuquantum-python-jax` depends explicitly on `jax[cuda12-local]`. `pip install cuquantum-python-jax` will install `jax[cuda12-local]`.
26
+ `cuquantum-python-jax` depends explicitly on `jax[cudaXX-local]`. `pip install cuquantum-python-jax` will install `jax[cudaXX-local]`.
25
27
 
26
- Using `jax[cuda12-local]` assumes the user provides both cuDNN and the CUDA Toolkit. cuDNN is not a part of the CUDA Toolkit and requires an additional installation. The user must also specify `LD_LIBRARY_PATH`, including the library folders containing `libcudnn.so` and `libcupti.so`.
28
+ Using `jax[cudaXX-local]` assumes the user provides both cuDNN and the CUDA Toolkit. cuDNN is not a part of the CUDA Toolkit and requires an additional installation. The user must also specify `LD_LIBRARY_PATH`, including the library folders containing `libcudnn.so` and `libcupti.so`.
27
29
 
28
30
  `libcupti.so` is provided by the CUDA Toolkit. If the CUDA Toolkit is installed under `/usr/local/cuda`, `libcupti.so` is located under `/usr/local/cuda/extras/CUPTI/lib64` and `LD_LIBRARY_PATH` should contain this path.
29
31
 
@@ -36,41 +38,24 @@ pip install nvidia-cudnn-cu12
36
38
  pip install nvidia-cuda-cupti-cu12
37
39
  ```
38
40
 
39
- After installing cuDNN and cuPTI, the user may install `cuquantum-python-jax` using `pip` using either:
40
-
41
- ```
42
- pip install cuquantum-python-jax
43
- ```
44
-
45
- or
41
+ After installing cuDNN and cuPTI, the user may install `cuquantum-python-jax` with `pip` using either:
46
42
 
47
43
  ```
48
- pip install cuquantum-python-cu12[jax]
44
+ pip install --no-build-isolation cuquantum-python-jax
49
45
  ```
50
46
 
51
- Note: if cuDNN and cuPTI are installed with `pip`, the user does not need to specify library folders in `LD_LIBRARY_PATH`.
52
-
53
- #### Installation using `jax[cuda12]`
54
-
55
- Alternatively, the user may
47
+ in which case the CUDA version will be detected, or one of
56
48
 
57
49
  ```
58
- pip install jax[cuda12] # install cuPTI and cuDNN together with CUDA-enabled JAX
50
+ pip install --no-build-isolation cuquantum-python-cu12[jax]
51
+ pip install --no-build-isolation cuquantum-python-cu13[jax]
59
52
  ```
60
53
 
61
- and either
62
-
63
- ```
64
- pip install cuquantum-python-jax
65
- ```
66
-
67
- or
68
-
69
- ```
70
- pip install cuquantum-python-cu12[jax]
71
- ```
54
+ where the CUDA version is explicitly specified on cuquantum-python.
72
55
 
73
- Warning: if the user has an installation of CUDA outside of `pip`, this may create conflicts and undefined behavior.
56
+ Note:
57
+ 1. If cuDNN and cuPTI are installed with `pip`, the user does not need to specify library folders in `LD_LIBRARY_PATH`.
58
+ 2. When the latter command `pip install --no-build-isolation cuquantum-python-cu12[jax]`/`pip install --no-build-isolation cuquantum-python-cu13[jax]` is used, `--no-build-isolation` applies to both cuquantum-python and cuquantum-python-jax. The user needs to ensure cuquantum-python's build dependencies are installed before the installation.
74
59
 
75
60
  #### Installing from source
76
61
 
@@ -90,8 +75,8 @@ Where `CUDENSITYMAT_ROOT` is the path to the libraries parent directory. For exa
90
75
  Runtime dependencies of the cuQuantum Python package include:
91
76
 
92
77
  * An NVIDIA GPU with compute capability 7.5+
93
- * cuquantum-python-cu12~=25.09
94
- * jax[cuda12]>=0.5,<0.7 or jax[cuda12-local]>=0.5,<0.7
78
+ * cuquantum-python-cu12~=26.1.0 for CUDA 12 or cuquantum-python-cu13~=26.1.0 for CUDA 13
79
+ * jax[cuda12-local]>=0.5,<0.7 for CUDA 12 or jax[cuda13-local]>=0.8,<0.9 for CUDA 13
95
80
  * pybind11
96
81
 
97
82
  ## Developer Notes
@@ -0,0 +1,18 @@
1
+ # Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES
2
+ #
3
+ # SPDX-License-Identifier: BSD-3-Clause
4
+
5
+ import warnings
6
+
7
+ import jax
8
+
9
+ if not jax.config.jax_enable_x64:
10
+ raise RuntimeError(f"jax_enable_x64 must be set to True to use cuQuantum Python JAX")
11
+
12
+ from .operator_action import operator_action
13
+ from .pysrc import (
14
+ ElementaryOperator,
15
+ MatrixOperator,
16
+ OperatorTerm,
17
+ Operator
18
+ )