Skip to content

Commit bfc7655

Browse files
mergify[bot]woodsp-ibmmanoelmarques
authored
Fix up to_ising docstring (backport #333) (#334)
* Fix up to_ising docstring (#333) (cherry picked from commit f1be804) * Fix copyright Co-authored-by: Steve Wood <[email protected]> Co-authored-by: Manoel Marques <[email protected]>
1 parent f93d0f7 commit bfc7655

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

qiskit_optimization/translators/ising.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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

0 commit comments

Comments
 (0)