learn_jijmodeling | Provide a guide to JijModeling.
Returns:
str: The guide to JijModeling. |
jm_check | Check the code for JijModeling rules.
Args:
code (str): The code to check.
Returns:
dict: The result of the check. |
qiskit_v0tov1v2_migration_guide | AI models are likely trained on Qiskit v0.x and may not be familiar with v1 and v2.
Therefore, it is necessary to provide a migration guide from v1 to v2.
Please refer to this guide first when writing Qiskit code.
Returns:
str: The migration guide content. |
qiskit_v1_api_reference_toc | Fetch the Qiskit v1 API reference table of contents (https://docs.quantum.ibm.com/api/qiskit/1.4).
Returns:
str: The table of contents in Markdown format. |
qiskit_v2_api_reference_toc | Fetch the Qiskit v2 (latest) API reference table of contents (https://docs.quantum.ibm.com/api/qiskit).
Returns:
str: The table of contents in Markdown format. |
qiskit_tutorial | Fetch a Qiskit tutorial from the IBM Quantum Learning Hub.
First, get the table of contents (toc) and check the tutorial names.
Tutorial names should be specified in lowercase with hyphens (e.g., "variational-quantum-eigensolver", "quantum-approximate-optimization-algorithm").
If the tutorial name is not found, it will return an error message.
Args:
tutorial_name (str): The name of the tutorial to fetch. Use "toc" for the table of contents.
If the tutorial name is not found, it will return an error message.
tutorial_name should be in lowercase and hyphenated (e.g., "variational-quantum-eigensolver", "quantum-approximate-optimization-algorithm").
Returns:
str: The tutorial content in Markdown format. |
qiskit_code_static_check | Check the provided Qiskit code for static analysis.
This function runs the code in a temporary virtual environment with the specified Qiskit version.
AI models are likely trained on Qiskit v0 and may not be familiar with v1 or v2.
Therefore, we perform static analysis by running AI-generated code on v1 or v2.
Errors will occur if the code uses modules or functions that are no longer supported.
In such cases, please refer to the v1 or v2 migration guide or similar tutorials.
Use v2 unless you have a specific reason not to.
If you need other dependencies like qiskit-ibm-runtime or qiskit-aer, please specify them as a list in other_dependencies.
Args:
code (str): AI-generated Qiskit code to check.
qiskit_version (typ.Literal["v1", "v2"]): The Qiskit version to use for checking the code.
other_dependencies (typ.Optional[list[str]], optional): List of other dependencies to include. Defaults to None.
Returns:
dict: The result of the static analysis, including any errors or warnings. |
fetch_as_markdown | Fetch a website, convert its HTML content to Markdown, and return it.
Args:
url (str): URL of the website to fetch.
headers (Optional[dict[str, str]]): Custom headers for the request.
Returns:
FetchResponse: An object containing the Markdown content or an error message.
On success, isError is false and content contains the Markdown text.
On failure, isError is true and errorMessage contains the error details. |