• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Running the algorithms learnt from the book

 
Author
Posts: 44
7
MyEclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way to practice the algorithms learnt from the book and see it work? I mean to run it on a simulated quantum machine, or on (say) a cloud based trial quantum service, am not sure if there is one?
 
Author
Posts: 28
10
C++
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mainak,
Happily the answer is "yes and yes yes". The book contains 54 code samples, covering a wide range of QPU tools and algorithms, and every single one can be run in a simulator online with one click (I wrote the sim).
Most of them will also run on IBM's physical quantum computers as well. On the code sample page for each sample has a menu where you can choose what kind of engine it's written for, like this:



Additionally, versions of most of the samples have been ported (thanks to friends at IBM and Microsoft) to Python (for Qiskit and IBM Q Experience), Q# (for Microsoft QDK), and OpenQASM (for running in IBM Q Experience).

If you're reading the book on a tablet or e-reader, just touching the inline link will bring you to the running sample. If you have a physical book, the links are very short and convenient to type, such as oreilly-qc.github.io/?p=2-4

Fun fact #1: When you run the quantum teleportation sample (Example 4-1 in the book) using Qiskit or OpenQASM, it performs actual physical quantum teleportation, not a simulation. You build whatever state you want, and then teleport it about 3.5mm on an IBM chip in New York.

Fun fact #2: We did some extra work so that most of the samples actually run directly on a Kindle using our own in-browser sim.



 
Mainak Biswas
Author
Posts: 44
7
MyEclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is fantastic.
The teleportation bit was quite some news, now googling around that to read about that.
 
Marshal
Posts: 65814
250
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

E Johnston wrote:. . . teleport it about 3.5mm . . .

Not quite, “Beam me up, Scotty,” yet.
 
Without subsidies, chem-ag food costs four times more than organic. Or this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!