|
168 | 168 | 2, |
169 | 169 | None, |
170 | 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'), |
180 | 171 | ('Plans for next week', 2, None, 'plans-for-next-week')]} |
181 | 172 | end of tocinfo --> |
182 | 173 |
|
|
271 | 262 | <!-- navigation toc: --> <li><a href="#back-to-the-more-realistic-cases" style="font-size: 80%;">Back to the more realistic cases</a></li> |
272 | 263 | <!-- navigation toc: --> <li><a href="#quantum-svms" style="font-size: 80%;">Quantum SVMs</a></li> |
273 | 264 | <!-- 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> |
280 | 265 | <!-- navigation toc: --> <li><a href="#plans-for-next-week" style="font-size: 80%;">Plans for next week</a></li> |
281 | 266 |
|
282 | 267 | </ul> |
@@ -319,7 +304,7 @@ <h2 id="plans-for-the-week-of-april-21-25" class="anchor">Plans for the week of |
319 | 304 | <ol> |
320 | 305 | <li> Introduction to QML</li> |
321 | 306 | <li> Support Vector Machines (SVM, classical machine learning approach)</li> |
322 | | - <li> Quantum Support Vector Machine Learning (QSVM)</li> |
| 307 | + <li> Quantum Support Vector Machine Learning (QSVM), short intro</li> |
323 | 308 | <li> Video of lecture at <a href="https://youtu.be/C36Kg4eaO7A" target="_self"><tt>https://youtu.be/C36Kg4eaO7A</tt></a></li> |
324 | 309 | <li> Whiteboard notes at <a href="https://github.com/CompPhysics/QuantumComputingMachineLearning/blob/gh-pages/doc/HandWrittenNotes/2025/NotesApril23.pdf" target="_self"><tt>https://github.com/CompPhysics/QuantumComputingMachineLearning/blob/gh-pages/doc/HandWrittenNotes/2025/NotesApril23.pdf</tt></a></li> |
325 | 310 | </ol> |
@@ -1883,107 +1868,6 @@ <h2 id="what-will-we-need-in-the-case-of-a-quantum-computer" class="anchor">What |
1883 | 1868 | </div> |
1884 | 1869 |
|
1885 | 1870 |
|
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 |
1891 | | -</p> |
1892 | | -$$ |
1893 | | -W(\theta) \mathcal{U}_{\Phi}(\vec{x}) \vert 0 \rangle. |
1894 | | -$$ |
1895 | | - |
1896 | | -<p>These kind of ansatzes are called quantum variational circuits.</p> |
1897 | | - |
1898 | | -<!-- !split --> |
1899 | | -<h2 id="quantum-svm" class="anchor">Quantum SVM </h2> |
1900 | | - |
1901 | | -<p>In the case of a quantum SVM we will only use the quantum feature maps</p> |
1902 | | -$$ |
1903 | | -\mathcal{U}_{\Phi(\vec{x})}, |
1904 | | -$$ |
1905 | | - |
1906 | | -<p>to translate the classical data into |
1907 | | -quantum states and build the Kernel of the SVM out of these quantum |
1908 | | -states. After calculating the Kernel matrix on the quantum computer we |
1909 | | -can train the Quantum SVM the same way as the classical SVM. |
1910 | | -</p> |
1911 | | - |
1912 | | -<!-- !split --> |
1913 | | -<h2 id="defining-the-quantum-kernel" class="anchor">Defining the Quantum Kernel </h2> |
1914 | | - |
1915 | | -<p>The idea of the quantum kernel is exactly the same as in the classical |
1916 | | -case. We take the inner product |
1917 | | -</p> |
1918 | | -$$ |
1919 | | -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, |
1920 | | -$$ |
1921 | | - |
1922 | | -<p>but now with the quantum feature maps</p> |
1923 | | -$$ |
1924 | | -\mathcal{U}_{\Phi(\vec{x})}. |
1925 | | -$$ |
1926 | | - |
1927 | | -<p>The idea is that if we choose a quantum feature maps that is not easy |
1928 | | -to simulate with a classical computer we might obtain a quantum |
1929 | | -advantage. |
1930 | | -</p> |
1931 | | - |
1932 | | -<!-- !split --> |
1933 | | -<h2 id="side-note" class="anchor">Side note </h2> |
1934 | | - |
1935 | | -<p>There is no proof yet that the QSVM brings a quantum |
1936 | | -advantage, but the argument the authors of |
1937 | | -<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 |
1938 | | -for sure no advantage if we use feature maps that are easy to simulate |
1939 | | -classically, because then we would not need a quantum computer to |
1940 | | -construct the Kernel. |
1941 | | -</p> |
1942 | | - |
1943 | | -<!-- !split --> |
1944 | | -<h2 id="feature-map" class="anchor">Feature map </h2> |
1945 | | - |
1946 | | -<p>For the feature maps we use the ansatz</p> |
1947 | | -$$ |
1948 | | -\mathcal{U}_{\Phi(x)} = U_{\Phi(x)} \otimes H^{\otimes n}, |
1949 | | -$$ |
1950 | | - |
1951 | | -<p>where</p> |
1952 | | -$$ |
1953 | | -U_{\Phi(x)} = \exp \left( i \sum_{S \in n} \phi_S(x) \prod_{i \in S} Z_i \right), |
1954 | | -$$ |
1955 | | - |
1956 | | -<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 |
1957 | | -\(S \leq 2\) interactions, which means we only let two qubits interact |
1958 | | -at a time. For \(S \leq 2\) the product \(\prod_{i \in S}\) only leads |
1959 | | -to interactions \(Z_i Z_j\) and non interacting terms \(Z_i\). And the |
1960 | | -sum \(\sum_{S \in n}\) over all these terms that are possible with \(n\) |
1961 | | -qubits. |
1962 | | -</p> |
1963 | | - |
1964 | | -<!-- !split --> |
1965 | | -<h2 id="classical-functions" class="anchor">Classical functions </h2> |
1966 | | - |
1967 | | -<p>Finally we define the classical functions \(\phi_i(\vec{x}) = x_i\) and |
1968 | | -\(\phi_{i,j}(\vec{x}) = (\pi - x_i)( \pi- x_j)\). |
1969 | | -</p> |
1970 | | - |
1971 | | -<p>If we write this ansatz for 2 qubits and \(S \leq 2\) we see how it |
1972 | | -simplifies: |
1973 | | -</p> |
1974 | | -$$ |
1975 | | -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). |
1976 | | -$$ |
1977 | | - |
1978 | | -<p>We won't get into details to much here, why we would take this ansatz. |
1979 | | -It is simply an ansatz that is simple enough an leads to good results. |
1980 | | -</p> |
1981 | | - |
1982 | | -<p>Finally we can define a depth of these circuits. Depth 2 means we repeat |
1983 | | -this ansatz two times. Which means our feature map becomes |
1984 | | -\(U_{\Phi(x)} \otimes H^{\otimes n} \otimes U_{\Phi(x)} \otimes H^{\otimes n}\) |
1985 | | -</p> |
1986 | | - |
1987 | 1871 | <!-- !split --> |
1988 | 1872 | <h2 id="plans-for-next-week" class="anchor">Plans for next week </h2> |
1989 | 1873 | <ol> |
|
0 commit comments