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

Bug: SKNorm failing case #151

Closed
vprusso opened this issue May 25, 2023 · 0 comments · Fixed by #156
Closed

Bug: SKNorm failing case #151

vprusso opened this issue May 25, 2023 · 0 comments · Fixed by #156
Labels
bug Something isn't working

Comments

@vprusso
Copy link
Owner

vprusso commented May 25, 2023

Refer to the comment from #150 (comment)

For replication, it appears that the sk_norm.py script is failing for the following case:

n = 2, a = 0.5

    @pytest.mark.parametrize("n, a", [(2, 0.5), (2, -0.5), (3, 0.5), (3, -0.5)])
    def test_s1_norm_werner(n, a):
        """Test S(1) norm of a Werner state."""
        rho = werner(n, a)
        # See:
        # N. Johnston.
        # Norms and Cones in the Theory of Quantum Entanglement.
        # PhD thesis (arXiv:1207.1479)
        # Proposition 5.2.10 and Table 5.1
        expected = (1 + abs(min(0, a))) / (n * (n - a))
    
        lower_bound, upper_bound = sk_operator_norm(rho, k=1)
>       np.testing.assert_equal(np.allclose(lower_bound, expected), True)
E       AssertionError: 
E       Items are not equal:
E        ACTUAL: False
E        DESIRED: True

tests/test_matrix_props/test_sk_norm.py:60: AssertionError
@vprusso vprusso added the bug Something isn't working label May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant