GreedyHeuristic
- class GreedyHeuristic(cost_gen=<bqskit.ir.opt.cost.functions.cost.hilbertschmidt.HilbertSchmidtCostGenerator object>)[source]
Bases:
HeuristicFunction
The GreedyHeuristic HeuristicFunction class.
Defines a heuristic that results in greedy search. This function only looks at the current distance of the circuit from the target. This will create a behavior similar to depth-first search.
- __init__(cost_gen=<bqskit.ir.opt.cost.functions.cost.hilbertschmidt.HilbertSchmidtCostGenerator object>)[source]
Construct a GreedyHeuristic Function.
- Parameters:
cost_gen (
CostFunctionGenerator
) – This is used to generate cost functions used during evaluations.
Methods
get_value
(circuit, target)Return the heuristic's value, see HeuristicFunction for more info.