Fidelities and cost functions

I am wanting to try and incorporate the fidelities within the cost function itself to see which feature combinations map to the highest fidelity states.

If it helps, we do have the state that contributes to the 1 fidelity, and would like to find the rest of the states via a ssvqe type of algorithm.