Skip to content

Commit

Permalink
nonlocal games, channel ops, chanel metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
purva-thakre committed Oct 19, 2023
1 parent 3ee28d5 commit 58fda1f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def test_cb_trace_norm_unitaries_channel():
"""The diamond norm of phi = id- U id U* is the diameter of the smallest circle that contains the eigenvalues of U."""
U = 1 / np.sqrt(2) * np.array([[1, 1], [-1, 1]]) # Hadamard gate
phi = kraus_to_choi([[np.eye(2), np.eye(2)], [U, -U]])
lam, eigv = np.linalg.eig(U)
lam, _ = np.linalg.eig(U)
dist = np.abs(lam[:, None] - lam[None, :]) # all to all distance
diameter = np.max(dist)
np.testing.assert_equal(
Expand Down
4 changes: 2 additions & 2 deletions tests/test_channel_ops/test_dual_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ def test_dual_channel_choi_dims():

def test_dual_channel_nonsquare_matrix():
"""Dual of a channel that transposes 3x2 matrices."""
choi = swap_operator([2, 3])
choi_dual = dual_channel(choi, dims=[[3, 2], [2, 3]])
choi1 = swap_operator([2, 3])
choi_dual = dual_channel(choi1, dims=[[3, 2], [2, 3]])
expected_choi_dual = np.array(
[
[1, 0, 0, 0, 0, 0],
Expand Down
1 change: 0 additions & 1 deletion tests/test_nonlocal_games/test_xor_game.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import numpy as np

from toqito.nonlocal_games.nonlocal_game import NonlocalGame
from toqito.nonlocal_games.xor_game import XORGame


Expand Down

0 comments on commit 58fda1f

Please sign in to comment.