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

Introducing: quil-py #140

Merged
merged 63 commits into from
Mar 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
7a1011f
convert to workspace, add quil-py crate
MarquessV Dec 20, 2022
23ef64d
give Expression::FunctionCall a named struct field
MarquessV Dec 23, 2022
4cc7b74
WIP: implement more wrappers
MarquessV Dec 30, 2022
d10bcac
use FunctionCallExpression in tests
MarquessV Jan 3, 2023
c7e4611
add InfixExpression struct for Infix variant
MarquessV Jan 3, 2023
f17e753
add PrefixExpression struct
MarquessV Jan 3, 2023
75d8c53
support adding Programs together, refactor py Program into its own
MarquessV Jan 4, 2023
6e72b02
clippy: remove redundant clones
MarquessV Jan 4, 2023
2f076d5
accomodate rigetti-pyo3 changes
MarquessV Jan 4, 2023
8da4043
refactor: remove unnecessary type aliases
Shadow53 Jan 5, 2023
c8b60a9
port CalibrationSet to Python
MarquessV Jan 11, 2023
91b4853
Merge branch 'python-bindings' of https://github.com/rigetti/quil-rs …
MarquessV Jan 11, 2023
8e264bd
port Waveforms, WaveformDefinition
MarquessV Jan 11, 2023
c014475
port Frame
MarquessV Jan 11, 2023
63a9107
port Declarations
MarquessV Jan 12, 2023
4521d82
port gate definitions, fix display bug on GateDefinition
MarquessV Jan 12, 2023
194292c
add to_headers, rely on program addition instead of separate parser on
MarquessV Jan 12, 2023
9776abf
validate protoquil/quil-t
MarquessV Jan 12, 2023
8cc4fd2
add WAIT instruction
MarquessV Jan 30, 2023
9fa1c35
refactor instruction module
MarquessV Feb 2, 2023
cf0832b
clippy --fix
MarquessV Feb 2, 2023
5a0827b
create reserved module for reserved tokens
MarquessV Feb 3, 2023
9912bb8
add validation module w/ identifier
MarquessV Feb 4, 2023
4f3b53e
actually commit the validation dir
MarquessV Feb 4, 2023
b407e17
apply validation identifier logic
MarquessV Feb 4, 2023
e8fb552
Various improvements to support Gate instruction in pyQuil
MarquessV Feb 7, 2023
f626f9c
implement dagger method
MarquessV Feb 7, 2023
2868a24
fix program comparison implementation
MarquessV Feb 8, 2023
3c7aacd
update .gitignore
MarquessV Feb 8, 2023
093ee68
refactor instructions into a parent module with a gate submodule
MarquessV Feb 8, 2023
d7e6045
flatten module paths
MarquessV Feb 8, 2023
c8ed467
Give PyProgram it's own constructor, add all the python package stuff
MarquessV Feb 8, 2023
cf18371
restructure and clean up quil-py instruction module
MarquessV Feb 9, 2023
74f6ef2
cleanup some old todos
MarquessV Feb 13, 2023
71d4f64
cleanup
MarquessV Feb 13, 2023
bfc9696
more consistent destruct logic
MarquessV Feb 13, 2023
bcf391f
use regex from quil spec
MarquessV Feb 21, 2023
69be996
clean up Cargo.toml
MarquessV Feb 21, 2023
ed2ef9f
Update quil-rs/src/program/calibration.rs
MarquessV Feb 21, 2023
58c317f
Add CONTRIBUTING.md
MarquessV Feb 22, 2023
63f89ba
Merge branch 'python-bindings' of https://github.com/rigetti/quil-rs …
MarquessV Feb 22, 2023
3e15b86
remove validate protoquil/quilt methods
MarquessV Feb 22, 2023
8b88389
allow Gate to be used as a baseclass
MarquessV Feb 23, 2023
91baad2
use pyo3 attribute for subclass definition
MarquessV Feb 24, 2023
4a5c5af
revert visibility change on FrameSet and CalibrationSet
MarquessV Feb 27, 2023
f67f16b
remove unused imports
MarquessV Feb 27, 2023
455971c
instruction module casing
MarquessV Mar 1, 2023
1d8af4b
cleanup return types and error handling in reserved module
MarquessV Mar 1, 2023
c84e3e5
use once_cell to only initialize identifier validation regex once
MarquessV Mar 1, 2023
e062bdb
more docs for refactored Gate types
MarquessV Mar 1, 2023
88f0b04
avoid unnecessary allocations
MarquessV Mar 1, 2023
9bf17b8
simpler display impl
MarquessV Mar 1, 2023
cbe85fc
simpler display impl
MarquessV Mar 1, 2023
97642fa
avoid unnecessary allocations
MarquessV Mar 1, 2023
e662651
GateType doc string
MarquessV Mar 3, 2023
4ec3b13
use py_wrap_simple_enum where applicable
MarquessV Mar 6, 2023
dc7379c
link to issue for TODO
MarquessV Mar 6, 2023
d0d69fc
merge main
MarquessV Mar 6, 2023
804c664
make dagger method public
MarquessV Mar 6, 2023
a559df8
Update CONTRIBUTING.md
MarquessV Mar 6, 2023
898d872
cleanup cargo deny
MarquessV Mar 6, 2023
090ba67
restore submodule to correct directory
MarquessV Mar 7, 2023
373816d
fix .gitmodules
MarquessV Mar 7, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/target
node_modules
Cargo.lock
.venv
.DS_Store

# JetBrains Editors
.idea/
.idea/
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "benches/quilc"]
path = benches/quilc
[submodule "quil-rs/benches/quilc"]
path = quil-rs/benches/quilc
url = https://github.com/quil-lang/quilc.git
34 changes: 34 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Contributing to quil-rs and quil-py

Welcome to the `quil-rs` project, and thanks for contributing!

This guide is to help walk you through contributing in different ways to `quil-rs` and `quil-py`,
as well as share some general how-tos for development, testing, and maintenance.

## Table of Contents

[Developer Guidelines](#developer-guidelines)

- [Instruction Module](#instruction-module)

## Developer Guidelines

### Instruction Module

The `instruction` module is large, so we follow a few guidelines when adding or changing instructions to help keep
them organized and consistent in both the `quil-rs` and `quil-py` crates.

All instruction definitions live inside of the `instruction` module. For ease of development,
instruction types are grouped into submodules so that similar instructions can be modified and viewed together
rather than having all instructions in one large file. However, to avoid imposing potentially arbritrary
instruction categories onto the user, the `instruction` module publically re-exports all of its types from
its root.

This module structure should remain consistent between both `quil-rs` and `quil-py`. For example, the file
`src/instruction/gate.rs` exists in both `quil-rs` and `quil-py` and contains the same set of instruction
definitions (for their respective target language, of course).

In short, an instruction should:
1. Be organized in the equivalent `instruction` submodule for both `quil-rs` and `quil-py` crates
2. Only be re-exported publicly from the root of the `Instruction` module

Loading