Commit 56a16ab
Create a secure internal path for custom prefixes in registers. (#14005)
* FIx: Create an internal path for custom prefixes in registers.
Prior implementations would replace the Register's prefix attribute inplace which is an unsafe operation. The following commits add a secure path for a provisional replacement of a register's prefix name to fix changed unsafe behavior from #13860.
* Fix: Address review comments
- Add test-case
* Apply suggestions from code review
Co-authored-by: Kevin Hartman <kevin@hart.mn>
* Fix: Address more review comments
* Fix: Lint error
* Update test/python/circuit/test_circuit_operations.py
Co-authored-by: Elena Peña Tapia <57907331+ElePT@users.noreply.github.com>
---------
Co-authored-by: Kevin Hartman <kevin@hart.mn>
Co-authored-by: Elena Peña Tapia <57907331+ElePT@users.noreply.github.com>1 parent ddd0401 commit 56a16ab
4 files changed
Lines changed: 49 additions & 5 deletions
File tree
- crates/circuit/src
- qiskit
- circuit
- transpiler/passes/layout
- test/python/circuit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
771 | 771 | | |
772 | 772 | | |
773 | 773 | | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
774 | 793 | | |
775 | 794 | | |
776 | 795 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3889 | 3889 | | |
3890 | 3890 | | |
3891 | 3891 | | |
3892 | | - | |
| 3892 | + | |
3893 | 3893 | | |
3894 | 3894 | | |
3895 | 3895 | | |
3896 | 3896 | | |
3897 | 3897 | | |
3898 | 3898 | | |
3899 | 3899 | | |
3900 | | - | |
| 3900 | + | |
3901 | 3901 | | |
3902 | 3902 | | |
3903 | 3903 | | |
| |||
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
96 | | - | |
97 | | - | |
| 95 | + | |
| 96 | + | |
98 | 97 | | |
99 | 98 | | |
100 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
852 | 852 | | |
853 | 853 | | |
854 | 854 | | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
855 | 881 | | |
856 | 882 | | |
857 | 883 | | |
| |||
0 commit comments