Commit 7228447
authored
Clean up recent changes in sub_state_vector (#8081)
- Verify the maximum eigenvalue is indeed close to 1.
- Enable arbitrary order of `keep_indices` as before.
- Use the same tolerance check as before #8077 with rtol=0.
This allows to restore previous tests instead of having
to do them with larger state vector deviation.
- Put back RaiseValueErrorIfNotProvided as a default for
`sub_state_vector`.
This allows using `None` for the fallback return value.
- Add check for negative values in `keep_indices`.
Follow-up to #80771 parent 02e927f commit 7228447
2 files changed
Lines changed: 31 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
29 | 38 | | |
30 | 39 | | |
31 | 40 | | |
| |||
471 | 480 | | |
472 | 481 | | |
473 | 482 | | |
474 | | - | |
| 483 | + | |
475 | 484 | | |
476 | | - | |
| 485 | + | |
477 | 486 | | |
478 | 487 | | |
479 | 488 | | |
| |||
542 | 551 | | |
543 | 552 | | |
544 | 553 | | |
545 | | - | |
| 554 | + | |
546 | 555 | | |
547 | 556 | | |
548 | 557 | | |
549 | 558 | | |
550 | | - | |
551 | | - | |
| 559 | + | |
552 | 560 | | |
553 | 561 | | |
554 | 562 | | |
555 | 563 | | |
556 | | - | |
557 | | - | |
| 564 | + | |
558 | 565 | | |
559 | 566 | | |
560 | 567 | | |
561 | 568 | | |
562 | | - | |
563 | | - | |
| 569 | + | |
| 570 | + | |
564 | 571 | | |
565 | 572 | | |
566 | 573 | | |
567 | 574 | | |
568 | 575 | | |
569 | 576 | | |
570 | | - | |
| 577 | + | |
571 | 578 | | |
572 | 579 | | |
573 | 580 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
384 | 384 | | |
385 | 385 | | |
386 | 386 | | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
393 | 391 | | |
394 | 392 | | |
395 | 393 | | |
396 | | - | |
397 | | - | |
| 394 | + | |
398 | 395 | | |
399 | 396 | | |
400 | | - | |
| 397 | + | |
401 | 398 | | |
402 | 399 | | |
403 | 400 | | |
404 | | - | |
| 401 | + | |
405 | 402 | | |
406 | 403 | | |
407 | 404 | | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
408 | 408 | | |
409 | 409 | | |
410 | 410 | | |
411 | | - | |
412 | | - | |
| 411 | + | |
413 | 412 | | |
414 | 413 | | |
415 | 414 | | |
| |||
482 | 481 | | |
483 | 482 | | |
484 | 483 | | |
| 484 | + | |
| 485 | + | |
485 | 486 | | |
486 | 487 | | |
487 | 488 | | |
| |||
0 commit comments