common.title

Docs
Quantum Circuit
TYTAN CLOUD

QUANTUM GAMING


Overview
Contact
Event
Project
Research

Terms of service (Web service)

Terms of service (Quantum and ML Cloud service)

Privacy policy


Sign in
Sign up
common.title

A prototype of the new solver, HOBO solver "hobotan," is now available.

Yuichiro Minato

2024/07/26 05:04

A prototype of the new solver, HOBO solver "hobotan," is now available.

We have created a new solver with volunteers on Discord.

We are extending QUBO to HOBO.

We are working on integrating it into the QUBO annealing compatible library TYTAN.

A prototype is available at https://github.com/ShoyaYasuda/hobotan.

You can try it with limited functionality, so please give us your feedback.

pip install -U git+https://github.com/ShoyaYasuda/hobotan

import numpy as np

from hobotan import *

"""
Only supports 1-dimensional arrays; [4, 4] is not allowed.
Only supports symbols named 'q'.
"""
q = symbols_list(5, 'q{}')

print(q)

"""
Expressions are probably OK with any number of terms.
"""
H = (q[0] + q[1] + q[2] + q[3] + q[4] - 5)**2 - 20*q[1]*q[2] - 10*q[1]*q[2]*q[3] + 5*q[1]*q[2]*q[3]*q[4]

Compile to HOBO tensor

hobo, offset = Compile(H).get_hobo()
print(offset)

print(hobo)

Select sampler (random seed fixed)

solver = sampler.SASampler(seed=0)

Sampling (100 times)

result = solver.run(hobo, shots=100)

Results

for r in result:
  print(r)
  arr, subs = Auto_array(r[0]).get_ndarray('q{}')
  print(arr)

© 2025, blueqat Inc. All rights reserved