Commit c6be13e
Update to PyO3 0.27 (Qiskit#15213)
* Update PyO3 dependencies
* Switch uses of `Bound::downcast*` to corresponding `cast*`
The new `cast` variants are available on both `Bound` and `Borrowed`,
and have slightly different semantics around the returned errors.
* Switch to new `FromPyObject` signature
The new form of the trait uses `Borrowed`, causing it to need another
lifetime parameter, and an explicit `Error` type. Where appropriate /
easy, I switched the error types away from the complete `PyErr`, even if
most of our handling of those errors does eventually convert them into
`PyErr` for now.
In places where extraction delegates to other methods, particularly
where those methods are logical mirrors to `FromPyObject`, this commit
also updates the signatures to use `Borrowed` instead of `&Bound`.
In a couple of places, the extraction being in terms of `Borrowed` meant
that trait implementations that are only accessible on `Bound` (for
example `impl IntoIterator for &Bound<PyDict>`) needed some
dereferencing inserted to re-satisfy the bounds.
* Switch to undeprecated `import_exception`
* Revert failure message change1 parent 3393a30 commit c6be13e
55 files changed
Lines changed: 443 additions & 368 deletions
File tree
- crates
- circuit_library/src
- circuit/src
- classical
- expr
- parameter
- qasm3/src
- quantum_info/src
- pauli_lindblad_map
- sparse_observable
- synthesis/src/evolution
- transpiler/src
- passes
- sabre
- vf2
- target
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
99 | 103 | | |
100 | | - | |
101 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
102 | 108 | | |
103 | 109 | | |
104 | | - | |
| 110 | + | |
105 | 111 | | |
106 | 112 | | |
107 | 113 | | |
| |||
509 | 515 | | |
510 | 516 | | |
511 | 517 | | |
512 | | - | |
513 | | - | |
514 | | - | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
515 | 523 | | |
516 | 524 | | |
517 | 525 | | |
| |||
629 | 637 | | |
630 | 638 | | |
631 | 639 | | |
632 | | - | |
633 | | - | |
634 | | - | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
635 | 645 | | |
636 | 646 | | |
637 | 647 | | |
| |||
761 | 771 | | |
762 | 772 | | |
763 | 773 | | |
764 | | - | |
| 774 | + | |
765 | 775 | | |
766 | 776 | | |
767 | 777 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
106 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
107 | 112 | | |
108 | 113 | | |
109 | 114 | | |
| |||
121 | 126 | | |
122 | 127 | | |
123 | 128 | | |
124 | | - | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
125 | 133 | | |
126 | 134 | | |
127 | 135 | | |
| |||
0 commit comments