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

feat: pyquil v4 upgrade #41

Merged
merged 10 commits into from
Sep 22, 2023
Merged

feat: pyquil v4 upgrade #41

merged 10 commits into from
Sep 22, 2023

Conversation

jselig-rigetti
Copy link
Contributor

@jselig-rigetti jselig-rigetti commented Sep 15, 2023

Closes #40

Updates pyquil to v4 and fixes breaking changes

@jselig-rigetti
Copy link
Contributor Author

The test_run is failing at _convert_to_rs_instruction seemingly because RawInstr has no quil_rs analog.

Context:

program = Program(RawInstr(qasm)).wrap_in_numshots_loop(shots)

# qasm value
'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[3];\ncreg ro[2];\nmeasure q[0] -> ro[0];\nmeasure q[1] -> ro[1];'

@jselig-rigetti jselig-rigetti marked this pull request as ready for review September 21, 2023 14:44
Clbit(ro_reg, clbit.index): loc._replace(registers=[ro_reg])
for clbit, loc in circuit._clbit_indices.items()
if clbit.register.name == orig_readout_name
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Simplified this function overall, but I only had to muck about here in the first place because the prior implementation hadn't altered _clbit_indices, which became necessary somewhere along the way.

Copy link
Contributor

@notmgsk notmgsk left a comment

Choose a reason for hiding this comment

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

LGTM. Might want to update title/description to reflect that this is out of draft.

@jselig-rigetti jselig-rigetti changed the title feat: work-in-progress pyquil v4 upgrade feat: pyquil v4 upgrade Sep 22, 2023
@jselig-rigetti jselig-rigetti merged commit a84ca72 into main Sep 22, 2023
9 checks passed
@jselig-rigetti jselig-rigetti deleted the 40-update-to-pyquil-v4 branch September 22, 2023 19:17
@rigetti-githubbot
Copy link

🎉 This PR is included in version 0.4.6 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update to use pyquil v4
4 participants