Test that we can capture float lists inside kernel functions.
()
| 89 | |
| 90 | |
| 91 | def test_float64_capture(): |
| 92 | """Test that we can capture float lists inside kernel functions.""" |
| 93 | |
| 94 | f = [np.float64(1.), np.float64(2)] |
| 95 | |
| 96 | # Capture a list of float |
| 97 | @cudaq.kernel |
| 98 | def float_vec_capture(i: int) -> np.float64: |
| 99 | return f[i] |
| 100 | |
| 101 | for i in range(len(f)): |
| 102 | assert is_close(f[i], float_vec_capture(i)) |
| 103 | |
| 104 | |
| 105 | def test_float64_definition(): |
nothing calls this directly
no test coverage detected