SlideShare a Scribd company logo
1 of 69
Download to read offline
PROGRAMMING COMPLEX FLOWS
ON QUANTUM COMPUTERS
Rolf Huisman
IT Architect
Rolf.Huisman@ .com
@rlrhuisman
What did you learn ?
How would you model a more
complex scenario ?
Picture by Rolf Huisman / CC0 Creative Commons
Picture by Rolf Huisman / CC0 Creative Commons
Picture by Rolf Huisman / CC0 Creative Commons
Picture by Rolf Huisman / CC0 Creative Commons
Internet
Of
Stuffed
Animals
(IOSA)
Picture by Rolf Huisman / CC0 Creative Commons
Picture by Rolf Huisman / CC0 Creative Commons
Living Room
Attic
Bedroom
Stuffed animal problem
Stuffed animal problem
Living Room
Attic
Bedroom
Picture by Rolf Huisman / CC0 Creative Commons
Stuffed animal problem
Living Room
Attic
Bedroom
Picture by Rolf Huisman / CC0 Creative Commons
Stuffed animal problem
Living Room
Attic
Bedroom
Picture by Rolf Huisman / CC0 Creative Commons
Stuffed animal problem
Living Room
Attic
Bedroom
Picture by Rolf Huisman / CC0 Creative Commons
Stuffed animal problem
Living Room
Attic
BedroomSearch Path
Optimization
Picture by Rolf Huisman / CC0 Creative Commons
Same problem as other fields
Picture by Geralt / CC0 Creative Commons
Traveling Salesman problem
• NP Hard
Pictures by Saurabh harsh / CC BY-SA 3.0
O(2n*2n)
Using the gates to describe
• Optimized Traveling Salesman Problem 5 Cities:
Details: Phys. Rev. A 95, 032323 – Published 22 March 2017
Using the gates to describe
• Optimized Traveling Salesman Problem 5 Cities:
Details: Phys. Rev. A 95, 032323 – Published 22 March 2017
Homework, lets use a simpler version for now …
Told Qubits are waves
Radio waves
Radio waves
Radio stations:
E.g. Q-Music, 538, Radio 4
Radio waves
Radio stations:
E.g. Q-Music, 538, Radio 4
Tuning specific waves
Tuning specific waves
Oracle Function
Grover (and other amplifications)
Oracle Function
Grover (and other amplifications)
Original Amplitudes Negate Amplitude
Average of all Amplitudes Flip all Amplitudes around Avg
Radio stations
Step 1: Create our state space
Stuffed animal problem
Simplified version
• 4 places
• 2 options per place
Stuffed animal problem
Stuffed animal problem
Attic
Bedroom
Stuffed animal problem
Attic
Bedroom
Stuffed animal problem
Stuffed animal problem
Stuffed animal problem
“Stairway to Attic Rock FM”
“Going down Beats FM”
Stuffed animal problem
Stuffed animal problem
• Add another Qubit
CNOT
In Code
Q#
Qiskit
Result
firstChoice location]
One
(Go Up)
One
(Attic)
Zero
(Go Down)
Zero
(Living Room)
Stuffed animal problem
Stuffed animal problem
Stuffed animal problem
Model the stairs
Q#
Qiskit
Model the stairs
choice1 choice2 “Location”
One
(Up)
One
(Up)
Roof
One
(Up)
Zero
(Down)
Bedroom
Zero
(Down)
Down
(Up)
Bedroom
Zero
(Down)
Zero
(Down)
Basement
Waffie on the roof ?
Dirty solution
Q#
Qiskit
Dirty solution
• But my basement is now gone 
choice1 choice2 “Location”
One
(Up)
Zero
(Down)
Bedroom
Zero
(Down)
One
(Up)
Bedroom
Controlled Hadamard
H H
Q1 Q2
One One
One Zero
Zero Zero
Controlled Hadamard
Using Q# functor:
(Controlled H)(Qubit[], Qubit)
H H H
Q1 Q2
One One
One Zero
Zero Zero
Put the basement back
Qiskit
Q#
Put the basement back
choice1 choice2 “Location”
One
(Up)
Zero
(Down)
Bedroom
Zero
(Down)
One
(Up)
Bedroom
Zero
(Down)
Zero
(Down
Basement
Keep on going
• For this example, still pretty simple (2 paths)
• Real version of my house is more complex
Choice 1 Choice 2 Choice 3 Choice 4 Choice 5 Choice 6 …
One
(Up)
Zero
(Down)
Zero
(Down)
Zero
(Down)
One
(Up)
One
(Up)
…
Zero
(Down)
Zero
(Down)
One
(Up)
One
(Up)
One
(Up)
Zero
(Down)
…
…. …. …. … … … …
This gives us our state space
Now we need to tune the frequency
Our Oracle function
Stuffed animal problem
• Oracle Function
• (Loss function, cost function)
Attic
Bedroom
Stuffed animal problem
• Oracle Function, Flag Qubit
Attic
Bedroom
Stuffed animal problem
• Oracle Function, Flag Qubit
Attic
Stuffed animal problem
• Oracle Function, Flag Qubit
Attic
Stuffed animal problem
• Oracle Function, Flag Qubit
Stuffed animal problem
• Oracle Function, Flag Qubit
Bedroom
Library Functions
Q#
Qiskit
Aqua
Grover (and other amplifications)
Original Amplitudes Negate Amplitude
Average of all Amplitudes Flip all Amplitudes around Avg
Grover execution:
informally 𝑠𝑡𝑎𝑡𝑒𝑠
Chance amplification
• When you have more options than 2 and places than 4
Choice 1 Choice 2 Choice 3 Chance
Zero Zero … 0.00.. %
Zero One … 49.99.. %
One Zero … 49.99.. %
One One … 0.00… %
Simplification
The real device is not the same
• Real vs Simulated for x + y = 1
Many hours and code lines later
Traditional Quantum
Naive O(𝑛!) O( 𝑛!)
With effort O(2n*2n) O(( 𝑛)!)
Many hours and code lines later
Traditional Quantum
Naive O(𝑛!) O( 𝑛!)
With effort O(2n*2n) O(( 𝑛)!)
Choice 1 Choice 2 Choice 3 Choice 4 …
… … … … …
Zero One One Zero …
… … … … …
Living Room
Attic
Bedroom
Stuffed animal solution
Low-Tech Solution
Picture by Rolf Huisman / CC0 Creative Commons
Conclusions
•Quantum Computing
1. If you want a challenge,
2. And change the world,
3. Because its cool to program for
4. And it works on real hardware ☺
So be part of the quantum future !
• Rolf Huisman
• Rolf.Huisman@infosupport.com
• @rlrhuisman
Questions ?
• For more internals, please visit the stand

More Related Content

Recently uploaded

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
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)

Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software Engineering
 
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
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation Computing
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
"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 ...
 
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
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
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
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
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
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...
 
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
 

Featured

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Meetup webscale architecture quantum computing (Part 2 16-10-2018)