Skip to content

Commit

Permalink
Update device toml specs to schema 2 (#642)
Browse files Browse the repository at this point in the history
* 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 <vincentm@nanoacademic.com>

* 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 <dime10@users.noreply.github.com>

* 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 <rmoyard@gmail.com>

* Update pennylane_lightning/lightning_gpu/lightning_gpu.toml

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* 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 <10773383+maliasadi@users.noreply.github.com>
Co-authored-by: Vincent Michaud-Rioux <vincentm@nanoacademic.com>
Co-authored-by: David Ittah <dime10@users.noreply.github.com>
Co-authored-by: ringo-but-quantum <github-ringo-but-quantum@xanadu.ai>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>
  • Loading branch information
7 people authored May 9, 2024
1 parent a2af361 commit 229359f
Show file tree
Hide file tree
Showing 4 changed files with 249 additions and 301 deletions.
2 changes: 1 addition & 1 deletion pennylane_lightning/core/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
Version number (major.minor.patch[-label])
"""

__version__ = "0.37.0-dev3"
__version__ = "0.37.0-dev4"
180 changes: 81 additions & 99 deletions pennylane_lightning/lightning_gpu/lightning_gpu.toml
Original file line number Diff line number Diff line change
@@ -1,121 +1,103 @@
schema = 1

[device]
name = "lightning.gpu"

[operators]
# Observables supported by the device
observables = [
"PauliX",
"PauliY",
"PauliZ",
"Hadamard",
"Hermitian",
"Identity",
"SparseHamiltonian",
"Hamiltonian",
"Sum",
"SProd",
"Prod",
"Exp",
]
# TODO: verify the contents of this file against what the device reports.
schema = 2

# The union of all gate types listed in this section must match what
# the device considers "supported" through PennyLane's device API.
[[operators.gates]]
native = [
"Identity",
"PauliX",
"PauliY",
"PauliZ",
"Hadamard",
"S",
"T",
"PhaseShift",
"RX",
"RY",
"RZ",
"Rot",
"CNOT",
"CY",
"CZ",
"SWAP",
"CSWAP",
"Toffoli",
"IsingXX",
"IsingXY",
"IsingYY",
"IsingZZ",
"ControlledPhaseShift",
"CRX",
"CRY",
"CRZ",
"CRot",
"SingleExcitation",
"SingleExcitationPlus",
"SingleExcitationMinus",
"DoubleExcitation",
"DoubleExcitationPlus",
"DoubleExcitationMinus",
"MultiRZ",
"QubitUnitary",
"GlobalPhase",
]
[operators.gates.native]

Identity = { properties = [ "differentiable" ] }
PauliX = { properties = [ "differentiable" ] }
PauliY = { properties = [ "differentiable" ] }
PauliZ = { properties = [ "differentiable" ] }
Hadamard = { properties = [ "differentiable" ] }
S = { properties = [ "differentiable" ] }
T = { properties = [ "differentiable" ] }
PhaseShift = { properties = [ "differentiable" ] }
RX = { properties = [ "differentiable" ] }
RY = { properties = [ "differentiable" ] }
RZ = { properties = [ "differentiable" ] }
Rot = { properties = [ "differentiable" ] }
CNOT = { properties = [ "differentiable" ] }
CY = { properties = [ "differentiable" ] }
CZ = { properties = [ "differentiable" ] }
SWAP = { properties = [ "differentiable" ] }
CSWAP = { properties = [ "differentiable" ] }
Toffoli = { properties = [ "differentiable" ] }
IsingXX = { properties = [ "differentiable" ] }
IsingXY = { properties = [ "differentiable" ] }
IsingYY = { properties = [ "differentiable" ] }
IsingZZ = { properties = [ "differentiable" ] }
ControlledPhaseShift = { properties = [ "differentiable" ] }
CRX = { properties = [ "differentiable" ] }
CRY = { properties = [ "differentiable" ] }
CRZ = { properties = [ "differentiable" ] }
CRot = { properties = [ "differentiable" ] }
SingleExcitation = { properties = [ "differentiable" ] }
SingleExcitationPlus = { properties = [ "differentiable" ] }
SingleExcitationMinus = { properties = [ "differentiable" ] }
DoubleExcitation = { properties = [ "differentiable" ] }
DoubleExcitationPlus = { properties = [ "differentiable" ] }
DoubleExcitationMinus = { properties = [ "differentiable" ] }
MultiRZ = { properties = [ "differentiable" ] }
QubitUnitary = { properties = [ "differentiable" ] }
GlobalPhase = { properties = [ "differentiable" ] }

# Operators that should be decomposed according to the algorithm used
# by PennyLane's device API.
# Optional, since gates not listed in this list will typically be decomposed by
# default, but can be useful to express a deviation from this device's regular
# strategy in PennyLane.
decomp = [
"BasisState",
"QFT",
"QubitStateVector",
"StatePrep",
"MultiControlledX",
]
[operators.gates.decomp]

BasisState = {}
QFT = {}
QubitStateVector = {}
StatePrep = {}
MultiControlledX = {}

# Gates which should be translated to QubitUnitary
matrix = [
"ControlledQubitUnitary",
"ECR",
"SX",
"ISWAP",
"PSWAP",
"SISWAP",
"SQISW",
"CPhase",
"OrbitalRotation",
"QubitCarry",
"QubitSum",
"DiagonalQubitUnitary",
"BlockEncode",
]
[operators.gates.matrix]


ControlledQubitUnitary = {}
ECR = {}
SX = {}
ISWAP = {}
PSWAP = {}
SISWAP = {}
SQISW = {}
OrbitalRotation = {}
QubitCarry = {}
QubitSum = {}
DiagonalQubitUnitary = {}
BlockEncode = {}

# Observables supported by the device
[operators.observables]

Identity = {}
PauliX = {}
PauliY = {}
PauliZ = {}
Hadamard = {}
Hermitian = {}
Hamiltonian = {}
SparseHamiltonian = {}

[measurement_processes]
exactshots = [
"Expval",
"Var",
"Probs",
"State",
]
finiteshots = [
"Expval",
"Var",
"Probs",
"Sample",
"Counts",
]

Expval = {}
Var = {}
Probs = {}
State = { condition = [ "analytic" ] }
Sample = { condition = [ "finiteshots" ] }
Counts = { condition = [ "finiteshots" ] }

[compilation]
# If the device is compatible with qjit
qjit_compatible = false
# If the device requires run time generation of the quantum circuit.
runtime_code_generation = false
# If the device supports adjoint
quantum_adjoint = false
# If the device supports quantum control instructions natively
quantum_control = false
# If the device supports mid circuit measurements natively
mid_circuit_measurement = false

Expand Down
Loading

0 comments on commit 229359f

Please sign in to comment.