pennylane-qrack 0.11.6__tar.gz → 0.13.0__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.
Potentially problematic release.
This version of pennylane-qrack might be problematic. Click here for more details.
- {pennylane_qrack-0.11.6 → pennylane_qrack-0.13.0}/CHANGELOG.md +182 -182
- {pennylane_qrack-0.11.6 → pennylane_qrack-0.13.0}/CMakeLists.txt +29 -29
- {pennylane_qrack-0.11.6 → pennylane_qrack-0.13.0}/LICENSE +201 -201
- {pennylane_qrack-0.11.6 → pennylane_qrack-0.13.0}/MANIFEST.in +8 -8
- {pennylane_qrack-0.11.6 → pennylane_qrack-0.13.0}/Makefile +85 -85
- {pennylane_qrack-0.11.6 → pennylane_qrack-0.13.0}/PKG-INFO +154 -142
- {pennylane_qrack-0.11.6 → pennylane_qrack-0.13.0}/README.rst +112 -110
- pennylane_qrack-0.13.0/pennylane_qrack/QrackDeviceConfig.toml +117 -0
- {pennylane_qrack-0.11.6 → pennylane_qrack-0.13.0}/pennylane_qrack/__init__.py +16 -16
- {pennylane_qrack-0.11.6 → pennylane_qrack-0.13.0}/pennylane_qrack/_version.py +19 -19
- {pennylane_qrack-0.11.6 → pennylane_qrack-0.13.0}/pennylane_qrack/qrack_device.cpp +868 -868
- {pennylane_qrack-0.11.6 → pennylane_qrack-0.13.0}/pennylane_qrack/qrack_device.py +729 -720
- {pennylane_qrack-0.11.6 → pennylane_qrack-0.13.0}/pennylane_qrack.egg-info/PKG-INFO +154 -142
- {pennylane_qrack-0.11.6 → pennylane_qrack-0.13.0}/pennylane_qrack.egg-info/SOURCES.txt +0 -6
- {pennylane_qrack-0.11.6 → pennylane_qrack-0.13.0}/requirements.txt +3 -3
- {pennylane_qrack-0.11.6 → pennylane_qrack-0.13.0}/setup.cfg +4 -4
- {pennylane_qrack-0.11.6 → pennylane_qrack-0.13.0}/setup.py +79 -79
- {pennylane_qrack-0.11.6 → pennylane_qrack-0.13.0}/tests/test_apply.py +658 -658
- {pennylane_qrack-0.11.6 → pennylane_qrack-0.13.0}/tests/test_integration.py +88 -88
- {pennylane_qrack-0.11.6 → pennylane_qrack-0.13.0}/tests/test_units.py +81 -81
- pennylane_qrack-0.11.6/catalyst/runtime/include/DataView.hpp +0 -148
- pennylane_qrack-0.11.6/catalyst/runtime/include/DynamicLibraryLoader.hpp +0 -79
- pennylane_qrack-0.11.6/catalyst/runtime/include/Exception.hpp +0 -87
- pennylane_qrack-0.11.6/catalyst/runtime/include/QuantumDevice.hpp +0 -364
- pennylane_qrack-0.11.6/catalyst/runtime/include/RuntimeCAPI.h +0 -112
- pennylane_qrack-0.11.6/catalyst/runtime/include/Types.h +0 -165
- pennylane_qrack-0.11.6/pennylane_qrack/QrackDeviceConfig.toml +0 -158
- {pennylane_qrack-0.11.6 → pennylane_qrack-0.13.0}/pennylane_qrack.egg-info/dependency_links.txt +0 -0
- {pennylane_qrack-0.11.6 → pennylane_qrack-0.13.0}/pennylane_qrack.egg-info/entry_points.txt +0 -0
- {pennylane_qrack-0.11.6 → pennylane_qrack-0.13.0}/pennylane_qrack.egg-info/requires.txt +0 -0
- {pennylane_qrack-0.11.6 → pennylane_qrack-0.13.0}/pennylane_qrack.egg-info/top_level.txt +0 -0
|
@@ -1,182 +1,182 @@
|
|
|
1
|
-
# Release 0.33.0-dev
|
|
2
|
-
|
|
3
|
-
### New features since last release
|
|
4
|
-
|
|
5
|
-
### Improvements 🛠
|
|
6
|
-
|
|
7
|
-
### Breaking changes 💔
|
|
8
|
-
|
|
9
|
-
* The `qml.QubitStateVector` template has been removed. Instead, use `qml.StatePrep`.
|
|
10
|
-
[(#27)](https://github.com/unitaryfund/pennylane-qrack/pull/27/)
|
|
11
|
-
|
|
12
|
-
### Deprecations 👋
|
|
13
|
-
|
|
14
|
-
### Documentation 📝
|
|
15
|
-
|
|
16
|
-
### Bug fixes 🐛
|
|
17
|
-
|
|
18
|
-
### Contributors ✍️
|
|
19
|
-
|
|
20
|
-
Andrija Paurevic
|
|
21
|
-
|
|
22
|
-
This release contains contributions from (in alphabetical order):
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
# Release 0.32.0
|
|
26
|
-
|
|
27
|
-
### Breaking changes
|
|
28
|
-
|
|
29
|
-
* Support for Python 3.8 has been removed, and support for 3.11 has been added.
|
|
30
|
-
[(#55)](https://github.com/PennyLaneAI/pennylane-qulacs/pull/55)
|
|
31
|
-
|
|
32
|
-
### Improvements
|
|
33
|
-
|
|
34
|
-
* Added support for `qml.StatePrep` as a state preparation operation.
|
|
35
|
-
[(#54)](https://github.com/PennyLaneAI/pennylane-qulacs/pull/54)
|
|
36
|
-
|
|
37
|
-
### Contributors
|
|
38
|
-
|
|
39
|
-
This release contains contributions from (in alphabetical order):
|
|
40
|
-
|
|
41
|
-
Mudit Pandey,
|
|
42
|
-
Jay Soni
|
|
43
|
-
|
|
44
|
-
---
|
|
45
|
-
# Release 0.29.0
|
|
46
|
-
|
|
47
|
-
### Improvements
|
|
48
|
-
|
|
49
|
-
* Removed support for in-place inversion of operations (e.g. `qml.PauliX(0).inv()`). Users should
|
|
50
|
-
use `qml.adjoint` instead.
|
|
51
|
-
[(#46)](https://github.com/PennyLaneAI/pennylane-qulacs/pull/46)
|
|
52
|
-
|
|
53
|
-
### Contributors
|
|
54
|
-
|
|
55
|
-
This release contains contributions from (in alphabetical order):
|
|
56
|
-
|
|
57
|
-
Albert Mitjans Coma
|
|
58
|
-
|
|
59
|
-
---
|
|
60
|
-
|
|
61
|
-
# Release 0.28.0
|
|
62
|
-
|
|
63
|
-
### Breaking changes
|
|
64
|
-
|
|
65
|
-
* Removes testing for Python 3.7.
|
|
66
|
-
[(#43)](https://github.com/PennyLaneAI/pennylane-qulacs/pull/43)
|
|
67
|
-
|
|
68
|
-
### Contributors
|
|
69
|
-
|
|
70
|
-
This release contains contributions from (in alphabetical order):
|
|
71
|
-
|
|
72
|
-
Christina Lee
|
|
73
|
-
|
|
74
|
-
---
|
|
75
|
-
|
|
76
|
-
# Release 0.24.0
|
|
77
|
-
|
|
78
|
-
### Improvements
|
|
79
|
-
|
|
80
|
-
* Adds the compatibility tag for Python 3.10 and removed it for 3.6.
|
|
81
|
-
[(#31)](https://github.com/PennyLaneAI/pennylane-qulacs/pull/31)
|
|
82
|
-
|
|
83
|
-
### Bug fixes
|
|
84
|
-
|
|
85
|
-
* Defines the missing `returns_state` entry of the `capabilities` dictionary of
|
|
86
|
-
the device.
|
|
87
|
-
[(#36)](https://github.com/PennyLaneAI/pennylane-qulacs/pull/36)
|
|
88
|
-
|
|
89
|
-
* Updates the plugin to be compatible with the use of `Operator.eigvals` as a method.
|
|
90
|
-
[(#35)](https://github.com/PennyLaneAI/pennylane-qulacs/pull/35)
|
|
91
|
-
|
|
92
|
-
### Contributors
|
|
93
|
-
|
|
94
|
-
This release contains contributions from (in alphabetical order):
|
|
95
|
-
|
|
96
|
-
Christina Lee, Antal Száva
|
|
97
|
-
|
|
98
|
-
---
|
|
99
|
-
|
|
100
|
-
# Release 0.16.0
|
|
101
|
-
|
|
102
|
-
### Improvements
|
|
103
|
-
|
|
104
|
-
* Adds the compatibility tag for Python 3.9.
|
|
105
|
-
[(#28)](https://github.com/PennyLaneAI/pennylane-qulacs/pull/28)
|
|
106
|
-
|
|
107
|
-
### Bug fixes
|
|
108
|
-
|
|
109
|
-
* Fixed an issue where the wrong results are returned when passing non-consecutive wires to `QubitStateVector`.
|
|
110
|
-
[(#25)](https://github.com/PennyLaneAI/pennylane-qulacs/pull/25)
|
|
111
|
-
|
|
112
|
-
* Fixed issue where a state cannot be loaded into a Qulacs circuit when using a subset of wires with `BasisState`.
|
|
113
|
-
[(#26)](https://github.com/PennyLaneAI/pennylane-qulacs/pull/26)
|
|
114
|
-
|
|
115
|
-
### Contributors
|
|
116
|
-
|
|
117
|
-
This release contains contributions from (in alphabetical order):
|
|
118
|
-
|
|
119
|
-
Theodor Isacsson, Romain Moyard
|
|
120
|
-
|
|
121
|
-
# Release 0.15.0
|
|
122
|
-
|
|
123
|
-
### Breaking changes
|
|
124
|
-
|
|
125
|
-
* Removed the `analytic` argument to reflect the [shots
|
|
126
|
-
refactor](https://github.com/PennyLaneAI/pennylane/pull/1079) in PennyLane. Analytic expectation
|
|
127
|
-
values can still be computed by setting `shots=None`.
|
|
128
|
-
[(#21)](https://github.com/PennyLaneAI/pennylane-qulacs/pull/21)
|
|
129
|
-
|
|
130
|
-
### Contributors
|
|
131
|
-
|
|
132
|
-
This release contains contributions from (in alphabetical order):
|
|
133
|
-
|
|
134
|
-
Maria Schuld
|
|
135
|
-
|
|
136
|
-
# Release 0.14.0
|
|
137
|
-
|
|
138
|
-
## Bug fixes
|
|
139
|
-
|
|
140
|
-
* Adjusted the matrix for the `CRZ` operation used internally.
|
|
141
|
-
[(#18)](https://github.com/PennyLaneAI/pennylane-qulacs/pull/18)
|
|
142
|
-
|
|
143
|
-
### Contributors
|
|
144
|
-
|
|
145
|
-
This release contains contributions from (in alphabetical order):
|
|
146
|
-
|
|
147
|
-
Theodor Isacsson, Antal Száva
|
|
148
|
-
|
|
149
|
-
# Release 0.12.0
|
|
150
|
-
|
|
151
|
-
### Improvements
|
|
152
|
-
|
|
153
|
-
* Speeds up the computation of expectation values by using native Qulacs methods.
|
|
154
|
-
[(#12)](https://github.com/PennyLaneAI/pennylane-qulacs/pull/12)
|
|
155
|
-
|
|
156
|
-
### Documentation
|
|
157
|
-
|
|
158
|
-
* Updates the installation instructions, to indicate how to install the PennyLane-Qulacs
|
|
159
|
-
plugin with either the CPU or GPU version of Qulacs.
|
|
160
|
-
[(#14)](https://github.com/PennyLaneAI/pennylane-qulacs/pull/14)
|
|
161
|
-
|
|
162
|
-
* Adds note to the documentation showing how to use multiple OpenMP threads by setting the
|
|
163
|
-
`OMP_NUM_THREADS` environment variable.
|
|
164
|
-
[(#14)](https://github.com/PennyLaneAI/pennylane-qulacs/pull/14)
|
|
165
|
-
|
|
166
|
-
### Contributors
|
|
167
|
-
|
|
168
|
-
This release contains contributions from (in alphabetical order):
|
|
169
|
-
|
|
170
|
-
Theodor Isacsson, Maria Schuld.
|
|
171
|
-
|
|
172
|
-
---
|
|
173
|
-
|
|
174
|
-
# Release 0.11.0
|
|
175
|
-
|
|
176
|
-
Initial public release.
|
|
177
|
-
|
|
178
|
-
### Contributors
|
|
179
|
-
|
|
180
|
-
This release contains contributions from:
|
|
181
|
-
|
|
182
|
-
Theodor Isacsson, Steven Oud, Maria Schuld, Antal Száva
|
|
1
|
+
# Release 0.33.0-dev
|
|
2
|
+
|
|
3
|
+
### New features since last release
|
|
4
|
+
|
|
5
|
+
### Improvements 🛠
|
|
6
|
+
|
|
7
|
+
### Breaking changes 💔
|
|
8
|
+
|
|
9
|
+
* The `qml.QubitStateVector` template has been removed. Instead, use `qml.StatePrep`.
|
|
10
|
+
[(#27)](https://github.com/unitaryfund/pennylane-qrack/pull/27/)
|
|
11
|
+
|
|
12
|
+
### Deprecations 👋
|
|
13
|
+
|
|
14
|
+
### Documentation 📝
|
|
15
|
+
|
|
16
|
+
### Bug fixes 🐛
|
|
17
|
+
|
|
18
|
+
### Contributors ✍️
|
|
19
|
+
|
|
20
|
+
Andrija Paurevic
|
|
21
|
+
|
|
22
|
+
This release contains contributions from (in alphabetical order):
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
# Release 0.32.0
|
|
26
|
+
|
|
27
|
+
### Breaking changes
|
|
28
|
+
|
|
29
|
+
* Support for Python 3.8 has been removed, and support for 3.11 has been added.
|
|
30
|
+
[(#55)](https://github.com/PennyLaneAI/pennylane-qulacs/pull/55)
|
|
31
|
+
|
|
32
|
+
### Improvements
|
|
33
|
+
|
|
34
|
+
* Added support for `qml.StatePrep` as a state preparation operation.
|
|
35
|
+
[(#54)](https://github.com/PennyLaneAI/pennylane-qulacs/pull/54)
|
|
36
|
+
|
|
37
|
+
### Contributors
|
|
38
|
+
|
|
39
|
+
This release contains contributions from (in alphabetical order):
|
|
40
|
+
|
|
41
|
+
Mudit Pandey,
|
|
42
|
+
Jay Soni
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
# Release 0.29.0
|
|
46
|
+
|
|
47
|
+
### Improvements
|
|
48
|
+
|
|
49
|
+
* Removed support for in-place inversion of operations (e.g. `qml.PauliX(0).inv()`). Users should
|
|
50
|
+
use `qml.adjoint` instead.
|
|
51
|
+
[(#46)](https://github.com/PennyLaneAI/pennylane-qulacs/pull/46)
|
|
52
|
+
|
|
53
|
+
### Contributors
|
|
54
|
+
|
|
55
|
+
This release contains contributions from (in alphabetical order):
|
|
56
|
+
|
|
57
|
+
Albert Mitjans Coma
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
# Release 0.28.0
|
|
62
|
+
|
|
63
|
+
### Breaking changes
|
|
64
|
+
|
|
65
|
+
* Removes testing for Python 3.7.
|
|
66
|
+
[(#43)](https://github.com/PennyLaneAI/pennylane-qulacs/pull/43)
|
|
67
|
+
|
|
68
|
+
### Contributors
|
|
69
|
+
|
|
70
|
+
This release contains contributions from (in alphabetical order):
|
|
71
|
+
|
|
72
|
+
Christina Lee
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
# Release 0.24.0
|
|
77
|
+
|
|
78
|
+
### Improvements
|
|
79
|
+
|
|
80
|
+
* Adds the compatibility tag for Python 3.10 and removed it for 3.6.
|
|
81
|
+
[(#31)](https://github.com/PennyLaneAI/pennylane-qulacs/pull/31)
|
|
82
|
+
|
|
83
|
+
### Bug fixes
|
|
84
|
+
|
|
85
|
+
* Defines the missing `returns_state` entry of the `capabilities` dictionary of
|
|
86
|
+
the device.
|
|
87
|
+
[(#36)](https://github.com/PennyLaneAI/pennylane-qulacs/pull/36)
|
|
88
|
+
|
|
89
|
+
* Updates the plugin to be compatible with the use of `Operator.eigvals` as a method.
|
|
90
|
+
[(#35)](https://github.com/PennyLaneAI/pennylane-qulacs/pull/35)
|
|
91
|
+
|
|
92
|
+
### Contributors
|
|
93
|
+
|
|
94
|
+
This release contains contributions from (in alphabetical order):
|
|
95
|
+
|
|
96
|
+
Christina Lee, Antal Száva
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
# Release 0.16.0
|
|
101
|
+
|
|
102
|
+
### Improvements
|
|
103
|
+
|
|
104
|
+
* Adds the compatibility tag for Python 3.9.
|
|
105
|
+
[(#28)](https://github.com/PennyLaneAI/pennylane-qulacs/pull/28)
|
|
106
|
+
|
|
107
|
+
### Bug fixes
|
|
108
|
+
|
|
109
|
+
* Fixed an issue where the wrong results are returned when passing non-consecutive wires to `QubitStateVector`.
|
|
110
|
+
[(#25)](https://github.com/PennyLaneAI/pennylane-qulacs/pull/25)
|
|
111
|
+
|
|
112
|
+
* Fixed issue where a state cannot be loaded into a Qulacs circuit when using a subset of wires with `BasisState`.
|
|
113
|
+
[(#26)](https://github.com/PennyLaneAI/pennylane-qulacs/pull/26)
|
|
114
|
+
|
|
115
|
+
### Contributors
|
|
116
|
+
|
|
117
|
+
This release contains contributions from (in alphabetical order):
|
|
118
|
+
|
|
119
|
+
Theodor Isacsson, Romain Moyard
|
|
120
|
+
|
|
121
|
+
# Release 0.15.0
|
|
122
|
+
|
|
123
|
+
### Breaking changes
|
|
124
|
+
|
|
125
|
+
* Removed the `analytic` argument to reflect the [shots
|
|
126
|
+
refactor](https://github.com/PennyLaneAI/pennylane/pull/1079) in PennyLane. Analytic expectation
|
|
127
|
+
values can still be computed by setting `shots=None`.
|
|
128
|
+
[(#21)](https://github.com/PennyLaneAI/pennylane-qulacs/pull/21)
|
|
129
|
+
|
|
130
|
+
### Contributors
|
|
131
|
+
|
|
132
|
+
This release contains contributions from (in alphabetical order):
|
|
133
|
+
|
|
134
|
+
Maria Schuld
|
|
135
|
+
|
|
136
|
+
# Release 0.14.0
|
|
137
|
+
|
|
138
|
+
## Bug fixes
|
|
139
|
+
|
|
140
|
+
* Adjusted the matrix for the `CRZ` operation used internally.
|
|
141
|
+
[(#18)](https://github.com/PennyLaneAI/pennylane-qulacs/pull/18)
|
|
142
|
+
|
|
143
|
+
### Contributors
|
|
144
|
+
|
|
145
|
+
This release contains contributions from (in alphabetical order):
|
|
146
|
+
|
|
147
|
+
Theodor Isacsson, Antal Száva
|
|
148
|
+
|
|
149
|
+
# Release 0.12.0
|
|
150
|
+
|
|
151
|
+
### Improvements
|
|
152
|
+
|
|
153
|
+
* Speeds up the computation of expectation values by using native Qulacs methods.
|
|
154
|
+
[(#12)](https://github.com/PennyLaneAI/pennylane-qulacs/pull/12)
|
|
155
|
+
|
|
156
|
+
### Documentation
|
|
157
|
+
|
|
158
|
+
* Updates the installation instructions, to indicate how to install the PennyLane-Qulacs
|
|
159
|
+
plugin with either the CPU or GPU version of Qulacs.
|
|
160
|
+
[(#14)](https://github.com/PennyLaneAI/pennylane-qulacs/pull/14)
|
|
161
|
+
|
|
162
|
+
* Adds note to the documentation showing how to use multiple OpenMP threads by setting the
|
|
163
|
+
`OMP_NUM_THREADS` environment variable.
|
|
164
|
+
[(#14)](https://github.com/PennyLaneAI/pennylane-qulacs/pull/14)
|
|
165
|
+
|
|
166
|
+
### Contributors
|
|
167
|
+
|
|
168
|
+
This release contains contributions from (in alphabetical order):
|
|
169
|
+
|
|
170
|
+
Theodor Isacsson, Maria Schuld.
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
# Release 0.11.0
|
|
175
|
+
|
|
176
|
+
Initial public release.
|
|
177
|
+
|
|
178
|
+
### Contributors
|
|
179
|
+
|
|
180
|
+
This release contains contributions from:
|
|
181
|
+
|
|
182
|
+
Theodor Isacsson, Steven Oud, Maria Schuld, Antal Száva
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
cmake_minimum_required(VERSION 3.20)
|
|
2
|
-
|
|
3
|
-
project(qrack_device)
|
|
4
|
-
|
|
5
|
-
if (NOT MSVC)
|
|
6
|
-
set(CMAKE_CXX_STANDARD 20)
|
|
7
|
-
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
8
|
-
|
|
9
|
-
option(ENABLE_OPENCL "Use OpenCL optimizations" ON)
|
|
10
|
-
find_package(OpenCL)
|
|
11
|
-
if ((NOT OpenCL_FOUND) OR (APPLE AND NOT ((${CMAKE_SYSTEM_PROCESSOR} MATCHES "^amd") OR (${CMAKE_SYSTEM_PROCESSOR} MATCHES "^x86_64"))))
|
|
12
|
-
set (ENABLE_OPENCL OFF)
|
|
13
|
-
endif ((NOT OpenCL_FOUND) OR (APPLE AND NOT ((${CMAKE_SYSTEM_PROCESSOR} MATCHES "^amd") OR (${CMAKE_SYSTEM_PROCESSOR} MATCHES "^x86_64"))))
|
|
14
|
-
add_library(qrack_device SHARED pennylane_qrack/qrack_device.cpp)
|
|
15
|
-
target_link_directories(qrack_device PUBLIC ${CMAKE_SOURCE_DIR}/catalyst/runtime/include ${CMAKE_SOURCE_DIR}/qrack/build)
|
|
16
|
-
target_include_directories(qrack_device PUBLIC ${CMAKE_SOURCE_DIR}/catalyst/runtime/include ${CMAKE_SOURCE_DIR}/_qrack_include)
|
|
17
|
-
if (ENABLE_OPENCL)
|
|
18
|
-
if (APPLE)
|
|
19
|
-
target_include_directories(qrack_device PUBLIC ${CMAKE_SOURCE_DIR}/qrack/build/_deps/opencl-headers-src/ ${CMAKE_SOURCE_DIR}/qrack/build/_deps/opencl-clhpp-src/include/)
|
|
20
|
-
target_link_libraries(qrack_device PUBLIC qrack "-framework OpenCL")
|
|
21
|
-
else (APPLE)
|
|
22
|
-
target_link_libraries(qrack_device PUBLIC qrack OpenCL)
|
|
23
|
-
endif (APPLE)
|
|
24
|
-
else (ENABLE_OPENCL)
|
|
25
|
-
target_link_libraries(qrack_device PUBLIC qrack)
|
|
26
|
-
endif (ENABLE_OPENCL)
|
|
27
|
-
set_property(TARGET qrack_device PROPERTY POSITION_INDEPENDENT_CODE ON)
|
|
28
|
-
install(TARGETS qrack_device LIBRARY DESTINATION pennylane_qrack)
|
|
29
|
-
endif (NOT MSVC)
|
|
1
|
+
cmake_minimum_required(VERSION 3.20)
|
|
2
|
+
|
|
3
|
+
project(qrack_device)
|
|
4
|
+
|
|
5
|
+
if (NOT MSVC)
|
|
6
|
+
set(CMAKE_CXX_STANDARD 20)
|
|
7
|
+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
8
|
+
|
|
9
|
+
option(ENABLE_OPENCL "Use OpenCL optimizations" ON)
|
|
10
|
+
find_package(OpenCL)
|
|
11
|
+
if ((NOT OpenCL_FOUND) OR (APPLE AND NOT ((${CMAKE_SYSTEM_PROCESSOR} MATCHES "^amd") OR (${CMAKE_SYSTEM_PROCESSOR} MATCHES "^x86_64"))))
|
|
12
|
+
set (ENABLE_OPENCL OFF)
|
|
13
|
+
endif ((NOT OpenCL_FOUND) OR (APPLE AND NOT ((${CMAKE_SYSTEM_PROCESSOR} MATCHES "^amd") OR (${CMAKE_SYSTEM_PROCESSOR} MATCHES "^x86_64"))))
|
|
14
|
+
add_library(qrack_device SHARED pennylane_qrack/qrack_device.cpp)
|
|
15
|
+
target_link_directories(qrack_device PUBLIC ${CMAKE_SOURCE_DIR}/catalyst/runtime/include ${CMAKE_SOURCE_DIR}/qrack/build)
|
|
16
|
+
target_include_directories(qrack_device PUBLIC ${CMAKE_SOURCE_DIR}/catalyst/runtime/include ${CMAKE_SOURCE_DIR}/_qrack_include)
|
|
17
|
+
if (ENABLE_OPENCL)
|
|
18
|
+
if (APPLE)
|
|
19
|
+
target_include_directories(qrack_device PUBLIC ${CMAKE_SOURCE_DIR}/qrack/build/_deps/opencl-headers-src/ ${CMAKE_SOURCE_DIR}/qrack/build/_deps/opencl-clhpp-src/include/)
|
|
20
|
+
target_link_libraries(qrack_device PUBLIC qrack "-framework OpenCL")
|
|
21
|
+
else (APPLE)
|
|
22
|
+
target_link_libraries(qrack_device PUBLIC qrack OpenCL)
|
|
23
|
+
endif (APPLE)
|
|
24
|
+
else (ENABLE_OPENCL)
|
|
25
|
+
target_link_libraries(qrack_device PUBLIC qrack)
|
|
26
|
+
endif (ENABLE_OPENCL)
|
|
27
|
+
set_property(TARGET qrack_device PROPERTY POSITION_INDEPENDENT_CODE ON)
|
|
28
|
+
install(TARGETS qrack_device LIBRARY DESTINATION pennylane_qrack)
|
|
29
|
+
endif (NOT MSVC)
|