<?xml version="1.0" encoding="UTF-8"?>
<rss 
    version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/" 
    xmlns:content="http://purl.org/rss/1.0/modules/content/" 
    xmlns:atom="http://www.w3.org/2005/Atom" 
    xmlns:media="http://search.yahoo.com/mrss/" 
>
    <channel>
        <title><![CDATA[QuantumAI.Cloud - QAC Lab ]]></title>
        <description><![CDATA[The research &amp; development initiative at the intersection of Quantum, AI, and Cloud]]></description>
        <link>https://quantumai.cloud</link>
        <image>
            <url>https://quantumai.cloud/favicon.png</url>
            <title>QuantumAI.Cloud - QAC Lab </title>
            <link>https://quantumai.cloud</link>
        </image>
        <generator>Ghost 6.3</generator>
        <lastBuildDate>Wed, 11 Mar 2026 02:25:02 +1100</lastBuildDate>
        <atom:link href="https://quantumai.cloud" rel="self" type="application/rss+xml"/>
        <ttl>60</ttl>

                <item>
                    <title><![CDATA[Quantum 101 - Eps 01: Qubits and Quantum Circuits]]></title>
                    <description><![CDATA[An introduction to quantum bits (qubits), quantum circuits and how to build a first simple quantum circuit using Qiskit.]]></description>
                    <link>https://quantumai.cloud/p/5e64f57a-ef78-4edb-9142-f23e0c8e1e55/</link>
                    <guid isPermaLink="false">66bb3ca7e4c5c7000153ca2a</guid>

                        <category><![CDATA[🔮 Quantum computing]]></category>

                        <dc:creator><![CDATA[Hoa Nguyen]]></dc:creator>

                    <pubDate>Tue, 13 Aug 2024 21:10:34 +1000</pubDate>

                        <media:content url="https://quantumai.cloud/content/images/2024/08/quantum-ep1.jpg" medium="image"/>

                    <content:encoded><![CDATA[<img src="https://quantumai.cloud/content/images/2024/08/quantum-ep1.jpg" alt="Quantum 101 - Eps 01: Qubits and Quantum Circuits"/> <h2 id="1-from-bits-to-qubits">1. From Bits to Qubits</h2><h3 id="bits-and-classical-computers">Bits and Classical Computers</h3><div class="kg-card kg-callout-card kg-callout-card-yellow"><div class="kg-callout-emoji">💡</div><div class="kg-callout-text"><b><strong style="white-space: pre-wrap;">What is a bit?</strong></b><br><i><em class="italic" style="white-space: pre-wrap;">A tool used for cutting or making holes?</em></i><br><i><em class="italic" style="white-space: pre-wrap;">A piece of metal you put in a horse's mouth?</em></i><br><i><em class="italic" style="white-space: pre-wrap;">The smallest unit of information?</em></i><br>→ <i><b><strong class="italic" style="white-space: pre-wrap;">Well, all right!</strong></b></i></div></div><p><em>But, in computer science:</em></p><ul><li>A bit is the <strong>smallest</strong> (classical) unit of information that must be either 0 or 1.</li><li>Bits can represent any piece of information. For example, we can represent the number \(2730_{10}\) in binary as \(101010101010_2\) , the character H as \(1001000_2\) , the symbol @ as \(1000000_2\) . More example <a href="https://www.ibm.com/docs/en/aix/7.2?topic=adapters-ascii-decimal-hexadecimal-octal-binary-conversion-table&ref=quantumai.cloud">here</a></li><li>If you have \(n\) bits, they can be in \(2^n\)  different classical states.</li></ul><h4 id="what-is-a-classical-computer">What is a (classical) computer?</h4><ul><li>A computer is an electronic device for storing and processing data, typically in binary form (bits), according to instructions given to it in a variable program.</li></ul><h3 id="qubits-and-quantum-computers">Qubits and Quantum Computers</h3><h4 id="what-is-a-qubit">What is a qubit?</h4><ul><li>A&nbsp;<strong>qubit</strong> or&nbsp;<strong>quantum bit</strong>&nbsp;is the basic unit of quantum information, an extension of the bit to quantum mechanics.</li><li>Qubit is a <em>quantum variant of the bit</em>, which means a qubit has exactly the same restrictions as a normal bit: it can store a single piece of information and can only give the output of 0 or 1. However, qubits can also be manipulated in ways that can only be described by quantum mechanics.</li><li>It is a two-state quantum-mechanical system and one of the simplest systems displaying the peculiarity (essential characteristic) of quantum mechanics.</li><li>A quantum state can be in <strong>superposition</strong> (i.e. <strong>simultaneously</strong> in 0 and 1). Superposition allows calculations to be performed on many states at the same time. So, some quantum algorithms have <strong>exponential speed-up.</strong></li></ul><div class="kg-card kg-callout-card kg-callout-card-yellow"><div class="kg-callout-emoji">⚠️</div><div class="kg-callout-text">However, once we measure the superposition state, it collapses to one of its states (0 or 1). In other words, we can only get one “answer” and not all answers to all states in the superposition. Therefore, it is not that easy to design quantum algorithms, but we can use interference effects (i.e “wrong answer” cancels each other out, while the “right answer” remains)</div></div><h4 id="what-is-a-quantum-computer">What is a quantum computer?</h4><p>Similar to a standard digital computer, which represents all information in the form of binary strings (or classical bits), the main difference between quantum computers and classical computers is that they use qubits instead of bits to represent information.</p><h4 id="what-is-a-quantum-simulator">What is a quantum simulator?</h4><p>A quantum simulator is a standard computer that calculates what an ideal quantum computer would do. Simulations are only possible for <em>small numbers of qubits (~50 qubits)</em>. An example is the QASM Simulator by IBM Quantum.</p><h2 id="2-quantum-circuits-at-a-glance">2. Quantum Circuits at a glance</h2><div class="kg-card kg-callout-card kg-callout-card-blue"><div class="kg-callout-emoji">💡</div><div class="kg-callout-text"><i><em class="italic" style="white-space: pre-wrap;">Whether the algorithm is designed to solve mathematical problems or process text or images, we always break big tasks down into small and simple steps.</em></i></div></div><h3 id="computation-as-a-circuit">Computation as a Circuit</h3><ul><li><strong>Computation</strong> is the manipulation process to turn the inputs we have into the outputs we need (either using bits or qubits)</li><li>A <strong>circuit diagram</strong> is a representation of the computation process.</li></ul><p><strong>Example</strong>: Two following bit-based and qubit-based circuit diagrams are equivalent</p>
<!--kg-card-begin: html-->
<span><img src="https://quantumai.cloud/content/images/2024/08/DraggedImage.png" 
 width="400px" /> <em>Bit-based circuit with AND and OR gates </em> </span>

<span><img src="https://quantumai.cloud/content/images/2024/08/DraggedImage-1.png" 
 width="500px" /> <em>Qubit-based circuit with NOT, CNOT, and Toffoli gates </em> </span>

<!--kg-card-end: html-->
<h3 id="what-is-a-quantum-circuit">What is a Quantum circuit?</h3><p>In a quantum circuit, we typically need to do 3 jobs:</p><figure class="kg-card kg-image-card"><img src="https://quantumai.cloud/content/images/2024/08/DraggedImage-2.png" class="kg-image" alt="" loading="lazy" width="2000" height="667" srcset="https://quantumai.cloud/content/images/size/w600/2024/08/DraggedImage-2.png 600w, https://quantumai.cloud/content/images/size/w1000/2024/08/DraggedImage-2.png 1000w, https://quantumai.cloud/content/images/size/w1600/2024/08/DraggedImage-2.png 1600w, https://quantumai.cloud/content/images/2024/08/DraggedImage-2.png 2000w" sizes="(min-width: 720px) 720px"></figure><ol><li>Encode the Input</li><li>Do some actual computation on the input</li><li>Extract an output</li></ol><p><strong>Example</strong>: a First quantum circuit with Qiskit</p><pre><code class="language-Python">n = 8
qc = QuantumCircuit(n)
qc.x(7)
for j in range(n):
qc.measure(j,j)
qc.draw()</code></pre><ol><li>Encoding an input: Using NOT gate to flip final qubit (q7) from 0 to 1: \( 10000000 = q_7q_6q_5q_4q_3q_2q_1q_0\) (right to left)<br><strong>Note:</strong> <em>Qiskit numbers the bits from right to left</em>.<strong> Why?</strong><br>It has advantages when using bits to represent numbers. Qubit \(n^{th}\) is telling how many  \(2^n\)s we have in the number. For example: \( 10000000 = 2^7 = 128 \) </li><li>Computation: Do nothing, keep the input unchanged </li><li>Output: Extract the output by using measurement - 1000000</li></ol><h2 id="3-example-build-our-first-quantum-circuit-to-do-the-addition">3. Example: Build our first Quantum Circuit to do the addition</h2><h3 id="what-is-the-half-adder">What is the Half Adder?</h3><p>The Half Adder is a type of combinational logic circuit that adds two of the 1-bit binary digits. It generates the carry and sum of both the inputs.<br>– The Half Adder does not add the carry obtained from the previous addition to the next one.– The logic circuits of Haft-Adder and Full-Adder– <em>What is about the <strong>Full Adder</strong>?</em><br>&nbsp;&nbsp;&nbsp;&nbsp;</p><figure class="kg-card kg-image-card"><img src="https://quantumai.cloud/content/images/2024/08/DraggedImage-3.png" class="kg-image" alt="" loading="lazy" width="2000" height="640" srcset="https://quantumai.cloud/content/images/size/w600/2024/08/DraggedImage-3.png 600w, https://quantumai.cloud/content/images/size/w1000/2024/08/DraggedImage-3.png 1000w, https://quantumai.cloud/content/images/size/w1600/2024/08/DraggedImage-3.png 1600w, https://quantumai.cloud/content/images/2024/08/DraggedImage-3.png 2000w" sizes="(min-width: 720px) 720px"></figure><p>The Full Adder is also a type of combinational logic that adds three of the 1-bit binary digits for performing an addition operation. It generates a sum of all three inputs along with a carrying value.– The Full Adder, along with its current inputs A and B, also adds the previous carry.</p><h3 id="key-ideas-of-the-half-adder">Key ideas of the Half Adder</h3><ul><li><strong>Four basic sums:</strong><br>0+0 = 00 (in decimal, this is 0+0=0)<br>0+1 = 01 (in decimal, this is 0+1=1)<br>1+0 = 01 (in decimal, this is 1+0=1)<br>1+1 = 10 (in decimal, this is 1+1=2)</li><li><strong>Key ideas</strong> of Half Adder:<br>– The <strong>rightmost bit</strong> is completely determined by whether <em>the two bits we are adding are the <strong>same</strong> or <strong>different</strong>.</em>Specifically, if the two bits are equal (i.e., 0 + 0 or 1+1), the rightmost bit of the answer comes out 0 and otherwise.<br>→ <strong>Solution</strong>: Use the XOR gate (or CNOT gate in quantum computation)<br>– The leftmost bit is only 1 if both of the bits we are adding are 1<br>&nbsp;&nbsp;&nbsp;&nbsp;→ <strong>Solution</strong>: Using the AND gate (or Toffoli gate in quantum computation)– We don’t want to overwrite the input<br>&nbsp;&nbsp;&nbsp;&nbsp;→ <strong>Solution</strong>: Using a different pair of qubits to write the output</li></ul><h4 id="what-are-an-xor-and-a-cnot-gate">What are an XOR and a CNOT gate?</h4><ul><li>An XOR gate implements an exclusive or; that is, a 1 output results if one, and only one, of the inputs to the gate is 1. If both inputs are 1 or both are 0, the output result is 0.</li></ul><p>A CNOT (Controlled-NOT) gate is a (reversible) quantum version of an XOR gate</p><figure class="kg-card kg-image-card"><img src="https://quantumai.cloud/content/images/2024/08/DraggedImage-4.png" class="kg-image" alt="" loading="lazy" width="2000" height="836" srcset="https://quantumai.cloud/content/images/size/w600/2024/08/DraggedImage-4.png 600w, https://quantumai.cloud/content/images/size/w1000/2024/08/DraggedImage-4.png 1000w, https://quantumai.cloud/content/images/size/w1600/2024/08/DraggedImage-4.png 1600w, https://quantumai.cloud/content/images/2024/08/DraggedImage-4.png 2000w" sizes="(min-width: 720px) 720px"></figure><p>– CNOT gate applies to a pair of qubits. One acts as the Control qubit (with the little dot, Input A), and another acts as the target qubit (with the big circle and +, Input B)– If the control qubit is 1, the CNOT gate does a NOT (flip) on the target qubit. Otherwise, it does nothing.</p><h4 id="what-are-an-and-and-a-tofolli-gate">What are an AND and a Tofolli gate?</h4><ul><li>An AND gate implements <a href="https://en.wikipedia.org/wiki/Logical_conjunction?ref=quantumai.cloud">logical conjunction</a> (∧) from&nbsp;<a href="https://en.wikipedia.org/wiki/Mathematical_logic?ref=quantumai.cloud">mathematical logic</a>. If (and only if) both inputs are 1, the output result is 1; otherwise, the output is 0</li><li>The Toffoli gate, invented by Tommaso Toffoli, is a universal reversible logic gate, which means that any reversible circuit can be constructed from Toffoli gates. It is also known as the&nbsp;<em>controlled-controlled-not</em>&nbsp;gate, which describes its action. It has 3-bit inputs and outputs; if the first two bits are both set to 1, it inverts the third bit, otherwise, all bits stay the same.</li><li>The Toffoli gate is essentially the <strong>atom of mathematics.</strong> It is the simplest element, from which every other problem-solving technique can be compiled.</li></ul><h3 id="implement-the-quantum-half-adder-circuit">Implement the Quantum Half Adder circuit</h3><p><strong>Example</strong>: The input is 11 (perform the 1 + 1 addition)</p><figure class="kg-card kg-image-card"><img src="https://quantumai.cloud/content/images/2024/08/DraggedImage-5.png" class="kg-image" alt="" loading="lazy" width="2000" height="1169" srcset="https://quantumai.cloud/content/images/size/w600/2024/08/DraggedImage-5.png 600w, https://quantumai.cloud/content/images/size/w1000/2024/08/DraggedImage-5.png 1000w, https://quantumai.cloud/content/images/size/w1600/2024/08/DraggedImage-5.png 1600w, https://quantumai.cloud/content/images/2024/08/DraggedImage-5.png 2000w" sizes="(min-width: 720px) 720px"></figure><p>Qiskit code:</p><pre><code class="language-python">qc_ha = QuantumCircuit(4,2)
# encode inputs in qubits 0 and 1
qc_ha.x(0) # For a=0, remove the this line. For a=1, leave it.
qc_ha.x(1) # For b=0, remove the this line. For b=1, leave it.
qc_ha.barrier()
# use cnots to write the XOR of the inputs on qubit 2
qc_ha.cx(0,2)
qc_ha.cx(1,2)
# use ccx to write the AND of the inputs on qubit 3
qc_ha.ccx(0,1,3)
qc_ha.barrier()
# extract outputs
qc_ha.measure(2,0) # extract XOR value
qc_ha.measure(3,1) # extract AND value

qc_ha.draw()
</code></pre><p>Simulate and get the result (Qiskit &lt;1.x):</p><pre><code class="language-python">counts = execute(qc_ha,Aer.get_backend('qasm_simulator')).result().get_counts()
plot_histogram(counts)
</code></pre><p>Result: 1 + 1 = 10 (binary). Or 1 + 1 = 2 (decimal)</p><figure class="kg-card kg-image-card"><img src="https://quantumai.cloud/content/images/2024/08/DraggedImage-6.png" class="kg-image" alt="" loading="lazy" width="2000" height="1362" srcset="https://quantumai.cloud/content/images/size/w600/2024/08/DraggedImage-6.png 600w, https://quantumai.cloud/content/images/size/w1000/2024/08/DraggedImage-6.png 1000w, https://quantumai.cloud/content/images/size/w1600/2024/08/DraggedImage-6.png 1600w, https://quantumai.cloud/content/images/2024/08/DraggedImage-6.png 2000w" sizes="(min-width: 720px) 720px"></figure><h2 id="references">References</h2><p><a>1</a> <strong>Qiskit Online Textbook</strong> - Quantum States and Qubits by <em>IBM Quantum</em> (https://learn.qiskit.org/course/ch-states)</p><p><a>2</a> <strong>IBM Quantum Summer School 2021</strong> (https://learn.qiskit.org/summer-school/2021)</p><p><a>2</a> <strong>Quantum Half-adder and&nbsp;Full-adder</strong> by <em>Lahiru Madushanka</em> (https://lahirumadushankablog.wordpress.com/2020/02/04/quantum-half-adder-and-full-adder/)</p>]]></content:encoded>
                </item>
                <item>
                    <title><![CDATA[Securing Federated Machine Learning: Kick-off!]]></title>
                    <description><![CDATA[A curated list of material for kicking off the study on securing Federated Learning ]]></description>
                    <link>https://quantumai.cloud/p/209717aa-9c9f-435e-b766-c571c7c4d95e/</link>
                    <guid isPermaLink="false">66064c87fdcabc0001efb130</guid>

                        <category><![CDATA[🤖 AI - Machine Learning]]></category>

                        <dc:creator><![CDATA[Hoa Nguyen]]></dc:creator>

                    <pubDate>Fri, 29 Mar 2024 16:08:50 +1100</pubDate>

                        <media:content url="https://images.unsplash.com/photo-1495055154266-57bbdeada43e?crop&#x3D;entropy&amp;cs&#x3D;tinysrgb&amp;fit&#x3D;max&amp;fm&#x3D;jpg&amp;ixid&#x3D;M3wxMTc3M3wwfDF8c2VhcmNofDEyfHxhaXxlbnwwfHx8fDE3MTE2NDkzNjh8MA&amp;ixlib&#x3D;rb-4.0.3&amp;q&#x3D;80&amp;w&#x3D;2000" medium="image"/>

                    <content:encoded><![CDATA[<img src="https://images.unsplash.com/photo-1495055154266-57bbdeada43e?crop&#x3D;entropy&amp;cs&#x3D;tinysrgb&amp;fit&#x3D;max&amp;fm&#x3D;jpg&amp;ixid&#x3D;M3wxMTc3M3wwfDF8c2VhcmNofDEyfHxhaXxlbnwwfHx8fDE3MTE2NDkzNjh8MA&amp;ixlib&#x3D;rb-4.0.3&amp;q&#x3D;80&amp;w&#x3D;2000" alt="Securing Federated Machine Learning: Kick-off!"/> <p>Ready to deep dive into the&nbsp;<strong>Federated Learning</strong>&nbsp;journey with selected state-of-the-art and valuable readings!</p><h1 id="%F0%9F%8E%AF-intro">🎯 Intro</h1><h3 id="blog">Blog</h3><ol><li><a href="https://ai.googleblog.com/2017/04/federated-learning-collaborative.html?ref=quantumai.cloud">Google – Federated Learning: Collaborative Machine Learning without Centralized Training Data</a>&nbsp;– April 6, 2017</li><li>Comic –&nbsp;<a href="https://federated.withgoogle.com/?ref=quantumai.cloud">https://federated.withgoogle.com/</a></li><li><a href="https://medium.com/@ODSC/what-is-federated-learning-99c7fc9bc4f5?ref=quantumai.cloud">https://medium.com/@ODSC/what-is-federated-learning-99c7fc9bc4f5</a></li><li><a href="https://towardsdatascience.com/introduction-to-federated-learning-and-challenges-ea7e02f260ca?ref=quantumai.cloud">https://towardsdatascience.com/introduction-to-federated-learning-and-challenges-ea7e02f260ca</a></li><li><a href="https://towardsdatascience.com/how-federated-learning-is-going-to-revolutionize-ai-6e0ab580420f?ref=quantumai.cloud">https://towardsdatascience.com/how-federated-learning-is-going-to-revolutionize-ai-6e0ab580420f</a></li></ol><h3 id="initial-papers">Initial papers</h3><ol><li><a href="https://eprint.iacr.org/2017/281.pdf?ref=quantumai.cloud">Practical Secure Aggregation for Privacy-Preserving Machine Learning</a>&nbsp;– Google, 2016</li><li><a href="https://arxiv.org/abs/1610.05492?ref=quantumai.cloud">Federated Learning: Strategies for Improving Communication Efficiency</a>&nbsp;– 2016</li><li><a href="https://arxiv.org/abs/1602.05629?ref=quantumai.cloud">Communication-Efficient Learning of Deep Networks from Decentralized Data</a>&nbsp;– 2017</li></ol><h3 id="talk-%E2%80%93-seminar">Talk – Seminar</h3><ol><li>Federated Learning One World Seminar –&nbsp;<a href="https://sites.google.com/view/one-world-seminar-series-flow/archive?ref=quantumai.cloud">https://sites.google.com/view/one-world-seminar-series-flow/archive</a></li><li>Coursera –&nbsp;<a href="https://www.coursera.org/learn/advanced-deployment-scenarios-tensorflow?ref=quantumai.cloud">https://www.coursera.org/learn/advanced-deployment-scenarios-tensorflow</a></li></ol><h1 id="%F0%9F%93%9C-survey">📜 Survey</h1><ol><li><a href="https://arxiv.org/pdf/1912.04977.pdf?ref=quantumai.cloud"><strong>Advances and Open Problems in Federated Learning</strong></a></li><li><a href="https://arxiv.org/pdf/1907.09693.pdf?ref=quantumai.cloud">A Survey on Federated Learning Systems: Vision, Hype and Reality for Data Privacy and Protection</a></li><li><a href="https://arxiv.org/abs/2007.11354?ref=quantumai.cloud"><strong>A Systematic Literature Review on Federated Machine Learning: From A Software Engineering Perspective</strong></a></li><li><a href="https://arxiv.org/pdf/2006.02931.pdf?ref=quantumai.cloud">Federated Learning for 6G Communications: Challenges, Methods, and Future Directions</a></li><li><a href="https://arxiv.org/pdf/2003.02133.pdf?ref=quantumai.cloud">Threats to Federated Learning: A Survey</a></li><li><a href="https://arxiv.org/pdf/2002.10610.pdf?ref=quantumai.cloud">Federated Learning for Resource-Constrained IoT Devices: Panoramas and State-of-the-art</a></li><li><a href="https://arxiv.org/pdf/1908.07873.pdf?ref=quantumai.cloud">Federated Learning: Challenges, Methods, and Future Directions</a></li><li><a href="https://arxiv.org/pdf/1909.11875.pdf?ref=quantumai.cloud">Federated Learning in Mobile Edge Networks: A Comprehensive Survey</a></li><li><a href="https://arxiv.org/pdf/1902.04885.pdf?ref=quantumai.cloud">Federated Machine Learning: Concept and Applications</a></li><li><a href="https://arxiv.org/pdf/2002.11545.pdf?ref=quantumai.cloud">Towards Utilizing Unlabeled Data in Federated Learning: A Survey and Prospective</a></li><li><a href="https://arxiv.org/pdf/2004.11794.pdf?ref=quantumai.cloud">A Review of Privacy-preserving Federated Learning for the Internet-of-Things</a></li></ol><h1 id="%F0%9F%93%A6-system-design-%E2%80%93-frameworks-%E2%80%93-libraries">📦 System design – frameworks – libraries</h1><ol><li>PySyft – A library for computing on data you do not own and cannot see<ul><li>Github:&nbsp;<a href="https://github.com/OpenMined/PySyft?ref=quantumai.cloud">https://github.com/OpenMined/PySyft</a></li></ul></li><li>Tensorflow Federated<ul><li>Website:&nbsp;<a href="https://www.tensorflow.org/federated?ref=quantumai.cloud">https://www.tensorflow.org/federated</a></li></ul></li><li><a href="https://arxiv.org/pdf/2007.13518.pdf?ref=quantumai.cloud">FedML: A Research Library and Benchmark for Federated Machine Learning</a><ul><li>Website:&nbsp;<a href="https://fedml.ai/?ref=quantumai.cloud">https://fedml.ai/</a></li></ul></li><li>Flower – A Friendly Federated Learning Framework<ul><li>Github:&nbsp;<a href="https://github.com/adap/flower?ref=quantumai.cloud">https://github.com/adap/flower</a></li></ul></li><li>Federated Learning Pytorch<ul><li>Github:&nbsp;<a href="https://github.com/AshwinRJ/Federated-Learning-PyTorch?ref=quantumai.cloud">https://github.com/AshwinRJ/Federated-Learning-PyTorch</a></li></ul></li><li><a href="https://arxiv.org/pdf/2002.08423.pdf?ref=quantumai.cloud">PrivacyFL: A simulator for privacy-preserving and secure federated learning.</a></li><li><a href="https://arxiv.org/abs/1902.01046?ref=quantumai.cloud">Towards Federated Learning at Scale: System Design</a></li></ol><h1 id="%F0%9F%92%BB-models-and-applications">💻 Models and Applications</h1><ol><li><a href="https://arxiv.org/pdf/1804.07474.pdf?ref=quantumai.cloud">DIOT: A Federated Self-learning Anomaly Detection System for IoT</a></li><li><a href="https://arxiv.org/pdf/1811.03850.pdf?ref=quantumai.cloud">MD-GAN: Multi-Discriminator Generative Adversarial Networks for Distributed Datasets.</a></li><li><a href="https://arxiv.org/pdf/2005.03793.pdf?ref=quantumai.cloud">(GAN) Federated Generative Adversarial Learning</a></li><li><a href="https://arxiv.org/pdf/2005.04563.pdf?ref=quantumai.cloud">Efficient Privacy-Preserving Edge Computing Framework for Image Classification</a></li></ol><h1 id="%F0%9F%9B%A1%EF%B8%8F-security-and-privacy">🛡️ Security and Privacy</h1><h3 id="overview">Overview</h3><p><a href="https://arxiv.org/pdf/2004.04676.pdf?ref=quantumai.cloud">An Overview of Federated Deep Learning Privacy Attacks and Defensive Strategies. 2020-04-01</a>&nbsp;Citation: 0</p><h3 id="backdoor-attacks">Backdoor Attacks</h3><p><strong>Awesome Backdoor Learning List:</strong>&nbsp;<a href="https://github.com/THUYimingLi/backdoor-learning-resources?ref=quantumai.cloud">https://github.com/THUYimingLi/backdoor-learning-resources</a><br><strong>Survey</strong>:&nbsp;<a href="https://arxiv.org/pdf/2007.08745.pdf?ref=quantumai.cloud">Backdoor Learning – a survey</a></p><ol><li>AISTATS 2020 –&nbsp;<a href="https://arxiv.org/pdf/1807.00459.pdf?ref=quantumai.cloud">How To Backdoor Federated Learning</a>&nbsp;✅ ⭐️⭐️<ul><li>Github:&nbsp;<a href="https://github.com/ebagdasa/backdoor_federated_learning?ref=quantumai.cloud">https://github.com/ebagdasa/backdoor_federated_learning</a></li><li>Conf:&nbsp;<a href="http://proceedings.mlr.press/v108/bagdasaryan20a.html?ref=quantumai.cloud">http://proceedings.mlr.press/v108/bagdasaryan20a.html</a></li><li>Supplementary PDF:&nbsp;<a href="http://proceedings.mlr.press/v108/bagdasaryan20a/bagdasaryan20a-supp.pdf?ref=quantumai.cloud">http://proceedings.mlr.press/v108/bagdasaryan20a/bagdasaryan20a-supp.pdf</a></li></ul></li><li><a href="https://arxiv.org/pdf/2005.03823.pdf?ref=quantumai.cloud">Blind Backdoors in Deep Learning Models (2021)</a>&nbsp;✅ ⭐️⭐️<ul><li>Github:&nbsp;<a href="https://github.com/ebagdasa/backdoors101?ref=quantumai.cloud">https://github.com/ebagdasa/backdoors101</a></li></ul></li><li>ICLR 2020 –&nbsp;<a href="https://openreview.net/forum?id=rkgyS0VFvr&ref=quantumai.cloud">DBA: Distributed Backdoor Attacks against Federated Learning</a><ul><li>Github:&nbsp;<a href="https://github.com/AI-secure/DBA?ref=quantumai.cloud">https://github.com/AI-secure/DBA</a></li></ul></li><li>NeurIPS 2019 –&nbsp;<a href="https://arxiv.org/pdf/1911.07963.pdf?ref=quantumai.cloud">Can You Really Backdoor Federated Learning?</a></li><li><a href="https://papers.nips.cc/paper/2020/file/b8ffa41d4e492f0fad2f13e29e1762eb-Paper.pdf?ref=quantumai.cloud">Attack of the Tails: Yes, You Really Can Backdoor Federated Learning</a></li><li><a href="https://arxiv.org/pdf/2006.07026.pdf?ref=quantumai.cloud">NeurIPS 2020 Submission: Backdoor Attacks on Federated Meta-Learning</a></li></ol><h3 id="data-poisoning">Data Poisoning</h3><ol><li><a href="https://arxiv.org/abs/2007.08432?ref=quantumai.cloud"><strong>Data Poisoning Attacks Against Federated Learning Systems</strong></a><strong>&nbsp;✅ ⭐️⭐️</strong><ul><li>Github:&nbsp;<a href="https://github.com/git-disl/DataPoisoning_FL?ref=quantumai.cloud">https://github.com/git-disl/DataPoisoning_FL</a></li></ul></li><li><a href="https://arxiv.org/pdf/2004.10020.pdf?ref=quantumai.cloud">Data Poisoning Attacks on Federated Machine Learning</a></li><li><a href="https://arxiv.org/abs/1906.07773?ref=quantumai.cloud">Poisoning Attacks with Generative Adversarial Nets</a></li><li><a href="https://www.researchgate.net/publication/336947655_Poisoning_Attack_in_Federated_Learning_using_Generative_Adversarial_Nets?ref=quantumai.cloud">Poisoning Attack in Federated Learning using Generative Adversarial Nets</a></li></ol><h3 id="model-poisoning">Model Poisoning</h3><ol><li>ICML 2019 –&nbsp;<a href="https://arxiv.org/pdf/1811.12470.pdf?ref=quantumai.cloud">Analyzing Federated Learning through an Adversarial Lens</a>&nbsp;<strong>✅ ⭐️⭐️⭐️ –</strong>&nbsp;Citation: 165 – Highlight: client attack</li><li>USS 2020 –&nbsp;<a href="https://arxiv.org/pdf/1911.11815.pdf?ref=quantumai.cloud">Local Model Poisoning Attacks to Byzantine-Robust Federated Learning</a></li></ol><h3 id="inference-attacks">Inference Attacks</h3><ol><li><a href="https://arxiv.org/pdf/2004.12571.pdf?ref=quantumai.cloud">Exploiting Defenses against GAN-Based Feature Inference Attacks in Federated Learning</a></li></ol><h3 id="free-rider-attacks">Free-rider Attacks</h3><ol><li>NeurIPS 2020 –&nbsp;<a href="https://arxiv.org/pdf/2006.11901.pdf?ref=quantumai.cloud">Free-rider Attacks on Model Aggregation in Federated Learning</a></li><li><a href="https://arxiv.org/pdf/1911.12560.pdf?ref=quantumai.cloud">Free-riders in Federated Learning: Attacks and Defenses</a></li></ol><h3 id="leakage">Leakage</h3><ol><li><a href="https://arxiv.org/pdf/1702.07464.pdf?ref=quantumai.cloud">Deep Models Under the GAN: Information Leakage from Collaborative Deep Learning. ACM CCS 2017. 2017-02-14</a>&nbsp;Citation: 284</li><li><a href="https://arxiv.org/pdf/1812.00535.pdf?ref=quantumai.cloud">Beyond Inferring Class Representatives: User-Level Privacy Leakage From Federated Learning. INFOCOM 2019</a>&nbsp;Citation: 56 Highlight: server-side attack</li><li><a href="https://arxiv.org/pdf/2004.10397.pdf?ref=quantumai.cloud">A Framework for Evaluating Gradient Leakage Attacks in Federated Learning. 2020-04-22</a>&nbsp;Researcher: Wenqi Wei, Ling Liu, GaTech</li><li><a href="https://arxiv.org/pdf/1910.05467.pdf?ref=quantumai.cloud">Quantification of the Leakage in Federated Learning. 2019-10-12</a>&nbsp;Citation: 1</li></ol><h3 id="privacy">Privacy</h3><ol><li><a href="https://arxiv.org/pdf/1911.04559.pdf?ref=quantumai.cloud">Privacy is What We Care About: Experimental Investigation of Federated Learning on Edge Devices</a></li><li><a href="https://arxiv.org/pdf/1812.00910.pdf?ref=quantumai.cloud">Comprehensive Privacy Analysis of Deep Learning: Passive and Active White-box Inference Attacks against Centralized and Federated Learning. 2018-12-03</a>&nbsp;Citation: 46</li><li><a href="https://arxiv.org/pdf/2003.14053.pdf?ref=quantumai.cloud">Inverting Gradients – How easy is it to break privacy in federated learning? 2020-03-31</a>&nbsp;Citation: 3<ul><li>Github:&nbsp;<a href="https://github.com/JonasGeiping/invertinggradients?ref=quantumai.cloud">https://github.com/JonasGeiping/invertinggradients</a></li></ul></li></ol><h3 id="defense">Defense</h3><ol><li><a href="https://arxiv.org/pdf/1808.04866.pdf?ref=quantumai.cloud">Mitigating Sybils in Federated Learning Poisoning. 2018-08-14. RAID 2020</a>&nbsp;Citation: 41 Highlight: defense<ul><li>Github:&nbsp;<a href="https://github.com/DistributedML/FoolsGold?ref=quantumai.cloud">https://github.com/DistributedML/FoolsGold</a></li></ul></li><li><a href="https://arxiv.org/abs/1811.03761?ref=quantumai.cloud">RSA: Byzantine-Robust Stochastic Aggregation Methods for Distributed Learning from Heterogeneous Datasets, AAAI 2019</a>&nbsp;Citation: 34<ul><li>Github:&nbsp;<a href="https://github.com/Liepill/RSA-Byzantine?ref=quantumai.cloud">https://github.com/Liepill/RSA-Byzantine</a></li></ul></li><li><a href="https://arxiv.org/pdf/2004.04986.pdf?ref=quantumai.cloud">Towards Realistic Byzantine-Robust Federated Learning. 2020-04-10</a></li><li><a href="https://arxiv.org/pdf/2006.15632.pdf?ref=quantumai.cloud">FDA3 : Federated Defense Against Adversarial Attacks for Cloud-Based IIoT Applications. 2020-06-28</a></li><li><a href="https://arxiv.org/pdf/2002.00211.pdf?ref=quantumai.cloud">Learning to Detect Malicious Clients for Robust Federated Learning. 2020-02-01</a></li><li><a href="https://arxiv.org/pdf/1912.13445.pdf?ref=quantumai.cloud">Robust Aggregation for Federated Learning. 2019-12-31</a>&nbsp;Citation: 9</li><li><a href="https://arxiv.org/pdf/1912.12370.pdf?ref=quantumai.cloud">Towards Deep Federated Defenses Against Malware in Cloud Ecosystems. 2019-12-27</a></li><li><a href="https://arxiv.org/pdf/1912.11464.pdf?ref=quantumai.cloud">Attack-Resistant Federated Learning with Residual-based Reweighting. 2019-12-23</a></li><li><a href="https://arxiv.org/pdf/1911.00251.pdf?ref=quantumai.cloud">Robust Federated Learning with Noisy Communication. 2019-11-01</a>&nbsp;Citation:</li><li><a href="https://arxiv.org/pdf/1910.09933.pdf?ref=quantumai.cloud">Abnormal Client Behavior Detection in Federated Learning. 2019-10-22</a>&nbsp;Citation: 3</li><li><a href="https://arxiv.org/pdf/1909.05125.pdf?ref=quantumai.cloud">Byzantine-Robust Federated Machine Learning through Adaptive Model Averaging. 2019-09-11</a></li><li><a href="https://arxiv.org/pdf/1908.08340.pdf?ref=quantumai.cloud">An End-to-End Encrypted Neural Network for Gradient Updates Transmission in Federated Learning. 2019-08-22</a></li><li><a href="https://arxiv.org/pdf/2006.07242.pdf?ref=quantumai.cloud">Ensemble Distillation for Robust Model Fusion in Federated Learning</a><ul><li><a href="https://github.com/epfml/federated-learning-public-code/tree/master/codes/FedDF-code?ref=quantumai.cloud">https://github.com/epfml/federated-learning-public-code/tree/master/codes/FedDF-code</a></li></ul></li></ol><h2 id="other-resources-and-references">Other Resources and References</h2><ul><li><strong>Awesome Federated Learning:&nbsp;</strong><a href="https://github.com/chaoyanghe/Awesome-Federated-Learning?ref=quantumai.cloud"><strong>https://github.com/chaoyanghe/Awesome-Federated-Learning</strong></a>&nbsp;(main reference)</li><li>Google AI:&nbsp;<a href="https://ai.google/?ref=quantumai.cloud">https://ai.google/</a></li><li>Deep AI:&nbsp;<a href="https://deepai.org/?ref=quantumai.cloud">https://deepai.org/</a></li><li>Papers with Codes:&nbsp;<a href="https://paperswithcode.com/task/federated-learning?ref=quantumai.cloud">https://paperswithcode.com/task/federated-learning</a></li></ul>]]></content:encoded>
                </item>
                <item>
                    <title><![CDATA[Deploy OpenFaaS serverless platform on Kubernetes using Rancher 2.0]]></title>
                    <description><![CDATA[A tutorial on how to setup OpenFaaS framework on Kubernetes using Rancher 2.0]]></description>
                    <link>https://quantumai.cloud/p/567b4145-08ed-41a9-881b-5a41258eac40/</link>
                    <guid isPermaLink="false">660647abfdcabc0001efb120</guid>

                        <category><![CDATA[🌩️ Cloud Computing]]></category>

                        <dc:creator><![CDATA[Hoa Nguyen]]></dc:creator>

                    <pubDate>Fri, 29 Mar 2024 15:46:35 +1100</pubDate>

                        <media:content url="https://quantumai.cloud/content/images/2024/03/openfaas-1.png" medium="image"/>

                    <content:encoded><![CDATA[<img src="https://quantumai.cloud/content/images/2024/03/openfaas-1.png" alt="Deploy OpenFaaS serverless platform on Kubernetes using Rancher 2.0"/> <p>In this article, we will set up a serverless platform with OpenFaaS, an open-source framework, to explore this paradigm—the first step in a deep dive into the serverless journey.</p><div class="kg-card kg-callout-card kg-callout-card-yellow"><div class="kg-callout-emoji">💡</div><div class="kg-callout-text"><b><strong style="white-space: pre-wrap;">Serverless</strong></b> is an emerging architecture that could be empowering a new generation of developers, and transform the design and development of modern scalable applications. Software delivery and operation must be radically simplified. "It is important to note that serverless computing does not mean the absence of servers. The implementation still happens on real servers, but developers are relieved of installing and managing the infrastructure. The development team can then focus on the business logic and deploy the functions as soon as they are ready. These functions are completely stateless, allowing them to scale rapidly and independently from each other. As a consequence, serverless computing has made developers change the way they design, develop and deploy modern software"</div></div><h2 id="prerequisites">Prerequisites</h2><ol><li>One or 2+ servers (recommended), using Ubuntu 18.04.3 (Desktop or Server version, local or remote). Note: These servers should have a fixed IP address.</li><li>Internet connection</li></ol><h2 id="setup-kubernetes-cluster-with-rancher-20">Setup Kubernetes Cluster with Rancher 2.0</h2><p>There are manifold options for deploying a local or remote Kubernetes cluster. You can find out them here. One of the easiest ways to build one is Rancher.</p><p>Rancher is known as a platform to deliver Kubernetes-as-a-Service across any infrastructure and it could be used in both production and development environment.</p><p>In this experiment, I used 3 virtual machines running Ubuntu 18.04. All of them used sharing networking, so they could connect to each other and have internet access. At least one plays a master role (Master node), and others are Worker nodes.</p><h3 id="step-1-install-the-latest-version-of-docker">Step 1: Install the latest version of Docker</h3><p>Docker is a mandatory ingredient and must be installed in all nodes (both Master and Worker)</p><p><strong>Option 1: </strong>Using the following script</p><pre><code class="language-python">curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
</code></pre><p><strong>Option 2: </strong>Do it step-by-step</p><p>Install docker:</p><pre><code class="language-python">sudo apt install -y docker.io
</code></pre><p>After the installation is complete, start the docker service and enable it to run it every time at system boot.</p><pre><code class="language-python">systemctl start docker 
systemctl enable docker
</code></pre><p>Grant privileges to manage Docker to non-root user (don’t have to use “sudo docker”)</p><pre><code class="language-python">sudo groupadd docker 
sudo usermod -aG docker $USER
</code></pre><p>You can check it using the commands below:</p><pre><code class="language-python">systemctl status docker
docker —version
</code></pre><h3 id="step-2-deploy-the-rancher-server-on-the-master-node">Step 2: Deploy the Rancher Server on the Master node</h3><p>Login to the Master node and install Rancher. It is nothing more than running a container. Following the official docs, from your shell, enter the following command:</p><pre><code class="language-python">sudo docker run -d --restart=unless-stopped -p 80:80 -p 443:443 rancher/rancher
</code></pre><p>It will take some minutes to complete. Once it’s done, log in to Rancher by the IP <code>https://&lt;server_ip&gt;</code> (replace &lt;server<em>ip&gt; with your Master node IP)</em></p><p>Then, you will be asked to set a password for the admin account and confirm the Rancher Server URL</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://quantumai.cloud/content/images/2024/03/DraggedImage.png" class="kg-image" alt="Login page of Rancher 2.0" loading="lazy" width="1024" height="763" srcset="https://quantumai.cloud/content/images/size/w600/2024/03/DraggedImage.png 600w, https://quantumai.cloud/content/images/size/w1000/2024/03/DraggedImage.png 1000w, https://quantumai.cloud/content/images/2024/03/DraggedImage.png 1024w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">Login page of Rancher 2.0</span></figcaption></figure><h3 id="step-3-setup-the-kubernetes-k8s-cluster">Step 3: Setup the Kubernetes (K8s) Cluster</h3><p>After login into the Rancher dashboard, click “Add Cluster” on the upper right corner. Then, select From existing nodes (Custom) to continue.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://quantumai.cloud/content/images/2024/03/DraggedImage-1.png" class="kg-image" alt="Select From existing nodes on upper left corner" loading="lazy" width="1024" height="759" srcset="https://quantumai.cloud/content/images/size/w600/2024/03/DraggedImage-1.png 600w, https://quantumai.cloud/content/images/size/w1000/2024/03/DraggedImage-1.png 1000w, https://quantumai.cloud/content/images/2024/03/DraggedImage-1.png 1024w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">Select From existing nodes on upper left corner</span></figcaption></figure><p>Type Cluster name, keep other fields as default or customize them if needed</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://quantumai.cloud/content/images/2024/03/DraggedImage-2.png" class="kg-image" alt="Provide Cluster name and keep others as default" loading="lazy" width="1024" height="943" srcset="https://quantumai.cloud/content/images/size/w600/2024/03/DraggedImage-2.png 600w, https://quantumai.cloud/content/images/size/w1000/2024/03/DraggedImage-2.png 1000w, https://quantumai.cloud/content/images/2024/03/DraggedImage-2.png 1024w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">Provide Cluster name and keep others as default</span></figcaption></figure><p>You will see the command to deploy Master and Worker nodes afterward:</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://quantumai.cloud/content/images/2024/03/DraggedImage-3.png" class="kg-image" alt="Command to deploy Kubernetes cluster" loading="lazy" width="1024" height="648" srcset="https://quantumai.cloud/content/images/size/w600/2024/03/DraggedImage-3.png 600w, https://quantumai.cloud/content/images/size/w1000/2024/03/DraggedImage-3.png 1000w, https://quantumai.cloud/content/images/2024/03/DraggedImage-3.png 1024w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">Command to deploy Kubernetes cluster</span></figcaption></figure><p>There are two cases: single-node cluster and multi nodes cluster</p><h4 id="single-node-cluster">Single Node Cluster:</h4><p>If you only have one server play the role of both Master and Worker:</p><ul><li>Check all boxes in part 1 – Node Options (etcd, Control Plan, Worker)</li><li>Then, copy the command in part 2 and run it on your shell on your server. The command will be looked like:</li></ul><pre><code class="language-Bash">sudo docker run -d --privileged --restart=unless-stopped --net=host -v /etc/kubernetes:/etc/kubernetes -v /var/run:/var/run rancher/rancher-agent:v2.3.2 --server https://&lt;server_ip&gt; --token wxhkwshb69zjk76jfrgmw8z8raabbccf98xjkv4fh92gmcrcm6d26r --ca-checksum cc2ccdb2e5a2620a4daec8de9fb100daabbccad85d8c169a1b1ddaa6fe6895d5 --etcd --controlplane --worker</code></pre><h4 id="multi-nodes-cluster">Multi Nodes Cluster:</h4><p>If you have 2 nodes or more than, then one is Master and others are Worker. You should set up follow the following rules:</p><ul><li><strong>Master node: </strong>check etcd and Control Plan and use the command in part 2 to run on Master node</li><li><strong>Worker node:</strong> check the only Worker and use the command in part 2 to run on all Worker nodes.</li></ul><p>Note that Rancher uses the hostname of each server as the Node name by default. If you have 2 or more nodes with the same hostname, you should define the different Node names for each other. Otherwise, the latter nodes couldn’t be added to the Cluster.</p><p>After that, wait for the provisioning process (it could take some minutes). When it’s done, you can see all nodes are activated in the Nodes page</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://quantumai.cloud/content/images/2024/03/DraggedImage-4.png" class="kg-image" alt="Setup Cluster is done" loading="lazy" width="1024" height="456" srcset="https://quantumai.cloud/content/images/size/w600/2024/03/DraggedImage-4.png 600w, https://quantumai.cloud/content/images/size/w1000/2024/03/DraggedImage-4.png 1000w, https://quantumai.cloud/content/images/2024/03/DraggedImage-4.png 1024w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">Setup Cluster is done</span></figcaption></figure><h3 id="step-4-setup-openfaas-%E2%80%93-serverless-platform-on-rancher-k8s-cluster">Step 4: Setup OpenFaaS – Serverless platform on Rancher K8s Cluster</h3><p><strong>OpenFaaS</strong> is a prevalent open-source platform for Serverless (besides OpenWhisk, Kubeless, Fission,…). OpenFaaS is Kubernetes-native and uses Deployments, Services, and Secrets. For more detail check out the “faas-netes” repository. Presently, OpenFaaS is not available in the library of Rancher so we will need to install it by hand. Once you have a cluster, you can follow these steps. I will deploy by kubectl, you can try other options (like using Helm or k3sup by find out on this page)</p><h4 id="install-kubectl">Install kubectl</h4><p>Login to the Master node and run the following command on your shell</p><pre><code class="language-python">sudo snap install kubectl --classic
</code></pre><h4 id="put-the-rancher-kubeconfig-file-into-the-master-node">Put the Rancher Kubeconfig file into the Master node</h4><p>Login to Kubernetes dashboard, on Cluster page, click Kubeconfig File on the upper right corner. You will see the <code>kubeconfig</code> file in the new popup.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://quantumai.cloud/content/images/2024/03/DraggedImage-5.png" class="kg-image" alt="Main dashboard of Rancher" loading="lazy" width="1024" height="840" srcset="https://quantumai.cloud/content/images/size/w600/2024/03/DraggedImage-5.png 600w, https://quantumai.cloud/content/images/size/w1000/2024/03/DraggedImage-5.png 1000w, https://quantumai.cloud/content/images/2024/03/DraggedImage-5.png 1024w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">Main dashboard of Rancher</span></figcaption></figure><p>Then copy all and put this into the file in <code>/home/&lt;user-name&gt;/kube/config</code> (create a new file if it does not exist).</p><p>Note that, you should change the permission of this file to ensure it could be accessible by the following command: <code>sudo chmod 755 /home//.kube/config</code></p><h4 id="install-openfaas-cli">Install OpenFaaS CLI</h4><p>You can install the OpenFaaS CLI (to interact with CLI) using brew or a curl script.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://quantumai.cloud/content/images/2024/03/DraggedImage-6.png" class="kg-image" alt="Install OpenFaaS CLI via curl" loading="lazy" width="1024" height="367" srcset="https://quantumai.cloud/content/images/size/w600/2024/03/DraggedImage-6.png 600w, https://quantumai.cloud/content/images/size/w1000/2024/03/DraggedImage-6.png 1000w, https://quantumai.cloud/content/images/2024/03/DraggedImage-6.png 1024w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">Install OpenFaaS CLI via curl</span></figcaption></figure><p>Via <strong>curl</strong>:</p><pre><code class="language-python">curl -sL https://cli.openfaas.com | sudo sh
</code></pre><p>Via <strong>brew</strong>:</p><pre><code class="language-python">brew install faas-cli
</code></pre><h4 id="deploy-openfaas-from-faas-netes-yaml-and-kubectl">Deploy OpenFaaS from faas-netes YAML and kubectl</h4><p>Clone the repository:</p><pre><code class="language-python">git clone https://github.com/openfaas/faas-netes
</code></pre><p>Deploy the whole stack: This command is split into two parts so that the OpenFaaS namespaces are always created first:</p><ul><li><code>openfaas</code> – for OpenFaaS services</li><li><code>openfaas-fn</code> – for functions</li></ul><p>Enter to faas-netes folder and deploy openfass and openfaas-fn namespace</p><pre><code class="language-python">cd faas-netes
kubectl apply -f namespaces.yml --kubeconfig=/home/&lt;user-name&gt;/.kube/config
</code></pre><p>Create a password for the gateway:</p><pre><code class="language-python"># Generate a random password
PASSWORD=$(head -c 12 /dev/urandom | shasum| cut -d' ' -f1)
kubectl -n openfaas create secret generic basic-auth \
--from-literal=basic-auth-user=admin \
--from-literal=basic-auth-password="$PASSWORD"
</code></pre><p><strong>Note</strong>: You can use your own password and remember it to login OpenFaaS UI. If using above command to generate a random password, then review and keep it (using <code>echo $PASSWORD</code>)</p><p>Deploy OpenFaaS:</p><p>In faas-netes folder, run following command:</p><pre><code class="language-python">kubectl apply -f ./yaml --kubeconfig=/home/&lt;user-name&gt;/.kube/config
</code></pre><h4 id="add-openfaas-project-to-rancher">Add OpenFaaS Project to Rancher</h4><p>Back to Rancher dashboard, navigate to Projects/Namespace, you will see 2 namespaces openfaas and openfaas-fn are created. Then, click Add Project on the upper right corner, enter Project Name (like openfaas or other up to you) and click Create. Next, select 2 openfaas namespaces and click Move button (on upper left corner) to move them to Project openfaas you have just created. Result:</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://quantumai.cloud/content/images/2024/03/DraggedImage-7.png" class="kg-image" alt="Create OpenFaaS project" loading="lazy" width="1024" height="630" srcset="https://quantumai.cloud/content/images/size/w600/2024/03/DraggedImage-7.png 600w, https://quantumai.cloud/content/images/size/w1000/2024/03/DraggedImage-7.png 1000w, https://quantumai.cloud/content/images/2024/03/DraggedImage-7.png 1024w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">Create OpenFaaS project</span></figcaption></figure><p>When clicking on your project, you will see all your Workloads</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://quantumai.cloud/content/images/2024/03/DraggedImage-8.png" class="kg-image" alt="All workloads after deploy OpenFaaS" loading="lazy" width="1024" height="728" srcset="https://quantumai.cloud/content/images/size/w600/2024/03/DraggedImage-8.png 600w, https://quantumai.cloud/content/images/size/w1000/2024/03/DraggedImage-8.png 1000w, https://quantumai.cloud/content/images/2024/03/DraggedImage-8.png 1024w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">All workloads after deploy OpenFaaS</span></figcaption></figure><h4 id="set-up-openfaas-gateway-to-access-openfaas-ui">Set up OpenFaaS gateway to access OpenFaaS UI</h4><p>Select Load balancing section, then click Add Ingress on the upper right corner. Type Ingress name, select Target is gateway workload, port like 8080, keep others fields á default and click Save.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://quantumai.cloud/content/images/2024/03/DraggedImage-9.png" class="kg-image" alt="Setup Gateway Ingress" loading="lazy" width="1536" height="964" srcset="https://quantumai.cloud/content/images/size/w600/2024/03/DraggedImage-9.png 600w, https://quantumai.cloud/content/images/size/w1000/2024/03/DraggedImage-9.png 1000w, https://quantumai.cloud/content/images/2024/03/DraggedImage-9.png 1536w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">Setup Gateway Ingress</span></figcaption></figure><p>The result will be like the following:</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://quantumai.cloud/content/images/2024/03/DraggedImage-10.png" class="kg-image" alt="Successful added Gateway Ingress" loading="lazy" width="1536" height="538" srcset="https://quantumai.cloud/content/images/size/w600/2024/03/DraggedImage-10.png 600w, https://quantumai.cloud/content/images/size/w1000/2024/03/DraggedImage-10.png 1000w, https://quantumai.cloud/content/images/2024/03/DraggedImage-10.png 1536w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">Successful added Gateway Ingress</span></figcaption></figure><p>Config Gateway Environment</p><pre><code class="language-python">export OPENFAAS_URL=gateway.openfaas.&lt;your_gateway_IP&gt;.xip.io
</code></pre><p>Now, you can access the OpenFaaS URL via the URL gateway.openfaas.&lt;server-ip&gt;.xip.io (in Targets) section and login with username admin and password in step 3</p><p>Congratulation! OpenFaaS deployment on Rancher is completed and you can play with Serverless now.</p><figure class="kg-card kg-image-card"><img src="https://quantumai.cloud/content/images/2024/03/DraggedImage-11.png" class="kg-image" alt="" loading="lazy" width="2000" height="1316" srcset="https://quantumai.cloud/content/images/size/w600/2024/03/DraggedImage-11.png 600w, https://quantumai.cloud/content/images/size/w1000/2024/03/DraggedImage-11.png 1000w, https://quantumai.cloud/content/images/size/w1600/2024/03/DraggedImage-11.png 1600w, https://quantumai.cloud/content/images/2024/03/DraggedImage-11.png 2298w" sizes="(min-width: 720px) 720px"></figure><h2 id="references">References</h2><p><a href="https://github.com/openfaas/faas?ref=quantumai.cloud">https://github.com/openfaas/faas</a></p>]]></content:encoded>
                </item>
                <item>
                    <title><![CDATA[Quantum Awesome Learning Hub]]></title>
                    <description><![CDATA[Collection of books, tutorials, courses, papers, toolkits, and resources to fulfill the quantum learning journey.]]></description>
                    <link>https://quantumai.cloud/blog/quantum-awesome-learning-hub/</link>
                    <guid isPermaLink="false">65f8dbd4fdcabc0001efb10b</guid>

                        <category><![CDATA[🔮 Quantum computing]]></category>

                        <dc:creator><![CDATA[Hoa Nguyen]]></dc:creator>

                    <pubDate>Tue, 19 Mar 2024 11:27:00 +1100</pubDate>

                        <media:content url="https://quantumai.cloud/content/images/2024/03/inaki-del-olmo-NIJuEQw0RKg-unsplash.jpg" medium="image"/>

                    <content:encoded><![CDATA[<img src="https://quantumai.cloud/content/images/2024/03/inaki-del-olmo-NIJuEQw0RKg-unsplash.jpg" alt="Quantum Awesome Learning Hub"/> <h1 id="get-started">Get started</h1><p><em>Get a feel for quantum computing with interactive introduction:</em></p><ol><li><a href="https://quantumai.google/learn/map?ref=quantumai.cloud"><strong>Quantum Computing Journey</strong></a> by QuantumAI.Google<br>An interactive map to get started with Quantum Computing from Google QuantumAI</li><li><a href="https://learn.qiskit.org/course/introduction?ref=quantumai.cloud"><strong>Introduction to Quantum Computing</strong></a> by Qiskit Learn<br>An short introduction course to get started with Quantum Computing</li><li><a href="https://quantum.country/?ref=quantumai.cloud"><strong>Quantum Country</strong></a> by Andy Matuschak and Michael Nielsen<br>An introduction to quantum computing and quantum mechanics</li></ol><h1 id="courses">Courses</h1><ol><li><a href="https://ocw.mit.edu/courses/mas-865j-quantum-information-science-spring-2006/pages/lecture-notes/?ref=quantumai.cloud"><strong>Quantum Information Science</strong></a> - MAS.865J by Isaac Chuang and Peter Shor<br>MIT Open Courseware</li><li><a href="https://qiskit.org/textbook-beta/summer-school/introduction-to-quantum-computing-and-quantum-hardware-2020/?ref=quantumai.cloud"><strong>Introduction to Quantum Computing and Quantum Hardware</strong></a> by IBM Qiskit<br>2020 Qiskit Global Summer School</li><li><a href="https://qiskit.org/textbook-beta/summer-school/quantum-computing-and-quantum-learning-2021?ref=quantumai.cloud"><strong>Quantum Machine Learning</strong></a> by IBM Qiskit<br>2021 Qiskit Global Summer School</li><li><a href="https://brilliant.org/courses/quantum-computing/?ref=quantumai.cloud"><strong>Quantum Computing</strong></a> by Brilliant<br>Solve hard problems by computing with quantum mechanics.</li><li><a href="https://www.udemy.com/course/quantum-computing-az/?ref=quantumai.cloud"><strong>Quantum Computing A-Z</strong></a> by Syed-Mohammad Raza<br>Learn Quantum Algorithms, Quantum Machine Learning, Quantum Information Theory, Quantum Error Correction &amp; More!</li></ol><h1 id="books">Books</h1><ol><li><a href="https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE?ref=quantumai.cloud#overview"><strong>Quantum Computation and Quantum Information</strong></a> by Michael A. Nielsen &amp; Isaac L. Chuang<br>Comprehensive textbook and “bible” for Quantum Computing</li><li><a href="https://www.amazon.com/Quantum-Computing-Computer-Scientists-Yanofsky/dp/0521879965?ref=quantumai.cloud"><strong>Quantum Computing for Computer Scientists</strong></a> by Noson S. Yanofsky and Mirco A. Mannucci</li><li><a href="https://www.amazon.com/Quantum-Computer-Science-David-Mermin/dp/0521876583/?ref=quantumai.cloud"><strong>Quantum Computer Science: An Introduction</strong></a> by N. David Mermin</li><li><a href="https://link.springer.com/book/10.1007/978-3-030-61601-4?ref=quantumai.cloud"><strong>Quantum Computing for the Quantum Curious</strong></a> by Ciaran Hughes, Joshua Isaacson, Anastasia Perry, Ranbel F. Sun, Jessica Turner</li><li><a href="https://qiskit.org/textbook-beta/?ref=quantumai.cloud"><strong>Qiskit Online Textbook</strong></a> by IBM Qiskit</li></ol><h1 id="programming-languages-and-sdks">Programming Languages and SDKs</h1><ol><li><a href="https://qiskit.org/?ref=quantumai.cloud"><strong>Qiskit</strong></a> by IBM<br>An open-source SDK for working with quantum computers at the level of pulses, circuits, and application modules.</li><li><a href="https://quantumai.google/cirq/?ref=quantumai.cloud"><strong>Cirq</strong></a> by Google<br>An open source framework for programming quantum computers</li><li><a href="https://docs.microsoft.com/en-us/azure/quantum/user-guide/libraries/standard/?ref=quantumai.cloud"><strong>Q# (Q Sharp)</strong></a> by Microsoft<br>A Microsoft’s open-source programming language for developing and running quantum algorithms</li><li><a href="https://github.com/aws/amazon-braket-sdk-python?ref=quantumai.cloud"><strong>Braket SDK</strong></a> by Amazon<br>An open source library that provides a framework that you can use to interact with quantum computing hardware devices through Amazon Braket.</li><li><a href="https://pennylane.ai/?ref=quantumai.cloud"><strong>PennyLane</strong></a> by Xanadu<br>A cross-platform Python library for differentiable programming of quantum computers. Train a quantum computer the same way as a neural network.</li><li><a href="https://github.com/rigetti/pyquil?ref=quantumai.cloud"><strong>PyQuil</strong></a> by Rigetti<br>A Python library for quantum programming using Quil, the quantum instruction language developed at Rigetti Computing</li></ol><h1 id="quantum-providers">Quantum Providers</h1><ol><li><a href="quantum-computing.ibm.com"><strong>IBM Quantum</strong></a> by IBM</li><li><a href="https://aws.amazon.com/braket/?ref=quantumai.cloud"><strong>Amazon Braket</strong></a> by Amazon</li><li><a href="https://azure.microsoft.com/en-us/services/quantum/?ref=quantumai.cloud"><strong>Azure Quantum</strong></a> by Microsoft</li><li><a href="https://quantumai.google/quantum-computing-service?ref=quantumai.cloud"><strong>Google Quantum Computing Service</strong></a> by Google</li><li><a href="https://strangeworks.com/?ref=quantumai.cloud"><strong>Strangeworks QC™</strong></a> by Strangeworks</li></ol><h1 id="quantum-blogs">Quantum Blogs</h1><ol><li><a href="http://sam-jaques.appspot.com/quantum_landscape_2022?ref=quantumai.cloud"><strong>Quantum Landscape 2022</strong></a> by Samuel Jaques, University of Oxford</li></ol><p><em>To be updated </em></p>]]></content:encoded>
                </item>
                <item>
                    <title><![CDATA[Quantum Computing at a glance: What, Why, When and Where are we now?]]></title>
                    <description><![CDATA[What is Quantum Computing?
Why do we need Quantum Computing?
When can we access a Quantum computer and develop a Quantum application? Where are we now in the Quantum world?]]></description>
                    <link>https://quantumai.cloud/blog/quantum-computing-at-a-glance/</link>
                    <guid isPermaLink="false">65f8d985fdcabc0001efb0f5</guid>


                        <dc:creator><![CDATA[Hoa Nguyen]]></dc:creator>

                    <pubDate>Tue, 19 Mar 2024 11:19:05 +1100</pubDate>

                        <media:content url="https://quantumai.cloud/content/images/2024/03/michael-dziedzic-qDG7XKJLKbs-unsplash-1.jpg" medium="image"/>

                    <content:encoded><![CDATA[<img src="https://quantumai.cloud/content/images/2024/03/michael-dziedzic-qDG7XKJLKbs-unsplash-1.jpg" alt="Quantum Computing at a glance: What, Why, When and Where are we now?"/> <p><em>What is Quantum Computing?</em></p><p><em>Why do we need Quantum Computing?</em></p><p><em>When can we access a Quantum computer and develop a Quantum application? Where are we now in the Quantum world?</em></p><p>We will together address these questions in this blog post to help you get a feeling about the current state of quantum computing – a promising paradigm shift in the near future.</p><h2 id="what-is-quantum-computing">What is Quantum Computing?</h2><blockquote>Quantum computing bases on the theory of quantum mechanics, and therefore, is fundamentally different from classical computer.</blockquote><p><strong>Wait, what is quantum mechanics?</strong> Quantum mechanics is a branch of physics to actually explain the nature of phenomena at the scale of atoms.</p><p><strong>But why fundamentally different?</strong></p><p>We could start to answer this question from the basic unit of classical computer and quantum computer: <strong>bits</strong> and <strong>quantum bits</strong> (or <strong>qubits</strong>). As we have learned, the fundamental unit of information in today’s computer is the bit, which could be either 0 or 1 (we could call they are states). In other words, we could break every digital information into 0s and 1s. 1010 is the bit representation of 18, for example. However, quantum data are made up of qubits, which could be 0, 1 or a combination of 0 and 1 at the same time (we called a <em>superposition</em> state). That means, with 1 qubit, we could have 2 states simultaneously. How about if we have 3 qubits? — 8 states, right? 10 qubits? 1024 states at the same time with quantum computer while it still be 1 state once with classical solution.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://quantumai.cloud/content/images/2024/03/quantum.gif" class="kg-image" alt="Superposition. Source: Geekonic" loading="lazy" width="480" height="270"><figcaption><span style="white-space: pre-wrap;">Superposition. Source: Geekonic</span></figcaption></figure><p>Along with superposition, quantum computing have another important characteristic called <em>entanglement</em>. We can simply think about an example of entanglement is special situation in which 2 qubit are strong correlated regardless how far away between them. Strong correlated means that one qubit could always determine the state of the second qubit without interacting with the second one. Looks like we could transfer the quantum information faster than the speed of light using entanglement? It is really “<em>spooky</em>” (as Einstein dubbed).</p><p>Exploiting this characteristic, we could take some exponential speed-up when using quantum computing to solve some intractable issues of today’s computer. A bit fancy, but it’s not an easy game, there are many things we need to learn and control before reaching all the advantages. We will discuss more in later posts, don’t make it complicated at the beginning 🥲</p><h2 id="why-do-we-need-quantum-computing">Why do we need Quantum Computing?</h2><p><strong><em>For some problems, supercomputers aren’t that super.</em></strong></p><p>Quantum computing is a promising technology to solve multiple intractable task even with “classical” supercomputers.</p><p>For example, factorising a large number into prime factors, which is the <em>“Achilles heel”</em> of crypto algorithms like RSA, could be “impossible” with the most powerful supercomputer. However, it’s not the rough way for quantum computers in near future by utilising Shor’s algorithm. This security risk has urged the emergence of another field called Post-Quantum Cryptography to develop a quantum-resistant crypto algorithms.</p><p>Apart from cryptography, quantum computing could be a solution for many prominent areas such as chemistry, finances, machine learning, networks and communications. That’s why now more and more countries put quantum computing on top of the national strategy to prioritise the large investment.</p><h2 id="when-can-we-access-an-actual-quantum-computer">When can we access an actual Quantum computer?</h2><p><strong>Now!</strong> Why not?</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://quantumai.cloud/content/images/2024/03/qts.jpeg" class="kg-image" alt="IBM Quantum System One (CES 2020) - (Credit: IBM)" loading="lazy" width="1023" height="682" srcset="https://quantumai.cloud/content/images/size/w600/2024/03/qts.jpeg 600w, https://quantumai.cloud/content/images/size/w1000/2024/03/qts.jpeg 1000w, https://quantumai.cloud/content/images/2024/03/qts.jpeg 1023w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">IBM Quantum System One (CES 2020) - (Credit: IBM)</span></figcaption></figure><p>Actually, from several years ago, we can access to actual quantum computer developed by IBM. The most popular way to run a program on quantum computer is through a cloud service, provided by some well-known vendors, such as IBM Quantum, Amazon Braket, Azure Quantum. That means, you can write your quantum application at your local computer and then send them to a quantum cloud service for executing, then waiting for the results. If you want to learn and try using quantum computer, go ahead to <a href="https://www.ibm.com/quantum-computing?ref=quantumai.cloud">IBM Quantum</a> - you can send your first quantum job to (up-to) 5-qubit quantum computers for FREE!</p><h2 id="where-are-we-now-in-the-quantum-world">Where are we now in the Quantum world?</h2><p>We are now staying in the <strong>NISQ</strong> – <em>Noisy Intermediate-Scale Quantum</em> era. That simply means the quantity and quality of qubits is not good enough to apply in practical problems at the moment. However, we witnessed numerous advancements in developing quantum hardware recently. The most powerful quantum computer presently (April 2022) is released by IBM last year with 127 qubits – a big milestone for the future of quantum computing. They also <a href="https://research.ibm.com/blog/ibm-quantum-roadmap?ref=quantumai.cloud">targeted to develop a 1121-qubit quantum computer</a> by the end of next year, 2023. In 2019, Google also claimed that their quantum computer just <a href="https://edition.cnn.com/2019/10/23/tech/google-quantum-supremacy-scn/index.html?ref=quantumai.cloud">need 200 seconds to solve a 10,000-year problem</a> of the world’s fastest supercomputer. They called it “quantum supremacy”. Moreover, many research topics related to quantum computing becoming a trending and very “hot” topics recently, such as Quantum Machine Learning, Quantum Error Correction.</p><h2 id="how-can-we-get-started-to-learn-quantum-computing">How can we get started to learn Quantum Computing?</h2><p>When I started learning Quantum computing, I found this interesting quote from Frank Zickert (PyQML):</p><blockquote>Quantum computing is fundamentally different from classical computing.<br>To master quantum computing, you must unlearn what you have learned.</blockquote><p>But don’t worry too much! Nowadays, we can learn almost any of new things by ourselves by many ways. There are many resources to learn about quantum computing, and it depends on your curiosity, how deep you want to dive in and how you intend to use quantum for your work.</p><ul><li>If you would like to get a bit more “feeling” about quantum computing and quantum mechanics, check out a website called<a href="https://quantum.country/?ref=quantumai.cloud">Quantum Country</a> (by <a href="https://andymatuschak.org/?ref=quantumai.cloud">Andy Matuschak</a> and <a href="http://michaelnielsen.org/?ref=quantumai.cloud">Michael Nielsen</a>).</li><li>If you want to have solid understanding about quantum, read the quantum “bible” entitles <strong><em>Quantum Computation and Quantum Information </em></strong>by Isaac Chuang and Michael Nielsen.</li><li>If you want an interactive textbook to learn Quantum computing in a more practical way and start to write your first quantum program using your Python skill, check out <a href="https://qiskit.org/textbook-beta/?ref=quantumai.cloud">Qiskit Textbook</a>.</li></ul><p>Just named a few, but there are numerous good books, online courses, tutorial videos, documentation available. If you are really interested to learn, define your keywords and your Google-ing skill will definitely help.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://quantumai.cloud/content/images/2024/03/quantumch.gif" class="kg-image" alt="Will we still need the classical computer? " loading="lazy" width="347" height="200"><figcaption><span style="white-space: pre-wrap;">Will we still need the classical computer?</span></figcaption></figure><p><strong><em>Happy learning!</em></strong></p>]]></content:encoded>
                </item>
    </channel>
</rss>