Define N detectors by pairing two measurement vectors element-wise. Standard form for cross-round detectors: each detector ``i`` is the parity of ``prev[i]`` and ``curr[i]``. Both arguments must be ``list[cudaq.measure_handle]`` handles (returned by ``kernel.mz`` on a
(self, prev, curr)
| 1306 | qec.ObservableOp(values, observableIndex=idxAttr) |
| 1307 | |
| 1308 | def detectors(self, prev, curr): |
| 1309 | """Define N detectors by pairing two measurement vectors |
| 1310 | element-wise. Standard form for cross-round detectors: each |
| 1311 | detector ``i`` is the parity of ``prev[i]`` and ``curr[i]``. |
| 1312 | Both arguments must be ``list[cudaq.measure_handle]`` handles |
| 1313 | (returned by ``kernel.mz`` on a ``qvector``). |
| 1314 | """ |
| 1315 | with self.ctx, self.insertPoint, self.loc: |
| 1316 | prevV = self.__qecOperandValue(prev, "detectors") |
| 1317 | currV = self.__qecOperandValue(curr, "detectors") |
| 1318 | for v in (prevV, currV): |
| 1319 | if not cc.StdvecType.isinstance(v.type): |
| 1320 | emitFatalError("kernel.detectors arguments must each be a " |
| 1321 | "list[cudaq.measure_handle]") |
| 1322 | qec.DetectorsOp(prevV, currV) |
| 1323 | |
| 1324 | def adjoint(self, otherKernel, *target_arguments): |
| 1325 | """ |