Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Intro to Quantum Machine Learning

Intro to Quantum Machine Learning

An introduction to quantum machine learning Using Cirq Framework from google Quantum AI ( & TensorFlow )

Avatar for nicabedgathaba

nicabedgathaba

June 11, 2022
Tweet

Other Decks in Programming

Transcript

  1. print ("Hello World! ") print ( "Just learnt python language,

    Yeah! ") “I think I can safely say that nobody understands quantum physics.”—Richard Feynman
  2. What is Quantum? is the minimum amount of any physical

    entity (physical property) involved in an interaction. What is quantum mechanics? is a fundamental theory in physics that provides a description of the physical properties of nature at the scale of atoms and subatomic particles
  3. states that if a physical system may be in one

    of many configurations—arrangements of particles or fields—then the most general state is a combination of all of these possibilities, where the amount in each configuration is specified by a complex number. Superposition 01 is the physical phenomenon that occurs when a group of particles are generated, interact, or share spatial proximity in a way such that the quantum state of each particle of the group cannot be described independently of the state of the others, including when the particles are separated by a large distance. Entanglement 02 allows an object to coexist in states of “being” and “non-being” at a given time Interference 03
  4. Quantum Computing What is quantum computing? is a type of

    computation that harnesses the collective properties of quantum states, such as superposition, interference, and entanglement, to perform calculations
  5. Binary 1 & 0 Bits 01 A qubit is a

    quantum bit, the counterpart in quantum computing to the binary digit or bit of classical computing. Qubits 02 03
  6. Machine Learning Machine learning (ML) is the subset of artificial

    intelligence (AI) that focuses on building systems that learn—or improve performance—based on the data they consume.
  7. Cirq framework An open source framework for programming quantum computers

    Cirq is a Python software library for writing, manipulating, and optimizing quantum circuits, and then running them on quantum computers and quantum simulators. Cirq provides useful abstractions for dealing with today’s noisy intermediate-scale quantum computers, where details of the hardware are vital to achieving state-of-the-art results.
  8. • cirq.NamedQubit: used to label qubits by an abstract name

    • cirq.LineQubit: qubits labelled by number in a linear array • cirq.GridQubit: qubits labelled by two numbers in a rectangular lattice. • A Gate is an effect that can be applied to a set of qubits. • An Operation is a gate applied to a set of qubits. • A Circuit is a collection of Moments. • A Moment is a collection of Operations that all act during the same abstract time slice. quantum circuit can be calculated by a Simulator
  9. There are two ways for installing Cirq 1. pip install

    cirq 2. try: import cirq except ImportError: print("installing cirq...") !pip install --quiet cirq import cirq print("installed cirq.")
  10. A ‘Hello world’ in Cirq import cirq circuit = cirq.Circuit()

    (q0, q1) = cirq.LineQubit.range(2) circuit.append([cirq.H(q0), cirq.CNOT(q0,q1)]) circuit.append([cirq.measure(q0), cirq.measure(q1)]) print(circuit)
  11. Google colab - Bell’s state & simulation Google Colab(ML) -

    an example of Quantum Machine Learning. CODE
  12. Resources - Google quantum AI. Communities: One Quantum Kenya. WhatsApp

    - Telegram - Newsletter - Books - Quantum computing and Quantum information by Isaac Chuang( a good grasp for quantum computing)
  13. Thank you! AI Engineer @ S-guard Corp, Sir/Lord @nicabedgathaba https://quantumai.google/

    @GoogleQuantumAI https://www.youtube.com/c/Qua ntumAI Resources Nicabed Gathaba