Create a :class:`Kernel`: An empty kernel function to be used for quantum program construction. This kernel is non-parameterized if it accepts no arguments, else takes the provided types as arguments. Returns a kernel if it is non-parameterized, else a tuple containing the
(*args)
| 1902 | |
| 1903 | |
| 1904 | def make_kernel(*args): |
| 1905 | """ |
| 1906 | Create a :class:`Kernel`: An empty kernel function to be used for quantum |
| 1907 | program construction. This kernel is non-parameterized if it accepts no |
| 1908 | arguments, else takes the provided types as arguments. |
| 1909 | |
| 1910 | Returns a kernel if it is non-parameterized, else a tuple containing the |
| 1911 | kernel and a :class:`QuakeValue` for each kernel argument. |
| 1912 | |
| 1913 | .. code-block:: python |
| 1914 | |
| 1915 | # Example: |
| 1916 | # Non-parameterized kernel. |
| 1917 | kernel = cudaq.make_kernel() |
| 1918 | |
| 1919 | # Example: |
| 1920 | # Parameterized kernel that accepts an `int` and `float` as arguments. |
| 1921 | kernel, int_value, float_value = cudaq.make_kernel(int, float) |
| 1922 | """ |
| 1923 | |
| 1924 | kernel = PyKernel([*args]) |
| 1925 | if len([*args]) == 0: |
| 1926 | return kernel |
| 1927 | |
| 1928 | return kernel, *kernel.arguments |
| 1929 | |
| 1930 | |
| 1931 | def isa_dynamic_kernel(object): |