From c70b95eaea9ffdea819d75af56523b88062662de Mon Sep 17 00:00:00 2001 From: snuffkin Date: Sat, 21 Dec 2024 14:25:23 +0900 Subject: [PATCH] docs: add explanations of build-in types --- docs/usage/how_it_works.ipynb | 40 +++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 7 deletions(-) diff --git a/docs/usage/how_it_works.ipynb b/docs/usage/how_it_works.ipynb index cfa5b26..1b26621 100644 --- a/docs/usage/how_it_works.ipynb +++ b/docs/usage/how_it_works.ipynb @@ -150,7 +150,7 @@ "For details on the built-in components, refer to [Built-in Components](#built-in-components).\n", "\n", "Furthermore, you can set custom transpilers, custom programs, and custom devices that you have created.\n", - "For details on how to create and use custom options, refer to [Using Custom Transpilers and Converters](/usage/custom)." + "For details on how to create and use custom options, refer to [Using Custom Transpilers and Converters](../custom)." ] }, { @@ -164,14 +164,17 @@ "### Step 1: Fetch the transpiler library\n", "The transpilers available in Tranqu are registered in the `TranspilerManager` class. \n", "Using the `transpiler_lib` argument, the appropriate transpiler library is fetched from the `TranspilerManager`.\n", + "If the `default_transpiler_lib` is set, the `transpiler_lib` argument can be omitted.\n", "\n", "### Step 2: Fetch the `ProgramConverter`\n", "Tranqu uses the `ProgramConverter` class to convert the format of the input program. \n", "To transform the input program into a format that can be processed by the specified transpiler, the appropriate `ProgramConverter` is fetched from the `ProgramConverterManager` class using the `program_lib` and `transpiler_lib` arguments.\n", + "If the `program_type` is set, the `program_lib` argument can be omitted.\n", "\n", "### Step 3: Fetch the `DeviceConverter`\n", "Tranqu uses the `DeviceConverter` class to convert the format of the input device information. \n", "To transform the input device information into a format that can be processed by the specified transpiler, the appropriate `DeviceConverter` is fetched from the `DeviceConverterManager` class using the `device_lib` and `transpiler_lib` arguments. \n", + "If the `device_type` is set, the `device_lib` argument can be omitted.\n", "\n", "If `device_lib` is not set, this step is skipped.\n", "\n", @@ -206,11 +209,6 @@ "| `\"qiskit\"` | Transpile quantum circuits using Qiskit. |" ] }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - }, { "cell_type": "markdown", "metadata": {}, @@ -241,7 +239,35 @@ { "cell_type": "markdown", "metadata": {}, - "source": [] + "source": [ + "## Built-in types\n", + "\n", + "When `Tranqu` class is instantiated, it automatically registers `program_type`, and `device_type` to their respective Managers. \n", + "These components are referred to as \"built-in types.\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Table 4: Built-in `program_type`\n", + "\n", + "| Program Library | Type |\n", + "|-----------------|-------------------------|\n", + "| `\"qiskit\"` | `qiskit.QuantumCircuit` |\n", + "| `\"tket\"` | `pytket.Circuit` |\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Table 5: Built-in `device_type`\n", + "\n", + "| Device Library | Type |\n", + "|----------------|------------------------------|\n", + "| `\"qiskit\"` | `qiskit.providers.BackendV2` |" + ] } ], "metadata": {