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

dev branch fixes #396

Merged
merged 9 commits into from
Dec 2, 2021
Merged
Show file tree
Hide file tree
Changes from 8 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
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ orbs:
jobs:
build:
docker:
- image: circleci/python:3.7.2
- image: circleci/python:3.7.12
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Need a higher version of gcc to compile Lightning. This image pulls in GCC 10.

- image: rigetti/quilc
command:
- -R
Expand All @@ -30,7 +30,7 @@ jobs:
sudo apt install pandoc -qq
python3 -m venv venv
. venv/bin/activate
pip install pip setuptools --upgrade
pip install pip setuptools cmake --upgrade
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Need a high version of cmake, pip installing pulls in a high enough version (as opposed to using apt-get install).

pip install -r requirements.txt
pip install --no-deps -r requirements_no_deps.txt

Expand Down
6 changes: 3 additions & 3 deletions demonstrations/tutorial_classical_shadows.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def calculate_classical_shadow(circuit_template, params, shadow_size, num_qubits
dev = qml.device("default.qubit", wires=num_qubits, shots=1)

# simple circuit to prepare rho
@qml.qnode(device=dev)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The new decorator was taking a dev argument instead of device. This has now been changed in PennyLane too, PennyLaneAI/pennylane#1969, but left the change here too just to be on the safe side.

@qml.qnode(dev)
def local_qubit_rotation_circuit(params, **kwargs):
observables = kwargs.pop("observable")
for w in dev.wires:
Expand Down Expand Up @@ -355,7 +355,7 @@ def shadow_state_reconstruction(shadow):

# circuit to create a Bell state and measure it in
# the bases specified by the 'observable' keyword argument.
@qml.qnode(device=dev)
@qml.qnode(dev)
def bell_state_circuit(params, **kwargs):
observables = kwargs.pop("observable")

Expand Down Expand Up @@ -582,7 +582,7 @@ def shadow_bound(error, observables, failure_rate=0.01):
dev = qml.device("default.qubit", wires=num_qubits, shots=1)


@qml.qnode(device=dev)
@qml.qnode(dev)
def circuit(params, **kwargs):
observables = kwargs.pop("observable")
for w in range(num_qubits):
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ sympy==1.6.2
pillow==7.1.0
pip==21.1
pyscf==1.7.6
git+https://github.com/PennyLaneAI/pennylane-lightning.git
Jaybsoni marked this conversation as resolved.
Show resolved Hide resolved
git+https://github.com/PennyLaneAI/pennylane.git
git+https://github.com/PennyLaneAI/pennylane.git#subdirectory=qchem
git+https://github.com/PennyLaneAI/pennylane-sf.git
Expand Down