Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacdevlugt committed Nov 10, 2023
1 parent aeccf76 commit 321260e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/ops/qubit/test_sparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,8 @@ def test_scalar_multipication(self, sparse_hamiltonian):
H = csr_matrix(SPARSEHAMILTONIAN_TEST_MATRIX)
H_multiplied = csr_matrix(SPARSEHAMILTONIAN_TEST_MATRIX * value)

H_sparse_mul_method = (
value * qml.SparseHamiltonian(H, wires=range(num_wires)).sparse_matrix()
)
H_sparse_mul_method = qml.SparseHamiltonian(H, wires=range(num_wires)) * value
H_sparse_mul_method = H_sparse_mul_method.sparse_matrix()
H_sparse_multiplied_before = qml.SparseHamiltonian(
H_multiplied, wires=range(num_wires)
).sparse_matrix()
Expand Down

0 comments on commit 321260e

Please sign in to comment.