old_contents: #Package configuration information
  
  import json
  import os.path
  import sys
  
  from . import config_location
  
  # Load the configuration from the json file
  # and populate the global configuration dictionary
  
  QGLCfgFile = config_location.get_config_path()
  
  if not os.path.isfile(QGLCfgFile):
      rootFolder = os.path.dirname(os.path.abspath(__file__))
      rootFolder = rootFolder.replace('\\', '/')  # use unix-like convention
  
      # build a config file from the template
      templateFile = os.path.join(rootFolder, 'config.example.json')
      ifid = open(templateFile, 'r')
      ofid = open(QGLCfgFile, 'w')
      for line in ifid:
          ofid.write(line.replace('/my/path/to', rootFolder))
      ifid.close()
      ofid.close()
  
  with open(QGLCfgFile, 'r') as f:
      QGLCfg = json.load(f)
  
  #pull out the variables
  #abspath allows the use of relative file names in the config file
  AWGDir = os.path.abspath(QGLCfg['AWGDir'])
  channelLibFile = os.path.abspath(QGLCfg['ChannelLibraryFile'])
  
  # plotting options
  plotBackground = QGLCfg.get('PlotBackground', '#EAEAF2')
  gridColor = QGLCfg.get('GridColor', None)
  
  # select pulse library (standard or all90)
  pulse_primitives_lib = QGLCfg.get('PulsePrimitivesLibrary', 'standard')
  
  # select a CNOT implementation (a name of a Pulse function that implements
  # CNOT in your gate set, e.g. CNOT_simple or CNOT_CR)
  cnot_implementation = QGLCfg.get('cnot_implementation', 'CNOT_simple')
  
new_contents: #Package configuration information
  
  import json
  import os.path
  import sys
  
  import config_location
  
  # Load the configuration from the json file
  # and populate the global configuration dictionary
  
  QGLCfgFile = config_location.get_config_path()
  print('Note: using QGLCfgFile [%s]' % QGLCfgFile)
  
  if not os.path.isfile(QGLCfgFile):
      rootFolder = os.path.dirname(os.path.abspath(__file__))
      rootFolder = rootFolder.replace('\\', '/')  # use unix-like convention
  
      # build a config file from the template
      templateFile = os.path.join(rootFolder, 'config.example.json')
      ifid = open(templateFile, 'r')
      ofid = open(QGLCfgFile, 'w')
      for line in ifid:
          ofid.write(line.replace('/my/path/to', rootFolder))
      ifid.close()
      ofid.close()
  
      print('Note: created QGLCfgFile using template [%s]' % templateFile)
  
  with open(QGLCfgFile, 'r') as f:
      QGLCfg = json.load(f)
  
  #pull out the variables
  #abspath allows the use of relative file names in the config file
  AWGDir = os.path.abspath(QGLCfg['AWGDir'])
  channelLibFile = os.path.abspath(QGLCfg['ChannelLibraryFile'])
  
  # plotting options
  plotBackground = QGLCfg.get('PlotBackground', '#EAEAF2')
  gridColor = QGLCfg.get('GridColor', None)
  
  # select pulse library (standard or all90)
  pulse_primitives_lib = QGLCfg.get('PulsePrimitivesLibrary', 'standard')
  
  # select a CNOT implementation (a name of a Pulse function that implements
  # CNOT in your gate set, e.g. CNOT_simple or CNOT_CR)
  cnot_implementation = QGLCfg.get('cnot_implementation', 'CNOT_simple')
  
subject: clean up import; print notes about config file