Skip to content

Commit

Permalink
Fixing a small mistake.
Browse files Browse the repository at this point in the history
  • Loading branch information
PabloAndresCQ committed Aug 15, 2023
1 parent e943acd commit 492dca8
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions pytket/extensions/cutensornet/mps/mps.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,13 +388,19 @@ def vdot(self, other: MPS) -> complex:
Args:
other: The other MPS to compare against.
Returns:
The resulting complex number.
Raises:
RuntimeError: If number of tensors, dimensions or positions do not match.
RuntimeError: If there are no tensors in the MPS.
Return:
The resulting complex number.
RuntimeError: If the ``CuTensorNetHandle`` is out of scope.
"""
if self._lib._is_destroyed:
raise RuntimeError(
"The cuTensorNet library handle is out of scope.",
"See the documentation of update_libhandle and CuTensorNetHandle.",
)

if len(self) != len(other):
raise RuntimeError("Number of tensors do not match.")
Expand Down

0 comments on commit 492dca8

Please sign in to comment.