qiskit_optimization/problems/quadratic_program.py
def _copy_from(self, other: "QuadraticProgram", include_name: bool) -> None:
        """Copy another QuadraticProgram to this updating QuadraticProgramElement

        Note: this breaks the consistency of `other`. You cannot use `other` after the copy.

        Args:
            other: The quadratic program to be copied from.
            include_name: Whether this method copies the problem name or not.
        """
        for attr, val in vars(other).items():
            if attr == "_name" and not include_name:
                continue
            if isinstance(val, QuadraticProgramElement):
                val.quadratic_program = self
            if isinstance(val, list):
                for elem in val:
                    if isinstance(elem, QuadraticProgramElement):
                        elem.quadratic_program = self
            setattr(self, attr, val)
Copy another QuadraticProgram to this updating QuadraticProgramElement

        Note: this breaks the consistency of `other`. You cannot use `other` after the copy.

        Args:
            other: The quadratic program to be copied from.
            include_name: Whether this method copies the problem name or not.
        
Copy another QuadraticProgram to this updating QuadraticProgramElement
Note: this breaks the consistency of `other`. You cannot use `other` after the copy.
Copy another QuadraticProgram to this updating QuadraticProgramElement Note : this breaks the consistency of ` other ` . You cannot use ` other ` after the copy .
def _copy_from(self, other: "QuadraticProgram", include_name: bool) -> None:
        for attr, val in vars(other).items():
            if attr == "_name" and not include_name:
                continue
            if isinstance(val, QuadraticProgramElement):
                val.quadratic_program = self
            if isinstance(val, list):
                for elem in val:
                    if isinstance(elem, QuadraticProgramElement):
                        elem.quadratic_program = self
            setattr(self, attr, val)
def _copy_from ( self , other : "QuadraticProgram" , include_name : bool ) -> None : for attr , val in vars ( other ) . items ( ) : if attr == "_name" and not include_name : continue if isinstance ( val , QuadraticProgramElement ) : val . quadratic_program = self if isinstance ( val , list ) : for elem in val : if isinstance ( elem , QuadraticProgramElement ) : elem . quadratic_program = self setattr ( self , attr , val )
Copy another QuadraticProgram to this updating QuadraticProgramElement
Note: this breaks the consistency of `other`.
Copy another QuadraticProgram to this updating QuadraticProgramElement Note : this breaks the consistency of ` other ` .
"""Copy another QuadraticProgram to this updating QuadraticProgramElement

        Note: this breaks the consistency of `other`. You cannot use `other` after the copy.

        Args:
            other: The quadratic program to be copied from.
            include_name: Whether this method copies the problem name or not.
        """
self
other
"QuadraticProgram"
The quadratic program to be copied from.
The quadratic program to be copied from .
include_name
bool
Whether this method copies the problem name or not.
Whether this method copies the problem name or not .