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

Add interface to lightning.qubit MCM preprocessing #760

Merged
merged 11 commits into from
Jun 13, 2024
3 changes: 3 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@
* `lightning.qubit` and `lightning.kokkos` use `qml.ops.Conditional.base` instead of `qml.ops.Conditional.then_op`.
[(#752)](https://github.com/PennyLaneAI/pennylane-lightning/pull/752)

* The preprocessing step in `lightning.qubit` now uses interface information to properly support the hardware-like postselection for mid-circuit measurements.
[(#760)](https://github.com/PennyLaneAI/pennylane-lightning/pull/760)

* Fix AVX streaming operation support with newer GCC.
[(#729)](https://github.com/PennyLaneAI/pennylane-lightning/pull/729)

Expand Down
2 changes: 1 addition & 1 deletion pennylane_lightning/core/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
Version number (major.minor.patch[-label])
"""

__version__ = "0.37.0-dev34"
__version__ = "0.37.0-dev35"
5 changes: 4 additions & 1 deletion pennylane_lightning/lightning_qubit/lightning_qubit.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,10 @@ def preprocess(self, execution_config: ExecutionConfig = DefaultExecutionConfig)
program.add_transform(validate_observables, accepted_observables, name=self.name)
program.add_transform(validate_device_wires, self.wires, name=self.name)
program.add_transform(
mid_circuit_measurements, device=self, mcm_config=exec_config.mcm_config
mid_circuit_measurements,
device=self,
mcm_config=exec_config.mcm_config,
interface=exec_config.interface,
)
program.add_transform(
decompose,
Expand Down
2 changes: 1 addition & 1 deletion tests/new_api/test_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def test_preprocess(self, adjoint):
expected_program.add_transform(validate_observables, accepted_observables, name=device.name)
expected_program.add_transform(validate_device_wires, device.wires, name=device.name)
expected_program.add_transform(
mid_circuit_measurements, device=device, mcm_config=MCMConfig()
mid_circuit_measurements, device=device, mcm_config=MCMConfig(), interface=None
)
expected_program.add_transform(
decompose,
Expand Down
Loading