Skip to content

Commit

Permalink
delete usuless variables
Browse files Browse the repository at this point in the history
  • Loading branch information
LuisAlfredoNu committed Sep 11, 2024
1 parent 6290953 commit 219262b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion pennylane_lightning/lightning_gpu/_state_vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def _apply_state_vector(self, state, device_wires, use_async=False):
basis_states = np.array(list(product([0, 1], repeat=len(device_wires))))

Check warning on line 232 in pennylane_lightning/lightning_gpu/_state_vector.py

View check run for this annotation

Codecov / codecov/patch

pennylane_lightning/lightning_gpu/_state_vector.py#L232

Added line #L232 was not covered by tests

# get basis states to alter on full set of qubits
unravelled_indices = np.zeros((2 ** len(device_wires), self.num_wires), dtype=int)
unravelled_indices = np.zeros((1 << len(device_wires), self.num_wires), dtype=int)
unravelled_indices[:, device_wires] = basis_states

Check warning on line 236 in pennylane_lightning/lightning_gpu/_state_vector.py

View check run for this annotation

Codecov / codecov/patch

pennylane_lightning/lightning_gpu/_state_vector.py#L235-L236

Added lines #L235 - L236 were not covered by tests

# get indices for which the state is changed to input state vector elements
Expand Down
3 changes: 0 additions & 3 deletions pennylane_lightning/lightning_gpu/lightning_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,13 +298,10 @@ def __init__( # pylint: disable=too-many-arguments
self._sync = sync

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

View check run for this annotation

Codecov / codecov/patch

pennylane_lightning/lightning_gpu/lightning_gpu.py#L297-L298

Added lines #L297 - L298 were not covered by tests

# Creating the state vector

self._mpi_handler = LightningGPU_MPIHandler(

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

View check run for this annotation

Codecov / codecov/patch

pennylane_lightning/lightning_gpu/lightning_gpu.py#L301

Added line #L301 was not covered by tests
mpi, mpi_buf_size, self._dp, self.num_wires, c_dtype
)

self._num_local_wires = self._mpi_handler.num_local_wires

self._statevector = self.LightningStateVector(

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

View check run for this annotation

Codecov / codecov/patch

pennylane_lightning/lightning_gpu/lightning_gpu.py#L305

Added line #L305 was not covered by tests
self.num_wires, dtype=c_dtype, mpi_handler=self._mpi_handler, sync=self._sync
)
Expand Down

0 comments on commit 219262b

Please sign in to comment.