Skip to content

Commit

Permalink
u[date docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
renatomello committed Oct 12, 2023
1 parent 3d87288 commit f45aa26
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/qibo/backends/abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,13 +326,21 @@ def entanglement_entropy(self, rho): # pragma: no cover
raise_error(NotImplementedError)

@abc.abstractmethod
def calculate_norm(self, state): # pragma: no cover
"""Calculate norm of a state vector."""
def calculate_norm(self, state, ord=None): # pragma: no cover
"""Calculate norm of a state vector.
For specifications on possible values of the parameter `ord`, please refer to
`numpy.linalg.norm <https://numpy.org/doc/stable/reference/generated/numpy.linalg.norm.html>`_.
"""
raise_error(NotImplementedError)

@abc.abstractmethod
def calculate_norm_density_matrix(self, state): # pragma: no cover
"""Calculate norm (trace) of a density matrix."""
def calculate_norm_density_matrix(self, state, ord="nuc"): # pragma: no cover
"""Calculate norm (trace) of a density matrix.
For specifications on possible values of the parameter `ord`, please refer to
`numpy.linalg.norm <https://numpy.org/doc/stable/reference/generated/numpy.linalg.norm.html>`_.
"""
raise_error(NotImplementedError)

@abc.abstractmethod
Expand Down

0 comments on commit f45aa26

Please sign in to comment.