-
Notifications
You must be signed in to change notification settings - Fork 12
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
Feature Z-CR target #9
Conversation
Z(q) shifts the reference frame for all CR pulses with q as the target --DR
if hasattr(ChannelLibrary.channelLib,"connectivityG"): | ||
for node in ChannelLibrary.channelLib.connectivityG.nodes(): | ||
#shift the reference for all CR gates with qubit as the target | ||
if ChannelLibrary.channelLib.connectivityG.has_predecessor(qubit,node): |
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.
This seems like a strange way to walk the graph. Don't you just want all neighbors of qubit
?
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.
So, I think what you want to iterate over is connectivityG.predecessors(qubit)
.
I guess what you are wanting to happen here is to propagate |
the thing is that I only want to shift if |
We should merge for now as we need this behaviour but I don't like the hidden side effects. It seems this should this phase tracking should happen at a separate pass because there will be other frame changes than just |
I think doing this The Right Way™ would be fairly simple. We just want a new function |
CompileUtils.SetUp does not create a new channelLib. Instead, it sets its channelDict. The graph then needs to be updated. Also, qubits are already defined at setup, I don't think we need to create them again within each test
This should make it more generic, but it's still restricted to CR gates
I think this is good to go, now. |
Applies the Z gate to all CR pulses where the qubit is the target