Commit 9486e3f
Add unit tests for TFQPauliSumCollector.collect (#1015)
This change implements unit tests for the `collect` method in
`TFQPauliSumCollector`, addressing a testing gap in
`batch_util_test.py`. The new tests cover:
- Standard Pauli Z observable (expected energy -1.0)
- Identity observable (expected energy 1.0)
- Mixed observable (Z + 2.0*I) (expected energy 1.0)
---------
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>1 parent c987980 commit 9486e3f
1 file changed
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
311 | 333 | | |
312 | 334 | | |
313 | 335 | | |
0 commit comments