Skip to content

Commit 229359f

Browse files
sergei-mironovgithub-actions[bot]maliasadivincentmrdime10
authored
Update device toml specs to schema 2 (#642)
* Update device toml specs * Auto update version * Auto update version * Fix missing Projector observable in the PL/kokkos device * Auto update version * Update formatting * Remove Projector from lightning_qubit.toml as this is not natively supported in this device * Remove non-native observables * Auto update version * trigger ci * Update pennylane_lightning/lightning_kokkos/lightning_kokkos.toml Co-authored-by: Vincent Michaud-Rioux <[email protected]> * Update obs order in toml * trigger ci * Auto update version * Auto update version * trigger ci * Auto update version * Apply review suggestions: mark Rot/QubitUnitary as non-differentiable * Apply review suggestions: mark Rot/QubitUnitary as non-differentiable * Auto update version * Auto update version * Update pennylane_lightning/lightning_kokkos/lightning_kokkos.toml Co-authored-by: David Ittah <[email protected]> * Auto update version * Address review suggestions: declare kokkos observables as differentiable * Update cuda quantum toml file * Auto update version from '0.36.0-dev30' to '0.36.0-dev36' * Update lightning_gpu toml file * Run Catalyst check; put a number of fixmes * Update pennylane_lightning/lightning_qubit/lightning_qubit.toml Co-authored-by: Romain Moyard <[email protected]> * Update pennylane_lightning/lightning_gpu/lightning_gpu.toml Co-authored-by: Romain Moyard <[email protected]> * Auto update version from '0.36.0-dev36' to '0.36.0-dev46' * Auto update version from '0.36.0-dev45' to '0.36.0-dev46' * Add a todo notice * Move CPhase close to ControlledPhaseShitf * Auto update version from '0.36.0-dev46' to '0.36.0-dev47' * Remove fixmes * Remove CPhase and mark GlobalPhase as non-controllable on kokkos * Auto update version from '0.36.0-dev47' to '0.36.0-dev48' * Auto update version from '0.36.0-dev48' to '0.36.0-dev49' --------- Co-authored-by: Dev version update bot <github-actions[bot]@users.noreply.github.com> Co-authored-by: Ali Asadi <[email protected]> Co-authored-by: Vincent Michaud-Rioux <[email protected]> Co-authored-by: David Ittah <[email protected]> Co-authored-by: ringo-but-quantum <[email protected]> Co-authored-by: Romain Moyard <[email protected]>
1 parent a2af361 commit 229359f

File tree

4 files changed

+249
-301
lines changed

4 files changed

+249
-301
lines changed

pennylane_lightning/core/_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
Version number (major.minor.patch[-label])
1717
"""
1818

19-
__version__ = "0.37.0-dev3"
19+
__version__ = "0.37.0-dev4"

pennylane_lightning/lightning_gpu/lightning_gpu.toml

+81-99
Original file line numberDiff line numberDiff line change
@@ -1,121 +1,103 @@
1-
schema = 1
2-
3-
[device]
4-
name = "lightning.gpu"
5-
6-
[operators]
7-
# Observables supported by the device
8-
observables = [
9-
"PauliX",
10-
"PauliY",
11-
"PauliZ",
12-
"Hadamard",
13-
"Hermitian",
14-
"Identity",
15-
"SparseHamiltonian",
16-
"Hamiltonian",
17-
"Sum",
18-
"SProd",
19-
"Prod",
20-
"Exp",
21-
]
1+
# TODO: verify the contents of this file against what the device reports.
2+
schema = 2
223

234
# The union of all gate types listed in this section must match what
245
# the device considers "supported" through PennyLane's device API.
25-
[[operators.gates]]
26-
native = [
27-
"Identity",
28-
"PauliX",
29-
"PauliY",
30-
"PauliZ",
31-
"Hadamard",
32-
"S",
33-
"T",
34-
"PhaseShift",
35-
"RX",
36-
"RY",
37-
"RZ",
38-
"Rot",
39-
"CNOT",
40-
"CY",
41-
"CZ",
42-
"SWAP",
43-
"CSWAP",
44-
"Toffoli",
45-
"IsingXX",
46-
"IsingXY",
47-
"IsingYY",
48-
"IsingZZ",
49-
"ControlledPhaseShift",
50-
"CRX",
51-
"CRY",
52-
"CRZ",
53-
"CRot",
54-
"SingleExcitation",
55-
"SingleExcitationPlus",
56-
"SingleExcitationMinus",
57-
"DoubleExcitation",
58-
"DoubleExcitationPlus",
59-
"DoubleExcitationMinus",
60-
"MultiRZ",
61-
"QubitUnitary",
62-
"GlobalPhase",
63-
]
6+
[operators.gates.native]
7+
8+
Identity = { properties = [ "differentiable" ] }
9+
PauliX = { properties = [ "differentiable" ] }
10+
PauliY = { properties = [ "differentiable" ] }
11+
PauliZ = { properties = [ "differentiable" ] }
12+
Hadamard = { properties = [ "differentiable" ] }
13+
S = { properties = [ "differentiable" ] }
14+
T = { properties = [ "differentiable" ] }
15+
PhaseShift = { properties = [ "differentiable" ] }
16+
RX = { properties = [ "differentiable" ] }
17+
RY = { properties = [ "differentiable" ] }
18+
RZ = { properties = [ "differentiable" ] }
19+
Rot = { properties = [ "differentiable" ] }
20+
CNOT = { properties = [ "differentiable" ] }
21+
CY = { properties = [ "differentiable" ] }
22+
CZ = { properties = [ "differentiable" ] }
23+
SWAP = { properties = [ "differentiable" ] }
24+
CSWAP = { properties = [ "differentiable" ] }
25+
Toffoli = { properties = [ "differentiable" ] }
26+
IsingXX = { properties = [ "differentiable" ] }
27+
IsingXY = { properties = [ "differentiable" ] }
28+
IsingYY = { properties = [ "differentiable" ] }
29+
IsingZZ = { properties = [ "differentiable" ] }
30+
ControlledPhaseShift = { properties = [ "differentiable" ] }
31+
CRX = { properties = [ "differentiable" ] }
32+
CRY = { properties = [ "differentiable" ] }
33+
CRZ = { properties = [ "differentiable" ] }
34+
CRot = { properties = [ "differentiable" ] }
35+
SingleExcitation = { properties = [ "differentiable" ] }
36+
SingleExcitationPlus = { properties = [ "differentiable" ] }
37+
SingleExcitationMinus = { properties = [ "differentiable" ] }
38+
DoubleExcitation = { properties = [ "differentiable" ] }
39+
DoubleExcitationPlus = { properties = [ "differentiable" ] }
40+
DoubleExcitationMinus = { properties = [ "differentiable" ] }
41+
MultiRZ = { properties = [ "differentiable" ] }
42+
QubitUnitary = { properties = [ "differentiable" ] }
43+
GlobalPhase = { properties = [ "differentiable" ] }
6444

6545
# Operators that should be decomposed according to the algorithm used
6646
# by PennyLane's device API.
6747
# Optional, since gates not listed in this list will typically be decomposed by
6848
# default, but can be useful to express a deviation from this device's regular
6949
# strategy in PennyLane.
70-
decomp = [
71-
"BasisState",
72-
"QFT",
73-
"QubitStateVector",
74-
"StatePrep",
75-
"MultiControlledX",
76-
]
50+
[operators.gates.decomp]
51+
52+
BasisState = {}
53+
QFT = {}
54+
QubitStateVector = {}
55+
StatePrep = {}
56+
MultiControlledX = {}
7757

7858
# Gates which should be translated to QubitUnitary
79-
matrix = [
80-
"ControlledQubitUnitary",
81-
"ECR",
82-
"SX",
83-
"ISWAP",
84-
"PSWAP",
85-
"SISWAP",
86-
"SQISW",
87-
"CPhase",
88-
"OrbitalRotation",
89-
"QubitCarry",
90-
"QubitSum",
91-
"DiagonalQubitUnitary",
92-
"BlockEncode",
93-
]
59+
[operators.gates.matrix]
60+
61+
62+
ControlledQubitUnitary = {}
63+
ECR = {}
64+
SX = {}
65+
ISWAP = {}
66+
PSWAP = {}
67+
SISWAP = {}
68+
SQISW = {}
69+
OrbitalRotation = {}
70+
QubitCarry = {}
71+
QubitSum = {}
72+
DiagonalQubitUnitary = {}
73+
BlockEncode = {}
74+
75+
# Observables supported by the device
76+
[operators.observables]
77+
78+
Identity = {}
79+
PauliX = {}
80+
PauliY = {}
81+
PauliZ = {}
82+
Hadamard = {}
83+
Hermitian = {}
84+
Hamiltonian = {}
85+
SparseHamiltonian = {}
9486

9587
[measurement_processes]
96-
exactshots = [
97-
"Expval",
98-
"Var",
99-
"Probs",
100-
"State",
101-
]
102-
finiteshots = [
103-
"Expval",
104-
"Var",
105-
"Probs",
106-
"Sample",
107-
"Counts",
108-
]
88+
89+
Expval = {}
90+
Var = {}
91+
Probs = {}
92+
State = { condition = [ "analytic" ] }
93+
Sample = { condition = [ "finiteshots" ] }
94+
Counts = { condition = [ "finiteshots" ] }
10995

11096
[compilation]
11197
# If the device is compatible with qjit
11298
qjit_compatible = false
11399
# If the device requires run time generation of the quantum circuit.
114100
runtime_code_generation = false
115-
# If the device supports adjoint
116-
quantum_adjoint = false
117-
# If the device supports quantum control instructions natively
118-
quantum_control = false
119101
# If the device supports mid circuit measurements natively
120102
mid_circuit_measurement = false
121103

0 commit comments

Comments
 (0)