|
163 | 163 | 2, |
164 | 164 | None, |
165 | 165 | 'back-to-the-more-realistic-cases'), |
| 166 | + ('Quantum SVMs', 2, None, 'quantum-svms'), |
| 167 | + ('What will we need in the case of a quantum computer?', |
| 168 | + 2, |
| 169 | + None, |
| 170 | + 'what-will-we-need-in-the-case-of-a-quantum-computer'), |
| 171 | + ('The most general ansatz', 2, None, 'the-most-general-ansatz'), |
| 172 | + ('Quantum SVM', 2, None, 'quantum-svm'), |
| 173 | + ('Defining the Quantum Kernel', |
| 174 | + 2, |
| 175 | + None, |
| 176 | + 'defining-the-quantum-kernel'), |
| 177 | + ('Side note', 2, None, 'side-note'), |
| 178 | + ('Feature map', 2, None, 'feature-map'), |
| 179 | + ('Classical functions', 2, None, 'classical-functions'), |
166 | 180 | ('Plans for next week', 2, None, 'plans-for-next-week')]} |
167 | 181 | end of tocinfo --> |
168 | 182 |
|
|
255 | 269 | <!-- navigation toc: --> <li><a href="#rewriting-in-terms-of-vectors-and-matrices" style="font-size: 80%;">Rewriting in terms of vectors and matrices</a></li> |
256 | 270 | <!-- navigation toc: --> <li><a href="#rewriting-inequalities" style="font-size: 80%;">Rewriting inequalities</a></li> |
257 | 271 | <!-- navigation toc: --> <li><a href="#back-to-the-more-realistic-cases" style="font-size: 80%;">Back to the more realistic cases</a></li> |
| 272 | + <!-- navigation toc: --> <li><a href="#quantum-svms" style="font-size: 80%;">Quantum SVMs</a></li> |
| 273 | + <!-- navigation toc: --> <li><a href="#what-will-we-need-in-the-case-of-a-quantum-computer" style="font-size: 80%;">What will we need in the case of a quantum computer?</a></li> |
| 274 | + <!-- navigation toc: --> <li><a href="#the-most-general-ansatz" style="font-size: 80%;">The most general ansatz</a></li> |
| 275 | + <!-- navigation toc: --> <li><a href="#quantum-svm" style="font-size: 80%;">Quantum SVM</a></li> |
| 276 | + <!-- navigation toc: --> <li><a href="#defining-the-quantum-kernel" style="font-size: 80%;">Defining the Quantum Kernel</a></li> |
| 277 | + <!-- navigation toc: --> <li><a href="#side-note" style="font-size: 80%;">Side note</a></li> |
| 278 | + <!-- navigation toc: --> <li><a href="#feature-map" style="font-size: 80%;">Feature map</a></li> |
| 279 | + <!-- navigation toc: --> <li><a href="#classical-functions" style="font-size: 80%;">Classical functions</a></li> |
258 | 280 | <!-- navigation toc: --> <li><a href="#plans-for-next-week" style="font-size: 80%;">Plans for next week</a></li> |
259 | 281 |
|
260 | 282 | </ul> |
@@ -1822,10 +1844,134 @@ <h2 id="back-to-the-more-realistic-cases" class="anchor">Back to the more realis |
1822 | 1844 |
|
1823 | 1845 | <p>Using the <b>CVXOPT</b> library, the matrix \( P \) would then be defined by the above matrix while the KKT conditions would all be collected by the matrix \( G \).</p> |
1824 | 1846 |
|
| 1847 | +<!-- !split --> |
| 1848 | +<h2 id="quantum-svms" class="anchor">Quantum SVMs </h2> |
| 1849 | + |
| 1850 | +<p>The idea of a classical SVM is that we have a set of points |
| 1851 | +that are in either one group or another and we want to find a line that |
| 1852 | +separates these two groups. This line can be linear, but it can also be |
| 1853 | +much more complex, which can be achieved by the use of Kernels. |
| 1854 | +</p> |
| 1855 | + |
| 1856 | +<!-- !split --> |
| 1857 | +<h2 id="what-will-we-need-in-the-case-of-a-quantum-computer" class="anchor">What will we need in the case of a quantum computer? </h2> |
| 1858 | + |
| 1859 | +<div class="panel panel-default"> |
| 1860 | +<div class="panel-body"> |
| 1861 | +<!-- subsequent paragraphs come in larger fonts, so start with a paragraph --> |
| 1862 | +<p>We will have to translate the classical data point \(\vec{x}\) |
| 1863 | +into a quantum datapoint \(\vert \Phi{(\vec{x})} \rangle\). This can |
| 1864 | +be achieved by a circuit \( \mathcal{U}\_\{\Phi(\vec{x})\} \vert 0\rangle \). |
| 1865 | +</p> |
| 1866 | + |
| 1867 | +<p>Here \(\Phi()\) could be any classical function applied |
| 1868 | +on the classical data \(\vec{x}\). |
| 1869 | +</p> |
| 1870 | +</div> |
| 1871 | +</div> |
| 1872 | + |
| 1873 | +<div class="panel panel-default"> |
| 1874 | +<div class="panel-body"> |
| 1875 | +<!-- subsequent paragraphs come in larger fonts, so start with a paragraph --> |
| 1876 | +<p>We need a parameterized quantum circuit \(W( \theta )\) that |
| 1877 | +processes the data in a way that in the end we |
| 1878 | +can apply a measurement that returns a classical value \(-1\) or |
| 1879 | +\(1\) for each classical input \(\vec{x}\) that indentifies the label |
| 1880 | +of the classical data. |
| 1881 | +</p> |
| 1882 | +</div> |
| 1883 | +</div> |
| 1884 | + |
| 1885 | + |
| 1886 | +<!-- !split --> |
| 1887 | +<h2 id="the-most-general-ansatz" class="anchor">The most general ansatz </h2> |
| 1888 | + |
| 1889 | +<p>Following these steps we can define an ansatz for this kind of problem |
| 1890 | +which is \(W(\theta) \mathcal{U}_{\Phi}(\vec{x}) \vert 0 \rangle\). |
| 1891 | +</p> |
| 1892 | + |
| 1893 | +<p>These kind of ansatz are called quantum variational circuits.</p> |
| 1894 | + |
| 1895 | +<!-- !split --> |
| 1896 | +<h2 id="quantum-svm" class="anchor">Quantum SVM </h2> |
| 1897 | + |
| 1898 | +<p>In the case of a quantum SVM we will only used the quantum feature maps |
| 1899 | +\(\mathcal{U}_{\Phi(\vec{x})}\) to translate the classical data into |
| 1900 | +quantum states and build the Kernel of the SVM out of these quantum |
| 1901 | +states. After calculating the Kernel matrix on the quantum computer we |
| 1902 | +can train the Quantum SVM the same way as the classical SVM. |
| 1903 | +</p> |
| 1904 | + |
| 1905 | +<!-- !split --> |
| 1906 | +<h2 id="defining-the-quantum-kernel" class="anchor">Defining the Quantum Kernel </h2> |
| 1907 | + |
| 1908 | +<p>The idea of the quantum kernel is exactly the same as in the classical |
| 1909 | +case. We take the inner product |
| 1910 | +\(K(\vec{x}, \vec{z}) = \vert \langle \Phi (\vec{x}) \vert \Phi(\vec{z}) \rangle \vert^2 = \langle 0^n \vert \mathcal{U}_{\Phi(\vec{x})}^{t} \mathcal{U}_{\Phi(\vec{z})} \vert 0^n \rangle\), |
| 1911 | +but now with the quantum feature maps \(\mathcal{U}_{\Phi(\vec{x})}\). |
| 1912 | +The idea is that if we choose a quantum feature maps that is not easy to |
| 1913 | +simulate with a classical computer we might obtain a quantum advantage. |
| 1914 | +</p> |
| 1915 | + |
| 1916 | +<!-- !split --> |
| 1917 | +<h2 id="side-note" class="anchor">Side note </h2> |
| 1918 | + |
| 1919 | +<p>There is no proof yet that the QSVM brings a quantum |
| 1920 | +advantage, but the argument the authors of |
| 1921 | +<a href="https://arxiv.org/pdf/1804.11326.pdf" target="_self"><tt>https://arxiv.org/pdf/1804.11326.pdf</tt></a> make, is that there is |
| 1922 | +for sure no advantage if we use feature maps that are easy to simulate |
| 1923 | +classically, because then we would not need a quantum computer to |
| 1924 | +construct the Kernel. |
| 1925 | +</p> |
| 1926 | + |
| 1927 | +<!-- !split --> |
| 1928 | +<h2 id="feature-map" class="anchor">Feature map </h2> |
| 1929 | + |
| 1930 | +<p>For the feature maps we use the ansatz</p> |
| 1931 | +$$ |
| 1932 | +\mathcal{U}_{\Phi(x)} = U_{\Phi(x)} \otimes H^{\otimes n}, |
| 1933 | +$$ |
| 1934 | + |
| 1935 | +<p>where</p> |
| 1936 | +$$ |
| 1937 | +U_{\Phi(x)} = \exp \left( i \sum_{S \in n} \phi_S(x) \prod_{i \in S} Z_i \right), |
| 1938 | +$$ |
| 1939 | + |
| 1940 | +<p>which simplifies a lot when we (like in <a href="https://arxiv.org/pdf/1804.11326.pdf" target="_self"><tt>https://arxiv.org/pdf/1804.11326.pdf</tt></a>) only consider |
| 1941 | +\(S \leq 2\) interactions, which means we only let two qubits interact |
| 1942 | +at a time. For \(S \leq 2\) the product \(\prod_{i \in S}\) only leads |
| 1943 | +to interactions \(Z_i Z_j\) and non interacting terms \(Z_i\). And the |
| 1944 | +sum \(\sum_{S \in n}\) over all these terms that are possible with \(n\) |
| 1945 | +qubits. |
| 1946 | +</p> |
| 1947 | + |
| 1948 | +<!-- !split --> |
| 1949 | +<h2 id="classical-functions" class="anchor">Classical functions </h2> |
| 1950 | + |
| 1951 | +<p>Finally we define the classical functions \(\phi_i(\vec{x}) = x_i\) and |
| 1952 | +\(\phi_{i,j}(\vec{x}) = (\pi - x_i)( \pi- x_j)\). |
| 1953 | +</p> |
| 1954 | + |
| 1955 | +<p>If we write this ansatz for 2 qubits and \(S \leq 2\) we see how it |
| 1956 | +simplifies: |
| 1957 | +</p> |
| 1958 | +$$ |
| 1959 | +U_{\Phi(x)} = \exp \left(i \left(x_1 Z_1 + x_2 Z_2 + (\pi - x_1)( \pi- x_2) Z_1 Z_2 \right) \right). |
| 1960 | +$$ |
| 1961 | + |
| 1962 | +<p>We won't get into details to much here, why we would take this ansatz. |
| 1963 | +It is simply an ansatz that is simple enough an leads to good results. |
| 1964 | +</p> |
| 1965 | + |
| 1966 | +<p>Finally we can define a depth of these circuits. Depth 2 means we repeat |
| 1967 | +this ansatz two times. Which means our feature map becomes |
| 1968 | +\(U_{\Phi(x)} \otimes H^{\otimes n} \otimes U_{\Phi(x)} \otimes H^{\otimes n}\) |
| 1969 | +</p> |
| 1970 | + |
1825 | 1971 | <!-- !split --> |
1826 | 1972 | <h2 id="plans-for-next-week" class="anchor">Plans for next week </h2> |
1827 | 1973 | <ol> |
1828 | | -<li> Discussion of quantum support vector machines</li> |
| 1974 | +<li> Discussion of quantum support vector machines and quantum kernels</li> |
1829 | 1975 | <li> Introducing quantum neural networks</li> |
1830 | 1976 | </ol> |
1831 | 1977 | <!-- ------------------- end of main content --------------- --> |
|
0 commit comments