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
Login via Terminal (SSH)
Login to BEAST-login
ssh -J <username>@qclogin.srv.lrz.de <username>@login.beast.lrz.de
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
HPC-Quantum Job Submission via MQSS-Adapter
To submit quantum jobs from HPC system, we use MQSS-Adapter, https://github.com/Munich-Quantum-Software-Stack/MQSS-Qiskit-Adapter. On the HPC cluster, we already installed this mqss-qiski-adapter with different qiskit versions. You can use module to load the package as shown in the jobscript example below.
#!/bin/bash #SBATCH -J ghz_eqe1_example #SBATCH -o ./%x_%j.out #SBATCH -e ./%x_%j.err #SBATCH --ntasks=1 #SBATCH --gres=qpu:iqm_eqe1:1 #SBATCH --licenses=iqm_eqe1:1 #SBATCH --partition=wolpy #SBATCH --time=00:05:00 ## Load the installed package having mqss-qiskit adapter echo "[$(date -u)] Load the installed packages having mqss-qiskit adapter" source /etc/profile.d/modules.sh module use -p /home/sw/qis/wolpy/hpcqc-software/modules/linux-rocky9-icelake/ module load py-mqss-qiskit ## Command to execute the program echo "[$(date -u)] Submit GHZ circuit to EQE1" python ghz-example.py echo "[$(date -u)] Done."
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 datetime import datetime
from qiskit import QuantumCircuit
from mqss.qiskit_adapter import MQSSQiskitAdapter
adapter = MQSSQiskitAdapter(token="HgWmw2NxnxG...", hpcqc="True")
print("---------------------------------")
print(f"[{datetime.now()}] Selected backend: EQE1")
print("---------------------------------")
backend = adapter.get_backend("EQE1")
# [backend] = adapter.backends(name="EQE1")
circuit = QuantumCircuit(2, 2)
circuit.h(0)
circuit.cx(0, 1)
circuit.measure([0, 1], [0, 1])
print(f"[{datetime.now()}] Submit job to QPU ...", )
job = backend.run(circuit, shots=1000)
status = job.status()
print(f"[{datetime.now()}] Job status:", status)
result = job.result()
counts = result.get_counts()
print(f"[{datetime.now()}]Measurement counts:", 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)