Skip to content

Commit

Permalink
trying this one more time
Browse files Browse the repository at this point in the history
  • Loading branch information
albi3ro committed Feb 27, 2025
1 parent a9e0e40 commit c712562
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 42 deletions.
40 changes: 0 additions & 40 deletions tests/capture/autograph/test_autograph_for_loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,6 @@ class TestForLoops:
@pytest.mark.parametrize("autograph", [True, False])
def test_for_in_array(self, autograph):
"""Test for loop over JAX array."""
if autograph:
pytest.xfail(reason="Autograph cannot be applied twice in a row. See sc-83366")

@qml.qnode(qml.device("default.qubit", wires=1), autograph=autograph)
def f(params):
Expand All @@ -138,8 +136,6 @@ def res(params):
@pytest.mark.parametrize("autograph", [True, False])
def test_for_in_array_unpack(self, autograph):
"""Test for loop over a 2D JAX array unpacking the inner dimension."""
if autograph:
pytest.xfail(reason="Autograph cannot be applied twice in a row. See sc-83366")

@qml.qnode(qml.device("default.qubit", wires=1), autograph=autograph)
def f(params):
Expand All @@ -159,8 +155,6 @@ def f(params):
@pytest.mark.parametrize("autograph", [True, False])
def test_for_in_numeric_list(self, autograph):
"""Test for loop over a Python list that is convertible to an array."""
if autograph:
pytest.xfail(reason="Autograph cannot be applied twice in a row. See sc-83366")

@qml.qnode(qml.device("default.qubit", wires=1), autograph=autograph)
def f():
Expand All @@ -179,8 +173,6 @@ def f():
@pytest.mark.parametrize("autograph", [True, False])
def test_for_in_numeric_list_of_list(self, autograph):
"""Test for loop over a nested Python list that is convertible to an array."""
if autograph:
pytest.xfail(reason="Autograph cannot be applied twice in a row. See sc-83366")

@qml.qnode(qml.device("default.qubit", wires=1), autograph=autograph)
def f():
Expand All @@ -203,8 +195,6 @@ def f():
def test_for_in_object_list(self, autograph):
"""Test for loop over a Python list that is *not* convertible to an array.
The behaviour should fall back to standard Python."""
if autograph:
pytest.xfail(reason="Autograph cannot be applied twice in a row. See sc-83366")

@qml.qnode(qml.device("default.qubit", wires=1), autograph=autograph)
def f():
Expand All @@ -222,8 +212,6 @@ def f():
@pytest.mark.parametrize("autograph", [True, False])
def test_for_in_static_range(self, autograph):
"""Test for loop over a Python range with static bounds."""
if autograph:
pytest.xfail(reason="Autograph cannot be applied twice in a row. See sc-83366")

@qml.qnode(qml.device("default.qubit", wires=3), autograph=autograph)
def f():
Expand All @@ -240,8 +228,6 @@ def f():
@pytest.mark.parametrize("autograph", [True, False])
def test_for_in_static_range_indexing_array(self, autograph):
"""Test for loop over a Python range with static bounds that is used to index an array."""
if autograph:
pytest.xfail(reason="Autograph cannot be applied twice in a row. See sc-83366")

@qml.qnode(qml.device("default.qubit", wires=1), autograph=autograph)
def f():
Expand All @@ -259,8 +245,6 @@ def f():
@pytest.mark.parametrize("autograph", [True, False])
def test_for_in_dynamic_range(self, autograph):
"""Test for loop over a Python range with dynamic bounds."""
if autograph:
pytest.xfail(reason="Autograph cannot be applied twice in a row. See sc-83366")

@qml.qnode(qml.device("default.qubit", wires=3), autograph=autograph)
def f(n: int):
Expand All @@ -277,8 +261,6 @@ def f(n: int):
@pytest.mark.parametrize("autograph", [True, False])
def test_for_in_dynamic_range_indexing_array(self, autograph):
"""Test for loop over a Python range with dynamic bounds that is used to index an array."""
if autograph:
pytest.xfail(reason="Autograph cannot be applied twice in a row. See sc-83366")

@qml.qnode(qml.device("default.qubit", wires=1), autograph=autograph)
def f(n: int):
Expand All @@ -296,8 +278,6 @@ def f(n: int):
@pytest.mark.parametrize("autograph", [True, False])
def test_for_in_enumerate_array(self, autograph):
"""Test for loop over a Python enumeration on an array."""
if autograph:
pytest.xfail(reason="Autograph cannot be applied twice in a row. See sc-83366")

@qml.qnode(qml.device("default.qubit", wires=3), autograph=autograph)
def f(params):
Expand All @@ -316,8 +296,6 @@ def f(params):
@pytest.mark.parametrize("autograph", [True, False])
def test_for_in_enumerate_array_no_unpack(self, autograph):
"""Test for loop over a Python enumeration with delayed unpacking."""
if autograph:
pytest.xfail(reason="Autograph cannot be applied twice in a row. See sc-83366")

@qml.qnode(qml.device("default.qubit", wires=3), autograph=autograph)
def f(params):
Expand All @@ -336,8 +314,6 @@ def f(params):
@pytest.mark.parametrize("autograph", [True, False])
def test_for_in_enumerate_nested_unpack(self, autograph):
"""Test for loop over a Python enumeration with nested unpacking."""
if autograph:
pytest.xfail(reason="Autograph cannot be applied twice in a row. See sc-83366")

@qml.qnode(qml.device("default.qubit", wires=3), autograph=autograph)
def f(params):
Expand All @@ -359,8 +335,6 @@ def f(params):
@pytest.mark.parametrize("autograph", [True, False])
def test_for_in_enumerate_start(self, autograph):
"""Test for loop over a Python enumeration with offset indices."""
if autograph:
pytest.xfail(reason="Autograph cannot be applied twice in a row. See sc-83366")

@qml.qnode(qml.device("default.qubit", wires=5), autograph=autograph)
def f(params):
Expand All @@ -379,8 +353,6 @@ def f(params):
@pytest.mark.parametrize("autograph", [True, False])
def test_for_in_enumerate_numeric_list(self, autograph):
"""Test for loop over a Python enumeration on a list that is convertible to an array."""
if autograph:
pytest.xfail(reason="Autograph cannot be applied twice in a row. See sc-83366")

@qml.qnode(qml.device("default.qubit", wires=3), autograph=autograph)
def f():
Expand Down Expand Up @@ -417,8 +389,6 @@ def f():
def test_for_in_enumerate_object_list(self, autograph):
"""Test for loop over a Python enumeration on a list that is *not* convertible to an array.
The behaviour should fall back to standard Python."""
if autograph:
pytest.xfail(reason="Autograph cannot be applied twice in a row. See sc-83366")

@qml.qnode(qml.device("default.qubit", wires=3), autograph=autograph)
def f():
Expand All @@ -440,8 +410,6 @@ def f():
def test_for_in_other_iterable_object(self, autograph):
"""Test for loop over arbitrary iterable Python objects.
The behaviour should fall back to standard Python."""
if autograph:
pytest.xfail(reason="Autograph cannot be applied twice in a row. See sc-83366")

@qml.qnode(qml.device("default.qubit", wires=1), autograph=autograph)
def f():
Expand Down Expand Up @@ -606,8 +574,6 @@ class TestErrors:
def test_for_in_object_list(self, autograph):
"""Check the error raised when a for loop iterates over a Python list that
is *not* convertible to an array."""
if autograph:
pytest.xfail(reason="Autograph cannot be applied twice in a row. See sc-83366")

@qml.qnode(qml.device("default.qubit", wires=1), autograph=autograph)
def f():
Expand All @@ -624,8 +590,6 @@ def test_for_in_static_range_indexing_numeric_list(self, autograph):
"""Test an informative error is raised when using a for loop with a static range
to index through an array-compatible Python list. This can be fixed by wrapping the
list in a jax array, so the error raised here is actionable."""
if autograph:
pytest.xfail(reason="Autograph cannot be applied twice in a row. See sc-83366")

@qml.qnode(qml.device("default.qubit", wires=1), autograph=autograph)
def f():
Expand All @@ -645,8 +609,6 @@ def test_for_in_dynamic_range_indexing_numeric_list(self, autograph):
"""Test an informative error is raised when using a for loop with a dynamic range
to index through an array-compatible Python list. This can be fixed by wrapping the
list in a jax array, so the error raised here is actionable."""
if autograph:
pytest.xfail(reason="Autograph cannot be applied twice in a row. See sc-83366")

@qml.qnode(qml.device("default.qubit", wires=1), autograph=autograph)
def f(n: int):
Expand All @@ -666,8 +628,6 @@ def test_for_in_dynamic_range_indexing_object_list(self, autograph):
"""Test that an error is raised for a for loop over a Python range with dynamic bounds
that is used to index an array-incompatible Python list. This use-case is never possible,
even with AutoGraph, because the list can't be wrapped in a jax array."""
if autograph:
pytest.xfail(reason="Autograph cannot be applied twice in a row. See sc-83366")

@qml.qnode(qml.device("default.qubit", wires=1), autograph=autograph)
def f(n: int):
Expand Down
2 changes: 0 additions & 2 deletions tests/capture/autograph/test_autograph_while_loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ def f(param):
@pytest.mark.parametrize("autograph", [True, False])
def test_whileloop_qnode(self, autograph):
"""Test while-loop used with a qnode"""
if autograph:
pytest.xfail(reason="Autograph cannot be applied twice in a row. See sc-83366")

@qml.qnode(qml.device("default.qubit", wires=4), autograph=autograph)
def f(p):
Expand Down

0 comments on commit c712562

Please sign in to comment.