Appearance
Tutorial: Quantum Application Development with Kipu Quantum Hub MCP Server
In this tutorial, you will learn how to develop quantum services using the Kipu Quantum Hub MCP server. You will learn how to use the MCP server to:
- Find suitable use cases that match your business domain and objectives
- Discover relevant quantum services on the Kipu Quantum Hub
- Implement quantum applications using the identified services and use cases
- Test your implementation locally
- Deploy your service to Kipu Quantum Hub
In this tutorial, we use the airline industry as an example business domain.
Prerequisites
- PLANQK CLI installed (see CLI installation guide)
- Access to Kipu Quantum Hub (sign up at https://hub.kipu-quantum.com)
- Personal Access Token for Kipu Quantum Hub
- AI coding assistant that supports MCP servers (e.g., Claude Code, GitHub Copilot, etc.). We will use Claude Code in this tutorial, but feel free to use any AI coding assistant that supports MCP servers
1. Setup
We will use the PLANQK CLI to set up a new Python Starter project for the Kipu Quantum Hub.
Create a New Project
Create a new project using the following command:
bash
planqk initYou will be prompted to provide some information about your project. For this tutorial, select:
- Service name: Choose a meaningful name (e.g.,
airline-optimization-service) - Starter template:
Python Starter - vCPU configuration:
1 vCPU - Memory configuration:
1GB
This will create a new directory containing all required files to run your quantum code on Kipu Quantum Hub.
Configure the MCP Server
Once the project is created, add the Kipu Quantum Hub MCP server to your AI coding assistant.
For Claude Code users: The project is already set up with a .mcp.json file in your project directory. Update the file with your personal access token:
json
{
"mcpServers": {
"kipu-quantum-hub": {
"command": "uvx",
"args": [
"kipu-quantum-hub-mcp"
],
"env": {
"KIPU_ACCESS_TOKEN": "<YOUR_PERSONAL_ACCESS_TOKEN>"
}
}
}
}For other AI coding assistants: Please refer to the documentation of your AI coding assistant on how to add MCP servers. See the MCP Server documentation for more details.
2. Identifying Relevant Use Cases
Once everything is set up, you can start by asking your AI coding assistant to help you identify relevant use cases for quantum computing.
The MCP server provides access to the Kipu Quantum Hub's use case repository, which contains industry-specific quantum computing applications.
Example Prompt
Ask your AI coding assistant:
What are some relevant use cases for quantum computing in the airline industry? Please provide a list of use cases along with a brief description of each.
Your AI assistant will query the Kipu Quantum Hub MCP server and return relevant use cases. For example:
Based on my search of the Kipu Quantum Hub platform, here are relevant quantum computing use cases for the airline industry:
Multi-Aircraft Routing Finding collision-free routes for multiple aircraft with defined start and destination locations. Aircraft move through a predefined grid structure to avoid conflicts. Application: Air traffic management, flight path optimization Method: Quantum annealing approaches
Single Vehicle Routing Pathfinding along grid points from start to destination using quantum annealing algorithms. Application: Individual flight route optimization, ground vehicle routing at airports Method: Quantum annealing
Review the use cases and select the one that best aligns with your business objectives. For this tutorial, we'll focus on the Multi-Aircraft Routing use case.
3. Discovering Quantum Services
Now that we've selected the **Multi-Aircraft Routing ** use case, we need to find quantum services on the Kipu Quantum Hub that can solve this type of problem.
The MCP server enables your AI assistant to search through available services and understand their capabilities.
Example Prompt
Ask your AI coding assistant with a use case-specific prompt:
For the Multi-Aircraft Routing use case, find quantum services offered by Kipu Quantum on the Kipu Quantum Hub that are suitable for solving this routing optimization problem. Please provide a list of services along with their descriptions and capabilities.
Your AI assistant will search the Kipu Quantum Hub marketplace and return relevant services that can handle routing optimization problems. Here are some example services it might find:
Based on the Multi-Aircraft Routing use case, here are some relevant quantum services available on the Kipu Quantum Hub:
Illay Base Quantum Optimizer (FREE):
Free quantum optimizer using DCQO (Digitized Counterdiabatic Quantum Optimization) on IBM Aer simulator.Miray Advanced Quantum Optimizer (PREMIUM):
Cutting-edge bias field quantum optimization running on actual IBM quantum hardware. Uses the bf-DCQO (bias-field Digitized Counterdiabatic Quantum Optimization) algorithm for production-scale problems.All services accept QUBO/Ising problem formulations, which is the standard format for encoding the Multi-Aircraft Routing constraints (collision avoidance, time-based routing, path optimization) as described in the use case documentation.
The AI assistant can also provide details about:
- Service input/output formats
- Supported quantum backends and hardware
- Pricing information
- Documentation and code examples
- How the service maps to the Multi-Aircraft Routing problem
4. Implementing Quantum Applications
Now that you have identified a use case and discovered relevant services, it's time to implement your quantum application.
Your AI coding assistant can help you write the code that integrates with the selected quantum service.
Example Prompt
For the Air Traffic Management use case, you might prompt:
Help me implement a managed service for the Kipu Quantum Hub that uses the Illay Base Quantum Optimizer to solve an air traffic management problem. Implement a small example 5 flight routes with some intersections. Ensure that it is feasible to be solved with the Iskay Base Quantum Optimizer. The following constraints must be considered:
- Minimize the number of vertical corridors used
- Intersecting routes cannot share the same corridor.
- Minimize total distance, fuel consumption, or time based on corridor assignments Please use the service we found earlier and implement the encoding, execution, and decoding steps. For implementation use the project we are currently in.
What Your AI Assistant Will Do
Your AI assistant will:
- Analyze the service API: Understand the input/output format required by the service
- Write the encoding logic: Convert your problem (flight routes, intersections) into a format the quantum service accepts
- Implement service execution: Use the PLANQK SDK or HTTP API to execute the service
- Write the decoding logic: Convert the quantum solution back into flight corridor assignments
- Add error handling: Ensure robust execution with proper exception handling
Working Collaboratively with Your AI Assistant
As you implement your application:
- Ask the AI assistant to explain the quantum service's input format
- Request help with data transformations
- Ask for code improvements and optimizations
- Get assistance with debugging and error handling
The AI assistant has access to the service documentation through the MCP server, so it can provide accurate, up-to-date implementation guidance.
5. Testing Locally
Before deploying your service to Kipu Quantum Hub, test it locally to ensure it works correctly.
Install Dependencies
First, navigate to your project directory and install the required dependencies:
bash
cd airline-optimization-serviceCreate a virtual environment and install dependencies:
bash
# Using uv (recommended)
uv venv
uv sync
source .venv/bin/activate
# Or using pip
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtTest Using Python Directly
Run your service directly with Python:
bash
python -m srcThis will execute your service with the default input data defined in input/data.json and input/params.json.
Test Using the PLANQK CLI
For a more realistic test that simulates the platform environment, use the PLANQK CLI:
bash
planqk serveThis starts a local server on http://localhost:8081. Once the server is operational, you can access http://localhost:8081/docs. This interface provides you the ability to run your current code and see the results. Further information can be found in the PLANQK CLI reference.
Get Help from Your AI Assistant
If you encounter errors during testing, ask your AI assistant for help:
I'm getting an error when testing my service locally: [paste error message]. Can you help me debug this?
Your AI assistant can analyze the error, check service documentation via the MCP server, and suggest fixes.
6. Deploying to Kipu Quantum Hub
Once you have tested your service locally and verified it works correctly, deploy it to Kipu Quantum Hub.
Deploy Using the CLI
From your project directory, run:
bash
planqk upThis command will:
- Package your project (respecting
.planqkignoreexclusions) - Upload it to Kipu Quantum Hub
- Trigger the containerization process
- Create a managed service
After successful deployment, you will see a message with the service URL.
Verify Your Deployment
- Navigate to the Services page on Kipu Quantum Hub
- Find your newly created service in the list
- Click on it to view the service details
- Wait for the containerization to complete (status will change to "RUNNING")
Execute Your Deployed Service
Execute your service using the CLI:
bash
planqk runThis will:
- Use the input data from
input/data.jsonandinput/params.json - Execute the service on Kipu Quantum Hub
- Display the execution status and result
Next Steps
Congratulations! You have successfully:
- Identified quantum computing use cases for your domain using the MCP server
- Discovered relevant quantum services on Kipu Quantum Hub
- Implemented a quantum application with AI assistance
- Tested your implementation locally
- Deployed your service to Kipu Quantum Hub

