• About

Max Hemingway

~ Musings as I work through life, career and everything.

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
  • LinkedIn
  • Email
  • Pinterest

Like this:

Like Loading...

Technology Couch Podcast

Technology Couch Podcast

Topical discussions with different guests on Technology

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

Max Hemingway

  • Listen on Apple Podcasts
  • Podcast RSS Feed

RSS Feed

RSS Feed RSS - Posts

Currently Reading

@HemingwayReads

Other Publications I contribute to

https://sparrowhawkbushcraft.com/

Recent Posts

  • Data Fellowship – Passed
  • Sign Up and Forget Culture
  • Data Fellowship – BCS Level 4 Certificate in Data Analysis Tools
  • Using the best of the Q Continuum
  • Importance of Regular Screen Breaks

Categories

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

Archives

Reading Shelf

Archives

Recent Posts

  • Data Fellowship – Passed
  • Sign Up and Forget Culture
  • Data Fellowship – BCS Level 4 Certificate in Data Analysis Tools
  • Using the best of the Q Continuum
  • Importance of Regular Screen Breaks

Top Posts & Pages

  • Your Digital Exhaust - The data we share

Category Cloud

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

Tags

# 3D Printing 21st Century Human AI Applications Architecture Automation BCS Big Data Blockchain Certification Cloud Cobot Cobotics Coding Communication Connected Home Continuous Delivery CPD Data Data Fellowship 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 Micro:Bit MicroLearning Mindset Mixed Reality Networks Open Source OpsDev Podcasts Productivity Programming Proving It R RaspberryPI Robot Robotics Scouts Security Smart Home Social Media Standards Statistical Inference STEM Technology Couch Podcast Thinking Tools Training 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 feed
  • Comments feed
  • WordPress.com

Blog at WordPress.com.

  • Follow Following
    • Max Hemingway
    • Join 1,348 other followers
    • Already have a WordPress.com account? Log in now.
    • Max Hemingway
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar
 

Loading Comments...
 

    %d bloggers like this: