QCLAB: A Matlab Toolbox for Quantum Computing

Sophia Keip, Daan Camps, Roel Van Beeumen · 2025

Read QCLAB: A Matlab Toolbox for Quantum Computing by Sophia Keip, Daan Camps, Roel Van Beeumen (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2503-03016.txt.

Introduction

Sophia Keip and co-authors present QCLAB, a MATLAB toolbox for quantum computing, in a 2025 paper. Quantum circuits need a bench where ideas can be built and tested fast. Object oriented code in MATLAB gives that bench a clear shape.

The toolbox builds, holds, and runs quantum circuits in one place. Number care, speed, and steadiness guide its design. A C++ mate, QCLAB++, taps graphics chips for heavy runs. The two form one kit that spans script ease to raw speed. A hands on tutorial walks new users through the tools. Labs can prototype quantum methods sans deep systems work.

Catalog record

CREATORSophia Keip, Daan Camps, Roel Van Beeumen
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE5 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2503-03016

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

QCLAB: A Matlab Toolbox for Quantum Computing
Sophia Keip, Daan Camps, Roel Van Beeumen

Abstract
We introduce QCLAB, an object-oriented MATLAB toolbox for constructing, representing, and simulating quantum circuits. Designed with an emphasis on numerical stability, efficiency, and performance, QCLAB provides a reliable platform for prototyping and testing quantum algorithms. For advanced performance needs, QCLAB ++ serves as a complementary C ++ package optimized for GPU-accelerated quantum circuit simulations. Together, QCLAB and QCLAB ++ form a comprehensive toolkit, balancing the simplicity of MATLAB scripting with the computational power of GPU acceleration. This paper serves as an introduction to the package and its features along with a hands-on tutorial that invites researchers to explore its capabilities right away.



1
Introduction

Quantum computing has rapidly advanced in recent years, propelled by remarkable progress in hardware development. As the technology evolves, the need for robust computational tools becomes ever more critical, empowering researchers to drive innovation in quantum algorithm research while hardware capabilities continue to mature.

This necessity led to the development of numerous quantum circuit simulators. Toolkits like IBM’s Qiskit
[
javadi2024quantum
]
with the Aer backend, Google Quantum AI’s Cirq
[
CirqDevelopers_2024
]
with the qsim simulator
[
QuantumAI2020qsim
]
and Xanadu’s PennyLane
[
bergholm2018pennylane
]
offer advanced capabilities for quantum circuit design, each with their own strengths. Additionally, NVIDIA’s cuQuantum SDK
[
bayraktar2023cuquantum
]
enables GPU-accelerated simulations, supported by all of the mentioned frameworks.

In this landscape, we present QCLAB
1
1

1

qclab:
https://github.com/QuantumComputingLab/qclab

[
Camps2021QCLAB
]
, a MATLAB toolbox for efficiently designing, simulating and visualizing quantum circuits. What sets QCLAB apart is its MATLAB integration and its emphasis on numerical stability, efficiency, and performance. The focus on robust numerical techniques makes it especially useful for fields like numerical linear algebra and underlies its role as the foundational framework for a range of derived software packages and quantum compilers
[
Camps2021F3C
,
camps2022fable
,
Camps2022FABLE1
]
. Its intuitive syntax and integration with MATLAB offer flexibility and ease of use, making it highly accessible for both researchers and educators.

QCLAB uses the circuit model of quantum computation, which is widely adopted across quantum hardware platforms. By leveraging this model, QCLAB allows researchers to explore and prototype quantum algorithms efficiently on classical hardware, with seamless transition to real quantum hardware enabled through compatibility with OpenQASM.

QCLAB is complemented by its C
++
counterpart QCLAB
++
2
2

2

qclab
++
:
https://github.com/QuantumComputingLab/qclabpp

[
VanBeeumen2021QCLABpp
,
van2023qclab++
]
, which is designed for high-performance quantum circuit simulations on GPUs. Retaining the intuitive syntax of QCLAB, QCLAB
++
bridges the gap between MATLAB-based prototyping and GPU-accelerated large-scale simulations, providing a powerful toolkit for quantum algorithm research.

Beyond its computational capabilities, QCLAB includes intuitive tools for visualizing quantum circuits, including the ability to generate executable LaTeX code. This simplifies the process of creating documentation for quantum research.

The paper is structured as follows: Section II demonstrates the intuitive quantum circuit construction in QCLAB, followed by Section III on simulation, combining practical steps with valuable insights into its implementation. Section IV discusses the visualization features, the openQASM compatibility, and the transition to QCLAB
++
. Section V continues with engaging examples, including quantum teleportation, state tomography, Grover’s algorithm and quantum error correction. Finally, we conclude with a brief comparison to MATLAB’s existing quantum computing package.

We assume a basic understanding of quantum computing principles, such as qubits, gates, and the circuit model. For a introduction we refer to
[
nielsen2010quantum
]
.

2
Constructing Quantum Circuits in QCLAB

A quantum circuit represents quantum computations as a sequence of unitary operations (gates) applied to a register of qubits. It starts with an initial state, evolves through gates, and includes measurements that extract classical information.
Quantum circuits are visually represented using musical score diagrams where qubits are shown as horizontal lines, while gates and measurements are symbols along these lines, with time proceeding from left to right. An example is illustrated in the circuit below.

Read the complete text