You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/qrisp/jasp/evaluation_tools/catalyst_qjit.py
+53-2Lines changed: 53 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@
20
20
fromqrisp.jasp.jasp_expressionimportmake_jaspr
21
21
22
22
23
-
defqjit(function):
23
+
defqjit(function=None, device=None):
24
24
"""
25
25
Decorator to leverage the jasp + Catalyst infrastructure to compile the given
26
26
function to QIR and run it on the Catalyst QIR runtime.
@@ -29,12 +29,40 @@ def qjit(function):
29
29
----------
30
30
function : callable
31
31
A function performing Qrisp code.
32
+
device : object
33
+
The `PennyLane device <https://docs.pennylane.ai/projects/catalyst/en/stable/dev/devices.html>`_ to execute the function.
34
+
The default device is `"lightning.qubit" <https://docs.pennylane.ai/projects/lightning/en/stable/lightning_qubit/device.html>`_,
35
+
a fast state-vector qubit simulator.
32
36
33
37
Returns
34
38
-------
35
39
callable
36
40
A function executing the compiled code.
37
41
42
+
Notes
43
+
-----
44
+
45
+
Lightning-GPU is compatible with systems featuring NVIDIA Volta (SM 7.0) GPUs or newer.
46
+
It is specifically optimized for Linux environments on X86-64 or ARM64 architectures running CUDA-12.
47
+
48
+
To install Lightning-GPU with NVIDIA CUDA support, the following packages need to be installed
49
+
50
+
::
51
+
52
+
pip install custatevec_cu12
53
+
pip install pennylane-lightning-gpu
54
+
55
+
56
+
Pre-built wheels for Lightning-AMDGPU are available for AMD MI300 series GPUs and systems running ROCm 7.0 or newer.
57
+
58
+
::
59
+
60
+
pip install pennylane-lightning-amdgpu
61
+
62
+
If the setup uses an older version of ROCm or a different AMD GPU series, Lightning-AMDGPU must be built manually from source.
63
+
64
+
Installation instructions for different platforms are available at `pennylane.ai/install <https://pennylane.ai/install#high-performance-computing-and-gpus>`_.
65
+
38
66
Examples
39
67
--------
40
68
@@ -65,8 +93,31 @@ def test_fun(i):
65
93
>>> test_fun(5)
66
94
[array(7.25, dtype=float64)]
67
95
96
+
97
+
For executing on "lightning.gpu" we specify the device:
0 commit comments