-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds Catalyst specification files. (#566)
* Adds Catalyst specification files. * Adds path config files. * Add file as a field to the device class. * Changelog. * Just use parent * Apply suggestions from code review Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com> Co-authored-by: Vincent Michaud-Rioux <vincent.michaud-rioux@xanadu.ai> * Rename files. * Remove version. * Add lightning_gpu.toml * Lightning gpu. * Move logic to devices * Update .github/CHANGELOG.md Co-authored-by: Tom Bromley <49409390+trbromley@users.noreply.github.com> * All gates in supported gates are now in the toml file. * Accounting for overlap. * Adds options to lightning_qubit. * Add mid circuit measurement to lightning kokkos. * Update MANIFEST.in Co-authored-by: Vincent Michaud-Rioux <vincent.michaud-rioux@xanadu.ai> * Apply suggestions from code review Co-authored-by: Ali Asadi <quthreads@gmail.com> * Move all matrix gates to decomp * Keep multicontrolledX as matrix gate as that is the current behaviour in Catalyst. * Add toml files with new fields. * New toml * Update toml files. * Update dev version. * Update toml according to maintainers preference. * Move adjoint to native gates. * Move files. * Remove adjoint gates from toml. * Move ControlledQubitUnitary and MultiControlledX to decomp. * Move ControlledQubitUnitary to matrix gate set. --------- Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com> Co-authored-by: Vincent Michaud-Rioux <vincent.michaud-rioux@xanadu.ai> Co-authored-by: Tom Bromley <49409390+trbromley@users.noreply.github.com> Co-authored-by: Ali Asadi <quthreads@gmail.com> Co-authored-by: Lee James O'Riordan <mlxd@users.noreply.github.com>
- Loading branch information
1 parent
8770a96
commit 998362a
Showing
9 changed files
with
388 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
include requirements.txt | ||
include CHANGELOG.rst | ||
include CHANGELOG.rst | ||
include lightning_qubit.toml | ||
include lightning_gpu.toml | ||
include lightning_kokkos.toml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,4 +16,4 @@ | |
Version number (major.minor.patch[-label]) | ||
""" | ||
|
||
__version__ = "0.34.0-dev17" | ||
__version__ = "0.34.0-dev18" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
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", | ||
] | ||
|
||
# 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", | ||
] | ||
|
||
# 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", | ||
] | ||
|
||
# Gates which should be translated to QubitUnitary | ||
matrix = [ | ||
"ControlledQubitUnitary", | ||
"ECR", | ||
"SX", | ||
"ISWAP", | ||
"PSWAP", | ||
"SISWAP", | ||
"SQISW", | ||
"CPhase", | ||
"OrbitalRotation", | ||
"QubitCarry", | ||
"QubitSum", | ||
"DiagonalQubitUnitary", | ||
] | ||
|
||
[measurement_processes] | ||
exactshots = [ | ||
"Expval", | ||
"Var", | ||
"Probs", | ||
"State", | ||
] | ||
finiteshots = [ | ||
"Expval", | ||
"Var", | ||
"Probs", | ||
"Sample", | ||
"Counts", | ||
] | ||
|
||
[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 | ||
|
||
# This field is currently unchecked but it is reserved for the purpose of | ||
# determining if the device supports dynamic qubit allocation/deallocation. | ||
dynamic_qubit_management = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
122 changes: 122 additions & 0 deletions
122
pennylane_lightning/lightning_kokkos/lightning_kokkos.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
schema = 1 | ||
|
||
[device] | ||
name = "lightning.kokkos" | ||
|
||
[operators] | ||
# Observables supported by the device | ||
observables = [ | ||
"PauliX", | ||
"PauliY", | ||
"PauliZ", | ||
"Hadamard", | ||
"Hermitian", | ||
"Identity", | ||
"SparseHamiltonian", | ||
"Hamiltonian", | ||
"Sum", | ||
"SProd", | ||
"Prod", | ||
"Exp", | ||
] | ||
|
||
# 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", | ||
] | ||
|
||
# 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", | ||
"QubitStateVector", | ||
"StatePrep", | ||
"QFT", | ||
"MultiControlledX", | ||
] | ||
|
||
# Gates which should be translated to QubitUnitary | ||
matrix = [ | ||
"ControlledQubitUnitary", | ||
"ECR", | ||
"SX", | ||
"ISWAP", | ||
"PSWAP", | ||
"SISWAP", | ||
"SQISW", | ||
"CPhase", | ||
"OrbitalRotation", | ||
"QubitCarry", | ||
"QubitSum", | ||
"DiagonalQubitUnitary", | ||
] | ||
|
||
[measurement_processes] | ||
exactshots = [ | ||
"Expval", | ||
"Var", | ||
"Probs", | ||
"State", | ||
] | ||
finiteshots = [ | ||
"Expval", | ||
"Var", | ||
"Probs", | ||
"Sample", | ||
"Counts", | ||
] | ||
|
||
[compilation] | ||
# If the device is compatible with qjit | ||
qjit_compatible = true | ||
# If the device requires run time generation of the quantum circuit. | ||
runtime_code_generation = false | ||
# If the device supports adjoint | ||
quantum_adjoint = true | ||
# If the device supports quantum control instructions natively | ||
quantum_control = false | ||
# If the device supports mid circuit measurements natively | ||
mid_circuit_measurement = true | ||
|
||
# This field is currently unchecked but it is reserved for the purpose of | ||
# determining if the device supports dynamic qubit allocation/deallocation. | ||
dynamic_qubit_management = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.