Skip to content

Conversation

@doctorperceptron
Copy link
Collaborator

This is a direct copy of PR #1462. That PR was open before the switch to the V2 pipeline which has caused CI to stall.

@github-actions
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!

@github-actions
Copy link

github-actions bot commented Oct 16, 2025

Your preview is ready 🎉!

You can view your changes here

Deployed at: 2025-10-20 07:16:30 UTC

# But ``Uvec_diag`` does not look block diagonal. What happened here?
# Well, it *is* block-diagonal, but we have to reorder the columns and rows of the final matrix to make this visible.
# This takes a bit of pain, which we outsource to a utility function that can be found
# `here <https://github.com/PennyLaneAI/qml/demonstrations_v2/tutorial_resourcefulness/utils.py>`__:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think this should be

Suggested change
# `here <https://github.com/PennyLaneAI/qml/demonstrations_v2/tutorial_resourcefulness/utils.py>`__:
# `here <https://github.com/PennyLaneAI/qml/blob/master/demonstrations_v2/tutorial_resourcefulness/utils.py>`__:

Copy link
Contributor

@peterse peterse left a comment

Choose a reason for hiding this comment

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

Overall its quite clear! The introduction feels a bit rocky: There are lots of technical terms, but none of them are yet defined. I do not have a good idea on how to deal with that, compared to what you have written here. Otherwise the rest of the demo is conceptually very rewarding to a reader who pushes through, and I think that you build up an intuition for these objects so nicely.

Just two high-level comments

  • I don't fully agree with "complex" being interchangeable with "resource" (actually, i don't like the "complex" is used here at all). Equating "complex"="many resource" implies that f(x)=sin(1000*x) is significantly more complex than a function of the form f(x) = \sum_{\omega < 100} \hat{f}(\omega) sin(\omega*x). I don't see why that is. The former is much more compressible, much simpler to write down. There is not much followup on what 'complex' means (beyond the comparison "complex"="many resource" in the very first paragraph) so I do not think that the word 'complex' adds very much here, and could just be replaced with some language related to resource theory (expensive, not-smooth?)
  • It was jarring when the representation theory for states in H ended up using representations acting on density matrices in B(H) rather than states in H. It seemed like the introduction was working towards a generalization of the Z_n example, and then suddenly we use some representation that involves conjugating density matrices. What went wrong? Why doesn't the naive generalization of what you already built up work for SU(2)\times SU(2)\times... ?? Everything you wrote was crystal clear, but the reasoning behind the choices is completely opaque...

plt.show()

######################################################################
# The function with the least resource is constant! This makes sense: We know that the decay of the Fourier coefficients
Copy link
Contributor

Choose a reason for hiding this comment

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

I didn't follow what this means. What does 'the number of times a function is differentiable' mean?

:align: center
:width: 70%

Figure 1: GFD Purities of different states using 2-qubit entanglement as a resource.
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the x-axis in figure 1, is it the 'order' discussed above? Is that really a continuous quantity, as it appears in this fig? What is theta in this figure? I think it is worth trying to make this figure crystal clear if its the first figure presented in the demo

Figure 1: GFD Purities of different states using 2-qubit entanglement as a resource.
A Bell state, which is maximally entangled, has high contributions in second-order GFD Purities, while
a tensor product state with no entanglement has contributions in the first-order Purities. The interpolation
between the two extremes, exemplified by a Haar random state, has a spectrum in between.
Copy link
Contributor

Choose a reason for hiding this comment

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

spectrum = GFD purity? or spectrum= power spectrum?

Also, I liked the power spectrum analogy given in the main text, i think it is worth repeating here because this plot can only be understood on an intuitive level at this point in the demo,...


.. math:: \hat{f}(k) = \frac{1}{\sqrt{N}} \sum_{x=0}^{N-1} f(x) e^{\frac{2 \pi i}{N} k x}, \;\; k = 0,...,N-1

In words, the Fourier coefficients are projections of :math:`f(x)` onto the *Fourier basis functions*
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: projection is usually from a vector to a vector, this is more like the length or norm of a projection of f, right?

#
# Without dwelling further, we simply recognise that the *circulant* permutation matrices -- those that shift vector
# entries by :math:`s` positions -- can be shown to
# form a unitary representation for the group :math:`g \in G = Z_N`, called the *regular representation*.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: ambiguous phrasing. Maybe "- can be shown to form a unitary representation (called the regular representation) for the group g \in G = Z_N"


######################################################################
# We now have a very different perspective on the power spectrum :math:`|\hat{f}(k)|^2`: It is a projection of the function
# :math:`f` into irreducible subspaces revealed by moving into the basis that block-diagonalises circular matrices.
Copy link
Contributor

Choose a reason for hiding this comment

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

circular -> circulant (?)

#
# .. note::
#
# Before moving on, we want to remark that the example of "smoothness" as a resource should be read as a pedagogical, and not rigorous, introduction to the idea of the GFD framework.
Copy link
Contributor

Choose a reason for hiding this comment

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

"smoothness" as a resource

nit: smoothness is free, right? non-smoothness would be the resource :p

# One can think of multipartite entanglement as a resource of the state of a quantum system that measures how "wiggly"
# the correlations between its constituents are.
# While this is a general statement, we will restrict our attention to systems made of our favourite quantum objects, qubits.
# Just like smoother functions have Fourier spectra concentrated in the low-order frequencies,
Copy link
Contributor

Choose a reason for hiding this comment

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

great sentence.

# This, of course, is not a very informative fingerprint -- one that is much too coarse!
#
# However, we have freedom to define the vector spaces for the fingerprint.
# It turns out that considering the space :math:`B(H)` of bounded linear operators, in which density matrices live, leads to
Copy link
Contributor

Choose a reason for hiding this comment

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

It turns out that considering the space :math:B(H) of bounded linear operators, in which density matrices live, leads to a much more nuanced generalised Fourier spectrum. Although this space contains matrices, it is a vector space in the technical sense. This requires some mental gymnastics, but we can think of flattening all density matrices, and turning operators acting on density matrices into other operators that act on the flattened 1-dimensional vectors.

I am struggling with this. What is going on? Is there a deeper way to understand or explain why the rep G \rightarrow GL(H) is an irrep and the above steps don't work out, but that using GL(B(H)) - or GL(H \otimes H*)?? - is somehow the right way to do things??

(this is very relevant for something i am trying to work out on our project!)

# The point here is that while multipartite entanglement can get complex very quickly as we
# add qubits (due to the exponential increase in possible correlations),
# our generalized Fourier analysis still provides a clear, intuitive fingerprint of a state's entanglement structure.
# Even more intriguingly, just as smoothness guides how we compress classical
Copy link
Contributor

Choose a reason for hiding this comment

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

does "suggests ways of how we might compress quantum states..." refer to specific protocols that have been developed, or is this meant to be open ended? It sounds vaguely like how tensor-network simulations of quantum circuits works...

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.

3 participants