Inspiration

Most small businesses don't fail because they're unprofitable on paper — they fail because cash arrives and leaves at the wrong times. A profitable month can still end with an overdraft if three vendor invoices land the same week payroll runs. We wanted to attack that specific, unglamorous problem: not "how much money will we make," but "will we have enough cash, on the right day." And since this hackathon called out quantum computing as a theme, we asked a more interesting question: can the same class of problem quantum annealers are built to solve — QUBO, Quadratic Unconstrained Binary Optimization — help a business decide when to pay its bills?

What it does

Equilibrium takes a business's cash position, upcoming revenue, and a list of outstanding vendor bills (each with a due date, an early-payment discount, and a late-payment penalty), and does two things:

Forecasts the weekly cash balance for the next 10 weeks and flags every week it's projected to dip below a safety buffer the business sets. Reschedules the bills using a QUBO-style cost function — solved with Simulated Annealing, the classical technique used to benchmark quantum annealers like D-Wave — to find a payment order that captures early-payment discounts where it's safe to, delays payments where the business can absorb a small penalty to protect its buffer, and minimizes the number of weeks the business is put at risk.

The dashboard shows this live: the optimizer's "energy" cooling down as it searches, a before/after cash flow chart, and a full schedule comparison table explaining exactly what moved and why.

How we built it

The whole thing is dependency-free vanilla JavaScript, HTML, and CSS — no framework, no build step — so it runs by opening a single file or from any static host.

data.js generates a deterministic, seeded synthetic dataset (starting balance, weekly revenue with seasonal variance, fixed costs, and a set of vendor bills with due dates, discount/penalty terms, and an allowed payment window). forecast.js projects the weekly cash balance for any payment schedule. optimizer.js is the core: each bill's payment week is encoded as a one-hot binary decision, the exact variable shape a QUBO formulation uses. The cost function mixes a linear term (discounts/penalties) with a quadratic penalty on any week the balance dips under the safety buffer. Simulated Annealing searches this landscape with a temperature that cools over the run, accepting worse moves early and only better moves late — the same mechanism used to validate QUBO problem formulations before or without real quantum hardware. app.js wires the pipeline to a Canvas-drawn dashboard: an energy convergence chart, a cash flow comparison chart, and a schedule table, all re-run live when the safety-buffer slider changes. Challenges we ran into

Getting the optimizer to do something meaningfully different from just "pay everything as late as possible" took real tuning. Early cost-function weightings either ignored the safety buffer entirely or overcorrected and pushed every bill to its earliest allowed week regardless of cost. We had to balance the linear (discount/penalty) and quadratic (risk) terms so the annealer makes a genuine trade-off — sometimes it's cheaper to eat a small penalty than to risk an overdraft, and the optimizer needed to actually discover that, not have it hand-coded.

We also had to decide how honest to be with the results. It would have been easy to tune the demo data so the optimizer always looks like a strict win on every metric. We chose not to: in our dataset, eliminating most of the risk weeks costs the business a small amount versus the naive schedule. We think that's a more credible, more real result than an all-upside number would have been — and the dashboard is explicit about it.

Accomplishments that we're proud of A working, from-scratch QUBO-style cost function and Simulated Annealing solver, not a wrapper around an existing optimization library. An "energy landscape" visualization that isn't decorative — it's the actual cost trace from the optimizer's search, so what you see on screen is what the algorithm did. A result we're willing to defend under questioning: the trade-offs are real, not massaged to look better than they are. What we learned

Quantum-inspired optimization is a genuinely useful lens for scheduling problems that are usually solved with simple heuristics ("pay bills in due-date order"). Framing "which week do I pay this" as a combinatorial search over a cost landscape — rather than a rule-based sort — surfaces non-obvious schedules a human wouldn't try by hand, especially once more than a handful of bills and weeks are involved.

What's next for Equilibrium Real bank/accounting integrations (Plaid, QuickBooks) instead of synthetic data. Extending the QUBO formulation to jointly optimize which invoices to send early-payment offers to, not just which bills to pay when. A true quantum backend (e.g. D-Wave's Ocean SDK) as a swappable solver behind the same cost function, to compare against the classical annealer as quantum hardware access becomes more practical.

Built With

  • canvas-api
  • cash-flow-forecasting
  • combinatorial-optimization
  • css3
  • fintech
  • html5
  • javascript
  • qubo
  • simulated-annealing
Share this project:

Updates