diff --git a/src/qibo/backends/abstract.py b/src/qibo/backends/abstract.py index 14d1dc752c..4d06d6ef9a 100644 --- a/src/qibo/backends/abstract.py +++ b/src/qibo/backends/abstract.py @@ -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 `_. + """ 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 `_. + """ raise_error(NotImplementedError) @abc.abstractmethod