Documentation: HPCQC System Access and HPCQC Job Submission via MQSS-Adapter
Access
Note that HPCQC is supported by demand because it is not yet public.
To request for the access, please send an email to quantum@lrz.de or open an ticket at https://servicedesk.lrz.de.
Login to the HPCQC Testbed System at LRZ
BEAST is an HPC testbed system at LRZ for researching and testing emerging technologies. As a part of BEAST, there is a cluster called “Wolpertinger” used for hybrid HPCQC workflows. Wolpertinger features HPC compute nodes (named “wolpy” nodes) that are tightly integrated with the Quantum Server. To access Wolpertinger, your LRZ accounts need to login to the BEAST-login node (so-called BEAST-gateway).
- BEAST-login is not public, therefore, to access BEAST-login, your account need to login to the QC-login (gateway) first.
- QC-login gateway: qclogin.srv.lrz.de
- BEAST-login: login.beast.lrz.de
- After already in BEAST-login, continue logging into Wolpertinger.
Login via Terminal (SSH)
Login to BEAST-login
ssh -J <username>@qclogin.srv.lrz.de <username>@login.beast.lrz.de
Then continue to log into “Wolpertinger”
ssh <username>@wolpy01
Optional: Configure SSH login
You can create an SSH config file at ~/.ssh/config, and add the fields below
Host qclogin HostName qclogin.srv.lrz.de User <your-account> ServerAliveInterval 90 Host beast-login HostName login.beast.lrz.de User <your-account> ProxyJump qclogin ServerAliveInterval 90
To login BEAST-login, you just need
ssh beast-login
Then, after you are in BEAST-login, further login to “Wolpertinger”
ssh wolpy01
HPC-Quantum Job Submission via MQSS-Adapter
Assume we use Qiskit to write your quantum circuit. To submit quantum jobs from HPC, we use MQSS-Adapter, https://github.com/Munich-Quantum-Software-Stack/MQSS-Qiskit-Adapter.
For example, in the jobscript, i.e., jobscript_hpcqc.sh
#!/bin/sh #SBATCH -J ghz_example #SBATCH -o ./%x_%j.out #SBATCH -e ./%x_%j.err #SBATCH --ntasks=1 #SBATCH --gres=qpu:1 #SBATCH --partition=wolpy #SBATCH --time=00:20:00 source /home/sw/qis/wolpy/mqss/scripts/load-mqss-qoffload.sh module use -p /home/sw/qis/wolpy/hpcqc-software/modules/linux-rocky9-icelake/ module load python/3.11.7-gcc-11.4.1-o75q74w ### User code or application and how to run the code python ghz_example.py source /home/sw/qis/wolpy/mqss/scripts/unload-mqss-qoffload.sh
In the example, ghz_example.py, we import MQSS-Adapter and specify the QPU backend that we want to submit quantum circuits. For example,
from mqss.qiskit_adapter import MQSSQiskitAdapter from qiskit.circuit import QuantumCircuit # Create a quantum circuit qc = QuantumCircuit(2) qc.h(0) qc.cx(0, 1) qc.measure_all() # Get the desired backend mqss_adapter = MQSSQiskitAdapter(token="<TOKEN>", hpcqc=”True”) [backend] = mqss_adapter.backends(name="<BACKEND_NAME>") # Submit the jobs job = backend.run(qc, shots=100) # Get the results print(job.result().get_counts())
To submit the job, check the status, and get the results, we can use SLURM commands, e.g.,
# To submit job sbatch jobscript_hpcqc.sh # To check the queue status squeue –-user=<user-account> # To cancel the job scancel <job-id>
(Note that the HPCQC documentation might be updated, depending on the software stack updates. Please coordinate with the quantum team for the support, quantum@lrz.de)