• About

Max Hemingway

Max Hemingway

Category Archives: Quantum

Taking a Leap into Quantum – Hello World with Q#

28 Wednesday Mar 2018

Posted by Max Hemingway in Programming, Quantum

≈ Leave a comment

Tags

Programming, Quantum

Quantum.jpg

Back in December 2017, Microsoft announced a Quantum Development kit which uses Q # (Q Sharp) as its language. It is designed to be used with Visual Studio 2017.  Recently I decided to install the development kit and have a go at the usual “Hello World” example.

The development kit is explained as being capable of developing Quantum code using a Quantum Simulator on your device.

“The development kit contains the tools you’ll need to build your own quantum computing programs and experiments. Assuming some experience with Microsoft Visual Studio or Visual Studio Code, beginners can write their first quantum program, and experienced researchers can quickly and efficiently develop new quantum algorithms”

Source: Microsoft

Overall I found the tutorial well laid out, with lots of good explanations and shows how some functions are equivalent to others in C, C#, Java. If you are used to C#, then Q# will be immediately familiar as it uses semicolons and braces to indicate program structure.

With this demonstration the “Hello World” is in the form of qubit, so the output on the screen is in Zero and One. the example also takes you through changing the program to create Superposition and Entanglement.

We’ll start with the simplest program possible and build it up to demonstrate quantum superposition and quantum entanglement. We will start with a qubit in a basis state |0⟩
, perform some operations on it and then measure the result.

Output:

Init:Zero 0s=1000 1s=0
Init:One 0s=0 1s=1000

Creating Superposition

Output:

Init:Zero 0s=484 1s=516
Init:One 0s=522 1s=478

Creating Entanglement

Output:

Init:Zero 0s=499 1s=501 agree=1000
Init:One 0s=490 1s=510 agree=1000

Source: Q# Worked Example

Q#

A good introduction and first steps into programming Quantum Computing.

Resources

  • https://www.microsoft.com/en-us/quantum/development-kit
  • Microsoft Quantum GitHub
  • A-Z of Digital – Q is for Quantum Computing

Share this:

  • Twitter
  • Facebook
  • Google
  • LinkedIn
  • Email
  • Pinterest

Like this:

Like Loading...

Technology Couch Podcast

Technology Couch Podcast

Technology Couch Podcast

Chat and views on latest Technology trends, news and what is currently hot in the industry

Max Hemingway

Subscribe via iTunes

RSS Feed

RSS Feed RSS - Posts

Currently Reading

@HemingwayReads

Other Publications I contribute to

www.thebushcraftjournal.com
TBJsmall

Recent Posts

  • Having the Right Digital Mindset: Social
  • Having the Right Digital Mindset: Technology
  • Having the Right Digital Mindset: Business (Change, Agility and a Growth Mindset)
  • Digitally Fit 2018 Roundup of posts
  • Technology Couch Podcast – Episode 5

Categories

  • 21st Century Human
  • 3D Printing
  • Applications
  • Architecture
  • Arduino
  • Automation
  • Big Data
  • Certification
  • Cloud
  • Cobotics
  • Connected Home
  • Data Science
  • Development
  • DevOps/OpsDev
  • Digital
  • DigitalFit
  • Drone
  • Enterprise Architecture
  • Governance
  • Innovation
  • IoT
  • Machine Learning
  • Micro:Bit
  • Networks
  • Open Source
  • Podcasts
  • Productivity
  • Programming
  • Quantum
  • Raspberry Pi
  • Robotics
  • Security
  • Smart Home
  • Social Media
  • STEM
  • Tools
  • Uncategorized
  • Wearable Tech
  • Windows
  • xR

Archives

Reading Shelf

Archives

Recent Posts

  • Having the Right Digital Mindset: Social
  • Having the Right Digital Mindset: Technology
  • Having the Right Digital Mindset: Business (Change, Agility and a Growth Mindset)
  • Digitally Fit 2018 Roundup of posts
  • Technology Couch Podcast – Episode 5

Top Posts & Pages

  • Data Science and Information Theory
  • Configuring the Raspberry PI with Ansible and AWSCLI
  • Smart Home - How many Hubs?

Category Cloud

21st Century Human Architecture Automation Big Data Cloud Cobotics Data Science Development DevOps/OpsDev Digital DigitalFit Enterprise Architecture Governance Innovation IoT Machine Learning Networks Open Source Podcasts Productivity Programming Raspberry Pi Robotics Security Social Media STEM Tools Uncategorized Wearable Tech Windows

Tags

# 3D Printing 21st Century Human AI API Applications Architecture Arduino Augmented Reality Automation Big Data Blockchain Certification Cloud Cobot Cobotics Coding Communication Connected Home Continuous Delivery CPD Data Data Science Delivery Development DevOps Digital DigitalFit Digital Human Docker Drone Email Encryption Enterprise Architecture Framework GTD Hashtag Infographic Information Theory Innovation IoT Journal Knowledge learning Machine Learning Mentor Micro:Bit MicroLearning Networks Open Source OpsDev Podcasts Productivity Programming Proving It Quantum R RaspberryPI Robot Robotics Security Social Media Standards Statistical Inference STEM Technology Couch Podcast Thinking Tools Training Visionables Visualisation Voice Wearable Tech Windows xR

License

Creative Commons Licence
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Meta

  • Register
  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.com

Blog at WordPress.com.

Cancel
loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.
%d bloggers like this: