SlideShare a Scribd company logo
1 of 31
Dr. Andrés Gómez
Andres.gomez.tato@cesga.es
Jan. 2020
Quantum Computing
Lecture 2
 QPU
 Topologies of QPU
 Programming
 Simulators.
 Introduction to ProjectQ
 My first program with ProjectQ .
Universal Quantum Computer.
Quantum Gates
From: Nielsen, M., & Chuang, I. (n.d.). Quantum computation and Quantum
information.
ONE QUBIT GATES TWO QUBIT GATES
(H,S,T,CNOT) = Universal Quantum Gates: can approximate ANY unitary operation
3
Quantum register initialized to
|0> for a finite bit string 0 (n bits =
nqubits)
Manipulated by a set of
primitives one or two qubit
unitary operations (quantum
gates)
Measured into a classical bases
labeled as a bit string of length n.
A program is provided by a set
of gates to be applied onto QuBits.
Universal Quantum Computer.
QRAM || QPU
Send QProgram
QPU
Get Result
Knill, E. (1996). Conventions for quantum pseudocode. LANL report LAUR-96-2724 & Knill, E. (1996). Quantum
Randomness and Nondeterminism, LABL report LAUR-96-2186. Archiv:quant-ph/9610012
4
Ion Trap (I)
171Yb+ trapped ions
Information stored in the hyperfine
‘clock’ states:
2
𝑆1/2
 |0 >≡ |𝐹 = 0; 𝑚𝐹 = 0 >
 |1 >≡ |𝐹 = 1; 𝑚𝐹 = 0 > 𝑜𝑓 𝑡ℎ𝑒
electronic ground level
 𝐹 , 𝑚𝐹 quantum numbers associated to total
atomic angular momentum and its
projection along the quantization axes
defined by an applied magnetic field of 5.2G
 Coherence time > 0.5s
Confined in a linear radio-frequency
Paul trap
Laser-cooled
5 µm for 5 qubits
Debnath, S., Linke, N. M., Figgatt, C., Landsman, K. A., Wright, K., & Monroe, C.
(2016). Demonstration of a small programmable quantum computer with atomic
qubits. Nature, 536(7614), 63–66. http://doi.org/10.1038/nature18648
13/09/2017 5
All-with-All
Ion Trap (II): Universal Gates
Implemented gates (using
Raman transition):
 single qubit 𝑅𝜑 𝜃 = 𝑅(𝜃, 𝜑)
 two − qubits 𝑋𝑋
𝐻 = 𝑅 −𝜋 𝑅
𝑥 𝑦
Universal Gates derived as:
𝜋
2
Z = 𝑅 −𝜋/2 𝑅 𝜃 𝑅
𝑦 𝑥 𝑦
𝜋
2
Controlled-NOT (CNOT)
Controlled-Phase (cP)
Debnath, S., Linke, N. M., Figgatt, C., Landsman, K. A., Wright, K., & Monroe, C.
(2016). Demonstration of a small programmable quantum computer with atomic
qubits. Nature, 536(7614), 63–66. http://doi.org/10.1038/nature18648
13/09/2017 6
Ion Trap (III): QFT(5)
State preparation (single qubits rotations)
Total gates[1]:
 5 H = 10 R
 10 CP = 10 (6R + 1 X)
 Total = 80 gates
Optimised Version [2]:
 22 single-qubit gates
 10 two-qubits gates
 Total: 32 gates
 Time: 2669 µs
1 Debnath, S., Linke, N. M., Figgatt, C., Landsman, K. A., Wright, K., & Monroe, C.
(2016). Demonstration of a small programmable quantum computer with atomic
qubits. Nature, 536(7614), 63–66. http://doi.org/10.1038/nature18648
2 Maslov, D. (2017). Basic circuit compilation techniques for an ion-trap quantum
machine. New Journal of Physics, 19(2), 23035. http://doi.org/10.1088/1367-
2630/aa5e47
QFT Ideal Gates: 15
13/09/2017 7
IBM QX
Hardware Gates:
 Frame Change (FC, 0ns),
 Gaussian Derivative (GD, 80ns) ,
 Gaussian Flattop (GF, 170-384ns)
 Buffer after each pulse:10ns
https://github.com/QISKit/ibmqx-backend-information/tree/master/backends/ibmqx3
Limits on:
- Available gates,
- Different times for each operations
- Restrictions on 2 qubits operations
- Restrictions on measurement
13/09/2017 8
Quantum Computing
Architecture
Send QProgram
QPU
Get Result
13/09/2017 9
Van Meter, R., & Horsman, C. (2013). A blueprint for building a quantum computer. Communications of the ACM, 56(10), 84.
http://doi.org/10.1145/2494568
10
Smith, J. M. (2015). Programming the Quantum Future. Communications of the ACM, 58(8),
52–61. http://doi.org/10.1145/2699415
Quantum Algorithm
Quantum Algorithm
A sequence of gates applied on a set of
qubits
Some well-known techniques:
 Amplify amplitude (Grover’s)
 Estimate phase
More than 400 quantum algorithm
papers on Quantum Zoo
Many are unitary transformation on n-
qubits plus measurement
 How to make them as a set of
universal gates?
Quantum Zoo website
13/09/2017 11
Quantum Programing
 Define one or several quantum registers
 Apply high level methods, a set of gates
or general unitary transformations
 Decompose them in basic gates
 Transform to real operations of the QPU
 Or for simulators Steiger, D. S., Häner, T., & Troyer, M.
(2016). ProjectQ: An Open Source
Software Framework for Quantum
Computing. Retrieved from
http://arxiv.org/abs/1612.08091
12
Modern Quantum
Languages (I)
(*) At least in the public versión
(**) 30 locally, 40 in Azure
Core
Language
Unlimited
Qubits
Simulator Optimizer/
decomp.
CESGA
ProjectQ Python/C
LIQUi|> F# (*)
Quipper HasKell
ScaffCC Scaffold QX
Microsoft
Quantum
Development
Kit (2018)
Q#
(**)
QisKit Python
Xacc C++/python
TNQVM
13
Modern Quantum
Languages (II)
Core
Language
Unlimited
Qubits
Simulator Optimizer/
decomp.
CESGA
Quest Python/C
Cirq (Google) Python ??
Quil (Rigetti) Python ??
14
ProjectQ
Steiger, D. S., Häner, T., & Troyer, M. (2016). ProjectQ: An Open Source Software Framework for Quantum Computing.
Retrieved from http://arxiv.org/abs/1612.08091
15
ProjectQ. Compiler Engines
MainEngine The MainEngine class provides all functionality of the main compiler engine.
CommandModifier
CommandModifier is a compiler engine which applies a function to all incoming
commands, sending on the resulting command instead of the original one.
IBMCNOTMapper CNOT mapper for the IBM backend.
ManualMapper
Manual Mapper which adds QubitPlacementTags to Allocate gate commands
according to a user-specified mapping.
LocalOptimizer
LocalOptimizer is a compiler engine which optimizes locally (merging rotations,
cancelling gates with their inverse) in a local window of user-defined size.
AutoReplacer
The AutoReplacer is a compiler engine which uses engine.is_available in order to
determine which commands need to be replaced/decomposed/compiled further.
TagRemover TagRemover is a compiler engine which removes temporary command tags.
More at http://projectq.readthedocs.io/en/latest/projectq.cengines.html
eng = MainEngine(backend=Simulator(),
engine list =[AutoReplacer(rule_set), TagRemover(), LocalOptimizer(3) ])
Steiger, D. S., Häner, T., & Troyer, M. (2016). ProjectQ: An Open Source Software Framework for Quantum Computing.
Retrieved from http://arxiv.org/abs/1612.08091
16
ProjectQ. Backends
More at http://projectq.readthedocs.io/en/latest/projectq.backends.html
Steiger, D. S., Häner, T., & Troyer, M. (2016). ProjectQ: An Open Source Software Framework for Quantum Computing.
Retrieved from http://arxiv.org/abs/1612.08091
17
CommandPrinter
CommandPrinter is a compiler engine which prints commands to stdout prior to
sending them on to the next compiler engine.
CircuitDrawer
CircuitDrawer is a compiler engine which generates TikZ code for drawing
quantum circuits.
Simulator
Simulator is a compiler engine which simulates a quantum computer using C++-
based kernels.
ClassicalSimulator A simple introspective simulator that only permits classical operations.
ResourceCounter
ResourceCounter is a compiler engine which counts the number of gates and
max.
IBMBackend
The IBM Backend class, which stores the circuit, transforms it to JSON QASM,
and sends the circuit through the IBM API.
ProjectQ. Setups
 The setups package contains a collection of setups which can be
loaded by the MainEngine.
 Each setup then loads its own set of decomposition rules and default
compiler engines.
 MainEngine(setup=projectq.setups.ibm)
More at http://projectq.readthedocs.io/en/latest/projectq.setups.html
Steiger, D. S., Häner, T., & Troyer, M. (2016). ProjectQ: An Open Source Software Framework for Quantum Computing.
Retrieved from http://arxiv.org/abs/1612.08091
18
default
Defines the default setup which provides an engine_list for
the MainEngine
ibm Defines a setup useful for the IBM QE chip with 5 qubits.
ibm16 Defines a setup useful for the IBM QE chip with 16 qubits.
ProjectQ. eDSL. Operations
 All common gates: X, Y, Z, T, S, CNOT, SWAP, etc.
 Additional useful gates: Rx, Ry, Rz, R, Ph, Toffoli
(ControledControledNOT/ ControledControledX)
 Advanced operations:
 Quantum Fourier Transform, QFT
 Hamiltonian Time Evolution, TimeEvolution
 A set of gates to be applied on a set of qubits, QubitOperator
 Create an entangled state: Entangle
 Methods to create multi-qubit controlled gates, ControledGate
 Measurement: Measure
 Sintax: <Operation> | <qubits>.
 Example: H | qureg[0]
More at http://projectq.readthedocs.io/en/latest/projectq.ops.html
19
Qiskit
https://qiskit.org/documentation/the_elements.html
20
Qiskit
21
More at http://projectq.readthedocs.io/en/latest/projectq.ops.html
 All common gates: X, Y, Z, T, S, CNOT, SWAP, etc.
 Additional useful gates: Rx, Ry, Rz, R, Toffoli
 Specific gates for IBM hardware:u1,cu1,u2,cu2,u3,cu3
 Advanced operations:
 Quantum Fourier Transform, QFT
 Hamiltonian Time Evolution, TimeEvolution
 A set of gates to be applied on a set of qubits, Operator
 Methods to create multi-qubit controlled gates
 Measurement:Measure
 Sintax: gates are methods of the circuit class:
 Example: circuit.h(0) means add a H gate to qubit 0
Qiskit. Backends
22
 AER.
 Local simulator
 Login not needed
 Three simulators:
 Unitary_simulator: produces the result operator of a circuit
 Statevector_simulator: One shot simulator that returns the
state vector
 Qasm_simulator: simulates the real hardware including noise.
Return the set of simulated measurements.
 Real backends:
 Allow execution of circuits on real noisy hardware or advanced
simulator
 Need login
 Remote execution using queues
OPEN PROJECTQ/ DENSE_CODING NOTEBOOK
Exercise: My First ProjectQ Program
OPEN QISKIT/ DENSE_CODING NOTEBOOK
Exercise: My First Qiskit Program
Some Basic Concepts with 2 qubits
Phase Kickback
26
Toffoli Gate
27
Inverse Gate?
28
OPEN PROJECTQ/ SOME_BASICS NOTEBOOK
Exercise: Some Basic Gates with ProjectQ
OPEN QISKIT/ SOME_BASICS NOTEBOOK
Exercise: Some Basic Gates with Qiskit
Lecture_2_v2_qc.pptx

More Related Content

Similar to Lecture_2_v2_qc.pptx

QGATE 0.3: QUANTUM CIRCUIT SIMULATOR
QGATE 0.3: QUANTUM CIRCUIT SIMULATORQGATE 0.3: QUANTUM CIRCUIT SIMULATOR
QGATE 0.3: QUANTUM CIRCUIT SIMULATORNVIDIA Japan
 
Gpu workshop cluster universe: scripting cuda
Gpu workshop cluster universe: scripting cudaGpu workshop cluster universe: scripting cuda
Gpu workshop cluster universe: scripting cudaFerdinand Jamitzky
 
A calculus of mobile Real-Time processes
A calculus of mobile Real-Time processesA calculus of mobile Real-Time processes
A calculus of mobile Real-Time processesPolytechnique Montréal
 
Cotopaxi - IoT testing toolkit (Black Hat Asia 2019 Arsenal)
Cotopaxi - IoT testing toolkit (Black Hat Asia 2019 Arsenal)Cotopaxi - IoT testing toolkit (Black Hat Asia 2019 Arsenal)
Cotopaxi - IoT testing toolkit (Black Hat Asia 2019 Arsenal)Jakub Botwicz
 
Qt everywhere a c++ abstraction platform
Qt everywhere   a c++ abstraction platformQt everywhere   a c++ abstraction platform
Qt everywhere a c++ abstraction platformDeveler S.r.l.
 
Better Information Faster: Programming the Continuum
Better Information Faster: Programming the ContinuumBetter Information Faster: Programming the Continuum
Better Information Faster: Programming the ContinuumIan Foster
 
Open Source Software Tools for Synchrophasor Applications
Open Source Software Tools for  Synchrophasor ApplicationsOpen Source Software Tools for  Synchrophasor Applications
Open Source Software Tools for Synchrophasor ApplicationsLuigi Vanfretti
 
Reading: "Pi in the sky: Calculating a record-breaking 31.4 trillion digits o...
Reading: "Pi in the sky: Calculating a record-breaking 31.4 trillion digits o...Reading: "Pi in the sky: Calculating a record-breaking 31.4 trillion digits o...
Reading: "Pi in the sky: Calculating a record-breaking 31.4 trillion digits o...Kento Aoyama
 
20072311272506
2007231127250620072311272506
20072311272506Vinod Vyas
 
Scalable Web Technology for the Internet of Things
Scalable Web Technology for the Internet of ThingsScalable Web Technology for the Internet of Things
Scalable Web Technology for the Internet of ThingsMatthias Kovatsch
 
RR & Docker @ MuensteR Meetup (Sep 2017)
RR & Docker @ MuensteR Meetup (Sep 2017)RR & Docker @ MuensteR Meetup (Sep 2017)
RR & Docker @ MuensteR Meetup (Sep 2017)Daniel Nüst
 
Breaking New Frontiers in Robotics and Edge Computing with AI
Breaking New Frontiers in Robotics and Edge Computing with AIBreaking New Frontiers in Robotics and Edge Computing with AI
Breaking New Frontiers in Robotics and Edge Computing with AIDustin Franklin
 
(Open) MPI, Parallel Computing, Life, the Universe, and Everything
(Open) MPI, Parallel Computing, Life, the Universe, and Everything(Open) MPI, Parallel Computing, Life, the Universe, and Everything
(Open) MPI, Parallel Computing, Life, the Universe, and EverythingJeff Squyres
 
Web-app realization of Shor’s quantum factoring algorithm and Grover’s quantu...
Web-app realization of Shor’s quantum factoring algorithm and Grover’s quantu...Web-app realization of Shor’s quantum factoring algorithm and Grover’s quantu...
Web-app realization of Shor’s quantum factoring algorithm and Grover’s quantu...TELKOMNIKA JOURNAL
 
Porting a Streaming Pipeline from Scala to Rust
Porting a Streaming Pipeline from Scala to RustPorting a Streaming Pipeline from Scala to Rust
Porting a Streaming Pipeline from Scala to RustEvan Chan
 

Similar to Lecture_2_v2_qc.pptx (20)

02 analysis
02 analysis02 analysis
02 analysis
 
QGATE 0.3: QUANTUM CIRCUIT SIMULATOR
QGATE 0.3: QUANTUM CIRCUIT SIMULATORQGATE 0.3: QUANTUM CIRCUIT SIMULATOR
QGATE 0.3: QUANTUM CIRCUIT SIMULATOR
 
Gpu workshop cluster universe: scripting cuda
Gpu workshop cluster universe: scripting cudaGpu workshop cluster universe: scripting cuda
Gpu workshop cluster universe: scripting cuda
 
Quantum programming
Quantum programmingQuantum programming
Quantum programming
 
A calculus of mobile Real-Time processes
A calculus of mobile Real-Time processesA calculus of mobile Real-Time processes
A calculus of mobile Real-Time processes
 
Cotopaxi - IoT testing toolkit (Black Hat Asia 2019 Arsenal)
Cotopaxi - IoT testing toolkit (Black Hat Asia 2019 Arsenal)Cotopaxi - IoT testing toolkit (Black Hat Asia 2019 Arsenal)
Cotopaxi - IoT testing toolkit (Black Hat Asia 2019 Arsenal)
 
Linux capacity planning
Linux capacity planningLinux capacity planning
Linux capacity planning
 
Qt everywhere a c++ abstraction platform
Qt everywhere   a c++ abstraction platformQt everywhere   a c++ abstraction platform
Qt everywhere a c++ abstraction platform
 
Better Information Faster: Programming the Continuum
Better Information Faster: Programming the ContinuumBetter Information Faster: Programming the Continuum
Better Information Faster: Programming the Continuum
 
Open Source Software Tools for Synchrophasor Applications
Open Source Software Tools for  Synchrophasor ApplicationsOpen Source Software Tools for  Synchrophasor Applications
Open Source Software Tools for Synchrophasor Applications
 
Reading: "Pi in the sky: Calculating a record-breaking 31.4 trillion digits o...
Reading: "Pi in the sky: Calculating a record-breaking 31.4 trillion digits o...Reading: "Pi in the sky: Calculating a record-breaking 31.4 trillion digits o...
Reading: "Pi in the sky: Calculating a record-breaking 31.4 trillion digits o...
 
Ns fundamentals 1
Ns fundamentals 1Ns fundamentals 1
Ns fundamentals 1
 
20072311272506
2007231127250620072311272506
20072311272506
 
So you think you can stream.pptx
So you think you can stream.pptxSo you think you can stream.pptx
So you think you can stream.pptx
 
Scalable Web Technology for the Internet of Things
Scalable Web Technology for the Internet of ThingsScalable Web Technology for the Internet of Things
Scalable Web Technology for the Internet of Things
 
RR & Docker @ MuensteR Meetup (Sep 2017)
RR & Docker @ MuensteR Meetup (Sep 2017)RR & Docker @ MuensteR Meetup (Sep 2017)
RR & Docker @ MuensteR Meetup (Sep 2017)
 
Breaking New Frontiers in Robotics and Edge Computing with AI
Breaking New Frontiers in Robotics and Edge Computing with AIBreaking New Frontiers in Robotics and Edge Computing with AI
Breaking New Frontiers in Robotics and Edge Computing with AI
 
(Open) MPI, Parallel Computing, Life, the Universe, and Everything
(Open) MPI, Parallel Computing, Life, the Universe, and Everything(Open) MPI, Parallel Computing, Life, the Universe, and Everything
(Open) MPI, Parallel Computing, Life, the Universe, and Everything
 
Web-app realization of Shor’s quantum factoring algorithm and Grover’s quantu...
Web-app realization of Shor’s quantum factoring algorithm and Grover’s quantu...Web-app realization of Shor’s quantum factoring algorithm and Grover’s quantu...
Web-app realization of Shor’s quantum factoring algorithm and Grover’s quantu...
 
Porting a Streaming Pipeline from Scala to Rust
Porting a Streaming Pipeline from Scala to RustPorting a Streaming Pipeline from Scala to Rust
Porting a Streaming Pipeline from Scala to Rust
 

Recently uploaded

HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 

Recently uploaded (20)

HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 

Lecture_2_v2_qc.pptx

  • 2. Lecture 2  QPU  Topologies of QPU  Programming  Simulators.  Introduction to ProjectQ  My first program with ProjectQ .
  • 3. Universal Quantum Computer. Quantum Gates From: Nielsen, M., & Chuang, I. (n.d.). Quantum computation and Quantum information. ONE QUBIT GATES TWO QUBIT GATES (H,S,T,CNOT) = Universal Quantum Gates: can approximate ANY unitary operation 3
  • 4. Quantum register initialized to |0> for a finite bit string 0 (n bits = nqubits) Manipulated by a set of primitives one or two qubit unitary operations (quantum gates) Measured into a classical bases labeled as a bit string of length n. A program is provided by a set of gates to be applied onto QuBits. Universal Quantum Computer. QRAM || QPU Send QProgram QPU Get Result Knill, E. (1996). Conventions for quantum pseudocode. LANL report LAUR-96-2724 & Knill, E. (1996). Quantum Randomness and Nondeterminism, LABL report LAUR-96-2186. Archiv:quant-ph/9610012 4
  • 5. Ion Trap (I) 171Yb+ trapped ions Information stored in the hyperfine ‘clock’ states: 2 𝑆1/2  |0 >≡ |𝐹 = 0; 𝑚𝐹 = 0 >  |1 >≡ |𝐹 = 1; 𝑚𝐹 = 0 > 𝑜𝑓 𝑡ℎ𝑒 electronic ground level  𝐹 , 𝑚𝐹 quantum numbers associated to total atomic angular momentum and its projection along the quantization axes defined by an applied magnetic field of 5.2G  Coherence time > 0.5s Confined in a linear radio-frequency Paul trap Laser-cooled 5 µm for 5 qubits Debnath, S., Linke, N. M., Figgatt, C., Landsman, K. A., Wright, K., & Monroe, C. (2016). Demonstration of a small programmable quantum computer with atomic qubits. Nature, 536(7614), 63–66. http://doi.org/10.1038/nature18648 13/09/2017 5 All-with-All
  • 6. Ion Trap (II): Universal Gates Implemented gates (using Raman transition):  single qubit 𝑅𝜑 𝜃 = 𝑅(𝜃, 𝜑)  two − qubits 𝑋𝑋 𝐻 = 𝑅 −𝜋 𝑅 𝑥 𝑦 Universal Gates derived as: 𝜋 2 Z = 𝑅 −𝜋/2 𝑅 𝜃 𝑅 𝑦 𝑥 𝑦 𝜋 2 Controlled-NOT (CNOT) Controlled-Phase (cP) Debnath, S., Linke, N. M., Figgatt, C., Landsman, K. A., Wright, K., & Monroe, C. (2016). Demonstration of a small programmable quantum computer with atomic qubits. Nature, 536(7614), 63–66. http://doi.org/10.1038/nature18648 13/09/2017 6
  • 7. Ion Trap (III): QFT(5) State preparation (single qubits rotations) Total gates[1]:  5 H = 10 R  10 CP = 10 (6R + 1 X)  Total = 80 gates Optimised Version [2]:  22 single-qubit gates  10 two-qubits gates  Total: 32 gates  Time: 2669 µs 1 Debnath, S., Linke, N. M., Figgatt, C., Landsman, K. A., Wright, K., & Monroe, C. (2016). Demonstration of a small programmable quantum computer with atomic qubits. Nature, 536(7614), 63–66. http://doi.org/10.1038/nature18648 2 Maslov, D. (2017). Basic circuit compilation techniques for an ion-trap quantum machine. New Journal of Physics, 19(2), 23035. http://doi.org/10.1088/1367- 2630/aa5e47 QFT Ideal Gates: 15 13/09/2017 7
  • 8. IBM QX Hardware Gates:  Frame Change (FC, 0ns),  Gaussian Derivative (GD, 80ns) ,  Gaussian Flattop (GF, 170-384ns)  Buffer after each pulse:10ns https://github.com/QISKit/ibmqx-backend-information/tree/master/backends/ibmqx3 Limits on: - Available gates, - Different times for each operations - Restrictions on 2 qubits operations - Restrictions on measurement 13/09/2017 8
  • 9. Quantum Computing Architecture Send QProgram QPU Get Result 13/09/2017 9 Van Meter, R., & Horsman, C. (2013). A blueprint for building a quantum computer. Communications of the ACM, 56(10), 84. http://doi.org/10.1145/2494568
  • 10. 10 Smith, J. M. (2015). Programming the Quantum Future. Communications of the ACM, 58(8), 52–61. http://doi.org/10.1145/2699415 Quantum Algorithm
  • 11. Quantum Algorithm A sequence of gates applied on a set of qubits Some well-known techniques:  Amplify amplitude (Grover’s)  Estimate phase More than 400 quantum algorithm papers on Quantum Zoo Many are unitary transformation on n- qubits plus measurement  How to make them as a set of universal gates? Quantum Zoo website 13/09/2017 11
  • 12. Quantum Programing  Define one or several quantum registers  Apply high level methods, a set of gates or general unitary transformations  Decompose them in basic gates  Transform to real operations of the QPU  Or for simulators Steiger, D. S., Häner, T., & Troyer, M. (2016). ProjectQ: An Open Source Software Framework for Quantum Computing. Retrieved from http://arxiv.org/abs/1612.08091 12
  • 13. Modern Quantum Languages (I) (*) At least in the public versión (**) 30 locally, 40 in Azure Core Language Unlimited Qubits Simulator Optimizer/ decomp. CESGA ProjectQ Python/C LIQUi|> F# (*) Quipper HasKell ScaffCC Scaffold QX Microsoft Quantum Development Kit (2018) Q# (**) QisKit Python Xacc C++/python TNQVM 13
  • 14. Modern Quantum Languages (II) Core Language Unlimited Qubits Simulator Optimizer/ decomp. CESGA Quest Python/C Cirq (Google) Python ?? Quil (Rigetti) Python ?? 14
  • 15. ProjectQ Steiger, D. S., Häner, T., & Troyer, M. (2016). ProjectQ: An Open Source Software Framework for Quantum Computing. Retrieved from http://arxiv.org/abs/1612.08091 15
  • 16. ProjectQ. Compiler Engines MainEngine The MainEngine class provides all functionality of the main compiler engine. CommandModifier CommandModifier is a compiler engine which applies a function to all incoming commands, sending on the resulting command instead of the original one. IBMCNOTMapper CNOT mapper for the IBM backend. ManualMapper Manual Mapper which adds QubitPlacementTags to Allocate gate commands according to a user-specified mapping. LocalOptimizer LocalOptimizer is a compiler engine which optimizes locally (merging rotations, cancelling gates with their inverse) in a local window of user-defined size. AutoReplacer The AutoReplacer is a compiler engine which uses engine.is_available in order to determine which commands need to be replaced/decomposed/compiled further. TagRemover TagRemover is a compiler engine which removes temporary command tags. More at http://projectq.readthedocs.io/en/latest/projectq.cengines.html eng = MainEngine(backend=Simulator(), engine list =[AutoReplacer(rule_set), TagRemover(), LocalOptimizer(3) ]) Steiger, D. S., Häner, T., & Troyer, M. (2016). ProjectQ: An Open Source Software Framework for Quantum Computing. Retrieved from http://arxiv.org/abs/1612.08091 16
  • 17. ProjectQ. Backends More at http://projectq.readthedocs.io/en/latest/projectq.backends.html Steiger, D. S., Häner, T., & Troyer, M. (2016). ProjectQ: An Open Source Software Framework for Quantum Computing. Retrieved from http://arxiv.org/abs/1612.08091 17 CommandPrinter CommandPrinter is a compiler engine which prints commands to stdout prior to sending them on to the next compiler engine. CircuitDrawer CircuitDrawer is a compiler engine which generates TikZ code for drawing quantum circuits. Simulator Simulator is a compiler engine which simulates a quantum computer using C++- based kernels. ClassicalSimulator A simple introspective simulator that only permits classical operations. ResourceCounter ResourceCounter is a compiler engine which counts the number of gates and max. IBMBackend The IBM Backend class, which stores the circuit, transforms it to JSON QASM, and sends the circuit through the IBM API.
  • 18. ProjectQ. Setups  The setups package contains a collection of setups which can be loaded by the MainEngine.  Each setup then loads its own set of decomposition rules and default compiler engines.  MainEngine(setup=projectq.setups.ibm) More at http://projectq.readthedocs.io/en/latest/projectq.setups.html Steiger, D. S., Häner, T., & Troyer, M. (2016). ProjectQ: An Open Source Software Framework for Quantum Computing. Retrieved from http://arxiv.org/abs/1612.08091 18 default Defines the default setup which provides an engine_list for the MainEngine ibm Defines a setup useful for the IBM QE chip with 5 qubits. ibm16 Defines a setup useful for the IBM QE chip with 16 qubits.
  • 19. ProjectQ. eDSL. Operations  All common gates: X, Y, Z, T, S, CNOT, SWAP, etc.  Additional useful gates: Rx, Ry, Rz, R, Ph, Toffoli (ControledControledNOT/ ControledControledX)  Advanced operations:  Quantum Fourier Transform, QFT  Hamiltonian Time Evolution, TimeEvolution  A set of gates to be applied on a set of qubits, QubitOperator  Create an entangled state: Entangle  Methods to create multi-qubit controlled gates, ControledGate  Measurement: Measure  Sintax: <Operation> | <qubits>.  Example: H | qureg[0] More at http://projectq.readthedocs.io/en/latest/projectq.ops.html 19
  • 21. Qiskit 21 More at http://projectq.readthedocs.io/en/latest/projectq.ops.html  All common gates: X, Y, Z, T, S, CNOT, SWAP, etc.  Additional useful gates: Rx, Ry, Rz, R, Toffoli  Specific gates for IBM hardware:u1,cu1,u2,cu2,u3,cu3  Advanced operations:  Quantum Fourier Transform, QFT  Hamiltonian Time Evolution, TimeEvolution  A set of gates to be applied on a set of qubits, Operator  Methods to create multi-qubit controlled gates  Measurement:Measure  Sintax: gates are methods of the circuit class:  Example: circuit.h(0) means add a H gate to qubit 0
  • 22. Qiskit. Backends 22  AER.  Local simulator  Login not needed  Three simulators:  Unitary_simulator: produces the result operator of a circuit  Statevector_simulator: One shot simulator that returns the state vector  Qasm_simulator: simulates the real hardware including noise. Return the set of simulated measurements.  Real backends:  Allow execution of circuits on real noisy hardware or advanced simulator  Need login  Remote execution using queues
  • 23. OPEN PROJECTQ/ DENSE_CODING NOTEBOOK Exercise: My First ProjectQ Program
  • 24. OPEN QISKIT/ DENSE_CODING NOTEBOOK Exercise: My First Qiskit Program
  • 25. Some Basic Concepts with 2 qubits
  • 29. OPEN PROJECTQ/ SOME_BASICS NOTEBOOK Exercise: Some Basic Gates with ProjectQ
  • 30. OPEN QISKIT/ SOME_BASICS NOTEBOOK Exercise: Some Basic Gates with Qiskit