Skip to content

Commit 834b582

Browse files
authored
update use of parse_native_mid_circuit_measurements (#1953)
**Context:** In pennylane PR [(#7962)](https://github.com/PennyLaneAI/pennylane/pull/7962/files) I found that `parse_native_mid_circuit_measurements` doesn't actually need both `circuit` and `aux_tapes`. So I tried to remove `aux_tapes`, just to get an error because catalyst was still passing it. **Description of the Change:** Stop passing `aux_tapes` to `parse_native_mid_circuit_measurements` **Benefits:** Slightly cleaner code. We will actually be able to remove `_removed_arg` from the signature of `parse_native_mid_circuit_measurements`. **Possible Drawbacks:** **Related GitHub Issues:**
1 parent e5e993a commit 834b582

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

doc/releases/changelog-dev.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@
5757

5858
<h3>Internal changes ⚙️</h3>
5959

60+
* Updates use of `qml.transforms.dynamic_one_shot.parse_native_mid_circuit_measurements` to improved signature.
61+
[(#1953)](https://github.com/PennyLaneAI/catalyst/pull/1953)
62+
6063
* When capture is enabled, `qjit(autograph=True)` will use capture autograph instead of catalyst autograph.
6164
[(#1960)](https://github.com/PennyLaneAI/catalyst/pull/1960)
6265

frontend/catalyst/qfunc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ def wrap_single_shot_qnode(*_):
288288
out = list(results)
289289
if has_mcm:
290290
out = parse_native_mid_circuit_measurements(
291-
cpy_tape, aux_tapes, results, postselect_mode="pad-invalid-samples"
291+
cpy_tape, results=results, postselect_mode="pad-invalid-samples"
292292
)
293293
if len(cpy_tape.measurements) == 1:
294294
out = (out,)

0 commit comments

Comments
 (0)