(n_rounds: int)
| 63 | |
| 64 | @cudaq.kernel |
| 65 | def kernel(n_rounds: int): |
| 66 | q = cudaq.qubit() |
| 67 | m = mz(q) |
| 68 | for _ in range(n_rounds): |
| 69 | m_new = mz(q) |
| 70 | cudaq.detector(m_new, m) |
| 71 | m = m_new |
| 72 | cudaq.logical_observable(m) |
| 73 | |
| 74 | dem_text = cudaq.dem_from_kernel(kernel, 2) |
| 75 | assert _summary(dem_text) == {"errors": 0, "detectors": 2, "observables": 1} |
nothing calls this directly
no test coverage detected