pennylane-qrack 0.24.1__py3-none-win_amd64.whl
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.
- pennylane_qrack/QrackAceDeviceConfig.toml +108 -0
- pennylane_qrack/QrackDeviceConfig.toml +117 -0
- pennylane_qrack/QrackStabilizerDeviceConfig.toml +99 -0
- pennylane_qrack/__init__.py +16 -0
- pennylane_qrack/_version.py +19 -0
- pennylane_qrack/qrack_ace_device.py +447 -0
- pennylane_qrack/qrack_device.cpp +875 -0
- pennylane_qrack/qrack_device.py +744 -0
- pennylane_qrack/qrack_stabilizer_device.py +313 -0
- pennylane_qrack-0.24.1.dist-info/LICENSE +201 -0
- pennylane_qrack-0.24.1.dist-info/METADATA +146 -0
- pennylane_qrack-0.24.1.dist-info/RECORD +15 -0
- pennylane_qrack-0.24.1.dist-info/WHEEL +5 -0
- pennylane_qrack-0.24.1.dist-info/entry_points.txt +4 -0
- pennylane_qrack-0.24.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
schema = 3
|
|
2
|
+
|
|
3
|
+
# The set of all gate types supported at the runtime execution interface of the
|
|
4
|
+
# device, i.e., what is supported by the `execute` method. The gate definitions
|
|
5
|
+
# should have the following format:
|
|
6
|
+
#
|
|
7
|
+
# GATE = { properties = [ PROPS ], conditions = [ CONDS ] }
|
|
8
|
+
#
|
|
9
|
+
# where PROPS and CONS are zero or more comma separated quoted strings.
|
|
10
|
+
#
|
|
11
|
+
# PROPS: additional support provided for each gate.
|
|
12
|
+
# - "controllable": if a controlled version of this gate is supported.
|
|
13
|
+
# - "invertible": if the adjoint of this operation is supported.
|
|
14
|
+
# - "differentiable": if device gradient is supported for this gate.
|
|
15
|
+
# CONDS: constraints on the support for each gate.
|
|
16
|
+
# - "analytic" or "finiteshots": if this operation is only supported in
|
|
17
|
+
# either analytic execution or with shots, respectively.
|
|
18
|
+
#
|
|
19
|
+
[operators.gates]
|
|
20
|
+
|
|
21
|
+
PauliX = { properties = [ "controllable", "invertible" ] }
|
|
22
|
+
PauliY = { properties = [ "controllable", "invertible" ] }
|
|
23
|
+
PauliZ = { properties = [ "controllable", "invertible" ] }
|
|
24
|
+
SX = { properties = [ "invertible" ] }
|
|
25
|
+
MultiRZ = { properties = [ "invertible" ] }
|
|
26
|
+
Hadamard = { properties = [ "invertible" ] }
|
|
27
|
+
S = { properties = [ "invertible" ] }
|
|
28
|
+
T = { properties = [ "invertible" ] }
|
|
29
|
+
CNOT = { properties = [ "invertible" ] }
|
|
30
|
+
SWAP = { properties = [ "invertible" ] }
|
|
31
|
+
ISWAP = { properties = [ "invertible" ] }
|
|
32
|
+
PSWAP = { properties = [ "invertible" ] }
|
|
33
|
+
CY = { properties = [ "invertible" ] }
|
|
34
|
+
CZ = { properties = [ "invertible" ] }
|
|
35
|
+
PhaseShift = { properties = [ "invertible" ] }
|
|
36
|
+
RX = { properties = [ "invertible" ] }
|
|
37
|
+
RY = { properties = [ "invertible" ] }
|
|
38
|
+
RZ = { properties = [ "invertible" ] }
|
|
39
|
+
Rot = { properties = [ "invertible" ] }
|
|
40
|
+
U3 = { properties = [ "invertible" ] }
|
|
41
|
+
Identity = { properties = [ "controllable", "invertible" ] }
|
|
42
|
+
|
|
43
|
+
# Observables supported by the device for measurements. The observables defined
|
|
44
|
+
# in this section should have the following format:
|
|
45
|
+
#
|
|
46
|
+
# OBSERVABLE = { conditions = [ CONDS ] }
|
|
47
|
+
#
|
|
48
|
+
# where CONDS is zero or more comma separated quoted strings, same as above.
|
|
49
|
+
#
|
|
50
|
+
# CONDS: constraints on the support for each observable.
|
|
51
|
+
# - "analytic" or "finiteshots": if this observable is only supported in
|
|
52
|
+
# either analytic execution or with shots, respectively.
|
|
53
|
+
# - "terms-commute": if a composite operator is only supported under the
|
|
54
|
+
# condition that its terms commute.
|
|
55
|
+
#
|
|
56
|
+
[operators.observables]
|
|
57
|
+
|
|
58
|
+
PauliX = {}
|
|
59
|
+
PauliY = {}
|
|
60
|
+
PauliZ = {}
|
|
61
|
+
Identity = {}
|
|
62
|
+
Prod = {}
|
|
63
|
+
# Hadamard = {}
|
|
64
|
+
# Hermitian = {}
|
|
65
|
+
# Projector = {}
|
|
66
|
+
# SparseHamiltonian = {}
|
|
67
|
+
# Hamiltonian = {}
|
|
68
|
+
# Sum = {}
|
|
69
|
+
# SProd = {}
|
|
70
|
+
# Exp = {}
|
|
71
|
+
|
|
72
|
+
# Types of measurement processes supported on the device. The measurements in
|
|
73
|
+
# this section should have the following format:
|
|
74
|
+
#
|
|
75
|
+
# MEASUREMENT_PROCESS = { conditions = [ CONDS ] }
|
|
76
|
+
#
|
|
77
|
+
# where CONDS is zero or more comma separated quoted strings, same as above.
|
|
78
|
+
#
|
|
79
|
+
# CONDS: constraints on the support for each measurement process.
|
|
80
|
+
# - "analytic" or "finiteshots": if this measurement is only supported
|
|
81
|
+
# in either analytic execution or with shots, respectively.
|
|
82
|
+
#
|
|
83
|
+
[measurement_processes]
|
|
84
|
+
|
|
85
|
+
ExpectationMP = { conditions = [ "finiteshots" ] }
|
|
86
|
+
VarianceMP = { conditions = [ "finiteshots" ] }
|
|
87
|
+
ProbabilityMP = { conditions = [ "finiteshots" ] }
|
|
88
|
+
StateMP = { conditions = [ "finiteshots" ] }
|
|
89
|
+
SampleMP = { conditions = [ "finiteshots" ] }
|
|
90
|
+
CountsMP = { conditions = [ "finiteshots" ] }
|
|
91
|
+
|
|
92
|
+
# Additional support that the device may provide that informs the compilation
|
|
93
|
+
# process. All accepted fields and their default values are listed below.
|
|
94
|
+
[compilation]
|
|
95
|
+
|
|
96
|
+
# Whether the device is compatible with qjit.
|
|
97
|
+
qjit_compatible = false
|
|
98
|
+
|
|
99
|
+
# Whether the device requires run time generation of the quantum circuit.
|
|
100
|
+
runtime_code_generation = false
|
|
101
|
+
|
|
102
|
+
# Whether the device supports allocating and releasing qubits during execution.
|
|
103
|
+
dynamic_qubit_management = false
|
|
104
|
+
|
|
105
|
+
# The methods of handling mid-circuit measurements that the device supports,
|
|
106
|
+
# e.g., "one-shot", "tree-traversal", "device", etc. An empty list indicates
|
|
107
|
+
# that the device does not support mid-circuit measurements.
|
|
108
|
+
supported_mcm_methods = [ "device", "one-shot" ]
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
schema = 3
|
|
2
|
+
|
|
3
|
+
# The set of all gate types supported at the runtime execution interface of the
|
|
4
|
+
# device, i.e., what is supported by the `execute` method. The gate definitions
|
|
5
|
+
# should have the following format:
|
|
6
|
+
#
|
|
7
|
+
# GATE = { properties = [ PROPS ], conditions = [ CONDS ] }
|
|
8
|
+
#
|
|
9
|
+
# where PROPS and CONS are zero or more comma separated quoted strings.
|
|
10
|
+
#
|
|
11
|
+
# PROPS: additional support provided for each gate.
|
|
12
|
+
# - "controllable": if a controlled version of this gate is supported.
|
|
13
|
+
# - "invertible": if the adjoint of this operation is supported.
|
|
14
|
+
# - "differentiable": if device gradient is supported for this gate.
|
|
15
|
+
# CONDS: constraints on the support for each gate.
|
|
16
|
+
# - "analytic" or "finiteshots": if this operation is only supported in
|
|
17
|
+
# either analytic execution or with shots, respectively.
|
|
18
|
+
#
|
|
19
|
+
[operators.gates]
|
|
20
|
+
|
|
21
|
+
PauliX = { properties = [ "controllable", "invertible" ] }
|
|
22
|
+
PauliY = { properties = [ "controllable", "invertible" ] }
|
|
23
|
+
PauliZ = { properties = [ "controllable", "invertible" ] }
|
|
24
|
+
SX = { properties = [ "controllable", "invertible" ] }
|
|
25
|
+
MultiRZ = { properties = [ "controllable", "invertible" ] }
|
|
26
|
+
Hadamard = { properties = [ "controllable", "invertible" ] }
|
|
27
|
+
S = { properties = [ "controllable", "invertible" ] }
|
|
28
|
+
T = { properties = [ "controllable", "invertible" ] }
|
|
29
|
+
CNOT = { properties = [ "controllable", "invertible" ] }
|
|
30
|
+
SWAP = { properties = [ "controllable", "invertible" ] }
|
|
31
|
+
CSWAP = { properties = [ "controllable", "invertible" ] }
|
|
32
|
+
ISWAP = { properties = [ "controllable", "invertible" ] }
|
|
33
|
+
PSWAP = { properties = [ "controllable", "invertible" ] }
|
|
34
|
+
Toffoli = { properties = [ "controllable", "invertible" ] }
|
|
35
|
+
CY = { properties = [ "controllable", "invertible" ] }
|
|
36
|
+
CZ = { properties = [ "controllable", "invertible" ] }
|
|
37
|
+
PhaseShift = { properties = [ "controllable", "invertible" ] }
|
|
38
|
+
ControlledPhaseShift = { properties = [ "controllable", "invertible" ] }
|
|
39
|
+
CPhase = { properties = [ "controllable", "invertible" ] }
|
|
40
|
+
RX = { properties = [ "controllable", "invertible" ] }
|
|
41
|
+
RY = { properties = [ "controllable", "invertible" ] }
|
|
42
|
+
RZ = { properties = [ "controllable", "invertible" ] }
|
|
43
|
+
Rot = { properties = [ "controllable", "invertible" ] }
|
|
44
|
+
CRX = { properties = [ "controllable", "invertible" ] }
|
|
45
|
+
CRY = { properties = [ "controllable", "invertible" ] }
|
|
46
|
+
CRZ = { properties = [ "controllable", "invertible" ] }
|
|
47
|
+
CRot = { properties = [ "controllable", "invertible" ] }
|
|
48
|
+
U3 = { properties = [ "controllable", "invertible" ] }
|
|
49
|
+
MultiControlledX = { properties = [ "controllable", "invertible" ] }
|
|
50
|
+
Identity = { properties = [ "controllable", "invertible" ] }
|
|
51
|
+
|
|
52
|
+
# Observables supported by the device for measurements. The observables defined
|
|
53
|
+
# in this section should have the following format:
|
|
54
|
+
#
|
|
55
|
+
# OBSERVABLE = { conditions = [ CONDS ] }
|
|
56
|
+
#
|
|
57
|
+
# where CONDS is zero or more comma separated quoted strings, same as above.
|
|
58
|
+
#
|
|
59
|
+
# CONDS: constraints on the support for each observable.
|
|
60
|
+
# - "analytic" or "finiteshots": if this observable is only supported in
|
|
61
|
+
# either analytic execution or with shots, respectively.
|
|
62
|
+
# - "terms-commute": if a composite operator is only supported under the
|
|
63
|
+
# condition that its terms commute.
|
|
64
|
+
#
|
|
65
|
+
[operators.observables]
|
|
66
|
+
|
|
67
|
+
PauliX = {}
|
|
68
|
+
PauliY = {}
|
|
69
|
+
PauliZ = {}
|
|
70
|
+
Identity = {}
|
|
71
|
+
Prod = {}
|
|
72
|
+
# Hadamard = {}
|
|
73
|
+
# Hermitian = {}
|
|
74
|
+
# Projector = {}
|
|
75
|
+
# SparseHamiltonian = {}
|
|
76
|
+
# Hamiltonian = {}
|
|
77
|
+
# Sum = {}
|
|
78
|
+
# SProd = {}
|
|
79
|
+
# Exp = {}
|
|
80
|
+
|
|
81
|
+
# Types of measurement processes supported on the device. The measurements in
|
|
82
|
+
# this section should have the following format:
|
|
83
|
+
#
|
|
84
|
+
# MEASUREMENT_PROCESS = { conditions = [ CONDS ] }
|
|
85
|
+
#
|
|
86
|
+
# where CONDS is zero or more comma separated quoted strings, same as above.
|
|
87
|
+
#
|
|
88
|
+
# CONDS: constraints on the support for each measurement process.
|
|
89
|
+
# - "analytic" or "finiteshots": if this measurement is only supported
|
|
90
|
+
# in either analytic execution or with shots, respectively.
|
|
91
|
+
#
|
|
92
|
+
[measurement_processes]
|
|
93
|
+
|
|
94
|
+
ExpectationMP = { conditions = [ "analytic" ] }
|
|
95
|
+
VarianceMP = { conditions = [ "analytic" ] }
|
|
96
|
+
ProbabilityMP = { conditions = [ "analytic" ] }
|
|
97
|
+
StateMP = { conditions = [ "analytic" ] }
|
|
98
|
+
SampleMP = { conditions = [ "finiteshots" ] }
|
|
99
|
+
CountsMP = { conditions = [ "finiteshots" ] }
|
|
100
|
+
|
|
101
|
+
# Additional support that the device may provide that informs the compilation
|
|
102
|
+
# process. All accepted fields and their default values are listed below.
|
|
103
|
+
[compilation]
|
|
104
|
+
|
|
105
|
+
# Whether the device is compatible with qjit.
|
|
106
|
+
qjit_compatible = true
|
|
107
|
+
|
|
108
|
+
# Whether the device requires run time generation of the quantum circuit.
|
|
109
|
+
runtime_code_generation = false
|
|
110
|
+
|
|
111
|
+
# Whether the device supports allocating and releasing qubits during execution.
|
|
112
|
+
dynamic_qubit_management = true
|
|
113
|
+
|
|
114
|
+
# The methods of handling mid-circuit measurements that the device supports,
|
|
115
|
+
# e.g., "one-shot", "tree-traversal", "device", etc. An empty list indicates
|
|
116
|
+
# that the device does not support mid-circuit measurements.
|
|
117
|
+
supported_mcm_methods = [ "device", "one-shot" ]
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
schema = 3
|
|
2
|
+
|
|
3
|
+
# The set of all gate types supported at the runtime execution interface of the
|
|
4
|
+
# device, i.e., what is supported by the `execute` method. The gate definitions
|
|
5
|
+
# should have the following format:
|
|
6
|
+
#
|
|
7
|
+
# GATE = { properties = [ PROPS ], conditions = [ CONDS ] }
|
|
8
|
+
#
|
|
9
|
+
# where PROPS and CONS are zero or more comma separated quoted strings.
|
|
10
|
+
#
|
|
11
|
+
# PROPS: additional support provided for each gate.
|
|
12
|
+
# - "controllable": if a controlled version of this gate is supported.
|
|
13
|
+
# - "invertible": if the adjoint of this operation is supported.
|
|
14
|
+
# - "differentiable": if device gradient is supported for this gate.
|
|
15
|
+
# CONDS: constraints on the support for each gate.
|
|
16
|
+
# - "analytic" or "finiteshots": if this operation is only supported in
|
|
17
|
+
# either analytic execution or with shots, respectively.
|
|
18
|
+
#
|
|
19
|
+
[operators.gates]
|
|
20
|
+
|
|
21
|
+
PauliX = { properties = [ "controllable", "invertible" ] }
|
|
22
|
+
PauliY = { properties = [ "controllable", "invertible" ] }
|
|
23
|
+
PauliZ = { properties = [ "controllable", "invertible" ] }
|
|
24
|
+
Hadamard = { properties = [ "invertible" ] }
|
|
25
|
+
S = { properties = [ "invertible" ] }
|
|
26
|
+
CNOT = { properties = [ "invertible" ] }
|
|
27
|
+
SWAP = { properties = [ "invertible" ] }
|
|
28
|
+
ISWAP = { properties = [ "invertible" ] }
|
|
29
|
+
PSWAP = { properties = [ "invertible" ] }
|
|
30
|
+
CY = { properties = [ "invertible" ] }
|
|
31
|
+
CZ = { properties = [ "invertible" ] }
|
|
32
|
+
Identity = { properties = [ "controllable", "invertible" ] }
|
|
33
|
+
|
|
34
|
+
# Observables supported by the device for measurements. The observables defined
|
|
35
|
+
# in this section should have the following format:
|
|
36
|
+
#
|
|
37
|
+
# OBSERVABLE = { conditions = [ CONDS ] }
|
|
38
|
+
#
|
|
39
|
+
# where CONDS is zero or more comma separated quoted strings, same as above.
|
|
40
|
+
#
|
|
41
|
+
# CONDS: constraints on the support for each observable.
|
|
42
|
+
# - "analytic" or "finiteshots": if this observable is only supported in
|
|
43
|
+
# either analytic execution or with shots, respectively.
|
|
44
|
+
# - "terms-commute": if a composite operator is only supported under the
|
|
45
|
+
# condition that its terms commute.
|
|
46
|
+
#
|
|
47
|
+
[operators.observables]
|
|
48
|
+
|
|
49
|
+
PauliX = {}
|
|
50
|
+
PauliY = {}
|
|
51
|
+
PauliZ = {}
|
|
52
|
+
Identity = {}
|
|
53
|
+
Prod = {}
|
|
54
|
+
# Hadamard = {}
|
|
55
|
+
# Hermitian = {}
|
|
56
|
+
# Projector = {}
|
|
57
|
+
# SparseHamiltonian = {}
|
|
58
|
+
# Hamiltonian = {}
|
|
59
|
+
# Sum = {}
|
|
60
|
+
# SProd = {}
|
|
61
|
+
# Exp = {}
|
|
62
|
+
|
|
63
|
+
# Types of measurement processes supported on the device. The measurements in
|
|
64
|
+
# this section should have the following format:
|
|
65
|
+
#
|
|
66
|
+
# MEASUREMENT_PROCESS = { conditions = [ CONDS ] }
|
|
67
|
+
#
|
|
68
|
+
# where CONDS is zero or more comma separated quoted strings, same as above.
|
|
69
|
+
#
|
|
70
|
+
# CONDS: constraints on the support for each measurement process.
|
|
71
|
+
# - "analytic" or "finiteshots": if this measurement is only supported
|
|
72
|
+
# in either analytic execution or with shots, respectively.
|
|
73
|
+
#
|
|
74
|
+
[measurement_processes]
|
|
75
|
+
|
|
76
|
+
ExpectationMP = { conditions = [ "analytic" ] }
|
|
77
|
+
VarianceMP = { conditions = [ "analytic" ] }
|
|
78
|
+
ProbabilityMP = { conditions = [ "analytic" ] }
|
|
79
|
+
StateMP = { conditions = [ "analytic" ] }
|
|
80
|
+
SampleMP = { conditions = [ "finiteshots" ] }
|
|
81
|
+
CountsMP = { conditions = [ "finiteshots" ] }
|
|
82
|
+
|
|
83
|
+
# Additional support that the device may provide that informs the compilation
|
|
84
|
+
# process. All accepted fields and their default values are listed below.
|
|
85
|
+
[compilation]
|
|
86
|
+
|
|
87
|
+
# Whether the device is compatible with qjit.
|
|
88
|
+
qjit_compatible = false
|
|
89
|
+
|
|
90
|
+
# Whether the device requires run time generation of the quantum circuit.
|
|
91
|
+
runtime_code_generation = false
|
|
92
|
+
|
|
93
|
+
# Whether the device supports allocating and releasing qubits during execution.
|
|
94
|
+
dynamic_qubit_management = false
|
|
95
|
+
|
|
96
|
+
# The methods of handling mid-circuit measurements that the device supports,
|
|
97
|
+
# e.g., "one-shot", "tree-traversal", "device", etc. An empty list indicates
|
|
98
|
+
# that the device does not support mid-circuit measurements.
|
|
99
|
+
supported_mcm_methods = [ "device", "one-shot" ]
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Copyright 2022 Xanadu Quantum Technologies Inc.
|
|
2
|
+
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
"""PennyLane-Qrack plugin (no public API)"""
|
|
16
|
+
from ._version import __version__
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Copyright 2022 Xanadu Quantum Technologies Inc.
|
|
2
|
+
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
"""Version information.
|
|
16
|
+
Version number (major.minor.patch[-label])
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
__version__ = "0.24.1"
|