Skip to content

Commit

Permalink
CR
Browse files Browse the repository at this point in the history
  • Loading branch information
SamFerracin committed Sep 27, 2024
1 parent 8ba519a commit e9b5371
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions qiskit_ibm_runtime/utils/embeddings.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,7 @@ def from_backend(cls, backend: BackendV2) -> "Embedding":
try:
coordinates = _get_qubits_coordinates(backend.num_qubits)
except ValueError as err:
raise ValueError(
f"Failed to fetch coordinates for backend '{backend.name}'."
) from err
raise ValueError(f"Failed to fetch coordinates for backend '{backend.name}'.") from err

return cls(coordinates, coupling_map)

Expand Down
2 changes: 1 addition & 1 deletion test/unit/test_embeddings.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def test_init_error(self):
with self.assertRaisesRegex(ValueError, "Invalid coupling map."):
Embedding(e_vigo.coordinates, e_kyiv.coupling_map)

with self.assertRaisesRegex(ValueError, "Coordinates for 1-qubit CPU are unknown."):
with self.assertRaisesRegex(ValueError, "Failed to fetch coordinates for backend"):
Embedding.from_backend(self.armonk)


Expand Down

0 comments on commit e9b5371

Please sign in to comment.