SlideShare a Scribd company logo
1 of 51
Quantum Programming in a nutshell
Quantum
Programming in a
nutshell
@RaduVunvulea
RADU VUNVULEA
Technology Enthusiast
Microsoft Azure MVP
Speaker & Trainer
Writer & Blogger
Idealist Software
Architecture Crafter
RADU VUNVULEA
- NO deep knowledge
on Quantum Computing
- You will not know to
write a real program in
Q#
- It’s all about probability
and vectors
Sneak preview on
quantum programming
concepts
Core concept of
Quantum theory
Energy, like matter, consists
of discrete units, rather than
solely as a continuous waves
Quantum computing takes advantage
of the strange ability of subatomic particles
to exist in more than one state at any time
Absolute values does not exists, just
an infinite values between 0 to 1
- superpositions -
GENESIS
Math
•Vectors
•Linear
Algebra
•Statistics
Particle
physics
• Photon
• Electron
Genesis
Schrödinger’s Cat
Dead or
Alive?
0.42342423423
• Absolute values like 0 or 1 does
not exist
• Statistics and multiple states is
what quantum defines
WHAT IS QUANTUM
COMPUTING?
BITS
Classical computer
ON OFF
Qubit
Qubit
ON
Qubit
Qubit
ON
Qubit
Qubit
ON
Bloch sphere
N qubits
2 𝑁
paths
QSPHERE
Superpositions
|0)
|1)
1 2(|0) + |1)) 1 2(|0) + |1))
|00000)
|00010)
|00110)
|01110)
|11111)
|11110)
|11010)
|01010)
BLOCK SPHERE QSPHERE
N qubits
2 𝑁
paths
QSPHERE
Superpositions
|0)
|1)
1 2(|0) + |1)) 1 2(|0) + |1))
|00000)
|00010)
|00110)
|01110)
|11111)
|11110)
|11010)
|01010)
BLOCK SPHERE QSPHERE
Number of calculation in
a single step
Nitrogen
fixation
100-200 qubits
Carbon
capture
100-200 qubits
Materials
science
100-1000qubits
Machine
Learning
100-1000qubits
Problems and Reqs
Classical
AND OR NOT Not-linear
Quantum
NOT
(Pauli-X)
Pauli-Z Hadamard CNOT Linear
Classical VS Quantum gates
Input Output
0 0 0 0
0 1 0 1
1 0 1 1
1 1 1 0
CNOT
• Quantum simulator
–2 𝑛
(n represents the no. of qubits)
–Multiple positions (superpositions)
• Traditional computer
–3 bits (2X2X2 – 8 combinations)
–7 bits (2X2X2X2X2X2X2 – 128 combinations)
How does the simulator works
• States
–30 qubits : 16 Gb on traditional computer
–31 qubits : 32 Gb
–70 qubits : 16 Zb
• Gate simulation
–30 qubits : 1s of normal computer
–40 qubits : 1s of super computer
–260 qubits : Age of Universe 
How does the simulator works
What we have now?
IBM: 50-qubit
Google: 72-qubit
Microsoft: 0-qubit
What we have now?
IBM: 50-qubit
Google: 72-qubit
Microsoft: 0-qubit
Hold the quantum
microstates 90
microseconds
• In the past:
–9 qubits (1 computational and 8 correctional)
• IBM breakthrough:
– 5 qubits (1 computational and 4 correctional)
Current problems
Current problems
Interfaces
Collapse
Error
correction
Output
observance
Quantum and
Microsoft
• Based on Majorana
particles
• Scalable
• Stable
• Error-prone
• Low cost
Microsoft Vision
Q#
Q#
Just another coprocessor like GPUs or
FPGAs
Windows,
Linux, maxOS
Development
libraries are
Open Source
Integrated with
Visual Studio
Interoperability
with Python
Q#
Application runs in a classical manner and when required a
sub-program runs inside quantum processor
Main concept
• Input data
• Setup
• Trigger quantum
processing
Classical
computation
• Run quantum
algorithm
Quantum
computation • Output data
• Present to the
user
Classical
computation
Domain Specific
Programming
Language
Used to write sub-
programs for
Quantum
processor
It is under control
of a classical host
Data type
• Primitive types
• Tuple
• Arrays
Basic Procedural
• Loops
• IF/ELSE
Q#
Q#
Int, Bool,
Qubit
Pauli (I,X,Y,Z)
Arrays []
Tuples ()
Result Zero One
User defined types
1. Int integer = 10;
2. Bool boolean = true;
3. Qubit qubit = Qubit[5];
4. Int[] array = Int[5];
5. (String, Qubit) tuple2 = (2, qubit[0]);
6. newtype event = (String, String);
1. set
2. newtype LogicalRegister = Qubit[]; //Callable expression
3. newtype EncodeOp = ((Qubit[], Qubit[]) =>
LogicalRegister);
4. // Range expression
5. 1..1..4; // 1234
6. 1..3..9; // 1369
7. 3..8..8; // 3
8. 1..-1..2; //Empty
9. array[1..2..5]; // Items on the index 1,3,5
1. let itcamp = 2018; // Immutable 'variable' /
symbol
2. mutable mutableValue = 200;
3. let imutableValue = mutableValue;
4. set mutableValue = 400;// imutableValue == 200
5. fail $"Exception occured";
6. return Zero;
Conclusion
• Quantum programming is all about vectors and
probabilities
• It is another programming paradigm
• Big potential for predictions and simulations
– AI, ML
Conclusion
Conclusion
• Quantum programming is all
about vectors and probabilities
• It is another programming
paradigm
• Big potential for predictions and
simulations
– AI, ML
Q & A
50
THANK YOU!
@RaduVunvulea
RADU VUNVULEA
 Quantum programming in a nutshell

More Related Content

Similar to Quantum programming in a nutshell

Similar to Quantum programming in a nutshell (20)

Quantum programming
Quantum programmingQuantum programming
Quantum programming
 
Unlocking the Power of Quantum Machine Learning with Azure Quantum
Unlocking the Power of Quantum Machine Learning with Azure QuantumUnlocking the Power of Quantum Machine Learning with Azure Quantum
Unlocking the Power of Quantum Machine Learning with Azure Quantum
 
Quantum Computing with Amazon Braket
Quantum Computing with Amazon BraketQuantum Computing with Amazon Braket
Quantum Computing with Amazon Braket
 
Strengths and limitations of quantum computing
Strengths and limitations of quantum computingStrengths and limitations of quantum computing
Strengths and limitations of quantum computing
 
Quantum Computing With the Q# Language
Quantum Computing With the Q# LanguageQuantum Computing With the Q# Language
Quantum Computing With the Q# Language
 
Quantum computing explained to my (Schrödinger) cat - Alessandro Vozza - Code...
Quantum computing explained to my (Schrödinger) cat - Alessandro Vozza - Code...Quantum computing explained to my (Schrödinger) cat - Alessandro Vozza - Code...
Quantum computing explained to my (Schrödinger) cat - Alessandro Vozza - Code...
 
Quantum Computing and Java QC API—Strange
Quantum Computing and Java QC API—StrangeQuantum Computing and Java QC API—Strange
Quantum Computing and Java QC API—Strange
 
The 1st workshop on engineering processes and practices for quantum software ...
The 1st workshop on engineering processes and practices for quantum software ...The 1st workshop on engineering processes and practices for quantum software ...
The 1st workshop on engineering processes and practices for quantum software ...
 
Quantum Computation For AI
Quantum Computation For AIQuantum Computation For AI
Quantum Computation For AI
 
Distributed Systems in the Post-Moore Era.pptx
Distributed Systems in the Post-Moore Era.pptxDistributed Systems in the Post-Moore Era.pptx
Distributed Systems in the Post-Moore Era.pptx
 
Quantum Computing: The next new technology in computing
Quantum Computing: The next new technology in computingQuantum Computing: The next new technology in computing
Quantum Computing: The next new technology in computing
 
The $5 Million Question: How Can We Make Quantum Computing Useful?
The $5 Million Question: How Can We Make Quantum Computing Useful?The $5 Million Question: How Can We Make Quantum Computing Useful?
The $5 Million Question: How Can We Make Quantum Computing Useful?
 
What is Quantum Computing and Why it is Important
What is Quantum Computing and Why it is ImportantWhat is Quantum Computing and Why it is Important
What is Quantum Computing and Why it is Important
 
Quantum Computing
Quantum ComputingQuantum Computing
Quantum Computing
 
Quantum Computing: The Why and How
Quantum Computing: The Why and HowQuantum Computing: The Why and How
Quantum Computing: The Why and How
 
[Q-tangled 22] Deconstructing Quantum Machine Learning Algorithms - Sasha Laz...
[Q-tangled 22] Deconstructing Quantum Machine Learning Algorithms - Sasha Laz...[Q-tangled 22] Deconstructing Quantum Machine Learning Algorithms - Sasha Laz...
[Q-tangled 22] Deconstructing Quantum Machine Learning Algorithms - Sasha Laz...
 
You always dreamt of your own quantum computer. now you can have it in the cloud
You always dreamt of your own quantum computer. now you can have it in the cloudYou always dreamt of your own quantum computer. now you can have it in the cloud
You always dreamt of your own quantum computer. now you can have it in the cloud
 
Navneet presentation
Navneet presentationNavneet presentation
Navneet presentation
 
Demystifying Quantum Computing
Demystifying Quantum ComputingDemystifying Quantum Computing
Demystifying Quantum Computing
 
Seminar presentaion title and qc ppt.pptx
Seminar presentaion title and qc ppt.pptxSeminar presentaion title and qc ppt.pptx
Seminar presentaion title and qc ppt.pptx
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
FIDO Alliance
 

Recently uploaded (20)

Navigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern EnterpriseNavigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern Enterprise
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
الأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهلهالأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهله
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overview
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptx
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational Performance
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation Computing
 

Quantum programming in a nutshell

Editor's Notes

  1. https://whatis.techtarget.com/definition/quantum-computing