Skip to content

Commit

Permalink
tidy up docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
multiphaseCFD committed Oct 15, 2024
1 parent 82b59e3 commit 168b436
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions mpitests/test_native_mcm.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@


def test_unspported_mid_measurement():
"""Test unsupported mid_measurement for lightning.gpu-mpi."""
"""Test unsupported mid_measurement for Lightning-GPU-MPI."""
comm = MPI.COMM_WORLD
dev = qml.device(device_name, wires=2, mpi=True, shots=1000)
params = np.pi / 4 * np.ones(2)
Expand All @@ -38,6 +38,6 @@ def func(x, y):
comm.Barrier()

with pytest.raises(
qml.DeviceError, match="LightningGPU-MPI does not support Mid-circuit measurements."
qml.DeviceError, match="Lightning-GPU-MPI does not support Mid-circuit measurements."
):
func(*params)
6 changes: 4 additions & 2 deletions pennylane_lightning/lightning_gpu/lightning_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ def __init__( # pylint: disable=too-many-arguments
# Creating the state vector
self._mpi_handler = MPIHandler(mpi, mpi_buf_size, len(self.wires), c_dtype)

#TODO: Remove this line after the MPI support for Mid-Measurement is added
# TODO: Remove this line after the MPI support for Mid-Measurement is added
self._use_mpi = mpi

Check warning on line 355 in pennylane_lightning/lightning_gpu/lightning_gpu.py

View check run for this annotation

Codecov / codecov/patch

pennylane_lightning/lightning_gpu/lightning_gpu.py#L355

Added line #L355 was not covered by tests

self._statevector = self.LightningStateVector(
Expand Down Expand Up @@ -513,7 +513,9 @@ def simulate(
"""
if circuit.shots and (any(isinstance(op, MidMeasureMP) for op in circuit.operations)):
if self._use_mpi:
raise qml.DeviceError("LightningGPU-MPI does not support Mid-circuit measurements.")
raise qml.DeviceError(

Check warning on line 516 in pennylane_lightning/lightning_gpu/lightning_gpu.py

View check run for this annotation

Codecov / codecov/patch

pennylane_lightning/lightning_gpu/lightning_gpu.py#L515-L516

Added lines #L515 - L516 were not covered by tests
"Lightning-GPU-MPI does not support Mid-circuit measurements."
)

results = []
aux_circ = QuantumScript(

Check warning on line 521 in pennylane_lightning/lightning_gpu/lightning_gpu.py

View check run for this annotation

Codecov / codecov/patch

pennylane_lightning/lightning_gpu/lightning_gpu.py#L520-L521

Added lines #L520 - L521 were not covered by tests
Expand Down

0 comments on commit 168b436

Please sign in to comment.