Skip to main content
Glama
Jij-Inc

Jij MCP Server

Official
by Jij-Inc

qiskit_tutorial

Access Qiskit tutorials from the IBM Quantum Learning Hub to explore quantum computing concepts. Retrieve tutorial content in Markdown format or fetch the table of contents for available topics.

Instructions

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tutorial_nameYes

Implementation Reference

  • Implementation of the qiskit_tutorial tool handler. This async function fetches Qiskit tutorials from the IBM Quantum Learning Hub by constructing the appropriate URL based on the tutorial_name (use 'toc' for table of contents) and converting the content to Markdown using fetch_as_markdown.
    @mcp.tool() async def qiskit_tutorial(tutorial_name: str) -> str: """ 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. """ if tutorial_name == "toc": url = "https://learning.quantum.ibm.com/catalog/tutorials" else: url = f"https://learning.quantum.ibm.com/tutorial/{tutorial_name}" response: FetchResponse = await fetch_as_markdown(url) if response.isError: return response.errorMessage if response.errorMessage else "Error fetching the content" if tutorial_name == "toc": # If the tutorial name is "toc", return the table of contents return url + "\n" + response.content[0]["text"] + "\n\n" + "Please specify the tutorial name in lowercase and hyphenated (e.g., 'variational-quantum-eigensolver')." else: return url + "\n" + response.content[0]["text"]
  • The @mcp.tool() decorator registers the qiskit_tutorial function as an MCP tool.
    @mcp.tool()
  • Input schema: tutorial_name (str). Output: str. Defined by type hints and docstring.
    async def qiskit_tutorial(tutorial_name: str) -> str: """ 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. """

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Jij-Inc/Jij-MCP-Server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server