Commit 34b4ab91 authored by Wright, Jerimiah's avatar Wright, Jerimiah
Browse files

Fixed default value for output_logs and fixed redundant code in chemistry_benchmark.py


Signed-off-by: Wright, Jerimiah's avatarJerimiah <Jerimiah.wright@utexas.edu>
parent 7c8253de
......@@ -36,18 +36,12 @@ class Chemistry(Benchmark):
elif inputParams['Observable']['name'] == 'fermion':
obs_str = inputParams['Observable']['obs_str']
H = xacc.getObservable('fermion', obs_str)
elif inputParams['Observable']['name'] == 'psi4':
elif inputParams['Observable']['name'] in ['pyscf','psi4']:
opts = {'basis':inputParams['Observable']['basis'], 'geometry':inputParams['Observable']['geometry']}
if 'fo' in inputParams['Observable'] and 'ao' in inputParams['Observable']:
opts['frozen-spin-orbitals'] = ast.literal_eval(inputParams['Observable']['fo'])
opts['active-spin-orbitals'] = ast.literal_eval(inputParams['Observable']['ao'])
H = xacc.getObservable('psi4', opts)
elif inputParams['Observable']['name'] == 'pyscf':
opts = {'basis':inputParams['Observable']['basis'], 'geometry':inputParams['Observable']['geometry']}
if 'fo' in inputParams['Observable'] and 'ao' in inputParams['Observable']:
opts['frozen-spin-orbitals'] = ast.literal_eval(inputParams['Observable']['fo'])
opts['active-spin-orbitals'] = ast.literal_eval(inputParams['Observable']['ao'])
H = xacc.getObservable('pyscf', opts)
H = xacc.getObservable(inputParams['Observable']['name'], opts)
#print('Ham: ', H.toString())
qpu = xacc.getAccelerator(acc_name, xacc_opts)
......
......@@ -408,7 +408,7 @@ def benchmark(xacc_settings):
tail)[0], timestr)
if 'output_logs' not in xacc_settings['Benchmark']:
xacc_settings['Benchmark']['output_logs'] = False
xacc_settings['Benchmark']['output_logs'] = True
if xacc_settings['Benchmark']['output_logs'] == True:
f = open(results_name+".ab", 'w')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment