This repository contains a collection of MATLAB scripts to generate explicit quantum circuits for block encodings of certain sparse matrices in QCLAB. A quantum circuit is a block encoding for a matrix
We say that the circuits we propose are explicit as they do not contain any blackbox oracles but are completely formulated in terms of elementary quantum gates. Furthermore, all the examples we provide have an efficient circuit decomposition that requires
Block encodings have been widely adopted in recent years for solving a broad range of computational problems with quantum computers. They are the central primitive in quantum numerical linear algebra algorithms.
The examples scripts include block encoding circuits for:
- A symmetric
$2 \times 2$ matrix:
scripts: test_realsym2_simple.m
, test_realsym2.m
- A banded circulant matrix or - equivalently - a tridiagonal matrix with periodic boundary conditions. We do also include the implementation for a tridiagonal matrix with non-periodic boundary conditions.
scripts: test_tridiag_cab.m
, test_tridiag_cab_ucry.m
, test_tridiag.m
, test_tridiag_ucry.m
- The adjacency matrix for a weighted extended binary tree with
$2^n$ nodes.
scripts: test_extbintree.m
These example matrices all have a simple structure. The quantum circuits that block encode them have a considerably higher degree of complexity and are not straightforward to derive. It is our goal that these examples will allow researchers to experiment with block encoding circuits and help them develop novel block encodings.
All the example scripts make use of the QCLAB toolbox, which requires MATLAB R2018a or newer. Detailed download installation instructions can be found here.
Explicit Quantum Circuits for Block Encodings of Certain Sparse Matrices, D. Camps, L. Lin, R. Van Beeumen, C. Yang (2022), arXiv:2203.10236.