A box represents any process with systems as input and output.
A (monoidal) signature
Given a signature
Given two signatures
a morphism
such that for all boxes
Given a signature
Diagrams are subject to three axioms.
From a signature
Can't be bothered to remember the axioms for diagrams? Your visual cortex has them built in!
In physical terms, naturality means parallel processes are spacelike-separated events.
Quantum gate sets are signatures!
Formal grammars are signatures!
A (strict monoidal) category
such that associativity, unitality and naturality hold. For example:
A (strict monoidal) functor
Theorem (Joyal & Street, 1988):
Intuition: The functors
Natural language semantics as a functor
DisCoCat models are functors
The principles of quantum theory as properties of the category
A category is symmetric if it comes with swaps.
A symmetric category is compact if it comes with cups and caps.
Entanglement is "the characteristic trait of quantum mechanics".
A symmetric category is cartesian if it has copy and discard.
In physical terms, the last equation (again called naturality) is equivalent to causality: the future cannot influence the past.
Theorem:
Lemma: Suppose a symmetric category has both cups and copy.
Theorem:
Applications:
We define a QNLP model as a monoidal functor
We define a QNLP model as a monoidal functor
from discopy import Ty, Word, Id, Cup
from discopy.circuit import Functor
from discopy.quantum import qubit, Ket, H, X, CX, sqrt
s, n = Ty('s'), Ty('n')
Alice, loves, Bob = Word('Alice', n), Word('loves', n.r @ s @ n.l), Word('Bob', n)
sentence = Alice @ loves @ Bob >> Cup(n, n.r) @ Id(s) @ Cup(n.l, n)
F = circuit.Functor(
ob={s: Ty(), n: qubit},
ar={Alice: Ket(0), loves: sqrt(2) @ Ket(0, 0) >> H @ X >> CX, Bob: Ket(1)})
assert F(sentence).eval()
We define a QNLP model as a parameterised monoidal functor:
Given a dataset
We call this approach functorial learning, a new category-theoretic approach to structured machine learning.
joint work with Richie Yeung and Giovanni de Felice