Skip to content

feat: Add platonic universal dynamic decoupling sequence for qudits#334

Open
hectorBrown wants to merge 5 commits intoqctrl:masterfrom
hectorBrown:platonic_udd
Open

feat: Add platonic universal dynamic decoupling sequence for qudits#334
hectorBrown wants to merge 5 commits intoqctrl:masterfrom
hectorBrown:platonic_udd

Conversation

@hectorBrown
Copy link
Copy Markdown
Contributor

Changes proposed in this pull request:

  • Implements the platonic dynamical decoupling sequence outlined here for robust qudit decoupling as a predefined sequence.

@hectorBrown hectorBrown requested a review from a team as a code owner February 8, 2026 04:10
@hectorBrown
Copy link
Copy Markdown
Contributor Author

Hi, quick update: I’m currently based here in Sydney and have applied for the Software Engineering role with the Quantum Sensing team. I’m really keen on all the work you are doing, and would love to hear any thoughts you have on this PR or any specific hardware-interfacing challenges the team is currently tackling!

Copy link
Copy Markdown
Member

@abenseny abenseny 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 the contribution @hectorBrown !

Unfortunately, myself and the other maintainers of this package are not in the Sensing division, so I have little to share about their hardware challenges.

assert _pulses_produce_identity(xy_concat_sequence)


def test_platonic_sequence():
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This test ends up being very long and convoluted. If it fails at any point it'd be hard to assess from the failure e.g. for which order it broke. I would suggest splitting it into separate tests for the different orders. (We could also use something like pytest.mark.parametrize, but I think the code would end up still being quite convoluted with so many options, which we don't want in simple unit tests.)


# The generators assocaited with each point group.
phi = (np.sqrt(5) + 1) / 2 # golden ratio
generators = {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Rather than defining these generators and eulerian_paths dictionaries, can we usematch/case or an if-elif chain and directly build the arrays in the different branches? It would save some memory and make the code more readable. There is no advantage in having an object that holds all the information at once in the implementaiton.

Comment on lines +869 to +874
eulerian_paths = {
"Dihedral": [0, 1, 0, 1, 1, 0, 1, 0],
"Tetrahedral": [ 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0],
"Octahedral": [ 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1 ],
"Icosahedral": [ 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0 ]
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Rather than replicating a lot of the logic of the implementation in the test, we could use hardcoded arrays for the expected values.

@hectorBrown
Copy link
Copy Markdown
Contributor Author

Hi, appreciate you taking the time to read over this. I've made the changes you suggested above. I also moved from generating the sequences with python generators to numpy for speed and readability. I worry that the tests are a bit unwieldy, especially the Icosahedral one - would it be possible to store these arrays elsewhere?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants