Skip to content
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

Merged
merged 7 commits into from
Mar 31, 2016
Merged

Feature Z-CR target #9

merged 7 commits into from
Mar 31, 2016

Conversation

dieris
Copy link
Collaborator

@dieris dieris commented Feb 25, 2016

Applies the Z gate to all CR pulses where the qubit is the target

dieris added 2 commits February 25, 2016 17:18
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):
Copy link
Collaborator

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?

Copy link
Collaborator

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).

@blakejohnson
Copy link
Collaborator

I guess what you are wanting to happen here is to propagate Z's onto the relevant Edges when called on a Qubit, right?

@dieris
Copy link
Collaborator Author

dieris commented Feb 29, 2016

the thing is that I only want to shift if qubit is the target, not the control

@caryan
Copy link
Contributor

caryan commented Feb 29, 2016

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 Ztheta that we'll miss.

@blakejohnson
Copy link
Collaborator

I think doing this The Right Way™ would be fairly simple. We just want a new function propagate_node_frame_to_edges that the compiler runs after normalizing a sequence into PulseBlocks that pushes any non-zero frame change on a node to the appropriate edges.

dieris added 3 commits February 29, 2016 18:29
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
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 75.785% when pulling 1f07a3a on feature/Z-CRtarget into 6c82a6f on master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 75.812% when pulling 9fda933 on feature/Z-CRtarget into 6c82a6f on master.

@blakejohnson
Copy link
Collaborator

I think this is good to go, now.

@blakejohnson blakejohnson merged commit a877dba into master Mar 31, 2016
@blakejohnson blakejohnson deleted the feature/Z-CRtarget branch March 31, 2016 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants