-
Notifications
You must be signed in to change notification settings - Fork 47
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
[Question] NoiseAwarePlacement
for single-qubit gates
#922
Comments
Hello, In TKET, when "Mapping" a virtual quantum
I mention this to try and motivate why a Therefore, if there is no physically motivated reason for assigning a virtual However, while this logic is sound for non-noise-aware instances, as you point out in this case, it is not assigning As it's unlikely algorithm circuits will have |
I also see the same behavior of the noise aware placement when a qubit has no gate, from some corner cases that the qubit does initially have gates, but the gates are compiled away for certain angles.
Is there any timeline about this catch case? |
@sjdilkes Is there any timeline about catching the cases for qubits with only 1-qubit gate and no gate? |
Really sorry for the slow reply and fix here - I have moved the catch case described above int our imminent work and should hopefully have a fix in the next release. |
The catch previously mentioned here for |
Hi @sjdilkes, thanks for updating the code about this issue! In the latest version of pytket, I indeed now see the test case of three H gates works as expected. However, in the case where there are mixed use of one- and two-qubit gates (like CX(0,1) and then H(2)), the qubit 2 is still unplaced. |
Hi @yitchen-tim, this is intended behaviour. When routing, we don't always assign every virtual Qubit in a Circuit to a physical Qubit of a Device when completing placement, as we find that allowing some virtual Qubit's to be dynamically assigned during the routing process can improve compilation results. If routing finds any qubits unassigned once it is finished routing for all two-qubit gates, it will assign them to remaining free physical Qubit's (or reassign them to ancilla qubits used during routing). Though this process isn't noise aware - so qubit 2 in your example maybe ends up on a physical Qubit that reports worse fidelity. For the case we discussed previously where the Circuit has no two-qubit gates, we can safely assign all virtual Qubit's to physical Qubit's as we know this won't effect later routing (as there is no routing to be done). For the mixed case you've shared, if we were to assign qubit 2 then we risk a drop in routing performance. However this is our current thinking - we can try to find a new solution that works for your case. I have a couple of a suggestions on which your input would be appreciated:
|
This issue has been automatically marked as stale. |
thanks @sjdilkes, I think the second method sounds better, given the first maybe suboptimal for routing. Ideally, a user would apply the reassign pass at the end. |
This issue has been automatically marked as stale. |
When using
NoiseAwarePlacement
, if I only have circuits with one-qubit gates, it seems like theNoiseAwarePlacement
module doesn't work.For example, in the below example, I'd have expected it to map the two H gates to qubits 1 and 2 (much lower node errors) but it'd return
unplaced
.How should I use
NoiseAwarePlacement
in these scenarios?The text was updated successfully, but these errors were encountered: