Skip to content

Commit

Permalink
Added test
Browse files Browse the repository at this point in the history
  • Loading branch information
mudit2812 committed May 8, 2024
1 parent 9639ceb commit 36452b8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/lightning_tensor/test_lightning_tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def test_device_name_and_init(num_wires, c_dtype):
"""Test the class initialization and returned properties."""
wires = Wires(range(num_wires)) if num_wires else None
dev = LightningTensor(wires=wires, c_dtype=c_dtype)
assert dev.name == "lightning.tensor"
assert dev.name == "default.tensor"
assert dev.c_dtype == c_dtype
assert dev.wires == wires
if num_wires is None:
Expand All @@ -46,6 +46,12 @@ def test_device_name_and_init(num_wires, c_dtype):
assert dev.num_wires == num_wires


def test_device_available_as_plugin():
"""Test that the device can be instantiated using ``qml.device``."""
dev = qml.device("default.tensor", wires=2)
assert isinstance(dev, LightningTensor)


@pytest.mark.parametrize("backend", ["fake_backend"])
def test_invalid_backend(backend):
"""Test an invalid backend."""
Expand Down

0 comments on commit 36452b8

Please sign in to comment.