Skip to content

Commit

Permalink
Merge pull request #18 from oqtopus-team/docs/buildin-types
Browse files Browse the repository at this point in the history
docs: add explanations of build-in types
  • Loading branch information
snuffkin authored Dec 21, 2024
2 parents 1f79341 + c70b95e commit 9ff5b15
Showing 1 changed file with 33 additions and 7 deletions.
40 changes: 33 additions & 7 deletions docs/usage/how_it_works.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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)."
]
},
{
Expand All @@ -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",
Expand Down Expand Up @@ -206,11 +209,6 @@
"| `\"qiskit\"` | Transpile quantum circuits using Qiskit. |"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -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": {
Expand Down

0 comments on commit 9ff5b15

Please sign in to comment.