Skip to content

Pasqal local - Link munge optionally and inject a couple env variables into user env#172

Open
MatthieuMoreau0 wants to merge 1 commit intomainfrom
mm/pasqal-local-support
Open

Pasqal local - Link munge optionally and inject a couple env variables into user env#172
MatthieuMoreau0 wants to merge 1 commit intomainfrom
mm/pasqal-local-support

Conversation

@MatthieuMoreau0
Copy link
Collaborator

@MatthieuMoreau0 MatthieuMoreau0 commented Feb 24, 2026

Description of Change

In this MR, I made a few updates to the spank plugin so that it supports the Pasqal Local QRMI introduced in qiskit-community/qrmi#32

Linking munge

For Pasqal Local we use munge to authenticate the root and end users, see QRMI MR for details on the auth flow. In this MR, I updated the CMakeLists.txt to link munge through the -DENABLE_MUNGE=ON option.

When the option is activated, munge is dynamically linked:

[root@login spank_qrmi]# ldd /shared/qrmi/target/release/libqrmi.so
	linux-vdso.so.1 (0x0000ffff90621000)
	libmunge.so.2 => /lib64/libmunge.so.2 (0x0000ffff905c3000)
	libssl.so.3 => /lib64/libssl.so.3 (0x0000ffff904df000)
	libcrypto.so.3 => /lib64/libcrypto.so.3 (0x0000ffff8f000000)
	libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000ffff904ae000)
	libm.so.6 => /lib64/libm.so.6 (0x0000ffff8f55f000)
	libc.so.6 => /lib64/libc.so.6 (0x0000ffff8ee52000)
	/lib/ld-linux-aarch64.so.1 (0x0000ffff905e4000)
	libz.so.1 => /lib64/libz.so.1 (0x0000ffff9047d000)

Defining env variables for slurm job ID and UID

Each task submitted to the pasqal local middleware will be mapped to a slurm job ID and a UID. The UID enables us to isolate user data, the slurm job ID will help us map QPU tasks to a slurm job ID for debugging.

These can be retrived using spank_get_item and are mapped to env variables prefixed by QRMI as they are intended to be consumed by the QRMI

Checklist ✅

  • Have you included a description of this change?
  • Have you updated the relevant documentation to reflect this change?
  • Have you made sure CI is passing before requesting a review?

Ticket

  • Fixes #
  • Is Part of #

@MatthieuMoreau0 MatthieuMoreau0 self-assigned this Feb 24, 2026
@MatthieuMoreau0 MatthieuMoreau0 changed the title Link munge optionally for pasqal-local resources Pasqal local - Link munge optionally and inject a couple env variables into user env Mar 6, 2026
@MatthieuMoreau0
Copy link
Collaborator Author

MatthieuMoreau0 commented Mar 13, 2026

This is finally ready for review alongside the QRMI MR.

@ohtanim I am happy to get your feedback on this optional linking of munge. This is the first QRMI implementation which requires linking to a C library that is not required for the other implementations. You may have an opinion on how to handle this properly in terms of documentation and/or distribution. Thank you!

Copy link
Collaborator

@ohtanim ohtanim left a comment

Choose a reason for hiding this comment

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

@MatthieuMoreau0 Thank you very much for your enhancement. Your changes look good to me, but I left 2 minor comments. Do you think my comments are reasonable to Pasqal ?

/*
* This code is part of Qiskit.
*
* (C) Copyright IBM 2025
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you add Pasqal copyright?

/*
* This code is part of Qiskit.
*
* (C) Copyright IBM 2025
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you please add Pasqal copyright ?

@ohtanim ohtanim added the enhancement New feature or request label Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants