Skip to content

Commit

Permalink
[tests] Fix test (#6362)
Browse files Browse the repository at this point in the history
**Context:** Fixes compiler test after changes in Catalyst.

**Description of the Change:** Catalyst will now have a public function
inside a quantum module to denote the entry point into the qnode.

**Benefits:** Tests pass when running with latest Catalyst.

**Possible Drawbacks:** None

**Related GitHub Issues:**
  • Loading branch information
erick-xanadu authored and austingmhuang committed Oct 23, 2024
1 parent 6d5edbf commit 129820f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions doc/releases/changelog-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,9 @@
[(#6278)](https://github.com/PennyLaneAI/pennylane/pull/6278)
[(#6310)](https://github.com/PennyLaneAI/pennylane/pull/6310)

* Fixes a test after updating to the nightly version of Catalyst.
[(#6362)](https://github.com/PennyLaneAI/pennylane/pull/6362)

<h3>Contributors ✍️</h3>

This release contains contributions from (in alphabetical order):
Expand All @@ -295,6 +298,7 @@ Austin Huang,
Korbinian Kottmann,
Christina Lee,
William Maxwell,
Erick Ochoa Lopez,
Lee J. O'Riordan,
Mudit Pandey,
David Wierichs,
2 changes: 1 addition & 1 deletion tests/test_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def circuit(x: float):
return qml.expval(qml.PauliZ(0))

mlir_str = str(circuit.mlir)
result_header = "func.func private @circuit(%arg0: tensor<f64>) -> tensor<f64>"
result_header = "func.func public @circuit(%arg0: tensor<f64>) -> tensor<f64>"
assert result_header in mlir_str

def test_qjit_adjoint(self):
Expand Down

0 comments on commit 129820f

Please sign in to comment.