-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
Describe the issue
If tesseract_decoder is imported before import highspy we get a segfault.
This affects anyone using both tesseract_decoder for QEC decoding and highspy/cvxpy for optimization in the same Python session.
What version of the software are you using?
0.1.1.dev20260202233842
How can the issue be reproduced?
# Import tesseract_decoder FIRST
from tesseract_decoder import tesseract # or: import tesseract_decoder
# Then use cvxpy with HiGHS solver
import cvxpy as cp
import numpy as np
x = cp.Variable(3)
A = np.array([[1.0, 2.0, 3.0]])
b = np.array([6.0])
prob = cp.Problem(cp.Minimize(cp.norm1(x)), [A @ x == b])
prob.solve(solver=cp.HIGHS, verbose=False) # SEGFAULT (exit code 139)
Note: If the import order is reversed (HiGHS used before importing tesseract_decoder), it works:
# This order works fine
import cvxpy as cp
import numpy as np
x = cp.Variable(3)
prob = cp.Problem(cp.Minimize(cp.norm1(x)), [np.array([[1,2,3]]) @ x == 6])
prob.solve(solver=cp.HIGHS) # Worksfrom tesseract_decoder import tesseract # Now safe to import
Environment
- tesseract_decoder: 0.1.1.dev20260202233842 (latest as of Feb 2026)
- highspy: 1.12.0
- cvxpy: 1.6.0
- Platform: macOS 15.3 ARM64 (Apple Silicon)
- Python: 3.13
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels