{
  "cells": [
    {
      "cell_type": "markdown",
      "id": "b6d1e3ec",
      "metadata": {},
      "source": [
        "---\n",
        "title: \"Lösen Sie das Sherrington-Kirkpatrick-Modell mit dem „ ParityQC -Parity-Twine-Optimizer“\"\n",
        "description: \"Anleitung zur Lösung des Sherrington-Kirkpatrick-Modells mit dem Parity Twine Optimizer\"\n",
        "---\n",
        "\n",
        "{/* cspell:ignore parityqc QOBLIB marketsplit independentset */}\n",
        "\n",
        "<span id=\"solve-the-sherrington-kirkpatrick-model-with-the-parityqc-parity-twine-optimizer\" />\n",
        "\n",
        "# Lösen Sie das Sherrington-Kirkpatrick-Modell mit dem „ ParityQC -Parity-Twine-Optimizer“\n",
        "\n"
      ]
    },
    {
      "attachments": {},
      "cell_type": "markdown",
      "id": "a6f69b77",
      "metadata": {},
      "source": [
        "Geschätzte *Ausführungszeit: 10 Sekunden auf einem Nighthawk- r2 -Prozessor. (HINWEIS: Dies ist lediglich eine Schätzung. (Die Laufzeit kann variieren.)*\n",
        "\n"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "21156b6f",
      "metadata": {},
      "source": [
        "<span id=\"learning-outcomes\" />\n",
        "\n",
        "## Lernziele\n",
        "\n",
        "* Verwenden Sie den Parity Twine Optimizer, um das Sherrington-Kirkpatrick-Modell zu lösen.\n",
        "* Erfahren Sie, welche Optionen für den Parity Twine Optimizer verfügbar sind und welche Ergebnisse ausgegeben werden.\n",
        "\n"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "d185259f257c1618",
      "metadata": {},
      "source": [
        "<span id=\"background\" />\n",
        "\n",
        "## Hintergrund\n",
        "\n",
        "In diesem Tutorial wird gezeigt, wie man das Sherrington-Kirkpatrick-Modell mit dem „Parity Twine Optimizer“ von ParityQC löst.\n",
        "\n",
        "Es enthält Code, mit dem sich das Problem vollständig lokal in einer Form formulieren lässt, die mit dem Parity Twine Optimizer kompatibel ist.\n",
        "\n",
        "<span id=\"the-sherrington-kirkpatrick-model\" />\n",
        "\n",
        "### Das Sherrington-Kirkpatrick-Modell\n",
        "\n",
        "Das Sherrington-Kirkpatrick-Modell (SK-Modell) ist ein grundlegendes Modell der statistischen Mechanik, insbesondere im Rahmen der Untersuchung von Spingläsern. Im Gegensatz zum Standard-Ising-Modell, bei dem sich die Wechselwirkungen in der Regel\n",
        "auf die nächsten Nachbarn beschränken, handelt es sich beim SK-Modell um ein Modell mit unbegrenzter Reichweite, was bedeutet, dass jeder Spin mit jedem anderen Spin im System wechselwirkt. Dies führt zu einer äußerst komplexen, „unebenen“ Energielandschaft, die durch\n",
        "zahlreiche lokale Minima gekennzeichnet ist – ein typisches Merkmal des glasartigen Verhaltens.\n",
        "\n",
        "Das Kernmerkmal des SK-Modells liegt in der Frustration. In dem Modell sind die Wechselwirkungsstärken $J_{ij}$ zwischen den Spins zufällig zwischen positiven und negativen Werten verteilt. Dies führt zu Situationen (zum\n",
        "Beispiel bei dreieckförmigen Anordnungen), in denen die Spins nicht so angeordnet werden können, dass alle Wechselwirkungen gleichzeitig minimiert werden. Da im SK-Modell jeder Spin mit jedem anderen Spin wechselwirkt, verstärkt sich diese Frustration\n",
        "global, was zu einem Geflecht widersprüchlicher Einschränkungen führt.\n",
        "\n",
        "<span id=\"mathematical-formulation\" />\n",
        "\n",
        "### Mathematische Formulierung\n",
        "\n",
        "Der Zustand des Systems wird durch eine Menge von $N$ Ising-Spins definiert, $s_i \\in \\{+1, -1 \\} $. Die Energie einer bestimmten Konfiguration ergibt sich aus dem Hamilton-Operator:\n",
        "\n",
        "$H = - \\sum_{1 \\leq i \\leq j \\leq N} J_{ij} s_i s_j$\n",
        "\n",
        "wobei $J_{ij}$ die Kopplungsstärke zwischen dem Spin $i$ und dem Spin $j$ ist.\n",
        "\n",
        "Im SK-Modell sind die Kopplungen $J_{ij}$ unabhängige und identisch verteilte Zufallsvariablen. Um sicherzustellen, dass die Energie im Verhältnis zu $N$ als\n",
        "$N \\rightarrow \\infty$ groß bleibt, muss die Varianz der Kopplungen mit der Anzahl der Teilchen skalieren:\n",
        "\n",
        "$J_{ij} \\sim \\mathcal{N} \\left( 0, \\frac{J^2}{N} \\right) $\n",
        "\n",
        "Der Grundzustand eines bestimmten $H$ ist die spezifische Konfiguration der Spins ( $s_1, s_2, ...s_n$ ), die die Energie minimiert. Die Bestimmung des Grundzustands ist ein NP-schweres Optimierungsproblem.\n",
        "\n"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "55b94021",
      "metadata": {},
      "source": [
        "<span id=\"requirements\" />\n",
        "\n",
        "## Anforderungen\n",
        "\n",
        "Bevor Sie mit dieser Anleitung beginnen, stellen Sie bitte sicher, dass folgende Komponenten installiert sind:\n",
        "\n",
        "* Qiskit Functions Catalog IBM Client (`pip install qiskit-ibm-catalog`)\n",
        "* Qiskit-Add-on „Optimization Mapper“ (`pip install qiskit_addon_opt_mapper`)\n",
        "* NumPy (`pip install numpy`)\n",
        "\n",
        "Außerdem benötigen Sie die Berechtigung, auf die Twine-Optimizer-Funktion „ ParityQC “ zuzugreifen. Um Zugang zu beantragen, füllen Sie bitte dieses [Formular](https://parityqc.com/products/parity-twine-optimizer/free-trial) aus.\n",
        "\n"
      ]
    },
    {
      "attachments": {},
      "cell_type": "markdown",
      "id": "7db2e559",
      "metadata": {},
      "source": [
        "<span id=\"setup\" />\n",
        "\n",
        "## Einrichtung\n",
        "\n",
        "(Dieser Code setzt voraus, dass Sie [Ihr Konto](/docs/guides/functions-get-started#install-qiskit-functions-catalog-client) bereits in Ihrer lokalen Umgebung gespeichert haben.)\n",
        "\n",
        "Importieren Sie zunächst alle für dieses Tutorial erforderlichen Pakete.\n",
        "\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "id": "bc380c46",
      "metadata": {},
      "outputs": [],
      "source": [
        "import numpy as np\n",
        "\n",
        "from qiskit_ibm_catalog import QiskitFunctionsCatalog"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "6d808e11c0992c07",
      "metadata": {},
      "source": [
        "Laden Sie den „Parity Twine Optimizer“ aus dem Katalog „ Qiskit Functions “:\n",
        "\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "id": "c4a7dc1cbb3d35ff",
      "metadata": {},
      "outputs": [],
      "source": [
        "catalog = QiskitFunctionsCatalog(channel=\"ibm_quantum_platform\")\n",
        "function = catalog.load(\"parityqc/parity-twine-optimizer\")"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "3071bc21ac4f3484",
      "metadata": {},
      "source": [
        "<span id=\"step-1-define-the-problem-as-an-objective-function\" />\n",
        "\n",
        "### Schritt 1: Definieren Sie das Problem als Zielfunktion\n",
        "\n",
        "Anstatt das SK-Problem wie beim [Marktaufteilungsproblem](/docs/tutorials/parity-twine-optimizer-ms) aus einer Bibliothek zu beziehen, formulieren Sie es direkt.\n",
        "\n",
        "Die Funktion `generate_sk_problem` formuliert das SK-Problem direkt im erforderlichen Wörterbuchformat. Die einzige erforderliche Eingabe `n` ist die Anzahl der Drehungen im Modell.\n",
        "\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "id": "d4c3b37d482e4f56",
      "metadata": {},
      "outputs": [],
      "source": [
        "def generate_sk_problem(\n",
        "    n: int,\n",
        "    coupling_mean: float = 0.0,\n",
        "    coupling_std: float = 1.0,\n",
        "    local_fields_mean: float = 0.0,\n",
        "    local_fields_std: float = 0.0,\n",
        "    edge_density: float = 1.0,\n",
        "    ensure_extensivity: bool = False,\n",
        "    seed: int | None = None,\n",
        ") -> dict:\n",
        "    \"\"\"Generate the Sherrington-Kirkpatrick (SK) model with varying\n",
        "     edge density.\n",
        "\n",
        "    Samples couplings and local fields via ``generate_couplings_sk_model``\n",
        "    and assembles the corresponding Ising Hamiltonian\n",
        "\n",
        "        H = -∑_{i<j} J_ij z_i z_j - ∑_i h_i z_i,\n",
        "\n",
        "    where z_i ∈ {-1, +1}.\n",
        "\n",
        "    Args:\n",
        "        n: Number of spins (>= 2).\n",
        "        coupling_mean: Mean coupling before optional SK scaling.\n",
        "        coupling_std: Coupling std before optional SK scaling.\n",
        "        local_fields_mean: Mean longitudinal field.\n",
        "        local_fields_std: Std of the longitudinal fields.\n",
        "        edge_density: Fraction of non-zero couplings, in ``[2/n, 1]``.\n",
        "        ensure_extensivity: Whether to apply the SK 1/n scaling.\n",
        "        seed: random number generator seed.\n",
        "\n",
        "    Returns:\n",
        "        An encoding the SK Hamiltonian.\n",
        "\n",
        "    Raises:\n",
        "        ValueError: If ``n < 2``, ``coupling_std < 0``, ``local_fields_std < 0``,\n",
        "            or ``edge_density`` is outside ``[2/n, 1]``.\n",
        "    \"\"\"\n",
        "    couplings, local_fields = _generate_couplings_sk_model(\n",
        "        n=n,\n",
        "        coupling_mean=coupling_mean,\n",
        "        coupling_std=coupling_std,\n",
        "        local_fields_mean=local_fields_mean,\n",
        "        local_fields_std=local_fields_std,\n",
        "        edge_density=edge_density,\n",
        "        ensure_extensivity=ensure_extensivity,\n",
        "        seed=seed,\n",
        "    )\n",
        "\n",
        "    # Handle quadratic terms: coupling[i, j] * zj[i] * zj[j]\n",
        "    # Only iterate over the upper triangle (i < j)\n",
        "    sk_problem = {\n",
        "        str((i, j)): float(couplings[i, j])\n",
        "        for i in range(n)\n",
        "        for j in range(i + 1, n)\n",
        "        if couplings[i, j] != 0\n",
        "    }\n",
        "\n",
        "    # Handle linear terms: local_fields[i] * zj[i]\n",
        "    sk_problem.update(\n",
        "        {\n",
        "            str((i,)): float(local_fields[i])\n",
        "            for i in range(n)\n",
        "            if local_fields[i] != 0\n",
        "        }\n",
        "    )\n",
        "\n",
        "    return sk_problem"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "c0caec311cb77bf6",
      "metadata": {},
      "source": [
        "Verwenden Sie die Funktion, `_generate_couplings_sk_model` um die zufälligen Kopplungsterme im SK-Modell zu berechnen. Um die Kopplungen besser steuern zu können, können Sie optionale Argumente verwenden, die im Docstring der Funktion erläutert werden.\n",
        "\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "id": "cb32954d63628202",
      "metadata": {},
      "outputs": [],
      "source": [
        "def _generate_couplings_sk_model(\n",
        "    n: int,\n",
        "    coupling_mean: float = 0.0,\n",
        "    coupling_std: float = 1.0,\n",
        "    local_fields_mean: float = 0.0,\n",
        "    local_fields_std: float = 0.0,\n",
        "    edge_density: float = 1.0,\n",
        "    ensure_extensivity: bool = False,\n",
        "    seed: int | None = None,\n",
        ") -> tuple[np.ndarray, np.ndarray]:\n",
        "    \"\"\"Generate random couplings and local fields for an Ising / SK model.\n",
        "\n",
        "    Couplings are Gaussian. With ``ensure_extensivity=True`` they follow the\n",
        "    Sherrington-Kirkpatrick scaling ``J_ij ~ N(coupling_mean/n, coupling_std^2/n)``\n",
        "    (extensive energy, O(n)); otherwise ``J_ij ~ N(coupling_mean, coupling_std^2)``\n",
        "    (energy O(n^2)). Fields are ``h_i ~ N(local_fields_mean, local_fields_std^2)``.\n",
        "\n",
        "    ``edge_density`` sets the fraction of the ``n*(n-1)/2`` possible couplings that\n",
        "    are non-zero (1 = fully dense). The kept edges always include a random spanning\n",
        "    tree, so the interaction graph is guaranteed connected. This requires at least\n",
        "    ``n-1`` edges, so ``edge_density`` must be at least ``2/n``.\n",
        "\n",
        "    Args:\n",
        "        n: Number of spins (>= 2).\n",
        "        coupling_mean: Mean coupling before optional SK scaling.\n",
        "        coupling_std: Coupling std before optional SK scaling.\n",
        "        local_fields_mean: Mean longitudinal field.\n",
        "        local_fields_std: Std of the longitudinal fields.\n",
        "        edge_density: Fraction of non-zero couplings, in ``[2/n, 1]``.\n",
        "        ensure_extensivity: Whether to apply the SK 1/n scaling.\n",
        "        seed: random number generator seed.\n",
        "\n",
        "    Returns:\n",
        "        Tuple ``(couplings, fields)``: a symmetric ``(n, n)`` matrix with zero\n",
        "        diagonal, and an ``(n,)`` field vector.\n",
        "\n",
        "    Raises:\n",
        "        ValueError: If ``n < 2``, ``coupling_std < 0``, ``local_fields_std < 0``,\n",
        "            or ``edge_density`` is outside ``[2/n, 1]``.\n",
        "    \"\"\"\n",
        "    if n < 2:\n",
        "        raise ValueError(f\"n must be >= 2, got {n}\")\n",
        "    if coupling_std < 0 or local_fields_std < 0:\n",
        "        raise ValueError(\n",
        "            \"coupling_std and local_fields_std must be non-negative\"\n",
        "        )\n",
        "\n",
        "    # A connected graph on n nodes needs at least n-1 of the n*(n-1)/2 possible\n",
        "    # edges, so edge_density has a hard lower bound of 2/n.\n",
        "    min_edge_density = 2.0 / n\n",
        "    if not min_edge_density <= edge_density <= 1.0:\n",
        "        raise ValueError(\n",
        "            f\"edge_density must be in [{min_edge_density:.4g}, 1] for n={n} \"\n",
        "            f\"(at least n-1 edges are needed to keep the graph connected), \"\n",
        "            f\"got {edge_density}\"\n",
        "        )\n",
        "\n",
        "    rng = np.random.default_rng(seed)\n",
        "\n",
        "    j_loc, j_scale = (\n",
        "        (coupling_mean / n, coupling_std / np.sqrt(n))\n",
        "        if ensure_extensivity\n",
        "        else (coupling_mean, coupling_std)\n",
        "    )\n",
        "\n",
        "    upper_idx = np.triu_indices(n, k=1)\n",
        "    n_edges = len(upper_idx[0])\n",
        "\n",
        "    # Select which edges are present.\n",
        "    if edge_density < 1.0:\n",
        "        n_keep = int(round(edge_density * n_edges))\n",
        "        # Map each (i, j) node pair to its position in the flat upper-triangle list.\n",
        "        pair_to_flat = {\n",
        "            (int(i), int(j)): idx\n",
        "            for idx, (i, j) in enumerate(\n",
        "                zip(upper_idx[0], upper_idx[1], strict=False)\n",
        "            )\n",
        "        }\n",
        "\n",
        "        # Random spanning tree: node perm[k] links to a random earlier node.\n",
        "        perm = rng.permutation(n)\n",
        "        keep = np.zeros(n_edges, dtype=bool)\n",
        "        for k in range(1, n):\n",
        "            child, parent = perm[k], perm[rng.integers(0, k)]\n",
        "            i, j = min(child, parent), max(child, parent)\n",
        "            keep[pair_to_flat[(int(i), int(j))]] = True\n",
        "\n",
        "        # Fill the remaining budget with random non-tree edges.\n",
        "        remaining = n_keep - (n - 1)\n",
        "        if remaining > 0:\n",
        "            keep[\n",
        "                rng.choice(\n",
        "                    np.flatnonzero(~keep), size=remaining, replace=False\n",
        "                )\n",
        "            ] = True\n",
        "    else:\n",
        "        keep = np.ones(n_edges, dtype=bool)\n",
        "\n",
        "    n_present = int(keep.sum())\n",
        "    if j_scale == 0.0:\n",
        "        vals = np.full(n_present, j_loc)\n",
        "    else:\n",
        "        vals = rng.normal(loc=j_loc, scale=j_scale, size=n_present)\n",
        "\n",
        "    couplings = np.zeros((n, n))\n",
        "    couplings[upper_idx[0][keep], upper_idx[1][keep]] = vals\n",
        "    couplings += couplings.T  # symmetrize; diagonal stays zero\n",
        "\n",
        "    fields = (\n",
        "        np.full(n, local_fields_mean)\n",
        "        if local_fields_std == 0.0\n",
        "        else rng.normal(loc=local_fields_mean, scale=local_fields_std, size=n)\n",
        "    )\n",
        "\n",
        "    return couplings, fields"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "cbc412ce550b1e6c",
      "metadata": {},
      "source": [
        "<span id=\"step-2-solve-the-problem-using-the-parity-twine-optimizer\" />\n",
        "\n",
        "### Schritt 2: Lösen Sie das Problem mit dem „Parity Twine Optimizer“\n",
        "\n",
        "Mit den oben genannten Funktionen können Sie das SK-Problem formulieren und mithilfe des Twine-Optimierers sowie eines ausgewählten Backends unter IBM Quantum® eine Lösung finden.\n",
        "\n",
        "Um die Funktion auszuführen, wählen Sie ein geeignetes Backend aus, zum Beispiel „ibm\\_phoenix“.\n",
        "\n",
        "Optional können Sie Optionen nutzen, um die Übermittlung genauer zu steuern:\n",
        "\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "id": "9dcece43ce7ad415",
      "metadata": {},
      "outputs": [],
      "source": [
        "options = {\n",
        "    \"shots\": 100000,\n",
        "    \"postprocessing_level\": 1,\n",
        "    \"transpile_only\": False,\n",
        "    \"job_tags\": [\"sk\"],\n",
        "}"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "f5f18f4df42cb260",
      "metadata": {},
      "source": [
        "wobei eine ganze Zahl ist `shots` , die die Anzahl der Schaltkreisaufrufe angibt, `postprocessing_level` festlegt, ob das Ergebnis einer Nachbearbeitung unterzogen wird,\n",
        "`transpile_only` bestimmt, ob das Problem lediglich in einen Schaltkreis transpiliert (und nicht gelöst) wird, und eine Kennung zur Identifizierung des Auftrags auf IBM Quantum Platform `job_tags` ist.\n",
        "\n",
        "Die Größe des SK-Modells wird durch $N$ definiert, die Anzahl der miteinander wechselwirkenden Spins. Sobald Sie „ $N$ “ auswählen, generiert der obige Code die Aufgabe für `n_spins`.\n",
        "\n",
        "Führen Sie den Optimierer aus:\n",
        "\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "id": "d36e4ab4ca0a4a08",
      "metadata": {},
      "outputs": [],
      "source": [
        "n_spins = 50\n",
        "sk_problem = generate_sk_problem(n_spins)\n",
        "\n",
        "function_job = function.run(\n",
        "    problem=sk_problem,\n",
        "    variable_type=\"spin\",\n",
        "    backend_name=\"ibm_phoenix\",\n",
        "    options=options,\n",
        ")\n",
        "print(f\"Job ID: {function_job.job_id}\")"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "8d4d7fd9e9fa2448",
      "metadata": {},
      "source": [
        "Überprüfen Sie den Auftragsstatus:\n",
        "\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "id": "c42621d5cdc6b25",
      "metadata": {},
      "outputs": [],
      "source": [
        "# Monitor the job status\n",
        "function_job.status()"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "a9ec094ef5bcdac2",
      "metadata": {},
      "source": [
        "Ergebnisse abrufen:\n",
        "\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "id": "c10e7dd2b49e7e36",
      "metadata": {},
      "outputs": [],
      "source": [
        "result = function_job.result()\n",
        "\n",
        "result"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "d993123e6787e5af",
      "metadata": {},
      "source": [
        "Das Ergebnis hat folgende Form:\n",
        "\n",
        "```\n",
        "{\n",
        "    'solution': {'0': 1, '1': 1, '10': 1, '11': 1, ... },\n",
        "    'objective_value':  -240.5425312543882,\n",
        "    'solution_bitstring': '00001101110100100111001110101001101111111011001110',\n",
        "    'metadata': {\n",
        "        'circuit_metrics': {\n",
        "            'depth': 523,\n",
        "            'gate_count': 10118,\n",
        "            'two_qubit_gate_depth': 196,\n",
        "            'two_qubit_gate_count': 2499,\n",
        "            'num_qubits': 50,\n",
        "            'operations': {'sx': 3353, 'rz': 3320, 'cz': 2499, 'delay': 894, 'measure': 50, 'x': 2},\n",
        "        },\n",
        "        'solver_info': {\n",
        "            'variable_mapping': {'0': 0, '1': 1, '10': 2, '11': 3, ... },\n",
        "            'bitstring_distributions': {\n",
        "                'before_postprocessing': {'011101110010110111001110011000': 1, ... },\n",
        "                'after_postprocessing': {'011011110000110101001111011000': 1, ... }\n",
        "            },\n",
        "            'best_parameters': {\n",
        "                'beta': [-0.4602084830507902],\n",
        "                'gamma': [1.8500357096574955]\n",
        "            }\n",
        "        },\n",
        "        'resource_usage': {\n",
        "            'RUNNING: MAPPING': {'CPU_TIME': 290.272},\n",
        "            'RUNNING: OPTIMIZING_FOR_HARDWARE': {'CPU_TIME': 0.494},\n",
        "            'RUNNING: WAITING_FOR_QPU': {'CPU_TIME': 8.775},\n",
        "            'RUNNING: EXECUTING_QPU': {'QPU_TIME': 31.0},\n",
        "            'RUNNING: POST_PROCESSING': {'CPU_TIME': 162.96},\n",
        "        },\n",
        "    }\n",
        "}\n",
        "```\n",
        "\n",
        "wobei das Wörterbuch `solution` den in der Aufgabe definierten Qubits entspricht und deren optimierte Spinwerte für den Hamilton-Operator des SK-Modells angibt.\n",
        "Diese spezifische Abfolge von Spins in der optimalen Lösung stellt die Konfiguration dar, die die Gesamtenergie des Systems auf der Grundlage der gegebenen zufälligen Wechselwirkungsstärken minimiert.\n",
        "Im SK-Modell kann dies als der Zustand mit der niedrigsten Energie eines ungeordneten magnetischen Systems betrachtet werden.\n",
        "\n",
        "`metadata` liefert Informationen zur Transpilierung (Anzahl der 2-Qubit-Gatter/Tiefe, verwendete Gatter, aktive Qubits) sowie zu verschiedenen Laufzeiten.\n",
        "\n"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "2cb5785c",
      "metadata": {},
      "source": [
        "<span id=\"next-steps\" />\n",
        "\n",
        "## Nächste Schritte\n",
        "\n",
        "<Admonition type=\"tip\" title=\"Empfehlungen\">\n",
        "  * Beantragen Sie den Zugriff auf die Funktion, indem Sie dieses [Formular](https://parityqc.com/products/parity-twine-optimizer/free-trial) ausfüllen.\n",
        "  * Rufen Sie die [API-Referenz](/docs/api/functions/parity-twine-optimizer) für diese Qiskit-Funktion auf.\n",
        "  * Lies die [Anleitung](/docs/guides/parity-twine-optimizer).\n",
        "  * Probieren Sie das [Tutorial](/docs/tutorials/parity-twine-optimizer-ms) zur Anwendung des „Parity Twine Optimizer“ auf das Marktaufteilungsproblem aus.\n",
        "  * Lesen Sie den Preprint [„Connectivity-aware Synthesis of Quantum Algorithms“ von Drier et al. (2025)](https://arxiv.org/abs/2501.14020) unter ArXiv.\n",
        "</Admonition>\n",
        "\n"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "id": "a1b8767d",
      "source": "© IBM Corp., 2017-2026"
    }
  ],
  "metadata": {
    "kernelspec": {
      "display_name": "Python 3",
      "language": "python",
      "name": "python3"
    },
    "language_info": {
      "codemirror_mode": {
        "name": "ipython",
        "version": 3
      },
      "file_extension": ".py",
      "mimetype": "text/x-python",
      "name": "python",
      "nbconvert_exporter": "python",
      "pygments_lexer": "ipython3",
      "version": "3"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 5
}