コード例 #1
0
ファイル: _model.py プロジェクト: ajavadia/qiskit-aqua
 def delete_section_property(self, section_name, property_name):
     if self._parser is None:
         raise AlgorithmError('Input not initialized.')
         
     self._parser.delete_section_property(section_name, property_name)
     if property_name == InputParser.NAME and \
         (InputParser.is_pluggable_section(section_name) or section_name == InputParser.INPUT):
         self._parser.delete_section_properties(section_name)
コード例 #2
0
ファイル: _model.py プロジェクト: ajavadia/qiskit-aqua
 def set_section_property(self, section_name, property_name, value):
     if self._parser is None:
         raise AlgorithmError('Input not initialized.')
         
     self._parser.set_section_property(section_name,property_name,value)
     if property_name == InputParser.NAME and \
         (InputParser.is_pluggable_section(section_name) or section_name == InputParser.INPUT):
         properties = self._parser.get_section_default_properties(section_name)
         if isinstance(properties,dict):
             properties[ InputParser.NAME] = value
             self._parser.delete_section_properties(section_name)
             for property_name,property_value in properties.items():  
                 self._parser.set_section_property(section_name,property_name,property_value)
コード例 #3
0
ファイル: _model.py プロジェクト: ajavadia/qiskit-aqua
 def is_pluggable_section(section_name):
     return InputParser.is_pluggable_section(section_name)