-
Notifications
You must be signed in to change notification settings - Fork 22
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
Update for pyQuil v3 #215
Update for pyQuil v3 #215
Conversation
9bf9085
to
25bb646
Compare
I'm not sure why, but Semaphore can't seem to find pyQuil v3.0.0 when running the
Locally: |
25bb646
to
2d42cb8
Compare
Assuming all the tests etc. pass (no CI here?) LGTM 👍 |
c946c5a
to
7aaa3f5
Compare
@genos Thanks :) CI seems to run on Semaphore for this repo, but I don't know why it can't pick up the latest version of pyQuil... Maybe someone who has access to the Semaphore account can take a peek? |
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.
Looks good to my untrained eyes 😅
"from pyquil.device import gates_in_isa\n", | ||
"from pyquil.noise import decoherence_noise_with_asymmetric_ro, _decoherence_noise_model\n", | ||
"# noise_model = decoherence_noise_with_asymmetric_ro(gates=gates_in_isa(qc.device.get_isa()), p00=0.92, p11=.87)\n", | ||
"from pyquil.noise import decoherence_noise_with_asymmetric_ro, _decoherence_noise_model, _get_qvm_noise_supported_gates\n", |
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.
Are those internal methods something that should be expose properly from pyQuil?
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 is the only place I've seen these used, so I don't know if we should move them over yet.
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 is a great point. I'm thinking we should do a pyQuil v3 follow up for exposing some methods and processes publicly, where external dependencies use them. I've used some private methods in the Cirq integration.
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.
Agree- a follow-up ticket after collecting all of the additional entry points sounds like the right approach.
96d14bf
to
e7ca5bc
Compare
0c4f7f6
to
ec01d05
Compare
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 think this is definitely a major version update. Otherwise, looks pretty ready to go.
"from pyquil.device import gates_in_isa\n", | ||
"from pyquil.noise import decoherence_noise_with_asymmetric_ro, _decoherence_noise_model\n", | ||
"# noise_model = decoherence_noise_with_asymmetric_ro(gates=gates_in_isa(qc.device.get_isa()), p00=0.92, p11=.87)\n", | ||
"from pyquil.noise import decoherence_noise_with_asymmetric_ro, _decoherence_noise_model, _get_qvm_noise_supported_gates\n", |
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 is a great point. I'm thinking we should do a pyQuil v3 follow up for exposing some methods and processes publicly, where external dependencies use them. I've used some private methods in the Cirq integration.
@@ -1 +1 @@ | |||
__version__ = "0.7.1" | |||
__version__ = "0.8.0" |
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 think this should be a major version update.
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.
It is, in the sense that this is still in beta 👍
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.
Yep, 0.8.0 seems right to me.
ec01d05
to
677bcd2
Compare
@@ -0,0 +1,29 @@ | |||
name: Tests |
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.
Let's replace Semaphore with GitHub Actions
8f160bb
to
5b84388
Compare
5b84388
to
e477fdc
Compare
14ff4da
to
1886937
Compare
1886937
to
fe034cd
Compare
@mhodson-rigetti I'm not sure why, but this test falls slightly out of tolerance in CI, but not locally: https://github.com/rigetti/forest-benchmarking/pull/215/checks?check_run_id=3316861010#step:4:567 Any opposition to widening the assertion's atol a bit? Alternately, I could mark the test as xfail and create an issue for it. I'd hate for this to block this PR |
@@ -705,4 +705,4 @@ | |||
}, | |||
"nbformat": 4, | |||
"nbformat_minor": 2 | |||
} | |||
} |
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.
No newline at EOF- would normally be a flake8 violation (is flake8 used in this repo?).
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.
Does flake8 check notebooks by default? Thought you needed some special addon for that.
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.
Source reviewed. Don't see anything out of place.
@ameyer-rigetti regarding the failing test, I checked locally and both the 1Q and 2Q tests there are non-deterministic. Despite setting the seed on the QAM, the results change with every run, and I can induce failures on both tests just by running them enough times. First question is- is the seed broken? If you go back to master, is the result consistent? In which case, pyquil v3 has a defect in terms of seeding the QVM runs. If the last release has the same issue, the only options are (a) re-run the CI until it goes green, and note the issue; with (b) mitigate the error by (i) widening to 3*decay_error in both tests and also potentially increasing the 2Q num_shots=50 and num_sequences_per_depth=30 as per the 1Q case (for a better fit). |
@mhodson-rigetti I was able to replicate non-determinism on master. Here is an example failure:
A look at this test and it seems that there is some randomness generated outside the QVM, specifically in
Let me know if you think we should also increase Change is here: #217 |
@erichulburd don't think you need to modify |
Finally merging this! Just had to be unhooked from Semaphore. Thank you to @mhodson-rigetti , @erichulburd , @dbanty and of course Andrew Meyer! 🥂 |
Description
Update code and tests for pyQuil v3
Closes #213
Checklist
docs/source/changes.rst
) has a description of this change.