Apache Mahout (https://mahout.apache.org) is a linear algebra library for building machine learning solutions, and up until this year focused on compute back-ends such as Spark and Flink for processing training data into predictions. More recently the project has adopted quantum compute back-ends as...
Apache Mahout (https://mahout.apache.org) is a linear algebra library for building machine learning solutions, and up until this year focused on compute back-ends such as Spark and Flink for processing training data into predictions. More recently the project has adopted quantum compute back-ends as well. The QuMat (https://github.com/apache/mahout?tab=...) library is a Python-based interface to multiple quantum computing systems, starting with IBM's Qiskit, which allows researchers and developers to assemble quantum logic gates into circuits that can run on simulators as well as utility-scale quantum computers. This talk will provide a brief introduction to quantum computing, including the data structures used along with some basic logic gates (https://github.com/apache/mahout/blob..., and will demo QuMat software running in a notebook that will be shared after the talk.
Size: 2.82 MB
Language: en
Added: Oct 09, 2024
Slides: 28 pages
Slide Content
QuMat Apache Mahout's Quantum Computing Interface Andrew Musselman FOSSY Portland OR Aug 2024
Intro to Mahout Intro to Quantum Motivation for Quantum in Mahout Distributed Matrix Arithmetic Rationale for QuMat Logic Gates in QuMat Notebook Demo Circuits and Diagrams Next Steps How to Get Involved Agenda
Apache Mahout is a distributed linear algebra framework and mathematically expressive Scala DSL designed to let mathematicians, statisticians, and data scientists quickly implement their own algorithms. Mathematically Expressive Scala DSL Support for Multiple Distributed Backends (including Apache Spark) Modular Native Solvers for CPU/GPU/CUDA Acceleration Intro to Mahout
2008: Lucene sub-project with analytics including clustering 2010: Apache top-level project recommender system Taste: ( https://svn.apache.org/repos/asf/lucene/mahout/site/publish/taste.pdf?p=836600 ) 2015: Samsara (back-end independent programming environment) 2017: Hadoop MapReduce back-end deprecated 2020: 14.1 released 2022: Zeppelin integration and algorithm development framework 2024: QuMat quantum computing interface Intro to Mahout
Intro to Quantum
Intro to Quantum Classical bit 2 1 states, ("0" or "1") Quantum bit ("qubit") 2 n states, ("it's complicated")
Intro to Quantum * https://en.wikipedia.org/wiki/Quantum_logic_gate Quantum states are typically represented by "kets," from a notation known as bra–ket. The vector representation of a single qubit is | a ⟩ = v |0 ⟩ + v 1 |1 ⟩ → where v and v 1 are the complex probability amplitudes of the qubit, and the values zero and one are represented by the kets |0 ⟩ = and |1 ⟩ = v v 1
|0 ⟩ = and |1 ⟩ = These kets are basis vectors for a complex vector space. Logic gates in quantum computing are matrices which take actions on qubits. For example, the identity gate (identity matrix) performs no action on any qubit: = = Intro to Quantum v * 1 + v 1 * 0 v v 1 v * 0 + v 1 * 1 v v 1
Motivation for Quantum in Mahout Core capabilities of Mahout Matrix arithmetic and operations Linear algebra Back-end agnostic, distributed or in-core CPU or GPU Simplified syntax in matrix math DSL (Samsara) Management of large-scale vectors and matrices Quantum compute in essence is matrix arithmetic Circuits are composed by multiplying matrices Vectors and matrices are complex-valued instead of binary or real
Samsara DSL and Syntax Samsara A’A val C = A.t %*% A MLLib A’A val C = A.transpose().multiply(A)
Samsara DSL and Syntax Computation in distributed stochastic PCA (dSPCA): In Samsara DSL: val G = B %*% B.t - C - C.t + (xi.t dot xi) * (s_q.t cross s_q)
Arithmetic and Assignment // Plus/minus: a + b a - b a + 5.0 a - 5.0 // Hadamard (elementwise) product: a * b a * 0.5 // Operations with assignment: a += b a -= b a += 5.0 a -= 5.0 a *= b a *= 5
Other Operators // Optimized right and left multiply with a diagonal matrix: diag( 5 , 5 ) :%*% b A %*%: diag( 5 , 5 ) // Second norm, of a vector or matrix: a.norm // Transpose: val Mt = M.t // Dot product: a dot b // Cross product: a cross b // Matrix multiply: a %*% b
Distributed Matrix Arithmetic: Optimization of A'A A
Distributed Matrix Arithmetic: Optimization of A'A x A A T
Distributed Matrix Arithmetic: Optimization of A'A x = x A A T a 1 T a 1
Distributed Matrix Arithmetic: Optimization of A'A x = x + x A A T a 1 T a 1 a 2 T a 2
Distributed Matrix Arithmetic: Optimization of A'A x = x + x A A T a 1 T a 1 a 2 T a 2 + x a 3 T a 3
Distributed Matrix Arithmetic: Optimization of A'A x = x + x A A T a 1 T a 1 a 2 T a 2 + x a 3 T a 3 + x a 4 T a 4
Rationale for QuMat Multiple frameworks for programming quantum circuits Qiskit (IBM) Braket (AWS) Cirq (Google) TKET (Honeywell) Qsharp (Microsoft) Pyquil (Rigetti) Multiple vendor platforms for running on simulated or real quantum hardware IBM ( https://quantum.ibm.com ) AWS ( https://aws.amazon.com/braket ) Google ( https://quantumai.google/quantumcomputer ) Honeywell ( https://www.honeywell.com/us/en/company/quantum/quantum-computer ) Multiple frameworks and back-ends is a Mahout core value One interface with no code change across tools provides flexibility
Logic gates implemented Qiskit Cirq Braket Next steps Draw Measure Execute QuMat Current State Samsara QuMat Spark Flink … Qiskit Cirq Braket Mahout
Logic Gates in QuMat Function definitions in Python
Notebook Demo
Circuits and Diagrams
Next Steps Draw, measure, and execute methods Use cases More examples Quantum machine learning methods (QML)
How to Get Involved Try it out using Docker Subscribe to the [email protected] and [email protected] mailing lists Get a binary or source build Run a notebook straight out of GitHub Contribute some documentation, fix some bugs, add some features