Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move Trace Norm #172

Merged
merged 6 commits into from
Jun 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/matrices.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,4 @@ Properties of Matrices and Vectors
toqito.matrix_props.is_unitary
toqito.matrix_props.majorizes
toqito.matrix_props.sk_operator_norm
toqito.matrix_props.trace_norm
1 change: 0 additions & 1 deletion docs/states.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ Distance Metrics for Quantum States
toqito.state_metrics.hilbert_schmidt_inner_product
toqito.state_metrics.sub_fidelity
toqito.state_metrics.trace_distance
toqito.state_metrics.trace_norm
toqito.state_metrics.bures_distance
toqito.state_metrics.matsumoto_fidelity

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Tests for trace_norm."""
import numpy as np

from toqito.state_metrics import trace_norm
from toqito.matrix_props import trace_norm
from toqito.states import basis


Expand Down
2 changes: 1 addition & 1 deletion toqito/channel_metrics/completely_bounded_trace_norm.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from toqito.channel_ops import apply_channel, dual_channel
from toqito.channel_props import is_quantum_channel, is_completely_positive
from toqito.state_metrics import trace_norm
from toqito.matrix_props import trace_norm

def completely_bounded_trace_norm(phi: np.ndarray) -> float:
r"""
Expand Down
3 changes: 2 additions & 1 deletion toqito/matrix_props/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@
from toqito.matrix_props.majorizes import majorizes
from toqito.matrix_props.sk_norm import sk_operator_norm
from toqito.matrix_props.is_block_positive import is_block_positive
from toqito.matrix_props.is_orthonormal import is_orthonormal
from toqito.matrix_props.is_orthonormal import is_orthonormal
from toqito.matrix_props.trace_norm import trace_norm
File renamed without changes.
1 change: 0 additions & 1 deletion toqito/state_metrics/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Distance metrics for quantum states."""
from toqito.state_metrics.trace_norm import trace_norm
from toqito.state_metrics.hilbert_schmidt import hilbert_schmidt
from toqito.state_metrics.hilbert_schmidt_inner_product import hilbert_schmidt_inner_product
from toqito.state_metrics.helstrom_holevo import helstrom_holevo
Expand Down
3 changes: 1 addition & 2 deletions toqito/state_metrics/helstrom_holevo.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
"""Helstrom-Holevo metric."""
import numpy as np

from toqito.matrix_props import is_density
from toqito.state_metrics import trace_norm
from toqito.matrix_props import is_density, trace_norm


def helstrom_holevo(rho: np.ndarray, sigma: np.ndarray) -> float:
Expand Down
3 changes: 1 addition & 2 deletions toqito/state_metrics/trace_distance.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
"""Trace distance metric."""
import numpy as np

from toqito.matrix_props import is_density
from toqito.state_metrics import trace_norm
from toqito.matrix_props import is_density, trace_norm


def trace_distance(rho: np.ndarray, sigma: np.ndarray) -> float:
Expand Down
3 changes: 1 addition & 2 deletions toqito/state_props/is_separable.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
import numpy as np

from toqito.channels import realignment
from toqito.matrix_props import is_positive_semidefinite
from toqito.matrix_props import is_positive_semidefinite, trace_norm
from toqito.state_props import is_ppt, in_separable_ball
from toqito.state_props.has_symmetric_extension import has_symmetric_extension
from toqito.state_metrics import trace_norm
from toqito.perms import swap

from picos import partial_trace
Expand Down