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

Bump python version #121

Merged
merged 6 commits into from
Feb 9, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
9 changes: 6 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ on:
- master
pull_request:


jobs:
tests:
runs-on: ubuntu-latest

strategy:
matrix:
python-version: [3.8, '3.10']
python-version: ["3.8", "3.10"]

steps:
- name: Cancel Previous Runs
Expand Down Expand Up @@ -55,6 +54,10 @@ jobs:
integration-tests:
runs-on: ubuntu-latest

strategy:
matrix:
python-version: ["3.8", "3.10"]

steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.4.1
Expand All @@ -72,7 +75,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.7
python-version: ${{ matrix.python-version }}

- name: Install requirements
run: |
Expand Down
29 changes: 29 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.8"
# You can also specify other tool versions:
# nodejs: "19"
# rust: "1.64"
# golang: "1.19"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: doc/conf.py

# If using Sphinx, optionally build your docs in additional formats such as PDF
# formats:
# - pdf

# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: doc/requirements.txt
3 changes: 0 additions & 3 deletions pennylane_rigetti/qpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,8 @@ def expval(self, observable, shot_range=None, bin_size=None):

# `measure_observables` called only when parametric compilation is turned off
if not self.parametric_compilation:

# Single-qubit observable
if len(device_wires) == 1:

# Ensure sensible observable
assert observable.name in [
"PauliX",
Expand All @@ -142,7 +140,6 @@ def expval(self, observable, shot_range=None, bin_size=None):

# Multi-qubit observable
elif len(device_wires) > 1 and isinstance(observable, Tensor):

# All observables are rotated to be measured in the Z-basis, so we just need to
# check which wires exist in the observable, map them to physical qubits, and measure
# the product of PauliZ operators on those qubits
Expand Down
1 change: 0 additions & 1 deletion pennylane_rigetti/wavefunction.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ def expand_state(self):

for string, amplitude in zip(subsystem_bit_strings, self._state):
for w in inactive_wires:

# expand the bitstring by inserting a zero bit for each inactive qubit
string = np.insert(string, w, 0)

Expand Down