Skip to content

Commit

Permalink
chore: Remove Python 3.11 upper bound (#14)
Browse files Browse the repository at this point in the history
* chore: Remove Python 3.11 upper bound

* chore: Bump pyquil to latest

* fix: SQRT-X test by using existing DefGet pattern
  • Loading branch information
jamesclark-Zapata authored Oct 19, 2023
1 parent 3037342 commit e2d6ad1
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
# Run jobs for a couple of Python versions.
strategy:
matrix:
python: ["3.8", "3.9", "3.10"]
python: ["3.9", "3.10", "3.11"]

name: TestCoverage - Python ${{ matrix.python }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
# Run jobs for a couple of Python versions.
strategy:
matrix:
python: ["3.8", "3.9", "3.10"]
python: ["3.9", "3.10", "3.11"]

name: Style - Python ${{ matrix.python }}

Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ include_package_data = True
package_dir =
= src
packages = find_namespace:
python_requires = >=3.8,!=3.9.7,<3.11
python_requires = >=3.9,!=3.9.7

install_requires =
pyquil>=2.25, <=3.3
pyquil~=4.0
orquestra-quantum


Expand Down
23 changes: 15 additions & 8 deletions tests/orquestra/integrations/forest/circuit_conversions_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,22 @@ def pyquil_u3_definition():
)


def pyquil_sqrt_x_definition():
return pyquil.quil.DefGate(
"SQRT-X",
np.array(
[
[0.5 + 0.5j, 0.5 - 0.5j],
[0.5 - 0.5j, 0.5 + 0.5j],
]
),
)


PYQUIL_XX = pyquil_xx_definition()
PYQUIL_RH = pyquil_rh_definition()
PYQUIL_U3 = pyquil_u3_definition()
PYQUIL_SQRT_X = pyquil_sqrt_x_definition()


EQUIVALENT_CIRCUITS = [
Expand Down Expand Up @@ -196,14 +209,8 @@ def pyquil_u3_definition():
_circuit.Circuit(
[SQRT_X_DEF()(3)],
),
pyquil.Program([("SQRT-X", 3)]).defgate(
"SQRT-X",
np.array(
[
[0.5 + 0.5j, 0.5 - 0.5j],
[0.5 - 0.5j, 0.5 + 0.5j],
]
),
pyquil.Program(
[PYQUIL_SQRT_X, PYQUIL_SQRT_X.get_constructor()(3)],
),
),
(
Expand Down

0 comments on commit e2d6ad1

Please sign in to comment.