Summary
Please add support for XQMXDomain.DISCRETE in the XQCP layer.
Motivation
I am using XQCP to formulate a portfolio-rebalancing optimisation problem. Each asset has a bounded discrete portfolio weight, such as an integer value from 0 to SCALE, rather than only a binary decision.
Currently, I need to encode each weight using multiple binary variables. Binary or thermometer encoding increases the number of variables and QUBO interactions significantly, especially when the portfolio contains many assets.
Direct discrete-variable support would allow the portfolio model to represent one discrete weight variable per asset more naturally and efficiently.
Intended usage
Conceptually, I would like to be able to define a model similar to:
from xqcp import Problem
from xqvm_py import XQMXDomain
problem = Problem("PortfolioRebalancing")
problem.define_model(
size=number_of_assets,
domain=XQMXDomain.DISCRETE,
)
The discrete variables would need either:
- An integer range, such as
0..SCALE; or
- An explicitly supplied set of permitted values.
For the portfolio model, the weights would also be constrained to sum to SCALE.
Desired behaviour
It would be helpful if XQCP could:
- Compile models using
XQMXDomain.DISCRETE.
- Allow the permitted range or values to be specified.
- Generate appropriate encoder, verifier and decoder programs.
- Pass the resulting discrete model to compatible XQSA solver backends.
- Include a small example demonstrating discrete variables.
I am happy to test an implementation branch using my portfolio-rebalancing model and report any problems.
Summary
Please add support for
XQMXDomain.DISCRETEin the XQCP layer.Motivation
I am using XQCP to formulate a portfolio-rebalancing optimisation problem. Each asset has a bounded discrete portfolio weight, such as an integer value from
0toSCALE, rather than only a binary decision.Currently, I need to encode each weight using multiple binary variables. Binary or thermometer encoding increases the number of variables and QUBO interactions significantly, especially when the portfolio contains many assets.
Direct discrete-variable support would allow the portfolio model to represent one discrete weight variable per asset more naturally and efficiently.
Intended usage
Conceptually, I would like to be able to define a model similar to:
The discrete variables would need either:
0..SCALE; orFor the portfolio model, the weights would also be constrained to sum to
SCALE.Desired behaviour
It would be helpful if XQCP could:
XQMXDomain.DISCRETE.I am happy to test an implementation branch using my portfolio-rebalancing model and report any problems.