-
Notifications
You must be signed in to change notification settings - Fork 35
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
Add Hermitian Support for Finite-Shot Measurement Statistics #451
base: main
Are you sure you want to change the base?
Changes from 64 commits
f0733e7
043bd0a
862070f
19b7976
0025b72
4a4ba17
8a7c804
fc6c4f7
d2a369f
0e563f2
200e37d
300ff89
116b4b3
7b74c10
9db1bc1
e4426cd
0090442
d83f283
93b6054
89da0ee
819e889
3df3c41
35b5533
a91c893
a868802
ed64d03
4467024
4cff4fe
6999037
a8ac1bd
6fbf6e6
89ab873
7c97813
11326af
c8ded02
c365730
a687893
4891bc5
bd305d9
14fd068
d1343ac
68d52e2
0b6b438
f1bb78d
1ff7f1e
c71e26d
4287394
a1bcef8
279e901
c00438b
8f87ac4
1115b02
7444ee4
c3f9b36
eb04c77
d53517b
a32ccdf
2abcd3d
7c5ae40
9bb29e1
343b2ba
b4b553a
9d85530
8aa5a04
90ad52f
934c80b
5c4d9a2
7195af7
6c1ae4b
490f7c2
d999dd3
63f6bb9
a35da01
ba4bae5
7abb4ea
4fe8806
b2ec3b5
64f505d
b2ee43d
5922f21
cc427d1
cd56be7
ea4fbf7
ade3aa2
cf832ff
d089593
b401d64
f8e106c
3f9fb3c
d94ec96
ccecc1f
921dee1
165f9da
bf9492d
12df432
f2a66e1
7f7da4f
71ec99b
017c567
05a7052
2fab1e2
79f5e19
71af0cf
832657c
7de6965
66720a5
d84f9ba
f58449f
27b21c9
f8fb90c
9c694d0
9b73fd0
504f9fe
e9be89a
0decf35
bc64e1a
41b7d85
0b0c0c4
17a61e8
b5cbc1a
04dca15
02be098
708068d
ddfaba9
360607c
030f472
3296112
cdd02b4
d9c3921
25fe0b7
b471aef
c0b1564
e53c243
151a4b8
257f51d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -136,7 +136,7 @@ jobs: | |||||
|
||||||
- name: Install Dependencies (Python) | ||||||
run: | | ||||||
python${{ matrix.python_version }} -m pip install wheel numpy pybind11 PyYAML | ||||||
python${{ matrix.python_version }} -m pip install wheel numpy pybind11 PyYAML scipy | ||||||
|
||||||
# Required for MHLO and building MLIR with protected symbols. | ||||||
# (Don't forget to add the build directory to PATH in subsequent steps, so | ||||||
|
@@ -230,7 +230,7 @@ jobs: | |||||
|
||||||
- name: Install Dependencies (Python) | ||||||
run: | | ||||||
python${{ matrix.python_version }} -m pip install wheel numpy pybind11 PyYAML | ||||||
python${{ matrix.python_version }} -m pip install wheel numpy pybind11 PyYAML scipy | ||||||
|
||||||
- name: Get Cached LLVM Source | ||||||
id: cache-llvm-source | ||||||
|
@@ -285,13 +285,14 @@ jobs: | |||||
# Build Catalyst-Runtime | ||||||
- name: Build Catalyst-Runtime | ||||||
run: | | ||||||
# TODO: Remove tmp tag 'add_dldso' before merge | ||||||
cmake -S runtime -B runtime-build -G Ninja \ | ||||||
-DCMAKE_BUILD_TYPE=Release \ | ||||||
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=$GITHUB_WORKSPACE/runtime-build/lib \ | ||||||
-DPYTHON_EXECUTABLE=$(which python${{ matrix.python_version }}) \ | ||||||
-Dpybind11_DIR=$(python${{ matrix.python_version }} -c "import pybind11; print(pybind11.get_cmake_dir())") \ | ||||||
-DENABLE_LIGHTNING_KOKKOS=ON \ | ||||||
-DLIGHTNING_GIT_TAG="v0.35.0" \ | ||||||
-DLIGHTNING_GIT_TAG="add_dldso" \ | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just leaving a comment here about our procedure to target development versions of lightning:
This ensures that the main branch of Catalyst builds reproducibly and correctly for CI & developers. |
||||||
-DKokkos_ENABLE_SERIAL=ON \ | ||||||
-DKokkos_ENABLE_OPENMP=ON \ | ||||||
-DENABLE_WARNINGS=OFF \ | ||||||
|
@@ -356,7 +357,12 @@ jobs: | |||||
name: Test Wheels (Python ${{ matrix.python_version }}) on ${{ matrix.os }} | ||||||
runs-on: ${{ matrix.os }} | ||||||
|
||||||
steps: | ||||||
steps: | ||||||
- name: Set up Python ${{ matrix.python_version }} | ||||||
uses: actions/setup-python@v4 | ||||||
with: | ||||||
python-version: ${{ matrix.python_version }} | ||||||
|
||||||
- name: Checkout Catalyst repo | ||||||
uses: actions/checkout@v3 | ||||||
|
||||||
|
@@ -366,14 +372,9 @@ jobs: | |||||
name: catalyst-manylinux2014_x86_64-wheel-py-${{ matrix.python_version }}.zip | ||||||
path: dist | ||||||
|
||||||
- name: Set up Python ${{ matrix.python_version }} | ||||||
uses: actions/setup-python@v4 | ||||||
with: | ||||||
python-version: ${{ matrix.python_version }} | ||||||
|
||||||
- name: Install Python dependencies | ||||||
run: | | ||||||
python${{ matrix.python_version }} -m pip install pytest pytest-xdist | ||||||
python${{ matrix.python_version }} -m pip install pytest pytest-xdist scipy | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm hesitant whether this is needed here (and in fact may be detrimental). At this point we are testing the built package, any (mandatory) dependencies should be handled by the package itself, and we should only install testing requirements or optional feature dependencies here.
Suggested change
|
||||||
|
||||||
- name: Install PennyLane Plugins | ||||||
run: | | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,13 +26,19 @@ jobs: | |
compiler: ${{ fromJson(needs.constants.outputs.compilers) }} | ||
|
||
steps: | ||
- uses: actions/setup-python@v4 | ||
name: Install Python | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Checkout Catalyst repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get -y -q install ninja-build make cmake clang libomp-dev | ||
python -m pip install scipy | ||
|
||
- name: Build Catalyst-Runtime | ||
run: | | ||
|
@@ -132,7 +138,7 @@ jobs: | |
steps: | ||
- name: Checkout Catalyst repo | ||
uses: actions/checkout@v3 | ||
|
||
multiphaseCFD marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- name: Cache MHLO Source | ||
id: cache-mhlo-source | ||
uses: actions/cache@v3 | ||
|
@@ -386,6 +392,7 @@ jobs: | |
# macOS requirements.txt | ||
python3 -m pip install cuda-quantum==0.6.0 | ||
python3 -m pip install oqc-qcaas-client | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would you like to replace python3 with python ( := python3.10) here? (You can remove the deps from |
||
/opt/hostedtoolcache/Python/3.10.14/x64/bin/python -m pip install scipy --force-reinstall | ||
maliasadi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
make frontend | ||
|
||
- name: Get Cached LLVM Build | ||
|
@@ -443,8 +450,13 @@ jobs: | |
strategy: | ||
matrix: | ||
compiler: ${{ fromJson(needs.constants.outputs.compilers) }} | ||
|
||
multiphaseCFD marked this conversation as resolved.
Show resolved
Hide resolved
|
||
steps: | ||
- uses: actions/setup-python@v4 | ||
name: Install Python | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Checkout Catalyst repo | ||
uses: actions/checkout@v3 | ||
|
||
|
@@ -455,9 +467,8 @@ jobs: | |
- name: Install Deps | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y python3 python3-pip libomp-dev libasan6 make | ||
python3 --version | grep ${{ needs.constants.outputs.primary_python_version }} | ||
python3 -m pip install -r requirements.txt | ||
sudo apt-get install -y libomp-dev libasan6 make | ||
python -m pip install -r requirements.txt scipy | ||
make frontend | ||
|
||
- name: Get Cached LLVM Build | ||
|
@@ -506,8 +517,8 @@ jobs: | |
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y python3 python3-pip libomp-dev libasan6 make | ||
python3 --version | grep ${{ needs.constants.outputs.primary_python_version }} | ||
python3 -m pip install -r requirements.txt | ||
python --version | grep ${{ needs.constants.outputs.primary_python_version }} | ||
python -m pip install -r requirements.txt | ||
make frontend | ||
|
||
- name: Get Cached LLVM Build | ||
|
@@ -556,9 +567,12 @@ jobs: | |
compiler: ${{ fromJson(needs.constants.outputs.compilers) }} | ||
|
||
steps: | ||
- uses: actions/setup-python@v4 | ||
name: Install Python | ||
with: | ||
python-version: '3.10' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this can be removed. right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not really, this set a |
||
# - name: Collect Workflow Telemetry | ||
# uses: catchpoint/workflow-telemetry-action@v2 | ||
|
||
- name: Checkout the repo | ||
uses: actions/checkout@v3 | ||
|
||
|
@@ -572,6 +586,11 @@ jobs: | |
run: | | ||
pip install numpy amazon-braket-sdk | ||
echo "AWS_DEFAULT_REGION=us-east-1" >> $GITHUB_ENV | ||
|
||
- name: Install additional dependencies (lightning device) | ||
if: ${{ matrix.backend != 'openqasm' }} | ||
run: | | ||
pip install scipy | ||
|
||
- name: Build Runtime test suite for Lightning simulator | ||
if: ${{ matrix.backend == 'lightning' }} | ||
|
@@ -619,13 +638,19 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/setup-python@v4 | ||
name: Install Python | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Checkout the repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get -y -q install cmake ninja-build libomp-dev lcov | ||
python -m pip install scipy | ||
|
||
- name: Build Runtime test suite for Lightning simulator | ||
run: | | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -205,6 +205,7 @@ coverage: coverage-frontend coverage-runtime | |||||
|
||||||
coverage-frontend: | ||||||
@echo "Generating coverage report for the frontend" | ||||||
$(ASAN_COMMAND) $(PYTHON) -m pip install scipy | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here (and other places) as well I would be hesitant to install If a built-time dependency, it can be added to the relevant build scripts in the corresponding setup step. If a run-time dependency, it should probably only be placed in one location: the |
||||||
$(ASAN_COMMAND) $(PYTHON) -m pytest frontend/test/pytest $(PARALLELIZE) --cov=catalyst --tb=native --cov-report=$(COVERAGE_REPORT) | ||||||
$(ASAN_COMMAND) $(PYTHON) -m pytest frontend/catalyst/oqc/test/ $(PARALLELIZE) --cov=catalyst --cov-append --tb=native --cov-report=$(COVERAGE_REPORT) | ||||||
ifeq ($(TEST_BRAKET), NONE) | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just double checking because these are build-time dependencies. Is
scipy
a built-time dependency if we are going the dynamic loading approach?