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

Fix windows bug #218

Merged
merged 7 commits into from
Feb 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
* Fix failed tests for the non-binary wheel.
[(#213)](https://github.com/PennyLaneAI/pennylane-lightning/pull/213)

* Fix failed tests on Windows.
[(#218)](https://github.com/PennyLaneAI/pennylane-lightning/pull/218)

### Contributors

This release contains contributions from (in alphabetical order):
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
access_token: ${{ github.token }}

- name: Install dependencies
run: sudo apt update && sudo apt -y install clang-format-11 python3
run: sudo apt update && sudo apt -y install clang-format-12 python3

- name: Checkout code
uses: actions/checkout@v2
Expand Down
3 changes: 3 additions & 0 deletions tests/test_adjoint_jacobian.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ def test_unsupported_hermitian_expectation(self, dev):
):
dev.adjoint_jacobian(tape)

@pytest.mark.skipif(
not hasattr(np, "complex256"), reason="Numpy only defines complex256 in Linux-like system"
)
@pytest.mark.skipif(not lq._CPP_BINARY_AVAILABLE, reason="Lightning binary required")
def test_unsupported_complex_type(self, dev):
dev._state = dev._asarray(dev._state, np.complex256)
Expand Down
3 changes: 3 additions & 0 deletions tests/test_apply.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ class TestApply:

from pennylane_lightning import LightningQubit as lq

@pytest.mark.skipif(
not hasattr(np, "complex256"), reason="Numpy only defines complex256 in Linux-like system"
)
@pytest.mark.skipif(not lq._CPP_BINARY_AVAILABLE, reason="Lightning binary required")
def test_apply_operation_raise_type_error(self, qubit_device_1_wire):
"""Tests that applying an operation yields the expected output state for single wire
Expand Down
9 changes: 9 additions & 0 deletions tests/test_vector_jacobian_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ class TestComputeVJP:
def dev(self):
return qml.device("lightning.qubit", wires=2)

@pytest.mark.skipif(
not hasattr(np, "complex256"), reason="Numpy only defines complex256 in Linux-like system"
)
def test_unsupported_complex_type(self, dev):
dev._state = dev._asarray(dev._state, np.complex256)

Expand Down Expand Up @@ -113,6 +116,9 @@ class TestVectorJacobianProduct:
def dev(self):
return qml.device("lightning.qubit", wires=2)

@pytest.mark.skipif(
not hasattr(np, "complex256"), reason="Numpy only defines complex256 in Linux-like system"
)
def test_unsupported_complex_type(self, dev):
dev._state = dev._asarray(dev._state, np.complex256)

Expand Down Expand Up @@ -438,6 +444,9 @@ class TestBatchVectorJacobianProduct:
def dev(self):
return qml.device("lightning.qubit", wires=2)

@pytest.mark.skipif(
not hasattr(np, "complex256"), reason="Numpy only defines complex256 in Linux-like system"
)
def test_unsupported_complex_type(self, dev):
dev._state = dev._asarray(dev._state, np.complex256)

Expand Down