177 research outputs found
Graph-theoretic simplification of quantum circuits with the ZX-calculus
We present a completely new approach to quantum circuit optimisation, based on the ZX-calculus. We first interpret quantum circuits as ZX-diagrams, which provide a flexible, lower-level language for describing quantum computations graphically. Then, using the rules of the ZX-calculus, we give a simplification strategy for ZX-diagrams based on the two graph transformations of local complementation and pivoting and show that the resulting reduced diagram can be transformed back into a quantum circuit. While little is known about extracting circuits from arbitrary ZX-diagrams, we show that the underlying graph of our simplified ZX-diagram always has a graph-theoretic property called generalised flow, which in turn yields a deterministic circuit extraction procedure. For Clifford circuits, this extraction procedure yields a new normal form that is both asymptotically optimal in size and gives a new, smaller upper bound on gate depth for nearest-neighbour architectures. For Clifford+T and more general circuits, our technique enables us to to `see around' gates that obstruct the Clifford structure and produce smaller circuits than naïve `cut-and-resynthesise' methods
PyZX: Large Scale Automated Diagrammatic Reasoning
The ZX-calculus is a graphical language for reasoning about ZX-diagrams, a
type of tensor networks that can represent arbitrary linear maps between
qubits. Using the ZX-calculus, we can intuitively reason about quantum theory,
and optimise and validate quantum circuits. In this paper we introduce PyZX, an
open source library for automated reasoning with large ZX-diagrams. We give a
brief introduction to the ZX-calculus, then show how PyZX implements methods
for circuit optimisation, equality validation, and visualisation and how it can
be used in tandem with other software. We end with a set of challenges that
when solved would enhance the utility of automated diagrammatic reasoning.Comment: In Proceedings QPL 2019, arXiv:2004.1475
Reinforcement Learning based Circuit Compilation via ZX-calculus
Màster Oficial de Ciència i Tecnologia Quàntiques / Quantum Science and Technology, Facultat de Física, Universitat de Barcelona. Curs: 2022-2023. Tutors: Jordi Riu, Marta P EstarellasZX-calculus is a formalism that can be used for quantum circuit compilation and optimization. We developed a Reinforcement Learning approach for enhanced circuit optimization via the ZX-diagram graph representation of the quantum circuit. The agent is trained using the well-established Proximal Policy Optimization (PPO) algorithm, and it uses Conditional Action Trees to perform Invalid Action Masking to reduce the space of actions available to the agent and speed up its training. Additionally, we also design and implement a Genetic Algorithm for the same task. Both the genetic algorithm and the most widely used ZX-calculus-based library for circuit optimization, the PyZX library, are used to benchmark our RL approach. We find our RL algorithm to be competitive against both approaches, but further exploration is required
Classifying Complexity with the ZX-Calculus: Jones Polynomials and Potts Partition Functions
The ZX-calculus is a graphical language which allows for reasoning about
suitably represented tensor networks - namely ZX-diagrams - in terms of rewrite
rules. Here, we focus on problems which amount to exactly computing a scalar
encoded as a closed tensor network. In general, such problems are #P-hard.
However, there are families of such problems which are known to be in P when
the dimension is below a certain value. By expressing problem instances from
these families as ZX-diagrams, we see that the easy instances belong to the
stabilizer fragment of the ZX-calculus. Building on previous work on efficient
simplification of qubit stabilizer diagrams, we present simplifying rewrites
for the case of qutrits, which are of independent interest in the field of
quantum circuit optimisation. Finally, we look at the specific examples of
evaluating the Jones polynomial and of counting graph-colourings. Our
exposition further champions the ZX-calculus as a suitable and unifying
language for studying the complexity of a broad range of classical and quantum
problems.Comment: QPL 2021 submissio
Quantum Circuit Optimization of Arithmetic circuits using ZX Calculus
Quantum computing is an emerging technology in which quantum mechanical
properties are suitably utilized to perform certain compute-intensive
operations faster than classical computers. Quantum algorithms are designed as
a combination of quantum circuits that each require a large number of quantum
gates, which is a challenge considering the limited number of qubit resources
available in quantum computing systems. Our work proposes a technique to
optimize quantum arithmetic algorithms by reducing the hardware resources and
the number of qubits based on ZX calculus. We have utilised ZX calculus rewrite
rules for the optimization of fault-tolerant quantum multiplier circuits where
we are able to achieve a significant reduction in the number of ancilla bits
and T-gates as compared to the originally required numbers to achieve
fault-tolerance. Our work is the first step in the series of arithmetic circuit
optimization using graphical rewrite tools and it paves the way for advancing
the optimization of various complex quantum circuits and establishing the
potential for new applications of the same
Speedy Contraction of ZX Diagrams with Triangles via Stabiliser Decompositions
Recent advances in classical simulation of Clifford+T circuits make use of
the ZX calculus to iteratively decompose and simplify magic states into
stabiliser terms. We improve on this method by studying stabiliser
decompositions of ZX diagrams involving the triangle operation. We show that
this technique greatly speeds up the simulation of quantum circuits involving
multi-controlled gates which can be naturally represented using triangles. We
implement our approach in the QuiZX library and demonstrate a significant
simulation speed-up (up to multiple orders of magnitude) for random circuits
and a variation of previously used benchmarking circuits. Furthermore, we use
our software to contract diagrams representing the gradient variance of
parametrised quantum circuits, which yields a tool for the automatic numerical
detection of the barren plateau phenomenon in ans\"atze used for quantum
machine learning. Compared to traditional statistical approaches, our method
yields exact values for gradient variances and only requires contracting a
single diagram. The performance of this tool is competitive with tensor network
approaches, as demonstrated with benchmarks against the quimb library
Universal MBQC with generalised parity-phase interactions and Pauli measurements
We introduce a new family of models for measurement-based quantum computation
which are deterministic and approximately universal. The resource states which
play the role of graph states are prepared via 2-qubit gates of the form
. When , these are equivalent, up
to local Clifford unitaries, to graph states. However, when , their
behaviour diverges in two important ways. First, multiple applications of the
entangling gate to a single pair of qubits produces non-trivial entanglement,
and hence multiple parallel edges between nodes play an important role in these
generalised graph states. Second, such a state can be used to realise
deterministic, approximately universal computation using only Pauli and
measurements and feed-forward. Even though, for , the relevant resource
states are no longer stabiliser states, they admit a straightforward, graphical
representation using the ZX-calculus. Using this representation, we are able to
provide a simple, graphical proof of universality. We furthermore show that for
every this family is capable of producing all Clifford gates and all
diagonal gates in the -th level of the Clifford hierarchy.Comment: 19 pages, accepted for publication in Quantum (quantum-journal.org).
A previous version of this article had the title: "Universal MBQC with
M{\o}lmer-S{\o}rensen interactions and two measurement bases
- …