File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
qiskit_optimization/translators Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 11# This code is part of Qiskit.
22#
3- # (C) Copyright IBM 2019, 2021 .
3+ # (C) Copyright IBM 2019, 2022 .
44#
55# This code is licensed under the Apache License, Version 2.0. You may
66# obtain a copy of this license in the LICENSE.txt file in the root directory
@@ -30,9 +30,12 @@ def to_ising(quad_prog: QuadraticProgram) -> Tuple[OperatorBase, float]:
3030 i-th variable is mapped to i-th qubit.
3131 See https://github.com/Qiskit/qiskit-terra/issues/1148 for details.
3232
33+ Args:
34+ quad_prog: The problem to be translated.
35+
3336 Returns:
34- qubit_op: The qubit operator for the problem
35- offset: The constant value in the Ising Hamiltonian.
37+ A tuple ( qubit_op, offset) comprising the qubit operator for the problem
38+ and offset for the constant value in the Ising Hamiltonian.
3639
3740 Raises:
3841 QiskitOptimizationError: If an integer variable or a continuous variable exists
You can’t perform that action at this time.
0 commit comments