How to Use Amazons Quantum Computers
If annealing, superposition, and qubits all sound like new Netflix films to you, then I too was in the same position only a week ago, until I fell down the rabbit hole of quantum computing.
How is the Quantum Computer Setup in Amazon – The Amazon Braket Architecture?
The diagram above, taken from Tyler Takeshita’s video (included in the resources), shows that using the AWS system has some real advantages like the rest of their Cloud hosting offering. While the actual quantum computers sit outside the AWS cloud, how you interact with them is very similar to how you’d do anything else on AWS.
Security Access – Identity and Access Management (IAM)
You can set specific permissions within the AWS console to allow access to the quantum computing solution. This works similarly to MS AD, where you can create users, groups and roles with associated permissions.
Amazon Braket gives you access to quantum computers and allows users to test their code on quantum emulators, which can be managed using the intrinsic IAM system.
Pay Per Use – Shot and Task
You only pay for what you use, and to save time and cost, you can use the quantum emulators to make sure your programming hasn’t got any technical debt and so you don’t waste money on quantum computer use.
The costing is based on a set price for a task (essentially the problem definition) at $0.30 and then the “shot”, which is the number of times the task is executed at around $0.00019 per shot (different machines have different prices).
Emulator prices work slightly differently in that you pay how long they’re in use.
Object Storage on AWS
After running a task on the quantum machine, the results are accessed in a secure AWS S3 Bucket for easy access within the AWS console.
Amazon CloudWatch
This service monitors resources and applications you run on AWS in real-time. You can use CloudWatch to collect and track metrics, create alarms that watch metrics and send notifications or automatically make changes to the resources you are monitoring when a threshold is breached.
Concerning the use of quantum computers, it will allow you to look at historical data and give you a holistic perspective on how Amazon Braket is performing for your business.
AWS EventBridge
A serverless monitoring tool that allows you to create event-driven applications at scale using events generated from your applications. This is useful when your system looks de-coupled when launched, but over time has become subject to a fragile API with a single point of failure.
AWS Key
Allows the user to create and manage cryptographic keys.
Why Use a Quantum Computer?
Now I’m no mathematician, having resat my Physics A-Level, and not getting very far with the .net teams Euler challenge in Rippleffect. Still, I see the broader point in using computing to solve problems.
Datasets which are large or complex are commonplace now with all things digital. These could range from life-saving pharmaceuticals, complex aero engineering, fintech data to military applications.
Historically companies have just used bigger and bigger computers, i.e. adding in more and more processes. But quantum computers work in a slightly different way.
What is a Quantum Computer?
The quantum processors store the data you’d usually associate with conventional chips as small magnetic fields (aka single flux quanta) rather than voltages over transistors.
The chips are made from Niorobium, which exhibits superconductor properties (zero electrical resistance) at low temperatures, but they need to be shielded from magnetic interference.
The operating environment is extreme. Forget the fan running at the back of your laptop when you’ve got MS Teams running. Forget the snazzy water-cooled motherboard your boyfriend treated himself to for gaming.
The quantum processor needs temperatures of around 0.01K which is significantly colder than interstellar space (3k). If you cast your mind back to “A-Level” physics, it is as good as absolute zero (-273 degrees C) as you’re likely to get.
Without this chill and the magnetic shielding, your quantum processor isn’t going to work. This is why quantum computers are so big; they have to include rack space for the conventional computer to feed them information, they need a cooling unit, and the processor needs up to 16 layers of shielding when in use.
AWS Quantum Computer Options
I used the “D-Wave — Advantage System 4.1”, which operated with quantum annealing.
Quantum Annealing
It can be loosely defined as “Seeks to use the intrinsic qualities of quantum mechanics to solve optimisation problems & probabilistic sampling”.
Optimisation problems are when you’re looking for the most efficient configuration out of many options. For instance, if you’re looking at building a car on a fixed budget but you have a variety of components, what combination (configuration) of those components will be the best (e.g. performance) for that fixed budget.
The latter, probabilistic sampling, is linked to the former but used to take a model sample from a probabilistic point of view to improve the model over time – one such application may be machine learning.
Gate Model Quantum Computing
A more complex method where rather than relying on the natural order of a system reaching a low energy state (and giving you your answer), you attempted to control and manipulate that quantum state over time.
The downside of the gate model approach is having the quantum process fail because it is delicate. Still, the advantage is more significant mathematical problems can be solved by utilising the quantum computer.
Gated machines tend to have significantly lower qubits than their annealing relatives and are even more so in their infancy.
See “What is Quantum Annealing?” in the resources below for more info.
Amazon Braket also offers access to other quantum computers by Rigetti and IonQ.
It’s also worth noting here that Google does have a Quantum computer capability using the Sycamore processor (link in the resources section). I only found this out when I looked up Jeremy Hilton, who pulled one of the resources I’ve cited, to find he moved from D-Wave to Google.
Using the D-Wave — Advantage_system 4.1 in Amazon Braket
If a picture says a thousand words, a video will say more. Rather than going into too much detail on how this hangs together (I’ll give some brief information), have a look at Tyler’s video as he talks the user through solving the Minimum Vertex Cover Problem. I’ve included a link in the resources about what this is.
Steps to using the quantum computer on Amazon Braket.
1. Set up or log in to your AWS account.
2. Search for S3 and create an S3 bucket with amazon-braket as the prefix (then some other name after that). e.g. amazon-braket-maffingoesquantum.
3. Set up a sub-folder and note the name.
4. Search Amazon Braket.
5. Under “Devices” click on and make a note of the ARN of the machine you want to use (there’s a handy copy button). Check it’s online too.
6. Make sure you’re in the right region as the quantum machine (e.g. US-West) won’t work if you’re in a different region.
7. Go to Notebooks and Create a Notebook (this takes a few minutes) – you can pick a user from the IAM – I left mine as root.
8. Within the Notebook, look at “Braket Examples”. Pick one to try.
9. Create New “Conda_Braket” (the CLI for submitting tasks to the quantum computer).
10. Dump in your code. Remember to watch out for “Or” examples. Some of the worked examples suggest two options; adding both will give you an error. Also, put in the S3 details you noted down earlier. Failure to do this will throw more errors.
11. Execute your code.
12. Head over to Tasks – if it has been executed, the correct details will be here. Make sure you’re in the right region!
13. Check your S3 bucket. The problem results should be located as a JSON file.
14. Congratulations, you’ve just gone quantum. Now tell everyone at work that’s what you did at the weekend when they said: “I went to Cheshire Oaks shopping”.
Quantum Conclusion
If you’re an accountant or a climate activist, the cost of a supercomputer is pretty high in terms of energy usage. They have thousands of processor chips that need to be powered and cooled, compared to a quantum computer that has just one.
This means that while there’s a lot of energy to keep the chip at 0.01K, a traditional supercomputer rack might use up to 10x that power without solving the problem 10x faster.
It’s not hard to see the potential use of quantum computers in real-world military situations, either. These include NP-Hardness problems that conventional supercomputers struggle to solve. For instance, consider the following purely hypothetical position:
NATO has a set of 10 mobile Patriot missile units (MIM-104) that it can deploy anywhere in a list of 100 accessible locations next to an aggressive non-NATO country.
NATO wants to cover as much geographic area as possible. However, some locations interfere with each other, which reduces their operational and, therefore, cost-effectiveness. Where should the MIM-104 sites be located?
Objective: Maximise coverage.
Constraints: i. Only 10 Patriot units are available for operational deployment. ii. Choose locations that do not cause interference.
Given the number of potential combinations, doing this manually will involve a lot of complex guesswork and an attempt and failure each time.
If the situation is escalating quickly and the lead time to deployment is significant, the only realistic solution is looking at automation. Failure to find the most efficient setup could cost many lives in the event of a missile launch. In this case, a quantum computer could be queried by command and the locations fed out to the relevant units. This is especially useful if the number of locations or units changes quickly (which happens in conflict as ground is lost or gained and hardware destroyed). The updated numbers could be rerun and new orders distributed.
Back in civilian life, sadly, given the problems quantum computers are best suited to solve, their sheer size and cost, it’s unlikely you’ll be booting up Counter-Strike Source on one any time soon for a game with the chaps at D-Wave. But as they follow a similar path to conventional computers (smaller and cheaper) and become more accessible through portals like AWS right now – they can be used to help solve environmental, financial and engineering problems quickly and relatively cheaply.
I’ve included some additional reading in the form of Simon Singh’s “Code Book”. It first introduced me to the idea of quantum computers back in 2004 and their potential use to brute force attack standard SSL and remove the underpinning security of that little padlock on your browser.
Financial institutions like PayPal are looking at how they can “quantum-proof” their companies against this type of attack and also use quantum computers to analyse large amounts of data in their fraud protection departments, knows as the “quantum advantage” (see resource PayPal: Harnessing Quantum Computing in FinTech | D-Wave Qubits 2021 below).
Quantum Resources
Amazon Web Services (AWS)
Tyler Takeshita Amazon Braket Demo Video
D Wave – quantum computer company
https://www.linkedin.com/company/d-wave-systems-inc./
D-Wave Quantum Computer Tour
(three parts and a warning a few years old)
Google Quantum Computer Info
https://quantumai.google/quantum-computing-service
What is Quantum Annealing?
https://youtu.be/zvfkXjzzYOo
https://docs.dwavesys.com/docs/latest/c_gs_2.html
Minimum Vertex Cover Problem
https://en.wikipedia.org/wiki/Vertex_cover
For those who are okay with terrifying mathematics, check out:
Shor’s algorithm
https://en.wikipedia.org/wiki/Shor%27s_algorithm
Grover’s algorithm – used for databases
https://en.wikipedia.org/wiki/Grover%27s_algorithm
Satellite Problem akin to the Patriot Missile Scenario
https://github.com/dwave-examples/satellite-placement
Additional Reading – Simon Singh Code Book
PayPal: Harnessing Quantum Computing in FinTech | D-Wave Qubits 2021
Cover Image by
https://unsplash.com/@igrevsky
Pact Coffee Voucher Codes
Looking for a Pact Coffee Voucher code? Here are a few I can recommend. It makes a great change; it’s tastes really good and comes in a load of different grinds and flavours. My favourite is probably the Bourbon Cream Espresso – but use the code to explore all the flavours Pact Coffee has to offer! Use the voucher code “PACTPERK” to get your discount now.
Like the Above? Below Are Hands Down the Best Blog Articles You’ve Ever Read
A Drive to Remember
A Drive to Remember: My TVR Adventure Across Europe If someone had told me a year ago, "Would you fancy [...]
Security Security Security
Increase Your Online Security with this Article Covid compliance forced physical shops to close and accelerated the use of [...]
Going Quantum
How to Use Amazons Quantum Computers If annealing, superposition, and qubits all sound like new Netflix films to [...]
Digital Currency: The Next Fintech Challenge?
With the likes of Dorthy Perkins and Topshop on the brink of collapse, what can governments do to stimulate spending [...]
Raspberry Pi Hedgehog Camera
Raspberry Pi Hedgehog Camera Lockdown 1.0 was a golden opportunity to learn some new skills, move out of [...]
Making Meetings More Manageable
"Never ask a question you didn't know the answer too". The first rule I was taught in advocacy at law school. [...]
5 Tips for Setting up Remote Agile Teams
During the recent Maxwell Bond Webinar (kindly organised by Riana Butler) on "Agile Project Delivery" I sat as a panellist. There [...]
Don’t Test The Testers
In the last 20 years of delivery I've lost count of the number of times I've heard "No, we don't need [...]
The Grand Bore
The room erupted in laughter when my colleague accidentally had a double typo in a sprint meeting and wrote “twat” instead [...]
Using Clouds to Help the Homeless
The tech ops guys were banging on about CloudFlare again, and I had no idea why. Did Cloudflare sponsor them? Surely it [...]
Digital Disappointment
Frustration increased as my colleague prodded her greasy index finger on my Macbook Pro’s screen and tried to swipe the web [...]
When Zero Talent Counts
Getting a highly qualified candidate with the most in-depth knowledge about your company’s chosen technology is the most valuable potential employee [...]
Grammarly and Linkedin, a Perfect Partnership?
This weekend I was told by a beautiful girl in a library how to bring my “A” game when writing Linkedin [...]
Do Project Managers Need KPIs
Key Performance Indicators, they’re not something a project manager needs to worry about right? They’re just a buzzy term used by [...]
Getting Team Buy In
What's the best way to get the most out of your team? Rule them with an iron fist and push them [...]
Delphix fixes Data Gravity
The internet is rapidly growing, and it's becoming more and more commonplace just to accept that every site you use pulls [...]
Maffins Wager
The accepted three pillars of project management are: On time, to budget and the right standard. Assuming the latter two are [...]
Failure is not an option fallacy
Many managers use the term "failure is not an option". One of the best pieces of advice I've ever heard came [...]
Context Switching in Programming
Ben Maffin People often talk about how interruptions disrupt their flow and the ability to produce good quality, consistent [...]
The XOX Method for Project Success
A common mistake made by project owners is to create a system which is either over engineered or is overly feature [...]
Live in 2 Days The MVP Conjecture
Getting a site up and running can take months or years for some companies. Can you do this quicker? What are [...]
What’s The Point to Pair Programming
Pair programming is a technique which essentially puts at least two developers on any given project at any time. So What's The [...]
Technical Debt, What is It
Technical debt is often an overlooked element of development but has far reaching implications on profit, delivery and quality of a project. What [...]
What Is Project Success
Like many questions in digital project management, this is a trickier to answer than most people initially think You'll find numerous answers, [...]
Leave A Comment