Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a base LKokkos new device API backend. #810

Merged
merged 113 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
93a52bf
Create a base with mock simulate, jacobian, simulate_and_jacobian, v…
LuisAlfredoNu Jul 22, 2024
feca914
Auto update version from '0.38.0-dev12' to '0.38.0-dev13'
ringo-but-quantum Jul 22, 2024
5ccf20c
Apply format
LuisAlfredoNu Jul 22, 2024
bcf961e
Solve issue with measurenment class
LuisAlfredoNu Jul 22, 2024
5701cc5
Merge branch 'kokkosNewAPI_backend' of github.com:PennyLaneAI/pennyla…
LuisAlfredoNu Jul 22, 2024
2e4e668
solve warnings from Pylint
LuisAlfredoNu Jul 22, 2024
3ee9669
solve warnings from Pylint
LuisAlfredoNu Jul 22, 2024
0e717f6
Apply format
LuisAlfredoNu Jul 22, 2024
42b6714
Skip test native mcm for Kokkos because has a bug with reference to o…
LuisAlfredoNu Jul 22, 2024
27c7ebc
Set the base class for LightningDevice and skip the tests
LuisAlfredoNu Jul 23, 2024
fd02214
Apply format
LuisAlfredoNu Jul 23, 2024
14b4964
apply format
LuisAlfredoNu Jul 24, 2024
369ac0e
Merge branch 'master' into kokkosNewAPI_backend
LuisAlfredoNu Jul 24, 2024
04283f9
Auto update version from '0.38.0-dev13' to '0.38.0-dev14'
ringo-but-quantum Jul 24, 2024
8d40c14
Apply suggestions from code review
LuisAlfredoNu Jul 24, 2024
44751ee
Fix spelling error
LuisAlfredoNu Jul 24, 2024
d17059d
Auto update version from '0.38.0-dev14' to '0.38.0-dev17'
ringo-but-quantum Jul 24, 2024
e8de485
Merge branch 'master' into kokkosNewAPI_backend
LuisAlfredoNu Jul 24, 2024
79b6bbe
Auto update version from '0.38.0-dev16' to '0.38.0-dev17'
ringo-but-quantum Jul 24, 2024
f34100b
Delete the unnecessary code for the backend
LuisAlfredoNu Jul 24, 2024
bcd323e
Delete the unnecessary functions up to now
LuisAlfredoNu Jul 24, 2024
a54ab3f
Merge branch 'master' into kokkosNewAPI_backend
LuisAlfredoNu Jul 26, 2024
39fb65f
Auto update version from '0.38.0-dev18' to '0.38.0-dev19'
ringo-but-quantum Jul 26, 2024
8dc5004
Merge branch 'master' into kokkosNewAPI_backend
LuisAlfredoNu Jul 29, 2024
90d1d6e
Auto update version from '0.38.0-dev19' to '0.38.0-dev20'
ringo-but-quantum Jul 29, 2024
80277d9
Add the simulate class for the new device (#817)
LuisAlfredoNu Jul 30, 2024
a15b018
Auto update version from '0.38.0-dev20' to '0.38.0-dev21'
ringo-but-quantum Jul 30, 2024
09d02dc
Merge branch 'master' into kokkosNewAPI_backend
LuisAlfredoNu Jul 30, 2024
06a8d2b
Auto update version from '0.38.0-dev20' to '0.38.0-dev21'
ringo-but-quantum Jul 30, 2024
aa052ad
Merge branch 'master' into kokkosNewAPI_backend
LuisAlfredoNu Aug 1, 2024
180a065
Auto update version from '0.38.0-dev21' to '0.38.0-dev22'
ringo-but-quantum Aug 1, 2024
6eb6eba
Merge branch 'master' into kokkosNewAPI_backend
LuisAlfredoNu Aug 2, 2024
319cacc
Auto update version from '0.38.0-dev22' to '0.38.0-dev23'
ringo-but-quantum Aug 2, 2024
5b99da7
Add the support class for the Adjoint Jacobian to the new device (#829)
LuisAlfredoNu Aug 2, 2024
3eea0d1
Auto update version from '0.38.0-dev23' to '0.38.0-dev25'
ringo-but-quantum Aug 2, 2024
35bcab6
Merge branch 'master' into kokkosNewAPI_backend
LuisAlfredoNu Aug 5, 2024
3588b9d
Auto update version from '0.38.0-dev25' to '0.38.0-dev26'
ringo-but-quantum Aug 5, 2024
f9ab86f
Add (check) full support for sampling in full parity with Lightning (…
LuisAlfredoNu Aug 9, 2024
0d1dd71
Auto update version from '0.38.0-dev26' to '0.38.0-dev27'
ringo-but-quantum Aug 9, 2024
ac9ed86
Merge branch 'master' into kokkosNewAPI_backend
LuisAlfredoNu Aug 9, 2024
9a20ee1
Auto update version from '0.38.0-dev26' to '0.38.0-dev27'
ringo-but-quantum Aug 9, 2024
244e0a1
Merge branch 'master' into kokkosNewAPI_backend
LuisAlfredoNu Aug 12, 2024
873656c
Auto update version from '0.38.0-dev28' to '0.38.0-dev29'
ringo-but-quantum Aug 12, 2024
fe0954a
Update unit/integration tests for the new device (#840)
LuisAlfredoNu Aug 13, 2024
286ea30
Merge branch 'master' into kokkosNewAPI_backend
LuisAlfredoNu Aug 13, 2024
3cb37be
Auto update version from '0.38.0-dev32' to '0.38.0-dev33'
ringo-but-quantum Aug 13, 2024
1bd9adc
Solve conflict with master
LuisAlfredoNu Aug 13, 2024
9ebbefc
check pylint
LuisAlfredoNu Aug 13, 2024
86316bc
trigger CIs
LuisAlfredoNu Aug 13, 2024
5c6b97d
trigger CIs
LuisAlfredoNu Aug 14, 2024
0293b29
remove verbose from CI kcuda
LuisAlfredoNu Aug 14, 2024
e310fef
Update CHANGELOG
LuisAlfredoNu Aug 14, 2024
9478c50
Merge branch 'master' into kokkosNewAPI_backend
LuisAlfredoNu Aug 14, 2024
bbc6448
Auto update version from '0.38.0-dev33' to '0.38.0-dev34'
ringo-but-quantum Aug 14, 2024
b586e21
Apply suggestions from code review - remove debug comments
LuisAlfredoNu Aug 15, 2024
00b6eb6
Auto update version from '0.38.0-dev34' to '0.38.0-dev35'
ringo-but-quantum Aug 15, 2024
3f3a48d
Merge branch 'master' into kokkosNewAPI_backend
LuisAlfredoNu Aug 15, 2024
84795f5
Auto update version from '0.38.0-dev34' to '0.38.0-dev35'
ringo-but-quantum Aug 15, 2024
6dbb9fe
Merge branch 'master' into kokkosNewAPI_backend
LuisAlfredoNu Aug 19, 2024
620a021
Auto update version from '0.38.0-dev37' to '0.38.0-dev38'
ringo-but-quantum Aug 19, 2024
7ae3360
Apply Amintor's commests
LuisAlfredoNu Aug 19, 2024
4a91c6f
Apply format
LuisAlfredoNu Aug 19, 2024
ebc503c
Merge branch 'master' into kokkosNewAPI_backend
LuisAlfredoNu Aug 20, 2024
c93f1c5
Auto update version from '0.38.0-dev38' to '0.38.0-dev39'
ringo-but-quantum Aug 20, 2024
519ce4a
Merge branch 'master' into kokkosNewAPI_backend
LuisAlfredoNu Aug 21, 2024
794c166
Auto update version from '0.38.0-dev39' to '0.38.0-dev40'
ringo-but-quantum Aug 21, 2024
168a406
Merge branch 'master' into kokkosNewAPI_backend
LuisAlfredoNu Aug 21, 2024
63ee6fd
fix issues with the unitary tests
LuisAlfredoNu Aug 21, 2024
3608945
Auto update version from '0.38.0-dev40' to '0.38.0-dev41'
ringo-but-quantum Aug 21, 2024
2ce52c3
Apply format
LuisAlfredoNu Aug 21, 2024
9bcd0fc
Merge branch 'kokkosNewAPI_backend' of github.com:PennyLaneAI/pennyla…
LuisAlfredoNu Aug 21, 2024
a8f4ec2
Using the attribute new_API
LuisAlfredoNu Aug 21, 2024
cc67c16
Auto update version from '0.38.0-dev41' to '0.38.0-dev42'
ringo-but-quantum Aug 21, 2024
81fd864
Merge branch 'master' into kokkosNewAPI_backend
LuisAlfredoNu Aug 21, 2024
c0d6e11
Auto update version from '0.38.0-dev41' to '0.38.0-dev42'
ringo-but-quantum Aug 21, 2024
330cc9c
Using the attribute new_API
LuisAlfredoNu Aug 21, 2024
e59baa1
Using the attribute new_API
LuisAlfredoNu Aug 21, 2024
c41b69a
Delete commented line
LuisAlfredoNu Aug 22, 2024
ee2c01a
Auto update version from '0.38.0-dev42' to '0.38.0-dev43'
ringo-but-quantum Aug 22, 2024
b1d4cad
Using the attribute new_API
LuisAlfredoNu Aug 22, 2024
32cf4a6
Using the attribute new_API
LuisAlfredoNu Aug 22, 2024
57dfbca
Merge branch 'master' into kokkosNewAPI_backend
LuisAlfredoNu Aug 22, 2024
d046ad9
Auto update version from '0.38.0-dev42' to '0.38.0-dev43'
ringo-but-quantum Aug 22, 2024
c2079f9
Changes from PR review
LuisAlfredoNu Aug 22, 2024
2a7e58a
Merge branch 'kokkosNewAPI_backend' of github.com:PennyLaneAI/pennyla…
LuisAlfredoNu Aug 22, 2024
3402e10
apply format
LuisAlfredoNu Aug 22, 2024
cc0f209
reduce the number of shots for testing and add class definitons on co…
LuisAlfredoNu Aug 23, 2024
8d5e198
Merge branch 'master' into kokkosNewAPI_backend
LuisAlfredoNu Aug 23, 2024
aa98b93
Auto update version from '0.38.0-dev47' to '0.38.0-dev48'
ringo-but-quantum Aug 23, 2024
e706192
Merge branch 'kokkosNewAPI_backend' of github.com:PennyLaneAI/pennyla…
LuisAlfredoNu Aug 23, 2024
5aced15
apply format
LuisAlfredoNu Aug 23, 2024
4ed563a
solve complains about CodeFactor
LuisAlfredoNu Aug 23, 2024
ea412bb
Merge branch 'master' into kokkosNewAPI_backend
LuisAlfredoNu Aug 23, 2024
5363361
Fix issue with the Hamiltonians
LuisAlfredoNu Aug 23, 2024
37fdbe2
Auto update version from '0.38.0-dev49' to '0.38.0-dev50'
ringo-but-quantum Aug 23, 2024
818093e
Fix error of lgpu importError
LuisAlfredoNu Aug 26, 2024
bd5ebf8
fix ImportError tensor
LuisAlfredoNu Aug 26, 2024
f64edf0
apply format
LuisAlfredoNu Aug 26, 2024
bef41b6
fix importError in test for lTensor
LuisAlfredoNu Aug 26, 2024
3e60948
Auto update version from '0.38.0-dev50' to '0.38.0-dev51'
ringo-but-quantum Aug 26, 2024
4b8b9a7
Merge branch 'master' into kokkosNewAPI_backend
LuisAlfredoNu Aug 26, 2024
6e9a6a3
Auto update version from '0.38.0-dev50' to '0.38.0-dev51'
ringo-but-quantum Aug 26, 2024
2dc1bc8
check flaky on CI
LuisAlfredoNu Aug 26, 2024
7e57ec2
trigger CIs
LuisAlfredoNu Aug 26, 2024
ab56233
Merge branch 'master' into kokkosNewAPI_backend
LuisAlfredoNu Aug 27, 2024
43b3724
Auto update version from '0.38.0-dev51' to '0.38.0-dev52'
ringo-but-quantum Aug 27, 2024
00d01c8
Merge branch 'master' into kokkosNewAPI_backend
LuisAlfredoNu Sep 3, 2024
4af7af9
Auto update version from '0.38.0-dev53' to '0.38.0-dev54'
ringo-but-quantum Sep 3, 2024
47b4860
remove temporary change
LuisAlfredoNu Sep 3, 2024
cf9302b
Update .github/CHANGELOG.md
LuisAlfredoNu Sep 3, 2024
f84cdcf
Merge branch 'master' into kokkosNewAPI_backend
LuisAlfredoNu Sep 4, 2024
0252f8a
Auto update version from '0.39.0-dev0' to '0.39.0-dev1'
ringo-but-quantum Sep 4, 2024
5561277
Increase the number of shots for measurenment test
LuisAlfredoNu Sep 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.38.0-dev12"
__version__ = "0.38.0-dev13"
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class Measurements final

const ComplexT *arr_data = this->_statevector.getData();

// Templated 1-4 wire cases; return probs
// Templated 1-4 wire cases; return probs
PROBS_SPECIAL_CASE(1);
PROBS_SPECIAL_CASE(2);
PROBS_SPECIAL_CASE(3);
Expand Down
31 changes: 31 additions & 0 deletions pennylane_lightning/lightning_kokkos/_state_vector.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright 2018-2024 Xanadu Quantum Technologies Inc.

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
Class implementation for state-vector manipulation.
LuisAlfredoNu marked this conversation as resolved.
Show resolved Hide resolved
"""


class LightningStateVector: # pylint: disable=too-few-public-methods
LuisAlfredoNu marked this conversation as resolved.
Show resolved Hide resolved
"""Lightning state-vector class.
LuisAlfredoNu marked this conversation as resolved.
Show resolved Hide resolved

Interfaces with C++ python binding methods for state-vector manipulation.

Args:
num_wires(int): the number of wires to initialize the device with
dtype: Datatypes for state-vector representation. Must be one of
``np.complex64`` or ``np.complex128``. Default is ``np.complex128``
device_name(string): state vector device name. Options: ["lightning.qubit"]
"""

pass # pylint: disable=unnecessary-pass
174 changes: 173 additions & 1 deletion pennylane_lightning/lightning_kokkos/lightning_kokkos.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
interfaces with C++ for fast linear algebra calculations.
"""

from numbers import Number
from os import getenv
from pathlib import Path
from typing import List
from typing import List, Tuple
from warnings import warn

import numpy as np
Expand All @@ -28,12 +29,16 @@
from pennylane.measurements import Expectation, MidMeasureMP, State
from pennylane.ops import Conditional
from pennylane.ops.op_math import Adjoint
from pennylane.tape import QuantumScript, QuantumTape
from pennylane.typing import Result
from pennylane.wires import Wires

from pennylane_lightning.core._serialize import QuantumScriptSerializer, global_phase_diagonal
from pennylane_lightning.core._version import __version__
from pennylane_lightning.core.lightning_base import LightningBase, _chunk_iterable

from ._state_vector import LightningStateVector

try:
# pylint: disable=import-error, no-name-in-module
from pennylane_lightning.lightning_kokkos_ops import (
Expand Down Expand Up @@ -71,6 +76,173 @@
return print_configuration()


def simulate( # pylint: disable=unused-argument
circuit: QuantumScript,
state: LightningStateVector,
LuisAlfredoNu marked this conversation as resolved.
Show resolved Hide resolved
mcmc: dict = None,
LuisAlfredoNu marked this conversation as resolved.
Show resolved Hide resolved
postselect_mode: str = None,
) -> Result:
"""Simulate a single quantum script.

Args:
circuit (QuantumTape): The single circuit to simulate
state (LightningStateVector): handle to Lightning state vector
LuisAlfredoNu marked this conversation as resolved.
Show resolved Hide resolved
mcmc (dict): Dictionary containing the Markov Chain Monte Carlo
parameters: mcmc, kernel_name, num_burnin. Descriptions of
these fields are found in :class:`~.LightningQubit`.
postselect_mode (str): Configuration for handling shots with mid-circuit measurement
postselection. Use ``"hw-like"`` to discard invalid shots and ``"fill-shots"`` to
keep the same number of shots. Default is ``None``.

Returns:
Tuple[TensorLike]: The results of the simulation

Note that this function can return measurements for non-commuting observables simultaneously.
"""
return 0

Check warning on line 102 in pennylane_lightning/lightning_kokkos/lightning_kokkos.py

View check run for this annotation

Codecov / codecov/patch

pennylane_lightning/lightning_kokkos/lightning_kokkos.py#L102

Added line #L102 was not covered by tests
# if mcmc is None:
LuisAlfredoNu marked this conversation as resolved.
Show resolved Hide resolved
# mcmc = {}
# state.reset_state()
# has_mcm = any(isinstance(op, MidMeasureMP) for op in circuit.operations)
# if circuit.shots and has_mcm:
# results = []
# aux_circ = qml.tape.QuantumScript(
# circuit.operations,
# circuit.measurements,
# shots=[1],
# trainable_params=circuit.trainable_params,
# )
# for _ in range(circuit.shots.total_shots):
# state.reset_state()
# mid_measurements = {}
# final_state = state.get_final_state(
# aux_circ, mid_measurements=mid_measurements, postselect_mode=postselect_mode
# )
# results.append(
# LightningMeasurements(final_state, **mcmc).measure_final_state(
# aux_circ, mid_measurements=mid_measurements
# )
# )
# return tuple(results)
# final_state = state.get_final_state(circuit)
# return LightningMeasurements(final_state, **mcmc).measure_final_state(circuit)


def jacobian( # pylint: disable=unused-argument
circuit: QuantumTape, state: LightningStateVector, batch_obs=False, wire_map=None
LuisAlfredoNu marked this conversation as resolved.
Show resolved Hide resolved
):
"""Compute the Jacobian for a single quantum script.

Args:
circuit (QuantumTape): The single circuit to simulate
state (LightningStateVector): handle to Lightning state vector
LuisAlfredoNu marked this conversation as resolved.
Show resolved Hide resolved
batch_obs (bool): Determine whether we process observables in parallel when
computing the jacobian. This value is only relevant when the lightning
qubit is built with OpenMP. Default is False.
wire_map (Optional[dict]): a map from wire labels to simulation indices

Returns:
TensorLike: The Jacobian of the quantum script
"""
return 0

Check warning on line 147 in pennylane_lightning/lightning_kokkos/lightning_kokkos.py

View check run for this annotation

Codecov / codecov/patch

pennylane_lightning/lightning_kokkos/lightning_kokkos.py#L147

Added line #L147 was not covered by tests
# if wire_map is not None:
# [circuit], _ = qml.map_wires(circuit, wire_map)
# state.reset_state()
# final_state = state.get_final_state(circuit)
# return LightningAdjointJacobian(final_state, batch_obs=batch_obs).calculate_jacobian(circuit)


def simulate_and_jacobian( # pylint: disable=unused-argument
circuit: QuantumTape, state: LightningStateVector, batch_obs=False, wire_map=None
LuisAlfredoNu marked this conversation as resolved.
Show resolved Hide resolved
):
"""Simulate a single quantum script and compute its Jacobian.

Args:
circuit (QuantumTape): The single circuit to simulate
state (LightningStateVector): handle to Lightning state vector
LuisAlfredoNu marked this conversation as resolved.
Show resolved Hide resolved
batch_obs (bool): Determine whether we process observables in parallel when
computing the jacobian. This value is only relevant when the lightning
qubit is built with OpenMP. Default is False.
wire_map (Optional[dict]): a map from wire labels to simulation indices

Returns:
Tuple[TensorLike]: The results of the simulation and the calculated Jacobian

Note that this function can return measurements for non-commuting observables simultaneously.
"""
return 0

Check warning on line 173 in pennylane_lightning/lightning_kokkos/lightning_kokkos.py

View check run for this annotation

Codecov / codecov/patch

pennylane_lightning/lightning_kokkos/lightning_kokkos.py#L173

Added line #L173 was not covered by tests
# if wire_map is not None:
# [circuit], _ = qml.map_wires(circuit, wire_map)
# res = simulate(circuit, state)
# jac = LightningAdjointJacobian(state, batch_obs=batch_obs).calculate_jacobian(circuit)
# return res, jac


def vjp( # pylint: disable=unused-argument
circuit: QuantumTape,
cotangents: Tuple[Number],
state: LightningStateVector,
LuisAlfredoNu marked this conversation as resolved.
Show resolved Hide resolved
batch_obs=False,
wire_map=None,
):
"""Compute the Vector-Jacobian Product (VJP) for a single quantum script.
Args:
circuit (QuantumTape): The single circuit to simulate
cotangents (Tuple[Number, Tuple[Number]]): Gradient-output vector. Must
have shape matching the output shape of the corresponding circuit. If
the circuit has a single output, ``cotangents`` may be a single number,
not an iterable of numbers.
state (LightningStateVector): handle to Lightning state vector
LuisAlfredoNu marked this conversation as resolved.
Show resolved Hide resolved
batch_obs (bool): Determine whether we process observables in parallel when
LuisAlfredoNu marked this conversation as resolved.
Show resolved Hide resolved
computing the VJP. This value is only relevant when the lightning
qubit is built with OpenMP.
wire_map (Optional[dict]): a map from wire labels to simulation indices

Returns:
TensorLike: The VJP of the quantum script
"""
return 0

Check warning on line 204 in pennylane_lightning/lightning_kokkos/lightning_kokkos.py

View check run for this annotation

Codecov / codecov/patch

pennylane_lightning/lightning_kokkos/lightning_kokkos.py#L204

Added line #L204 was not covered by tests
# if wire_map is not None:
# [circuit], _ = qml.map_wires(circuit, wire_map)
# state.reset_state()
# final_state = state.get_final_state(circuit)
# return LightningAdjointJacobian(final_state, batch_obs=batch_obs).calculate_vjp(
# circuit, cotangents
# )


def simulate_and_vjp( # pylint: disable=unused-argument
circuit: QuantumTape,
cotangents: Tuple[Number],
state: LightningStateVector,
LuisAlfredoNu marked this conversation as resolved.
Show resolved Hide resolved
batch_obs=False,
wire_map=None,
):
"""Simulate a single quantum script and compute its Vector-Jacobian Product (VJP).
Args:
circuit (QuantumTape): The single circuit to simulate
cotangents (Tuple[Number, Tuple[Number]]): Gradient-output vector. Must
have shape matching the output shape of the corresponding circuit. If
the circuit has a single output, ``cotangents`` may be a single number,
not an iterable of numbers.
state (LightningStateVector): handle to Lightning state vector
LuisAlfredoNu marked this conversation as resolved.
Show resolved Hide resolved
batch_obs (bool): Determine whether we process observables in parallel when
computing the jacobian. This value is only relevant when the lightning
qubit is built with OpenMP.
wire_map (Optional[dict]): a map from wire labels to simulation indices

Returns:
Tuple[TensorLike]: The results of the simulation and the calculated VJP
Note that this function can return measurements for non-commuting observables simultaneously.
"""
return 0

Check warning on line 238 in pennylane_lightning/lightning_kokkos/lightning_kokkos.py

View check run for this annotation

Codecov / codecov/patch

pennylane_lightning/lightning_kokkos/lightning_kokkos.py#L238

Added line #L238 was not covered by tests
# if wire_map is not None:
# [circuit], _ = qml.map_wires(circuit, wire_map)
# res = simulate(circuit, state)
# _vjp = LightningAdjointJacobian(state, batch_obs=batch_obs).calculate_vjp(circuit, cotangents)
# return res, _vjp


allowed_operations = {
"Identity",
"BasisState",
Expand Down
7 changes: 7 additions & 0 deletions tests/test_native_mcm.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@
if not LightningDevice._CPP_BINARY_AVAILABLE: # pylint: disable=protected-access
pytest.skip("No binary module found. Skipping.", allow_module_level=True)

# TODO: remove this after the new device API implementation for Kokkos is implemented
if device_name == "lightning.kokkos":
pytest.skip(
"Native Kokkos device has compatible issues with the new device API. Skipping.",
allow_module_level=True,
)


def get_device(wires, **kwargs):
kwargs.setdefault("shots", None)
Expand Down
Loading