Skip to content

Commit

Permalink
Update distance.py
Browse files Browse the repository at this point in the history
  • Loading branch information
gcattan authored Dec 20, 2024
1 parent 425c99d commit bd54e88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyriemann_qiskit/utils/distance.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ def trace_prod_log(m1, m2):
w = optimizer.get_weights(prob, matrices)

wtLogAtLogAw = prob.sum(
w[i] * w[j] * log_prod(A[i], A[j]) for i in matrices for j in matrices
w[i] * w[j] * trace_prod_log(A[i], A[j]) for i in matrices for j in matrices
)
wLogBLogA = prob.sum(w[i] * log_prod(B, A[i]) for i in matrices)
wLogBLogA = prob.sum(w[i] * trace_prod_log(B, A[i]) for i in matrices)
objective = wtLogAtLogAw - 2 * wLogBLogA

prob.set_objective("min", objective)
Expand Down

0 comments on commit bd54e88

Please sign in to comment.