MonarQ

From Alliance Doc
Jump to navigation Jump to search
This page is a translated version of the page MonarQ and the translation is 100% complete.
Other languages:
Availability: January 2025
Login node: monarq.calculquebec.ca

MonarQ is a 24-qubit superconducting quantum computer developed in Montreal by Anyon Systems and located at the École de technologie supérieure. See section Technical specifications below.

Its name is inspired by the monarch butterfly, a symbol of evolution and migration. The capital Q denotes the quantum nature of the computer and its origins in Quebec. Acquisition of MonarQ was made possible with the support of the Ministère de l'Économie, de l'Innovation et de l'Énergie du Québec (MEIE) and Canada Economic Development (CED).

Getting access to MonarQ

  1. To begin the process of getting access to MonarQ, complete this form. It can only be completed by the principal investigator.
  2. You must have an account with the Alliance in order to get access to MonarQ.
  3. Meet with our team to discuss the specifics of your project, access privileges, and billing details.
  4. Receive access to the MonarQ dashboard and generate your access token
  5. To get started using MonarQ see Getting started below.

Contact our quantum team at quantique@calculquebec.ca if you have any questions or if you want to have a more general discussion before requesting access to MonarQ.

Technical specifications

MonarQ qubit mapping

Like quantum processors available today, MonarQ operates in an environment where noise remains a significant factor. Performance metrics, updated at each calibration, are accessible via the Thunderhead portal which you will be able to use after being approved for access to MonarQ.

Among the metrics are:

  • 24-qubit quantum processor
  • Single-qubit gate: 99.8% fidelity with gate duration of 15ns
  • Two-qubit gate: 95.6% fidelity with gate duration of 35ns
  • Coherence time: 4-10μs (depending on state)
  • Maximum circuit depth: approximately 350 for single-qubit gates and 115 for two-qubit gates

Quantum computing software

There are several specialized software libraries for quantum computing and the development of quantum algorithms. These libraries allow you to build circuits that are executed on simulators that mimic the performance and results obtained on a quantum computer such as MonarQ. They can be used on all Alliance clusters.

The quantum logic gates of the MonarQ processor are called through a Snowflurry software library written in Julia. Although MonarQ is natively compatible with Snowflurry, there is a PennyLane-Snowflurry plugin developed by Calcul Québec that allows you to execute circuits on MonarQ while benefiting from the features and development environment offered by PennyLane.

Getting started

Prerequisites: Make sure you have access to MonarQ and that you have your login credentials (username, API token). If you have any questions, write to quantique@calculquebec.ca.

  • Step 1: Connect to Narval
    • MonarQ is only accessible from Narval, a Calcul Québec cluster. Narval is accessed from the login node narval.alliancecan.ca.
    • For help connecting to Narval, see SSH.
  • Step 2: Create the environment
    • Create a Python virtual environment (3.11 or later) to use PennyLane and the PennyLane-CalculQuébec plugin. These are already installed on Narval so that you will only have to import the software libraries you want.
[name@server ~]$ module load python/3.11
[name@server ~]$ virtualenv --no-download --clear ~/ENV && source ~/ENV/bin/activate
[name@server ~]$ pip install --no-index --upgrade pip
[name@server ~]$ pip install --no-index --upgrade pennylane-calculquebec
[name@server ~]$ python -c "import pennylane; import pennylane_calculquebec"
  • Step 3: Set up your credentials on MonarQ and set MonarQ as the device
    • Open a .py Python file and import the necessary dependencies (PennyLane and MonarqClient) in the example below.
    • Create a client with your credentials. Your token is available from the Thunderhead portal. The host is monarq.calculquebec.ca.
    • Create a PennyLane device with your client. You can also mention the number of qubits (wires) to use and the number of shots.
    • For help, see pennylane_calculquebec.
Fichier : my_circuit.py

import pennylane as qml
from pennylane_calculquebec.API.client import MonarqClient

my_client = MonarqClient("monarq.calculquebec.ca", "your username", "your access token", "your project")

dev = qml.device("monarq.default", client = my_client, wires = 3, shots = 1000)


  • Step 4: Create your circuit
    • In the same Python file, you can now code your quantum circuit.
Fichier : my_circuit.py

@qml.qnode(dev)

def bell_circuit():
    qml.Hadamard(wires=0)
    qml.CNOT(wires=[0, 1]) 
    qml.CNOT(wires=[1, 2])
 
    return qml.counts()

result = bell_circuit()
print(result)


  • Step 5: Run your circuit from the scheduler
$ sbatch simple_job.sh
Submitted batch job 123456

with a Slurm script such as

File : simple_job.sh

#!/bin/bash
#SBATCH --time=00:15:00
#SBATCH --account=def-someuser # Votre username
#SBATCH --cpus-per-task=1      # Modifiez s'il y a lieu
#SBATCH --mem-per-cpu=1G 	  # Modifiez s'il y a lieu
python my_circuit.py


  • The result is written to a file whose name starts with slurm-, followed by the task ID and the .out suffix, for example slurm-123456.out.
  • In this file, we find the result of our circuit in a dictionary {'000': 496, '001': 0, '010': 0, '011': 0, '100': 0, '101': 0, '110': 0, '111': 504}.
  • For more information on how to submit jobs to Narval, see Running jobs.

Other tools

Applications

MonarQ is suited for computations requiring small quantities of high-fidelity qubits, making it an ideal tool to develop and test quantum algorithms. Other possible applications include modelling small quantum systems; testing new methods and techniques for quantum programming and error correction; and more generally, fundamental research in quantum computing.

Technical support

For questions about our quantum services, write to quantique@calculquebec.ca.
Sessions on quantum computing and programming with MonarQ are listed here.