-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Correct MitTask type #197
base: main
Are you sure you want to change the base?
Changes from all commits
e551c8d
06e14be
212d850
e5b0f37
e8247d7
ed084e7
539e192
43d4838
9fafe5a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,8 @@ | |
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
from typing import cast | ||
|
||
from pytket import Circuit | ||
from pytket.extensions.quantinuum.backends.leakage_gadget import ( | ||
prune_shots_detected_as_leaky, | ||
|
@@ -69,13 +71,15 @@ def test_compare_with_prune() -> None: | |
), | ||
n_shots=detection_circuit_shots.Shots, | ||
) | ||
for detection_circuit_shots in detection_circuit_shots_list | ||
for detection_circuit_shots in cast( | ||
list[CircuitShots], detection_circuit_shots_list | ||
) | ||
] | ||
|
||
qermit_result_list = postselection_task( | ||
( | ||
result_list, | ||
postselect_mgr_list, | ||
postselect_mgr_list, # type: ignore | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is required since PostselectMgr, is not a recognised wire type. Simply adding it to the list of recognised wire types induces cyclic imports. I don't really know what the right solution to this is... I assume there must be a way to define a type annotation for PostselectMgr within Another solution is to move serialised versions of PostselectMgr along wires. As far as I can tell that is the best solution, but would be some significant work. Another solution would be to allow Any as a wire type, which I don't want to do... |
||
) | ||
) | ||
pytket_result_list = [ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if there is a more succinct way of doing this. I would like
Tuple[List[Wire], ...]
to work but that assumes everyList[Wire]
inTuple
uses the sameWire
.