## Quantum-assisted quantum compiling

## Abstract

Compiling quantum algorithms for near-term quantum computers (accounting for connectivity and native gate alphabets) is a major challenge that has received significant attention both by industry and academia. Avoiding the exponential overhead of classical simulation of quantum dynamics will allow compilation of larger algorithms, and a strategy for this is to evaluate an algorithm's cost on a quantum computer. To this end, we propose a variational hybrid quantum-classical algorithm called quantum-assisted quantum compiling (QAQC). In QAQC, we use the overlap between a target unitary $U$and a trainable unitary $V$as the cost function to be evaluated on the quantum computer. More precisely, to ensure that QAQC scales well with problem size, our cost involves not only the global overlap $\mathrm{T}\mathrm{r}\left({V}^{\u2020}U\right)$ but also the local overlaps with respect to individual qubits. We introduce novel short-depth quantum circuits to quantify the terms in our cost function, and we prove that our cost cannot be efficiently approximated with a classical algorithm under reasonable complexity assumptions. We present both gradient-free and gradient-based approaches to minimizing this cost. As a demonstration of QAQC, we compile various one-qubit gates on IBM's and Rigetti's quantum computers into their respective native gate alphabets. Furthermore, we successfully simulate QAQC up to a problem size of 9 qubits, and these simulations highlight both the scalability of our cost function as well as the noise resilience of QAQC. Future applications of QAQC include algorithm depth compression, black-box compiling, noise mitigation, and benchmarking.

- Authors:

- Los Alamos National Lab. (LANL), Los Alamos, NM (United States); Louisiana State Univ., Baton Rouge, LA (United States)
- Los Alamos National Lab. (LANL), Los Alamos, NM (United States); Michigan State Univ., East Lansing, MI (United States)
- Los Alamos National Lab. (LANL), Los Alamos, NM (United States); California Inst. of Technology (CalTech), Pasadena, CA (United States)
- Los Alamos National Lab. (LANL), Los Alamos, NM (United States)

- Publication Date:

- Research Org.:
- Los Alamos National Lab. (LANL), Los Alamos, NM (United States)

- Sponsoring Org.:
- USDOE; Laboratory Directed Research & Development (LDRD)

- OSTI Identifier:
- 1530785

- Report Number(s):
- LA-UR-18-25861

Journal ID: ISSN 2521-327X

- Grant/Contract Number:
- 89233218CNA000001

- Resource Type:
- Accepted Manuscript

- Journal Name:
- Quantum

- Additional Journal Information:
- Journal Volume: 3; Journal ID: ISSN 2521-327X

- Publisher:
- Quantum Science Open Community

- Country of Publication:
- United States

- Language:
- English

- Subject:
- 97 MATHEMATICS AND COMPUTING

### Citation Formats

```
Khatri, Sumeet, LaRose, Ryan, Poremba, Alexander, Cincio, Lukasz, Sornborger, Andrew Tyler, and Coles, Patrick Joseph. Quantum-assisted quantum compiling. United States: N. p., 2019.
Web. doi:10.22331/q-2019-05-13-140.
```

```
Khatri, Sumeet, LaRose, Ryan, Poremba, Alexander, Cincio, Lukasz, Sornborger, Andrew Tyler, & Coles, Patrick Joseph. Quantum-assisted quantum compiling. United States. doi:10.22331/q-2019-05-13-140.
```

```
Khatri, Sumeet, LaRose, Ryan, Poremba, Alexander, Cincio, Lukasz, Sornborger, Andrew Tyler, and Coles, Patrick Joseph. Mon .
"Quantum-assisted quantum compiling". United States. doi:10.22331/q-2019-05-13-140. https://www.osti.gov/servlets/purl/1530785.
```

```
@article{osti_1530785,
```

title = {Quantum-assisted quantum compiling},

author = {Khatri, Sumeet and LaRose, Ryan and Poremba, Alexander and Cincio, Lukasz and Sornborger, Andrew Tyler and Coles, Patrick Joseph},

abstractNote = {Compiling quantum algorithms for near-term quantum computers (accounting for connectivity and native gate alphabets) is a major challenge that has received significant attention both by industry and academia. Avoiding the exponential overhead of classical simulation of quantum dynamics will allow compilation of larger algorithms, and a strategy for this is to evaluate an algorithm's cost on a quantum computer. To this end, we propose a variational hybrid quantum-classical algorithm called quantum-assisted quantum compiling (QAQC). In QAQC, we use the overlap between a target unitaryUand a trainable unitary Vas the cost function to be evaluated on the quantum computer. More precisely, to ensure that QAQC scales well with problem size, our cost involves not only the global overlap Tr(V†U) but also the local overlaps with respect to individual qubits. We introduce novel short-depth quantum circuits to quantify the terms in our cost function, and we prove that our cost cannot be efficiently approximated with a classical algorithm under reasonable complexity assumptions. We present both gradient-free and gradient-based approaches to minimizing this cost. As a demonstration of QAQC, we compile various one-qubit gates on IBM's and Rigetti's quantum computers into their respective native gate alphabets. Furthermore, we successfully simulate QAQC up to a problem size of 9 qubits, and these simulations highlight both the scalability of our cost function as well as the noise resilience of QAQC. Future applications of QAQC include algorithm depth compression, black-box compiling, noise mitigation, and benchmarking.},

doi = {10.22331/q-2019-05-13-140},

journal = {Quantum},

number = ,

volume = 3,

place = {United States},

year = {2019},

month = {5}

}