Commit 95bebae
authored
Reject formulas as keys of ParamResolvers (#5384)
* Reject formulas as keys of ParamResolvers
- A ParamResolver resolves variables into values.
- Having non-trivial formulas as keys allows a significant
complexity and ambiguity into ParamResolvers, since it is
unclear how much is supported. Prevent this case altogether
by raising an error if non-symbol formulas are used in ParamResolvers.
Fixes: #35501 parent 1b7a800 commit 95bebae
File tree
4 files changed
+25
-24
lines changed- cirq-core/cirq/study
- cirq-google/cirq_google/api/v2
4 files changed
+25
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
58 | 61 | | |
59 | 62 | | |
60 | 63 | | |
| |||
68 | 71 | | |
69 | 72 | | |
70 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
71 | 77 | | |
72 | 78 | | |
73 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
| 159 | + | |
170 | 160 | | |
171 | 161 | | |
172 | 162 | | |
173 | 163 | | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
| 164 | + | |
| 165 | + | |
180 | 166 | | |
181 | 167 | | |
182 | 168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
65 | | - | |
66 | 64 | | |
67 | | - | |
68 | | - | |
| 65 | + | |
| 66 | + | |
69 | 67 | | |
70 | 68 | | |
71 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
77 | | - | |
78 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
79 | 90 | | |
80 | 91 | | |
81 | 92 | | |
| |||
0 commit comments