# How to build a Quantum Algorithm - Quantum Circuits

## Introduction

One of the important tasks of a quantum compiler is to identify operations in some abstract quantum algorithm. The compiler then replaces them with sequences of operations which have the same effect on the qubits' states, and are composed of operations which can be executed 'on-chip.' But how do we know how to make such transformations? As usual, we will base our strategy on the operations in a classical computer.

In this video, postdoctoral researcher Ben Criger will go over the standard mathematical techniques which allow us to express and manipulate quantum circuits. Furthermore, he will discuss methods for proving the equivalence of two circuits. We will see that if the circuits under consideration are small, you can often see this very quickly. However, as the circuits become larger, more technical methods are used to reduce the amount of mathematics to something we can handle.

## Prerequisite knowledge

- Quantum gates
- Matrix operations
- Quantum algorithms

## Further Thinking

Consider the following circuits:

Which of the circuits above do you think performs a SWAP operation? (multiple answers might be correct)

## Further reading

- More information about the most used gates: https://www.quantiki.org/wiki/quantum-gates