qat.nnize.metric.QuantumCostMetric
- class qat.nnize.metrics.QuantumCostMetric
This metric must be used to minimize the number of gate in the circuit.
- get_best_index(base_path, candidates)
Returns the index of the candidate which minimize the quantum cost
- Parameters:
base_path (GateList) – base path
candidates (cpplist[GateList]) – list of candidates
- Returns:
index of the best candidate
- Return type:
int
- init()
Execute this function to warn this metric that the given nnizer is ready and entirely defined.