>>> variables = graph.optimization_variable(
... 2, lower_bound=0, upper_bound=1, name="variables"
... )
>>> x = variables[0]
>>> y = variables[1]
>>> cost = (x - 0.1) ** 2 + graph.sin(y) ** 2
>>> cost.name = "cost"
>>> result = qctrl.functions.calculate_optimization(
... graph=graph, cost_node_name="cost", output_node_names=["variables"]
... )
>>> result.cost
0.0
>>> result.output["variables"]["value"]
array([0.1, 0.])