diff --git a/docs/matrices.rst b/docs/matrices.rst index 1fba53db0..49e9b2bb4 100644 --- a/docs/matrices.rst +++ b/docs/matrices.rst @@ -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 diff --git a/docs/states.rst b/docs/states.rst index 68d08d145..a6cfad08e 100644 --- a/docs/states.rst +++ b/docs/states.rst @@ -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 diff --git a/tests/test_state_metrics/test_trace_norm.py b/tests/test_matrix_props/test_trace_norm.py similarity index 92% rename from tests/test_state_metrics/test_trace_norm.py rename to tests/test_matrix_props/test_trace_norm.py index 1b272a748..ac2d6e138 100644 --- a/tests/test_state_metrics/test_trace_norm.py +++ b/tests/test_matrix_props/test_trace_norm.py @@ -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 diff --git a/toqito/channel_metrics/completely_bounded_trace_norm.py b/toqito/channel_metrics/completely_bounded_trace_norm.py index 684d44a19..284524c97 100644 --- a/toqito/channel_metrics/completely_bounded_trace_norm.py +++ b/toqito/channel_metrics/completely_bounded_trace_norm.py @@ -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""" diff --git a/toqito/matrix_props/__init__.py b/toqito/matrix_props/__init__.py index 46be4ec77..682f591cf 100644 --- a/toqito/matrix_props/__init__.py +++ b/toqito/matrix_props/__init__.py @@ -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 \ No newline at end of file +from toqito.matrix_props.is_orthonormal import is_orthonormal +from toqito.matrix_props.trace_norm import trace_norm \ No newline at end of file diff --git a/toqito/state_metrics/trace_norm.py b/toqito/matrix_props/trace_norm.py similarity index 100% rename from toqito/state_metrics/trace_norm.py rename to toqito/matrix_props/trace_norm.py diff --git a/toqito/state_metrics/__init__.py b/toqito/state_metrics/__init__.py index 6c4df7724..96c8ac6ae 100644 --- a/toqito/state_metrics/__init__.py +++ b/toqito/state_metrics/__init__.py @@ -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 diff --git a/toqito/state_metrics/helstrom_holevo.py b/toqito/state_metrics/helstrom_holevo.py index 5d62c4ca2..00e72f999 100644 --- a/toqito/state_metrics/helstrom_holevo.py +++ b/toqito/state_metrics/helstrom_holevo.py @@ -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: diff --git a/toqito/state_metrics/trace_distance.py b/toqito/state_metrics/trace_distance.py index d8406fb23..1291a0630 100644 --- a/toqito/state_metrics/trace_distance.py +++ b/toqito/state_metrics/trace_distance.py @@ -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: diff --git a/toqito/state_props/is_separable.py b/toqito/state_props/is_separable.py index 3ba126201..69d721414 100644 --- a/toqito/state_props/is_separable.py +++ b/toqito/state_props/is_separable.py @@ -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