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

Add the simulate class for the new device #817

Merged
merged 26 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
f577c4e
Added simulate method for the new API with LKokkos
LuisAlfredoNu Jul 25, 2024
145e18e
Apply format
LuisAlfredoNu Jul 25, 2024
a5ae5a7
Remove mcmc from functions
LuisAlfredoNu Jul 25, 2024
97d0182
apply format
LuisAlfredoNu Jul 26, 2024
fe502ea
trigger CIs
LuisAlfredoNu Jul 26, 2024
58a064c
Block the test for pl-device to check the actual coverage of the impl…
LuisAlfredoNu Jul 26, 2024
d186d3a
Temporal fix for errors in CI
LuisAlfredoNu Jul 26, 2024
7ef5416
Added simulate test
LuisAlfredoNu Jul 26, 2024
d7f0610
apply format
LuisAlfredoNu Jul 26, 2024
2a31aaf
Update tests/lightning_qubit/test_simulate_method.py
LuisAlfredoNu Jul 26, 2024
72faa2f
Include the changes introduced in #814 for measurements
LuisAlfredoNu Jul 26, 2024
5226b8c
remove _asarray method
LuisAlfredoNu Jul 26, 2024
ca34833
trigger CIs
LuisAlfredoNu Jul 26, 2024
b60a751
Simplify apply_operations method
LuisAlfredoNu Jul 29, 2024
c1fa3eb
Apply review comments
LuisAlfredoNu Jul 29, 2024
941377b
apply format
LuisAlfredoNu Jul 29, 2024
aef2f97
Fix bug
LuisAlfredoNu Jul 29, 2024
3134460
correct comment format for github/workflows/tests_lkcuda_python.yml
LuisAlfredoNu Jul 29, 2024
e1f0945
Apply suggestions from code review in doc for d2h in kokkos
LuisAlfredoNu Jul 29, 2024
8636a2b
change the doc for kokkos_configuration
LuisAlfredoNu Jul 29, 2024
d64f50b
avoid double call of reset_state
LuisAlfredoNu Jul 29, 2024
fdab75f
reorder the import modules sequence
LuisAlfredoNu Jul 29, 2024
c836bac
regroup attributes in state_vector
LuisAlfredoNu Jul 29, 2024
bccc56b
Change doc for Lightning Kokkos Measurements
LuisAlfredoNu Jul 29, 2024
9a094ca
trigger CIs
LuisAlfredoNu Jul 29, 2024
c4860a9
remove useless lines from test_state_vector
LuisAlfredoNu Jul 30, 2024
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 .github/workflows/tests_lkcpu_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,8 @@ jobs:
PL_DEVICE=${DEVICENAME} python -m pytest tests/ $COVERAGE_FLAGS --splits 7 --group ${{ matrix.group }} \
--store-durations --durations-path='.github/workflows/python_lightning_kokkos_test_durations.json' --splitting-algorithm=least_duration
mv .github/workflows/python_lightning_kokkos_test_durations.json ${{ github.workspace }}/.test_durations-${{ matrix.exec_model }}-${{ matrix.group }}
pl-device-test --device ${DEVICENAME} --skip-ops --shots=20000 $COVERAGE_FLAGS --cov-append
pl-device-test --device ${DEVICENAME} --shots=None --skip-ops $COVERAGE_FLAGS --cov-append
: # pl-device-test --device ${DEVICENAME} --skip-ops --shots=20000 $COVERAGE_FLAGS --cov-append
: # pl-device-test --device ${DEVICENAME} --shots=None --skip-ops $COVERAGE_FLAGS --cov-append
LuisAlfredoNu marked this conversation as resolved.
Show resolved Hide resolved
mv .coverage .coverage-${{ github.job }}-${{ matrix.pl_backend }}-${{ matrix.group }}

- name: Upload test durations
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/tests_lkcuda_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,8 @@ jobs:
cd main/
DEVICENAME=`echo ${{ matrix.pl_backend }} | sed "s/_/./g"`
PL_DEVICE=${DEVICENAME} python -m pytest tests/ -k "not test_native_mcm" $COVERAGE_FLAGS
pl-device-test --device ${DEVICENAME} --skip-ops --shots=20000 $COVERAGE_FLAGS --cov-append
pl-device-test --device ${DEVICENAME} --shots=None --skip-ops $COVERAGE_FLAGS --cov-append
# pl-device-test --device ${DEVICENAME} --skip-ops --shots=20000 $COVERAGE_FLAGS --cov-append
# pl-device-test --device ${DEVICENAME} --shots=None --skip-ops $COVERAGE_FLAGS --cov-append
LuisAlfredoNu marked this conversation as resolved.
Show resolved Hide resolved
mv coverage.xml coverage-${{ github.job }}-${{ matrix.pl_backend }}.xml

- name: Install all backend devices
Expand All @@ -275,7 +275,8 @@ jobs:
OMP_PROC_BIND: false
run: |
cd main/
for device in lightning.qubit lightning.kokkos; do
# for device in lightning.qubit lightning.kokkos; do
for device in lightning.qubit; do
AmintorDusko marked this conversation as resolved.
Show resolved Hide resolved
pl-device-test --device ${device} --skip-ops --shots=20000 $COVERAGE_FLAGS --cov-append
pl-device-test --device ${device} --shots=None --skip-ops $COVERAGE_FLAGS --cov-append
done
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/wheel_linux_aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ jobs:
matrix:
os: [ubuntu-latest]
arch: [aarch64]
pl_backend: ["lightning_kokkos", "lightning_qubit"]
: # pl_backend: ["lightning_kokkos", "lightning_qubit"]
pl_backend: ["lightning_qubit"]
cibw_build: ${{ fromJson(needs.set_wheel_build_matrix.outputs.python_version) }}
exec_model: ${{ fromJson(needs.set_wheel_build_matrix.outputs.exec_model) }}
kokkos_version: ${{ fromJson(needs.set_wheel_build_matrix.outputs.kokkos_version) }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/wheel_linux_x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ jobs:
fail-fast: false
matrix:
arch: [x86_64]
pl_backend: ["lightning_kokkos", "lightning_qubit"]
: # pl_backend: ["lightning_kokkos", "lightning_qubit"]
pl_backend: ["lightning_qubit"]
cibw_build: ${{ fromJson(needs.set_wheel_build_matrix.outputs.python_version) }}
exec_model: ${{ fromJson(needs.set_wheel_build_matrix.outputs.exec_model) }}
kokkos_version: ${{ fromJson(needs.set_wheel_build_matrix.outputs.kokkos_version) }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/wheel_macos_arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ jobs:
matrix:
os: [macos-12]
arch: [arm64]
pl_backend: ["lightning_kokkos", "lightning_qubit"]
: # pl_backend: ["lightning_kokkos", "lightning_qubit"]
pl_backend: ["lightning_qubit"]
cibw_build: ${{fromJson(needs.mac-set-matrix-arm.outputs.python_version)}}
timeout-minutes: 30
name: macos-latest::arm64 - ${{ matrix.pl_backend }} (Python ${{ fromJson('{ "cp39-*":"3.9","cp310-*":"3.10","cp311-*":"3.11","cp312-*":"3.12" }')[matrix.cibw_build] }})
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/wheel_macos_x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ jobs:
matrix:
os: [macos-12]
arch: [x86_64]
pl_backend: ["lightning_kokkos", "lightning_qubit"]
: # pl_backend: ["lightning_kokkos", "lightning_qubit"]
pl_backend: ["lightning_qubit"]
cibw_build: ${{fromJson(needs.set_wheel_build_matrix.outputs.python_version)}}
exec_model: ${{ fromJson(needs.set_wheel_build_matrix.outputs.exec_model) }}
kokkos_version: ${{ fromJson(needs.set_wheel_build_matrix.outputs.kokkos_version) }}
Expand Down
Loading
Loading