# Workflow Steps: Formulation and Sampling¶

The two main steps of solving problems on quantum computers are:

1. Formulate your problem as an objective function

Objective (cost) functions are mathematical expressions of the problem to be optimized; for quantum computing, these are quadratic models1 that have lowest values (energy) for good solutions to the problems they represent.

2. Find good solutions by sampling

Samplers are processes that sample from low-energy states of objective functions. Find good solutions by submitting your quadratic model to one of a variety of Ocean’s quantum, classical, and hybrid quantum-classical samplers.

Solution steps: (1) a problem known in “problem space” (a circuit of Boolean gates, a graph, a network, etc) is formulated as a quadratic model, mathematically or using Ocean functionality, and (2) the model is sampled for solutions.

1

Quadratic models have one or two variables per term. A simple example of a quadratic model is,

$Ax + By + Cxy$

where $$A$$, $$B$$, and $$C$$ are constants. Single-variable terms—$$Ax$$ and $$By$$ here—are linear with the constant biasing the term’s variable. Two-variable terms—$$Cxy$$ here—are quadratic with a relationship between the variables.