Skip to content

Commit

Permalink
Merge pull request #50 from qiboteam/rename_methods
Browse files Browse the repository at this point in the history
Rename backend methods related to vector and matrix norms
  • Loading branch information
renatomello authored Nov 12, 2024
2 parents 807c89b + bdd18cc commit 50a13e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/qiboml/backends/tensorflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,11 @@ def update_frequencies(self, frequencies, probabilities, nsamples):
)
return frequencies

def calculate_norm(self, state, order=2):
def calculate_vector_norm(self, state, order=2):
state = self.cast(state)
return self.tf.norm(state, ord=order)

def calculate_norm_density_matrix(self, state, order="nuc"):
def calculate_matrix_norm(self, state, order="nuc"):
state = self.cast(state)
if order == "nuc":
return self.np.trace(state)
Expand Down

0 comments on commit 50a13e2

Please sign in to comment.