Skip to content
Back to Academy

Quantum Optimization Quickstart

Run your first quantum optimization in a few lines of Python, on IBM Quantum with Iskay or on the Kipu Quantum Hub with Miray. Copy the code and follow along.

TutorialBeginner~15 min

Combinatorial optimization is where quantum hardware is useful today. Kipu Quantum’s BF-DCQO engine encodes your objective directly as a higher-order binary problem (HUBO), so you spend qubits on variables, not on reducing higher-order terms to pairwise ones. The same engine ships two ways: as Iskay, a first-class Qiskit Function on the IBM Quantum Platform, and as Miray on the Kipu Quantum Hub, which also targets IonQ, Rigetti, and QuEra.

This is the first tutorial on Kipu Academy. More are on the way, each pairing a hands-on walkthrough with code you can copy and a notebook you can run.

1. Connect

Load Iskay as a Qiskit Function, or point the Hub client at the Miray service endpoint.

2. Define a HUBO

Express your objective as binary variables with linear, quadratic, and higher-order terms.

3. Run and read the solution

Submit, let Kipu manage encoding and post-processing, and read back the optimal bitstring.

The code

Same objective, two entry points. Switch tabs to compare the Iskay and Miray calls.

iskay_quickstart.py
from qiskit_ibm_catalog import QiskitFunctionsCatalog  # pip install qiskit-ibm-catalog

catalog = QiskitFunctionsCatalog(
    token=IBM_TOKEN, channel="ibm_quantum_platform", instance=INSTANCE_CRN,
)
iskay = catalog.load("kipu-quantum/iskay-quantum-optimizer")

# Objective as a QUBO/HUBO. Higher-order terms are native.
hubo = {
    "()": 0.0,          # constant
    "(0,)": -1.0,       # linear
    "(1,)": -1.0,
    "(0, 1)": 2.0,      # quadratic (QUBO)
    "(0, 1, 2)": -1.5,  # cubic (HUBO), no extra qubits
}

job = iskay.run(
    problem=hubo,
    problem_type="binary",
    instance=INSTANCE_CRN,
    backend_name="ibm_fez",
    options={"shots": 100, "num_iterations": 3},
)

result = job.result()
print(result["solution_info"]["cost"], result["solution"])

The solver needs credentials before it runs. For Miray on the Hub, the Quickstart walks you through account setup, the Service SDK documents HubServiceClient, and access tokens issues your access_key_id and secret_access_key. For Iskay, load it as a Qiskit Function with your IBM Quantum Platform token and instance CRN.

Run it on the Kipu Hub

The Miray path runs on the Kipu Quantum Hub: create a free account, grab your service keys, and submit the same HUBO in minutes.