vprusso/toqito

Remove `np.testing` from unit tests

Opened this issue · 0 comments

Based on the discussion in #423, we want to remove all instances of np.testing and switch to using pytest. #423 (comment) has an alternative to comparing two arrays using pytest.

Wherever possible, use parametrize to better organize identical tests in 1 file. https://docs.pytest.org/en/7.3.x/how-to/parametrize.html

Below is an itemized list of the files that require these changes. If you are interested in working on one of these, comment with which item you want to work on. A maintainer will assign that item to you.

  • #492
  • toqito/states/tests/test_ghz.py
  • toqito/states/tests/test_bb84.py
  • toqito/states/tests/test_trine.py
  • toqito/states/tests/test_werner.py
  • toqito/rand/tests/test_random_povm.py
  • toqito/states/tests/test_max_mixed.py
  • toqito/matrix_props/tests/test_is_normal.py
  • toqito/matrix_props/tests/test_majorizes.py
  • toqito/measurement_props/tests/test_is_povm.py
  • toqito/state_props/tests/test_l1_norm_coherence.py
  • toqito/state_props/tests/test_purity.py
  • toqito/helper/tests/test_np_array_as_expr.py
  • toqito/state_props/tests/test_log_negativity.py
  • toqito/state_metrics/tests/test_fidelity.py
  • toqito/state_props/tests/test_is_ppt.py
  • toqito/states/tests/test_mutually_unbiased_basis.py
  • toqito/matrix_props/tests/test_is_circulant.py
  • toqito/state_props/tests/test_is_npt.py
  • toqito/matrix_props/tests/test_is_totally_positive.py
  • toqito/matrix_ops/tests/test_outer_product.py
  • toqito/rand/tests/test_random_density_matrix.py
  • toqito/states/tests/test_gen_bell.py
  • toqito/state_props/tests/test_is_unextendible_product_basis.py
  • toqito/matrix_props/tests/test_is_diagonally_dominant.py
  • toqito/matrix_props/tests/test_is_unitary.py
  • toqito/rand/tests/test_random_ginibre.py
  • toqito/matrix_props/tests/test_is_hermitian.py
  • toqito/matrix_props/tests/test_is_projection.py
  • toqito/state_opt/tests/test_symmetric_extension_hierarchy.py
  • toqito/matrix_props/tests/test_is_density.py
  • toqito/measurement_ops/tests/test_measure.py
  • toqito/helper/tests/test_expr_as_np_array.py
  • toqito/state_props/tests/test_concurrence.py
  • toqito/state_metrics/tests/test_bures_angle.py
  • toqito/matrix_props/tests/test_is_idempotent.py
  • toqito/states/tests/test_basis.py
  • toqito/state_props/tests/test_is_product.py
  • toqito/channel_props/tests/test_choi_rank.py
  • toqito/channel_props/tests/test_is_quantum_channel.py
  • toqito/state_props/tests/test_negativity.py
  • toqito/matrix_ops/tests/test_vectors_to_gram_matrix.py
  • toqito/channels/tests/test_depolarizing.py
  • toqito/matrices/tests/test_cnot.py
  • toqito/channel_props/tests/test_is_unitary.py
  • toqito/state_metrics/tests/test_sub_fidelity.py
  • toqito/helper/tests/test_channel_dim.py
  • toqito/channel_props/tests/test_is_positive.py
  • toqito/states/tests/test_tile.py
  • toqito/nonlocal_games/tests/test_nonlocal_game.py
  • toqito/states/tests/test_isotropic.py
  • toqito/states/tests/test_brauer.py
  • toqito/state_metrics/tests/test_hilbert_schmidt_inner_product.py
  • toqito/state_props/tests/test_has_symmetric_extension.py
  • toqito/matrix_props/tests/test_is_linearly_independent.py
  • toqito/matrix_props/tests/test_is_identity.py
  • toqito/channel_props/tests/test_is_herm_preserving.py
  • toqito/state_metrics/tests/test_trace_distance.py
  • toqito/states/tests/test_bell.py
  • toqito/channels/tests/test_dephasing.py
  • toqito/matrix_props/tests/test_is_diagonal.py
  • toqito/matrices/tests/test_fourier.py
  • toqito/perms/tests/test_perfect_matchings.py
  • toqito/perms/tests/test_permute_systems.py
  • toqito/states/tests/test_singlet.py
  • toqito/state_metrics/tests/test_bures_distance.py
  • toqito/state_props/tests/test_is_mutually_orthogonal.py
  • toqito/matrix_props/tests/test_is_positive_definite.py
  • toqito/state_ops/tests/test_pure_to_mixed.py
  • toqito/matrix_props/tests/test_is_positive_semidefinite.py
  • toqito/matrix_props/tests/test_sk_norm.py
  • toqito/matrices/tests/test_gen_gell_mann.py
  • toqito/matrices/tests/test_gen_pauli.py
  • toqito/states/tests/test_gisin.py
  • toqito/states/tests/test_max_entangled.py
  • toqito/matrices/tests/test_cyclic_permutation.py
  • toqito/state_props/tests/test_is_pure.py
  • toqito/state_props/tests/test_von_neumann_entropy.py
  • toqito/states/tests/test_w_state.py
  • toqito/matrix_props/tests/test_is_square.py
  • toqito/perms/tests/test_swap_operator.py
  • toqito/matrices/tests/test_pauli.py
  • toqito/matrix_props/tests/test_trace_norm.py
  • toqito/matrix_ops/tests/test_unvec.py
  • toqito/matrices/tests/test_gell_mann.py
  • toqito/state_props/tests/test_is_separable.py
  • toqito/states/tests/test_chessboard.py
  • toqito/matrix_props/tests/test_is_commuting.py
  • toqito/matrices/tests/test_hadamard.py
  • toqito/perms/tests/test_symmetric_projection.py
  • toqito/state_props/tests/test_is_ensemble.py
  • toqito/channels/tests/test_partial_transpose.py
  • toqito/state_props/tests/test_schmidt_rank.py
  • toqito/state_metrics/tests/test_hilbert_schmidt.py
  • toqito/state_props/tests/test_is_mixed.py
  • toqito/helper/tests/test_cvx_kron.py
  • toqito/channels/tests/test_reduction.py
  • toqito/matrix_ops/tests/test_vec.py
  • toqito/matrix_props/tests/test_is_permutation.py
  • #546