def test_superoperator_to_kraus_fixed_values(superoperator, expected_kraus_operators) -> None:
    """Verifies that cirq.kraus_to_superoperator computes the correct channel matrix."""
    actual_kraus_operators = cirq.superoperator_to_kraus(superoperator)
    for i in (0, 1):
        for j in (0, 1):
            input_rho = np.zeros((2, 2))
            input_rho[i, j] = 1
            actual_rho = apply_kraus_operators(actual_kraus_operators, input_rho)
            expected_rho = apply_kraus_operators(expected_kraus_operators, input_rho)
            assert np.allclose(actual_rho, expected_rho)
Verifies that cirq.kraus_to_superoperator computes the correct channel matrix.
cirq-core/cirq/qis/channels_test.py