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

Get PR#1179 into dev #1188

Closed
wants to merge 40 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
1555d29
Merge changes from dev to master (#1092)
astralcai May 7, 2024
477ef73
Update tutorial_intro_amplitude_amplification.py (#1095)
KetpuntoG May 8, 2024
f9df21d
Changing Codebook references in content to PennyLane Codebook (#1100)
ikurecic May 14, 2024
44191b2
Add MCM introduction to master branch (#1105)
dwierichs May 16, 2024
3309266
Add covalent to metadata schema (#1102)
doctorperceptron May 16, 2024
25e2586
QCBM Tutorial (#1053)
Gopal-Dahale May 22, 2024
790093e
Update tutorial_qcbm.metadata.json (#1114)
KetpuntoG May 23, 2024
8b5c54b
Add Run on Covalent button to Univariate demo (#1112)
josh146 May 23, 2024
94563bf
Covalent cloud demo (#1115)
josh146 May 29, 2024
a9151f6
Update tutorial_lcu_blockencoding.py (#1122)
KetpuntoG May 31, 2024
9a60300
Lie-sim demo (#1085)
Qottmann Jun 7, 2024
026cc47
Fix path in figure inclusion syntax (#1128)
ikurecic Jun 11, 2024
bdc574c
Notebook converter fix (#1126)
ikurecic Jun 13, 2024
364a5a7
Fix for installation of torch and torchvision on macOS (#1125)
austingmhuang Jun 17, 2024
24bf0ec
Updating poetry.lock (#1131)
ikurecic Jun 18, 2024
a32d925
[WIP] [g-sim 3] (g + P)-sim (#1118)
Qottmann Jun 18, 2024
418519f
updating image (#1136)
KetpuntoG Jun 21, 2024
fd2c4cc
Update old Codebook links and mentions on pennylane.ai (#1138)
ikurecic Jun 24, 2024
409865b
[sc-63358] How to use Qiskit 1.0 with PennyLane (#1104)
isaacdevlugt Jul 2, 2024
75de260
Updating large thumbnail to recent Qiskit demo (#1139)
ikurecic Jul 3, 2024
2202527
Updated large thumbnail for Qiskit demo (#1141)
ikurecic Jul 3, 2024
8496380
exclude `demonstrations_categories.metadata.json` from `upload-text` …
michaelvu97 Jul 3, 2024
ddc7f6e
In-equation syntax in parshift Demo fix (#1149)
ikurecic Jul 5, 2024
0c31674
Sync dev to master (#1155)
astralcai Jul 9, 2024
4296c5b
(Offline) Qrack tutorial (#1142)
WrathfulSpatula Jul 10, 2024
c37f6a4
Fixing link typo (#1157)
ikurecic Jul 10, 2024
951f206
Fixing ref behavior in demo (#1158)
ikurecic Jul 10, 2024
5de5a15
Update error mitigation demo to use `split_non_commuting` (#1162)
Shiro-Raven Jul 19, 2024
a7b7030
[sc-68716] Your guide to PennyLane knowing Qiskit (#1117)
isaacdevlugt Jul 22, 2024
e3d164a
Switched from `expansion_strategy` to `level` in Fourier tutorial (#1…
Shiro-Raven Jul 22, 2024
d47b6f9
sc-69242-create-how-to-category-in-qml-repository (#1163)
ashishks0522 Jul 23, 2024
4b13386
Add How-to category to select PennyLane Demos (#1168)
ikurecic Jul 24, 2024
0197bb9
Changing PennyLane Demo name (#1171)
ikurecic Jul 25, 2024
79b320c
sc-66381-demos-page-optimize-imagess (#1170)
ashishks0522 Jul 26, 2024
31d9380
update-sphinx-gallery-version (#1174)
ashishks0522 Jul 29, 2024
9907e19
Corrected links in old Demos (#1173)
ikurecic Aug 2, 2024
cae9708
Clean up PennyLane Demo thumbnail assets (#1159)
ikurecic Aug 5, 2024
aa28ab8
Shadow Hamiltonian Simulation (#1177)
Qottmann Aug 6, 2024
3503e94
Reproduce Sphinx-Gallery Failure (#1179)
rashidnhm Aug 6, 2024
8d32177
Update "Using PennyLane with IBM’s quantum devices and Qiskit" (#1143)
austingmhuang Aug 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/update-metadata-reminder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
repo: context.repo.repo,
body: `👋 Hey, looks like you've updated some demos!

🐘 Don't forget to update the \`dateOfLastModification\` in the associated metadata files so your changes show up on [pennylane.ai](https://pennylane.ai).
🐘 Don't forget to update the \`dateOfLastModification\` in the associated metadata files so your changes are reflected in Glass Onion (search and recommendations).

Please hide this comment once the field(s) are updated. Thanks!`
})
7 changes: 5 additions & 2 deletions .github/workflows/upload-text.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,11 @@ jobs:
path: qml_text

- name: Copy Concatenated Metadata into Build
run: |
jq -s . $(find demonstrations -name "*.metadata.json" -type f) > ${{ steps.qml_text.outputs.download-path }}/demos/metadata.json
run: >
jq -s .
$(find demonstrations -name "*.metadata.json" -type f
! -name "demonstrations_categories.metadata.json")
> ${{ steps.qml_text.outputs.download-path }}/demos/metadata.json

- name: Upload
uses: XanaduAI/cloud-actions/push-to-s3-and-invalidate-cloudfront@main
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,6 @@ environment:
$$PYTHON_VENV_PATH/bin/python -m pip install --upgrade git+https://github.com/PennyLaneAI/pennylane-cirq.git#egg=pennylane-cirq;\
$$PYTHON_VENV_PATH/bin/python -m pip install --upgrade git+https://github.com/PennyLaneAI/pennylane-qiskit.git#egg=pennylane-qiskit;\
$$PYTHON_VENV_PATH/bin/python -m pip install --upgrade git+https://github.com/PennyLaneAI/pennylane-qulacs.git#egg=pennylane-qulacs;\
$$PYTHON_VENV_PATH/bin/python -m pip install -i https://test.pypi.org/simple/ PennyLane-Lightning --pre --upgrade;\
fi;\
fi
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ quantum computing paper/result.

```python
##############################################################################
#.. figure:: ../_static/demonstrations_assets/<demo name>/image.png
#.. figure:: ../_static/demonstration_assets/<demo name>/image.png
# :align: center
# :width: 90%
```
Expand Down Expand Up @@ -104,7 +104,7 @@ quantum computing paper/result.
- Make sure the file name is `<name of your tutorial>.metadata.json`.
- The "id" of the author will be the same as the one you chose when creating the bio.
- The date of publication and modification. Leave them empty in case you don't know them.
- Choose the categories your demo fits into: `"Getting Started"`, `"Optimization"`, `"Quantum Machine Learning"`, `"Quantum Chemistry"`, `"Devices and Performance"`, `"Quantum Computing"`, `"Quantum Hardware"` or `"Algorithms"`. Feel free to add more than one.
- Choose the categories your demo fits into: `"Getting Started"`, `"Optimization"`, `"Quantum Machine Learning"`, `"Quantum Chemistry"`, `"Devices and Performance"`, `"Quantum Computing"`, `"Quantum Hardware"`, `"Algorithms"` or `"How-to"`. Feel free to add more than one.
- In `previewImages` you should simply modify the final part of the file's name to fit the name of your demo. These two images will be sent to you once the review process begins. Once sent, you must upload them to the address indicated in the metadata.
- `relatedContent` refers to the demos related to yours. You will have to put the corresponding id and set the `weight` to `1.0`.
- If there is any doubt with any field, do not hesitate to post a comment to the reviewer of your demo.
Expand Down
Binary file modified _static/authors/alain_delgado.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _static/authors/alejandro_montanez.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _static/authors/ali_asadi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _static/authors/andrea_mari.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _static/authors/andrea_mari_original.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _static/authors/angus_lowe.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _static/authors/angus_lowe_original.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _static/authors/antal_szava.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _static/authors/antal_szava_original.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _static/authors/anuj_apte.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _static/authors/anuj_apte_original.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _static/authors/ara_ghukasyan.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions _static/authors/ara_ghukasyan.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. bio:: Ara Ghukasyan
:photo: ../_static/authors/ara_ghukasyan.jpeg

Ara is a Research Software Engineer at Agnostiq Inc. He has a B.Sc. in Math & Physics and a Ph.D. in Engineering Physics from McMaster University in Hamilton, Ontario. Ara’s interests include machine learning, physics, and quantum computing.


Binary file modified _static/authors/aroosa_ijaz.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _static/authors/aroosa_ijaz_original.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _static/authors/borja_requena.jpg
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _static/authors/brian_doolittle.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _static/authors/brian_doolittle_original.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _static/authors/chase_roberts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _static/authors/christina_lee.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _static/authors/clara_ferreira_cores.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _static/authors/dan_strano.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions _static/authors/dan_strano.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.. bio:: Dan Strano
:photo: ../_static/authors/dan_strano.jpeg

Dan Strano is a technical staff member at Unitary Fund. Additionally, he has been the lead author of the Qrack simulator framework since 2017.
Binary file modified _static/authors/danial_motlagh.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _static/authors/david_ittah.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _static/authors/david_wakeham_original.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _static/authors/david_wierichs.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _static/authors/diksha_dhawan.png
4 changes: 4 additions & 0 deletions _static/authors/diksha_dhawan.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.. bio:: Diksha Dhawan
:photo: ../_static/authors/diksha_dhawan.png

Diksha is a quantum software developer at Xanadu. Her work is focused on implementing quantum computing algorithms for quantum chemistry.
Binary file modified _static/authors/gideon_uchehara.jpg
Binary file added _static/authors/gopal_ramesh_dahale.jpeg
4 changes: 4 additions & 0 deletions _static/authors/gopal_ramesh_dahale.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.. bio:: Gopal Ramesh Dahale
:photo: ../_static/authors/gopal_ramesh_dahale.jpeg

Gopal is a quantum research software engineer at Qkrishi and a Qiskit advocate interested in applications of quantum computing in machine learning, chemistry and combinatorial optimization problems.
Binary file modified _static/authors/guillermo_alonso.jpeg
Binary file added _static/authors/isaac_de_vlugt.jpeg
4 changes: 4 additions & 0 deletions _static/authors/isaac_de_vlugt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.. bio:: Isaac De Vlugt
:photo: ../_static/authors/isaac_de_vlugt.jpeg

Isaac De Vlugt is a Quantum Scientist on the Product team at Xanadu. His work involves creating accessible quantum computing content and PennyLane features for the community, as well as spamming GIFs in our Slack channels.
Binary file modified _static/authors/isabel_nha_minh_le.jpg
Binary file modified _static/authors/isidor_schoch.png
Binary file modified _static/authors/jack_stephen_baker.png
Binary file modified _static/authors/james_ellis.jpg
Binary file modified _static/authors/jarrett_smalley.png
Binary file modified _static/authors/joana_fraxanet.jpeg
Binary file modified _static/authors/johannes_jakob_meyer.png
Binary file modified _static/authors/josh_izaac_original.png
Binary file modified _static/authors/juan_felipe_carrasquilla_alvarez.png
Binary file modified _static/authors/lillian_frederiksen.png
Binary file modified _static/authors/luis_mantilla.jpg
Binary file modified _static/authors/maggie_li.jpg
Binary file modified _static/authors/maggie_li_original.jpg
Binary file modified _static/authors/mark_nicholas_jones.png
Binary file modified _static/authors/matthew_silverman.jpg
Binary file modified _static/authors/nathan_killoran.jpg
Binary file modified _static/authors/nathan_killoran_original.jpg
Binary file modified _static/authors/paul_k_faehrmann.jpg
Binary file modified _static/authors/peter-jan_derks.png
Binary file modified _static/authors/peter-jan_derks_original.png
Binary file added _static/authors/pietropaolo_frisoni.jpg
4 changes: 4 additions & 0 deletions _static/authors/pietropaolo_frisoni.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.. bio:: Pietropaolo Frisoni
:photo: ../_static/authors/pietropaolo_frisoni.jpg

Pietropaolo is a quantum software developer at Xanadu. His background is in theoretical physics and quantum gravity, with a focus on scientific computing.
Binary file modified _static/authors/radoica_draskic.jpg
Binary file modified _static/authors/reast.jpeg
Binary file modified _static/authors/richard_east.jpeg
Binary file modified _static/authors/romain_moyard.jpg
Binary file modified _static/authors/santosh_kumar_radha.png
Binary file modified _static/authors/shahnawaz_ahmed.png
Binary file modified _static/authors/shahnawaz_ahmed_original.png
Binary file modified _static/authors/shaoming_zhang.png
Binary file modified _static/authors/soran_jahangiri.png
Binary file modified _static/authors/stefano_mangini.jpg
Binary file modified _static/authors/stefano_mangini_original.jpg
Binary file modified _static/authors/stepan_fomichev.jpg
Binary file modified _static/authors/sukin_sim.png
Binary file modified _static/authors/sukin_sim_original.png
Binary file modified _static/authors/theodor_isacsson.jpg
Binary file modified _static/authors/thomas_bromley.png
Binary file modified _static/authors/thomas_bromley_original.png
Binary file modified _static/authors/utkarsh_azad.png
Binary file modified _static/authors/varun_rishi_original.png
File renamed without changes
Binary file modified _static/demonstration_assets/QUBO/items_QUBO.png
Binary file modified _static/demonstration_assets/adaptive_circuits/h_sparse.png
Binary file modified _static/demonstration_assets/adaptive_circuits/main.png
Binary file modified _static/demonstration_assets/adjoint_diff/scaling.png
Binary file modified _static/demonstration_assets/ahs_aquila/aquila_demo_image.png
Binary file modified _static/demonstration_assets/ahs_aquila/gaussian_fn.png
Binary file modified _static/demonstration_assets/ahs_aquila/rydberg_blockade.png
21 changes: 13 additions & 8 deletions _static/demonstration_assets/barren_gadgets/barren_gadgets.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import pennylane as qml
from pennylane import numpy as np

def non_identity_obs(obs):
return [o for o in obs if not isinstance(o, qml.Identity)]

class PerturbativeGadgets:
""" Class to generate the gadget Hamiltonian corresponding to a given
Expand Down Expand Up @@ -28,12 +30,13 @@ def gadgetize(self, Hamiltonian, target_locality=3):
# checking for unaccounted for situations
self.run_checks(Hamiltonian, target_locality)
computational_qubits, computational_locality, computational_terms = self.get_params(Hamiltonian)
Hamiltonian_coeffs, Hamiltonian_ops = Hamiltonian.terms()

# total qubit count, updated progressively when adding ancillaries
total_qubits = computational_qubits
#TODO: check proper convergence guarantee
gap = 1
perturbation_norm = np.sum(np.abs(Hamiltonian.coeffs)) \
perturbation_norm = np.sum(np.abs(Hamiltonian_coeffs)) \
+ computational_terms * (computational_locality - 1)
lambda_max = gap / (4 * perturbation_norm)
l = self.perturbation_factor * lambda_max
Expand All @@ -44,7 +47,7 @@ def gadgetize(self, Hamiltonian, target_locality=3):
obs_anc = []
obs_pert = []
ancillary_register_size = int(computational_locality / (target_locality - 2))
for str_count, string in enumerate(Hamiltonian.ops):
for str_count, string in enumerate(Hamiltonian_ops):
previous_total = total_qubits
total_qubits += ancillary_register_size
# Generating the ancillary part
Expand All @@ -54,10 +57,10 @@ def gadgetize(self, Hamiltonian, target_locality=3):
# Generating the perturbative part
for anc_q in range(ancillary_register_size):
term = qml.PauliX(previous_total+anc_q) @ qml.PauliX(previous_total+(anc_q+1)%ancillary_register_size)
term = qml.operation.Tensor(term, *string.non_identity_obs[
term = qml.prod(term, *non_identity_obs(string.operands)[
(target_locality-2)*anc_q:(target_locality-2)*(anc_q+1)])
obs_pert.append(term)
coeffs_pert += [l * sign_correction * Hamiltonian.coeffs[str_count]] \
coeffs_pert += [l * sign_correction * Hamiltonian_coeffs[str_count]] \
+ [l] * (ancillary_register_size - 1)
coeffs = coeffs_anc + coeffs_pert
obs = obs_anc + obs_pert
Expand All @@ -77,12 +80,13 @@ def get_params(self, Hamiltonian):
computational_terms (int) : number of terms in the sum
composing the Hamiltonian
"""
_, Hamiltonian_ops = Hamiltonian.terms()
# checking how many qubits the Hamiltonian acts on
computational_qubits = len(Hamiltonian.wires)
# getting the number of terms in the Hamiltonian
computational_terms = len(Hamiltonian.ops)
computational_terms = len(Hamiltonian_ops)
# getting the locality, assuming all terms have the same
computational_locality = max([len(Hamiltonian.ops[s].non_identity_obs)
computational_locality = max([len(non_identity_obs(Hamiltonian_ops[s]))
for s in range(computational_terms)])
return computational_qubits, computational_locality, computational_terms

Expand All @@ -96,6 +100,7 @@ def run_checks(self, Hamiltonian, target_locality):
Returns:
None
"""
_, Hamiltonian_ops = Hamiltonian.terms()
computational_qubits, computational_locality, _ = self.get_params(Hamiltonian)
computational_qubits = len(Hamiltonian.wires)
if computational_qubits != Hamiltonian.wires[-1] + 1:
Expand All @@ -104,8 +109,8 @@ def run_checks(self, Hamiltonian, target_locality):
'Decomposition not implemented for this case')
# Check for same string lengths
localities=[]
for string in Hamiltonian.ops:
localities.append(len(string.non_identity_obs))
for string in Hamiltonian_ops:
localities.append(len(non_identity_obs(string)))
if len(np.unique(localities)) > 1:
raise Exception('The given Hamiltonian has terms with different locality.' +
' Gadgetization not implemented for this case')
Expand Down
Binary file modified _static/demonstration_assets/barren_plateaus/surface.png
Binary file modified _static/demonstration_assets/classical_kernels/salesman.PNG
Binary file modified _static/demonstration_assets/classically_boosted_vqe/CB_VQE.png
Binary file modified _static/demonstration_assets/contextuality/model.png
Binary file modified _static/demonstration_assets/contextuality/rps.png
Binary file modified _static/demonstration_assets/contextuality/rpstable.png
Loading
Loading