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

Add measurement gate. #141

Merged
merged 3 commits into from
Jul 6, 2020
Merged

Add measurement gate. #141

merged 3 commits into from
Jul 6, 2020

Conversation

sergeisakov
Copy link
Collaborator

This PR also cleans up statespace.

@sergeisakov sergeisakov marked this pull request as draft June 30, 2020 22:32
Copy link
Collaborator

@95-martin-orion 95-martin-orion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First pass of review comments - still need to review tests, and likely need another read of the *for files.

I can think of several Cirq users who will be very happy to have this. On their behalf, thanks for building this feature out!

lib/gate_appl.h Show resolved Hide resolved
lib/gate_appl.h Show resolved Hide resolved
lib/statespace.h Outdated Show resolved Hide resolved
lib/statespace.h Outdated Show resolved Hide resolved
lib/parfor.h Outdated Show resolved Hide resolved
lib/statespace_avx.h Outdated Show resolved Hide resolved
lib/statespace.h Outdated Show resolved Hide resolved
lib/fuser_basic.h Outdated Show resolved Hide resolved
@@ -49,7 +51,7 @@ struct BasicGateFuser final {
* applied together. Note that gates fused with this method are not
* multiplied together until ApplyFusedGate is called on the output.
* @param num_qubits The number of qubits acted on by 'gates'.
* @param gates The gates to be fused.
* @param gates The gates to be fused. Gate times should be ordered.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a change from our previous assumptions, correct? re: #74

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct. Gates don't get explicitly sorted. So there was a possibility of getting incorrect results for unordered gate times.

lib/fuser_basic.h Show resolved Hide resolved
@sergeisakov sergeisakov marked this pull request as ready for review July 1, 2020 21:52
Copy link
Collaborator

@95-martin-orion 95-martin-orion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One remaining request for comments - otherwise this is ready to merge. Thanks again!

@sergeisakov
Copy link
Collaborator Author

Thank you for the review. I added a function comment.

@sergeisakov sergeisakov merged commit 8ad553c into master Jul 6, 2020
@sergeisakov sergeisakov deleted the measurements branch July 6, 2020 18:13
This was referenced Jul 10, 2020
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.

2 participants