MonarQ/en-ca
| Connection Node: https://manager.anyonlabs.com |
|---|
MonarQ is a 24-qubit superconducting quantum computer developed in Montreal by Anyon Systems and located at the École de technologie supérieure. For more information on MonarQ's specifications and performance, see Technical Specifications below.
Accessing MonarQ¶
- To begin the process of accessing MonarQ, fill out this form. It must be completed by the principal investigator.
- You must have an Alliance account to access MonarQ.
- Meet with our team to discuss your project's specific needs, access, and billing details.
- Receive access to the MonarQ dashboard and generate your access token.
- To get started, see Getting Started with MonarQ below.
Contact our quantum team at quantique@calculquebec.ca if you have any questions or would like a more general discussion before requesting access.
Technical Specifications¶
Like other quantum processors available today, MonarQ operates in an environment where noise remains a significant factor. Performance metrics, updated with each calibration, are accessible via the Thunderhead portal. Access to this portal requires MonarQ access approval.
Among other things, the following metrics are available:
- 24-qubit quantum processor
- One-qubit gate with 99.8% fidelity and 32ns duration
- Two-qubit gate with 96% fidelity and 90ns duration
- Coherence time of 4-10μs (depending on the state)
- Maximum circuit depth of approximately 350 for one-qubit gates and 115 for two-qubit gates
Quantum Computing Software¶
Several specialized software libraries exist for quantum computing and developing quantum algorithms. These libraries allow you to build circuits that are executed on simulators which mimic the performance and results obtained on a quantum computer such as MonarQ. They can be used on all Alliance clusters.
- PennyLane, Python command library
- Snowflurry, Julia command library
- Qiskit, Python command library
MonarQ's quantum logic gates are called via the Snowflurry software library, written in Julia. Although MonarQ is natively compatible with Snowflurry, there is a PennyLane-CalculQuébec plugin developed by Calcul Québec that allows circuits to be executed on MonarQ while leveraging the features and development environment offered by PennyLane.
Getting Started with MonarQ¶
Prerequisites
Ensure you have access to MonarQ and your login credentials (username, API token). For any questions, write to quantique@calculquebec.ca.
-
Step 1: Connect to Narval
- MonarQ is accessible from Narval, a Calcul Québec cluster. Access to Narval is via the connection node
narval.alliancecan.ca. - For help connecting to Narval, consult the SSH page.
- MonarQ is accessible from Narval, a Calcul Québec cluster. Access to Narval is via the connection node
-
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, and you will only need to import the software libraries you wish to use.
module load python/3.11
virtualenv --no-download --clear ~/ENV && source ~/ENV/bin/activate
pip install --no-index --upgrade pip
pip install --no-index --upgrade pennylane-calculquebec
python -c "import pennylane; import pennylane_calculquebec"
- Step 3: Configure your MonarQ credentials and define MonarQ as the device
- Open a Python
.pyfile and import the necessary dependencies, namely PennyLane andCalculQuebecClientas shown in the example below. - Create a client with your credentials. Your token is available from the Thunderhead portal. The host is
https://manager.anyonlabs.com. - Create a PennyLane device with your client. You can also specify the number of qubits (wires) to use and the number of samples (shots).
- For help, consult pennylane_calculquebec.
- Open a Python
# my_circuit.py
import pennylane as qml
from pennylane_calculquebec.API.client import CalculQuebecClient
my_client = CalculQuebecClient(host="https://monarq.calculquebec.ca", user="your username", access_token="your access token", project_id="your project_id")
dev = qml.device("monarq.default", client = my_client, wires = 3)
- Step 4: Create your circuit
- In the same Python file, you can now code your quantum circuit.
# my_circuit.py
@qml.set_shots(1000)
@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: Execute your circuit from the scheduler
- The
sbatchcommand is used to submit a task sbatch.
- The
* With a Slurm script similar to this:
# simple_job.sh
#!/bin/bash
#SBATCH --time=00:15:00
#SBATCH --account=def-someuser # Your username
#SBATCH --cpus-per-task=1 # Modify if applicable
#SBATCH --mem-per-cpu=1G # Modify if applicable
python my_circuit.py
* The circuit's output is written to a file named `slurm-` followed by the job ID and the `.out` suffix, for example, *slurm-123456.out*.
* In this file, you will find the circuit's result 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 on Narval, see [Running jobs](../running-jobs/running_jobs.md).
Common Questions¶
Other Tools¶
Applications¶
MonarQ is suited for computations requiring small numbers of high-fidelity qubits, making it an ideal tool for the development and testing of quantum algorithms. Other possible applications include modelling small quantum systems; testing new quantum programming and error correction methods and techniques; and more generally, fundamental research in quantum computing.
Technical Support¶
If you have questions about our quantum services, write to quantique@calculquebec.ca. Sessions on quantum computing and programming with MonarQ are listed here.