top of page

Learn to program a Quantum Computer!

Updated: Aug 22, 2020



On the 29th of May 2019, I attended the Quantum MeetUp held at the Sydney Microsoft Reactor on learning to program a Quantum Computer. During this 3-hour event, two presentations were given on Quantum Computation and afterwards, the attendees had the choice to either work individually or as a team to try their hands on the Microsoft QC programming language Q#. As the first person to have completed the entire activity, I was given a Microsoft Quantum t-shirt :)


Notes from the event

  • Amplitude Amplification - Grover’s search algorithm

  • Phase Estimation - Shor’s Factoring Algorithm


Quantum Gates

For any qubit, the probability of reading a 1, i.e P(1), is ||α||^2; and the probability of reading a 0, i.e. P(0), is ||β||^2.
  • P(1)+P(0) = 1


Q# Programming

  • made up of operations and functions

variable declaration: mutable var = Zero; // initialising qubits
initialise qubit: qubits = Qubit[2] // 2 bits
get state: set var = M(qubits[0]) // M short for “measure”
entanglement: Entangle(qubits[0],qubits[1])

OPERATIONS - Quantum or non deterministic classical code that can interact with and transform the qubits, describes the side effects quantum operations can have on quantum data.

  • X, H, Y, Z, Ry gates

  • CNOT gate etc


FUNCTIONS - Allow modifications to classical data, used to describe purely classical behavior and do not have any effects besides computing classical output values.

Comments


Post: Blog2_Post
bottom of page