Test that we can pass float lists to kernel functions.
()
| 19 | |
| 20 | |
| 21 | def test_float_params(): |
| 22 | """Test that we can pass float lists to kernel functions.""" |
| 23 | |
| 24 | f = [1., 2] |
| 25 | |
| 26 | # Pass a list of float as a parameter |
| 27 | @cudaq.kernel |
| 28 | def float_vec_param(vec: list[float], i: int) -> float: |
| 29 | return vec[i] |
| 30 | |
| 31 | for i in range(len(f)): |
| 32 | assert is_close(f[i], float_vec_param(f, i)) |
| 33 | |
| 34 | |
| 35 | def test_float_capture(): |
nothing calls this directly
no test coverage detected