Skip to content

feat: add Circuit.from_pyquil import#16

Open
huhaha120 wants to merge 1 commit into
marqov-dev:mainfrom
huhaha120:codex/marqov-from-pyquil
Open

feat: add Circuit.from_pyquil import#16
huhaha120 wants to merge 1 commit into
marqov-dev:mainfrom
huhaha120:codex/marqov-from-pyquil

Conversation

@huhaha120

Copy link
Copy Markdown

Summary

  • Add Circuit.from_pyquil() to import pyQuil Program objects into Marqov circuits.
  • Support the canonical gate set from CONTRIBUTING.md: H, X, Y, Z, S, T, RX, RY, RZ, CNOT, CZ, and SWAP.
  • Add a pyquil optional dependency extra and include it in the all extra.
  • Add focused tests for canonical gate mapping, unsupported gates, symbolic rotation parameters, a hand-written Bell-pair Quil program, and a to_pyquil() / from_pyquil() round-trip.

Closes #4

Tests

  • python3 -m py_compile marqov/circuits.py tests/test_circuits.py
  • uv run --python 3.12 --with ruff ruff check marqov/circuits.py tests/test_circuits.py
  • uv run --python 3.12 --extra dev --extra pyquil python -m pytest tests/test_circuits.py::TestFromPyquil -q
  • git diff --check

AI Assistance Disclosure

This contribution was AI-assisted. I used Codex as a coding assistant, reviewed the issue requirements and implementation scope, and verified the change locally with the tests listed above.

@huhaha120 huhaha120 force-pushed the codex/marqov-from-pyquil branch from 409bafe to 8130b02 Compare June 3, 2026 02:27
@ddri

ddri commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Thanks for the PR. I see you've made a large amount of PRs on a large number of projects in the unitaryHACK listing. The concern here would be that Codex has done all the work, and there's not been any good-faith effort to really understand the project, make thoughtful decisions, and properly test the solution in context.

To help me understand if that's the case, I'd like to hear your thoughts on this, and talk a little about your experience and approach using the Marqov SDK.

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.

feat(circuits): add Circuit.from_pyquil() import

2 participants