0% found this document useful (0 votes)
9 views

Brief Introduction To Quantum Computing

An Introduction to Quantum Natural Language Processing (QNLP)

Uploaded by

MonikaSahay
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Brief Introduction To Quantum Computing

An Introduction to Quantum Natural Language Processing (QNLP)

Uploaded by

MonikaSahay
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 87

An Introduction

to
Quantum Natural Language
Processing (QNLP)

Part 1 :

Brief Introduction to Quantum Computing


Outline of the lecture
Outline of the lecture

 Introduction to Quantum Computing


Outline of the lecture

 Introduction to Quantum Computing


 Properties of Quantum Computing
Outline of the lecture

 Introduction to Quantum Computing


 Properties of Quantum Computing
 Single Qubit Quantum Gates – X, Y, Z, H, Rz, Rx
Outline of the lecture

 Introduction to Quantum Computing


 Properties of Quantum Computing
 Single Qubit Quantum Gates – X, Y, Z, H, Rz, Rx
 Multi Qubit Quantum Gates – CX, CRz, CRx
Outline of the lecture

 Introduction to Quantum Computing


 Properties of Quantum Computing
 Single Qubit Quantum Gates – X, Y, Z, H, Rz, Rx
 Multi Qubit Quantum Gates – CX, CRz, CRx
 ZX Calculus Representation of Quantum Gates
Introduction to Quantum Computing

Classical vs Quantum
Introduction to Quantum Computing

Classical vs Quantum

Classical Computing Quantum Computing

Based on the principles of classical Based on the principles of quantum


mechanics mechanics

Uses classical bits 0 & 1 Uses Quantum Bits called Qubits,


where bits can be in superposition.
Represented as |0> & |1> (Ket 0 &
Ket 1) or <0| & <1| (Bra 0 & Bra 1)

Hardware is composed of CMOS Hardware varies such as


circuits superconducting qubits, ion traps,
optical photons.

Consists of Central Processing Consists of Quantum Processing


Units, processing in sequential Units, processing in parallel
manner
Introduction to Quantum Computing

Introduction to Quantum Computing Concludes


Properties of Quantum Computing
Properties of Quantum Computing

 Superposition
Properties of Quantum Computing

 Superposition
 Interference
Properties of Quantum Computing

 Superposition
 Interference
 Entanglement
Properties of Quantum Computing

Superposition
Properties of Quantum Computing

Superposition

Classical
Bit 1

Classical
Bit 0
Properties of Quantum Computing

Superposition

Linear combination of quantum states or simultaneous occurrence of


multiple quantum states! There can be 2^N states, where N is the
number of qubits.

Classical
Bit 1

Classical
Bit 0
Properties of Quantum Computing

Superposition

Linear combination of quantum states or simultaneous occurrence of


multiple quantum states! There can be 2^N states, where N is the
number of qubits.

Classical
Bit 1

Classical
Bit 0
Properties of Quantum Computing

Interference
Properties of Quantum Computing

Interference

Image Source - https://physics.stackexchange.com/questions/170877/classical-and-semi-classical-vs-quantum-


interferometry
Properties of Quantum Computing

Interference

Constructive or Destructive Interference leads to some quantum states


having high probability of measurement

Image Source - https://physics.stackexchange.com/questions/170877/classical-and-semi-classical-vs-quantum-


interferometry
Properties of Quantum Computing

Entanglement
Properties of Quantum Computing

Entanglement
Properties of Quantum Computing

Entanglement

 Pairs or groups of qubits exist as a single quantum state


such that their properties are correlated, even if the qubits
are separated by a long distance!
Properties of Quantum Computing

Entanglement

 Pairs or groups of qubits exist as a single quantum state


such that their properties are correlated, even if the qubits
are separated by a long distance!

 If two particles are entangled, then measuring properties of


1st particle will give you information about the 2nd particle
Properties of Quantum Computing

Properties of Quantum Computing Concludes


Single Qubit Quantum Logic Gates
Single Qubit Quantum Logic Gates

Pauli X Gate
Single Qubit Quantum Logic Gates

Pauli X Gate
Gate Symbol
Single Qubit Quantum Logic Gates

Pauli X Gate
Gate Symbol

Gate Truth Table

Inputs Outputs
|0> |1>
|1> |0>
Single Qubit Quantum Logic Gates

Pauli X Gate
Gate Symbol Gate Operator

0 1
𝑋 = 𝜎𝑥 =
1 0
Gate Truth Table

Inputs Outputs
|0> |1>
|1> |0>
Single Qubit Quantum Logic Gates

Pauli Y Gate
Single Qubit Quantum Logic Gates

Pauli Y Gate
Gate Symbol
Single Qubit Quantum Logic Gates

Pauli Y Gate
Gate Symbol

Gate Truth Table

Inputs Outputs
|0> i|1>
|1> -i|0>
Single Qubit Quantum Logic Gates

Pauli Y Gate
Gate Symbol Gate Operator

0 −𝑖
𝑌 = 𝜎𝑦 =
𝑖 0
Gate Truth Table

Inputs Outputs
|0> i|1>
|1> -i|0>
Single Qubit Quantum Logic Gates

Pauli Z Gate
Single Qubit Quantum Logic Gates

Pauli Z Gate
Gate Symbol
Single Qubit Quantum Logic Gates

Pauli Z Gate
Gate Symbol

Gate Truth Table

Inputs Outputs
|0> |0>
|1> -|1>
Single Qubit Quantum Logic Gates

Pauli Z Gate
Gate Symbol Gate Operator

1 0
𝑍 = 𝜎𝑧 =
0 −1
Gate Truth Table

Inputs Outputs
|0> |0>
|1> -|1>
Single Qubit Quantum Logic Gates

Hadamard (H) Gate


Single Qubit Quantum Logic Gates

Hadamard (H) Gate


Gate Symbol
Single Qubit Quantum Logic Gates

Hadamard (H) Gate


Gate Symbol

Gate Truth Table

Inputs Outputs
|0> |0 > +|1 >
| +> =
2
|1> |0 ≻ −|1 >
| −> =
2
Single Qubit Quantum Logic Gates

Hadamard (H) Gate


Gate Symbol Gate Operator

1 1 1
𝐻=
2 1 −1
Gate Truth Table

Inputs Outputs
|0> |0 > +|1 >
| +> =
2
|1> |0 ≻ −|1 >
| −> =
2
Single Qubit Quantum Logic Gates

Hadamard (H) Gate


Gate Symbol Gate Operator

1 1 1
𝐻=
2 1 −1
Gate Truth Table

Inputs Outputs
|0> |0 > +|1 >
| +> =
2
|1> |0 ≻ −|1 >
| −> =
2

Hadamard gate is used to create superposition


Single Qubit Quantum Logic Gates

Parameterized Gate - Rz Gate


Single Qubit Quantum Logic Gates

Parameterized Gate - Rz Gate


Gate Symbol
Single Qubit Quantum Logic Gates

Parameterized Gate - Rz Gate


Gate Symbol

Gate Operator

1 0
Rz =
0 𝑒 𝑖𝜑
Single Qubit Quantum Logic Gates

Parameterized Gate - Rz Gate


Gate Symbol

Gate Operator

1 0
Rz =
0 𝑒 𝑖𝜑
Rotations around the Z axis of Bloch Sphere
Single Qubit Quantum Logic Gates

Parameterized Gate - Rx Gate


Single Qubit Quantum Logic Gates

Parameterized Gate - Rx Gate


Gate Symbol
Single Qubit Quantum Logic Gates

Parameterized Gate - Rx Gate


Gate Symbol

Gate Operator

𝜑 𝜑
𝑐𝑜𝑠 −𝑖 𝑠𝑖𝑛
Rx = 2 2
𝜑 𝜑
−𝑖 𝑠𝑖𝑛 𝑐𝑜𝑠
2 2
Single Qubit Quantum Logic Gates

Parameterized Gate - Rx Gate


Gate Symbol

Gate Operator

𝜑 𝜑
𝑐𝑜𝑠 −𝑖 𝑠𝑖𝑛
Rx = 2 2
𝜑 𝜑
−𝑖 𝑠𝑖𝑛 𝑐𝑜𝑠
2 2
Rotations around the X axis of Bloch Sphere
Single Qubit Quantum Logic Gates

Single Qubit Quantum Gates Concludes


Multi Qubit Quantum Logic Gates

CNOT (CX) Gate


Multi Qubit Quantum Logic Gates

CNOT (CX) Gate


Gate Symbol
1st (Control)

2nd (Target)
Multi Qubit Quantum Logic Gates

CNOT (CX) Gate


Gate Symbol
1st (Control)

2nd (Target)

Gate Truth Table


Inputs Outputs
1st 2nd 1st 2nd
|00> |00>
|01> |01
|10> |11>
|11> |10>
Multi Qubit Quantum Logic Gates

CNOT (CX) Gate


Gate Symbol Gate Operator
1st (Control) 1 0 0 0
0 1 0 0
CX =
0 0 0 1
2nd (Target)
0 0 1 0
Gate Truth Table
Inputs Outputs
1st 2nd 1st 2nd
|00> |00>
|01> |01
|10> |11>
|11> |10>
Multi Qubit Quantum Logic Gates

CNOT (CX) Gate


Gate Symbol Gate Operator
1st (Control) 1 0 0 0
0 1 0 0
CX =
0 0 0 1
2nd (Target)
0 0 1 0
Gate Truth Table
Inputs Outputs
1st 2nd 1st 2nd
|00> |00>
|01> |01
|10> |11>
|11> |10>
CNOT Gate is used to create entanglement
Multi Qubit Quantum Logic Gates

Parameterized Control Gate - CRz Gate


Multi Qubit Quantum Logic Gates

Parameterized Control Gate - CRz Gate


Gate Symbol
Multi Qubit Quantum Logic Gates

Parameterized Control Gate - CRz Gate


Gate Symbol

Gate Operator

1 0 0 0
𝜆
−𝑖
0 𝑒 2 0 0
CRz =
0 0 1 0
𝜆
𝑖2
0 0 0 𝑒
Multi Qubit Quantum Logic Gates

Parameterized Control Gate - CRx Gate


Multi Qubit Quantum Logic Gates

Parameterized Control Gate - CRx Gate


Gate Symbol
Multi Qubit Quantum Logic Gates

Parameterized Control Gate - CRx Gate


Gate Symbol

Gate Operator
1 0 0 0
𝜃 𝜃
0 𝑐𝑜𝑠 0 −𝑖 𝑠𝑖𝑛
CRx = 2 2
0 0 1 0
𝜃 𝜃
0 −𝑖 𝑠𝑖𝑛 0 𝑐𝑜𝑠
2 2
Multi Qubit Quantum Logic Gates

Multi Qubit Quantum Gates Concludes


ZX Calculus Representation of Quantum Gates
ZX Calculus Representation of Quantum Gates

 A graphical language which can represent quantum circuit diagrams


as linear maps between qubits
ZX Calculus Representation of Quantum Gates

 A graphical language which can represent quantum circuit diagrams


as linear maps between qubits

 It consists of diagrammatic rewrite rules which assists in the


reasoning of quantum circuits
ZX Calculus Representation of Quantum Gates

 A graphical language which can represent quantum circuit diagrams


as linear maps between qubits

 It consists of diagrammatic rewrite rules which assists in the


reasoning of quantum circuits

 ZX-diagrams are generated by two basic generators – Z spiders and


X spiders shown by white dots and grey dots respectively
ZX Calculus Representation of Quantum Gates

 A graphical language which can represent quantum circuit diagrams


as linear maps between qubits

 It consists of diagrammatic rewrite rules which assists in the


reasoning of quantum circuits

 ZX-diagrams are generated by two basic generators – Z spiders and


X spiders shown by white dots and grey dots respectively

 ZX calculus can be used to convert string diagrams into quantum


circuits which is useful for QNLP
ZX Calculus Representation of Quantum Gates

 A graphical language which can represent quantum circuit diagrams


as linear maps between qubits

 It consists of diagrammatic rewrite rules which assists in the


reasoning of quantum circuits

 ZX-diagrams are generated by two basic generators – Z spiders and


X spiders shown by white dots and grey dots respectively

 ZX calculus can be used to convert string diagrams into quantum


circuits which is useful for QNLP

 ZX calculus is complete i.e. different set of rewrite rules are


complete for different families of linear maps
ZX Calculus Representation of Quantum Gates

Z & X Basis States


ZX Calculus Representation of Quantum Gates

Z & X Basis States

|0 >
ZX Calculus Representation of Quantum Gates

Z & X Basis States

|0 >
|1 >
ZX Calculus Representation of Quantum Gates

Z & X Basis States

|0 >
|1 >

| +>
ZX Calculus Representation of Quantum Gates

Z & X Basis States

|0 >
|1 >

| +>
| −>
ZX Calculus Representation of Quantum Gates

Rz, Rx & CNOT Quantum Gates


ZX Calculus Representation of Quantum Gates

Rz, Rx & CNOT Quantum Gates

Rz Gate
ZX Calculus Representation of Quantum Gates

Rz, Rx & CNOT Quantum Gates

Rz Gate Rx Gate
ZX Calculus Representation of Quantum Gates

Rz, Rx & CNOT Quantum Gates

Rz Gate Rx Gate

CNOT Gate
ZX Calculus Representation of Quantum Gates

Hadamard & Unitary Quantum Gates


ZX Calculus Representation of Quantum Gates

Hadamard & Unitary Quantum Gates

Hadamard Gate and its ZX components


ZX Calculus Representation of Quantum Gates

Hadamard & Unitary Quantum Gates

Hadamard Gate and its ZX components

Unitary Gate or Parameterized Gate


ZX Calculus Representation of Quantum Gates

Hadamard & Unitary Quantum Gates

Hadamard Gate and its ZX components

Unitary Gate or Parameterized Gate


Unitary Gate can be used to make other
quantum gates
ZX Calculus Representation of Quantum Gates

ZX Calculus Representation of Quantum Gates


Concludes
References

 John van de Wetering, “ZX-calculus for the working quantum computer


scientist”, https://arxiv.org/abs/2012.13966

Bob Coecke, “Foundations for Near Term Quantum Natural Language


Processing”, https://arxiv.org/abs/2012.03755

Bob Coecke, “Compositionality as we see it, everywhere around us”,


https://arxiv.org/abs/2110.05327

Stephen Clark, “Something Old, Something New: Grammar-based CCG


Parsing with Transformer Models”, https://arxiv.org/abs/2109.10044

Bob Coecke, Aleks Kissinger, “Picturing Quantum Processes”, Cambridge


University Press, 2017

Joachim Lambek, “From Word to Sentence: A Computational Algebraic


Approach to Grammar”, Polimetrica s.a.s., 2008
Thank you so much!

You might also like