LiftedSDPProblem<Formulation, Solver> is the common C++ template for explicit semidefinite relaxations of D=1 QCQPs. Python exposes its two MOSEK-backed specializations as MosekMonolithicSDP and MosekChordalSDP.
import gtsamShared relaxation and recovery contract¶
Both specializations lift quadratic terms in to linear trace terms in . They share the same public lifecycle:
construction from
QcqpProblem;solve()plus status, objective, and timing queries;functional
qcqpValues()andvariableEVRs()recovery queries;ordered QCQP keys and dimensions.
The monolithic formulation owns one PSD cone. The chordal formulation owns overlapping clique cones built from a symbolic Bayes tree. The formulation and solver tags are compile-time C++ details; Python uses the concrete class names below.
classes = ["MosekMonolithicSDP", "MosekChordalSDP", "ChordalOrderingType"]
for name in classes:
print(f"{name}: {'available' if hasattr(gtsam, name) else 'not in this build'}")MosekMonolithicSDP: available
MosekChordalSDP: available
ChordalOrderingType: available
Choosing a formulation¶
Use MosekMonolithicSDP as the simplest reference formulation and for small dense problems. Use MosekChordalSDP when factor-graph sparsity produces clique cones substantially smaller than the full lifted matrix. Both require GTSAM to be built with MOSEK and a valid license.
See MosekMonolithicSDP and MosekChordalSDP for complete Python solves and typed Pose recovery. For the solver-independent low-rank route, see RiemannianStaircaseOptimizer.