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

[WIP] [g-sim 3] (g + P)-sim #1118

Merged
merged 46 commits into from
Jun 18, 2024
Merged

[WIP] [g-sim 3] (g + P)-sim #1118

merged 46 commits into from
Jun 18, 2024

Conversation

Qottmann
Copy link
Collaborator

@Qottmann Qottmann commented May 25, 2024

Merged the approach from #1106 with the branching approach here. This has neater illustrations anyway 👍

If you are writing a demonstration, please answer these questions to facilitate the marketing process.

  • GOALS — Why are we working on this now?
    Lie algebras in QC and simulation techniques like g-sim are a hot topic due to their relevance to barren plateaus. This is an extension of g-sim to a small number of non-DLA gates. It bears some intriguing theoretical features but, like g-sim itself, is of rather limited practical relevance.

  • AUDIENCE — Who is this for?
    This is an expert demo targeted towards people familiar with Lie algebras, g-sim in particular.

  • KEYWORDS — What words should be included in the marketing post?

    • dynamical Lie algebra / Lie groups
    • g-sim
  • Which of the following types of documentation is most similar to your file?
    (more details here)

  • Tutorial
  • Demo
  • How-to

[sc-62859]

Copy link

👋 Hey, looks like you've updated some demos!

🐘 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!

Copy link

github-actions bot commented May 25, 2024

Thank you for opening this pull request.

You can find the built site at this link.

Deployment Info:

  • Pull Request ID: 1118
  • Deployment SHA: 1de9b1b1439d37e2cf7801ecf55f6431a4a71fe0
    (The Deployment SHA refers to the latest commit hash the docs were built from)

Note: It may take several minutes for updates to this pull request to be reflected on the deployed site.

@Qottmann
Copy link
Collaborator Author

In the end I managed to combine both approaches into one, as they are effectlvely the same. The branching one is nice to understand the underlying transformations and the required maximum moment order. The g-sim in moment vector spaces approach is more practical and what one would do in the end, though I finally argue based on some scaling numbers that this approach is overall of limited practical utility and should be understood as a mere theoretical insight.

Copy link
Contributor

@dwierichs dwierichs left a comment

Choose a reason for hiding this comment

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

Nice that you made this work, and in two ways, even! Congrats for this nice work @Qottmann 💯
Very nice and concise read, really liked it.

I left a number of comments, as usual a good bit of them are subjective suggestions.

Regarding the direction of the drawings: I think reverting it might actually be a good idea. However, I think it should be consistent with the other demo, and as the depicted matrices/tensors are not a circuit diagram directly, it might be useful to have this visual differentiation. Also, the current ordering works with matrix product notation, which is nice :) So I think both directions have their perks.

"dateOfLastModification": "2024-06-30T00:00:00+00:00",
"categories": [
"Quantum Computing",
"Getting Started"
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure this demo is for beginners? 😅

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

haha, definitely not 😆 The metadata is actually just a copy-paste from the liesim demo, I need to still update that but figured this is lowest priority atm

demonstrations/tutorial_liesim3.py Outdated Show resolved Hide resolved
demonstrations/tutorial_liesim3.py Outdated Show resolved Hide resolved
demonstrations/tutorial_liesim3.py Outdated Show resolved Hide resolved
demonstrations/tutorial_liesim3.py Outdated Show resolved Hide resolved
demonstrations/tutorial_liesim3.py Outdated Show resolved Hide resolved
demonstrations/tutorial_liesim3.py Outdated Show resolved Hide resolved
demonstrations/tutorial_liesim3.py Outdated Show resolved Hide resolved
demonstrations/tutorial_liesim3.metadata.json Outdated Show resolved Hide resolved
demonstrations/tutorial_liesim3.py Outdated Show resolved Hide resolved
Copy link
Contributor

@dwierichs dwierichs left a comment

Choose a reason for hiding this comment

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

Thanks for all the updates! 🎉 Sorry to keep you waiting but I'd like to do one more math-only pass before approving.

demonstrations/tutorial_liesim3.py Outdated Show resolved Hide resolved
demonstrations/tutorial_liesim3.py Outdated Show resolved Hide resolved
@dwierichs dwierichs self-requested a review May 30, 2024 20:38
Copy link
Contributor

@dwierichs dwierichs left a comment

Choose a reason for hiding this comment

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

Took another look and I'm comfortable with the second approach now as well :)
Really well done pulling this one off 💯 It's definitely a funky mathematical foundation to walk on! :o

Just had some tiny additional comments, including one typo for math mode.

Remember to update metadata before merging 😇

demonstrations/tutorial_liesim3.py Outdated Show resolved Hide resolved
demonstrations/tutorial_liesim3.py Outdated Show resolved Hide resolved
demonstrations/tutorial_liesim3.py Outdated Show resolved Hide resolved
demonstrations/tutorial_liesim3.py Outdated Show resolved Hide resolved
demonstrations/tutorial_liesim3.py Outdated Show resolved Hide resolved
Copy link
Collaborator Author

@Qottmann Qottmann left a comment

Choose a reason for hiding this comment

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

I will update the metadata together with the thumbnail

A note: I found some inconsistency in gate nomenclature — it would be worth it to check that the P gate is consistently capitalized and in mathcal or not.

The mathcal $\mathcal{P}$ is referring to the unitary gate $\mathcal{P} = e^{-i \theta h_{\mu}}$ whereas the $P$ is the adjoint action "gate" $P = e^{-i \theta ad_{h_{\mu}}}$. There was one case where a regular $p$ was not capitalized that you found, I corrected that 👍

Also, why is it called tutorial_liesim3? I assume this is for historical reasons; it might be better to pick something different (_extension)?

Good point! Will update the file names 👍

demonstrations/tutorial_liesim3.py Outdated Show resolved Hide resolved
demonstrations/tutorial_liesim3.py Outdated Show resolved Hide resolved
demonstrations/tutorial_liesim3.py Outdated Show resolved Hide resolved
@@ -0,0 +1,568 @@
r"""(g + P)-sim: Extending g-sim by non-DLA observables and gates
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Can the website handle that? I removed all inline math from headings for this demo due to the rendering issues

demonstrations/tutorial_liesim3.py Outdated Show resolved Hide resolved
Copy link
Contributor

@ikurecic ikurecic left a comment

Choose a reason for hiding this comment

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

Thanks, @Qottmann .
Two items remain:

  • I'll look into fixing the rendering issue in the first note.
  • If you could check if the demo title would display correctly if math-mode is used within it, that would be great. This issue in section titles was fixed recently.

Comment on lines 11 to 14
.. note::

The contents of this demo are self-contained. However, familiarity with
:doc:`dynamical Lie algebras </demos/tutorial_liealgebra>` and :doc:`:math:`\mathfrak{g}`-sim in PennyLane </demos/tutorial_liesim>` are advised.
Copy link
Contributor

Choose a reason for hiding this comment

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

image
Something went wrong here.
I'll look into it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah I think I've seen this before, just gonna remove the mathmode from the link 🙃

@ikurecic ikurecic added ci:build-all-qml-demos Build all the Demos for this Pull Request and removed ci:build-all-qml-demos Build all the Demos for this Pull Request labels Jun 18, 2024
@ikurecic ikurecic merged commit a32d925 into master Jun 18, 2024
10 checks passed
@ikurecic ikurecic deleted the liesim3 branch June 18, 2024 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants