job_data.append({ 'Date': job. creation_date, # Put a dictionary of info of the current job in job_data 'Jobid': job.id, 'runtype': run_type, 'batchno': i }) print('Batch %d/%d: %s' % (i + 1, nr_batches, 'SENT') ) # This batch is done and the jobs are saved to job_data and jobs ############################################################################### store.save_jobdata( circuit_name, job_data, tomo_set, # Save the data of all jobs (in job_data) to file backendname, shots, nr_batches, run_type, Unitary) store.save_last( circuit_name, job_data, tomo_set, backendname, # Save also to 'last' file shots, nr_batches, run_type, Unitary) unregister(
circuit_list.append(Q_program.get_circuit(cir)) print('Batch %d/%d: %s' % (i + 1, nr_batches, 'INITIALIZING')) if i == 0: job = execute(circuit_list, backend=backendname, shots=shots) jobs.append(job) job_data.append({ 'Date': job.creation_date, 'Jobid': job.id, 'runtype': run_type, 'batchno': i }) print('Batch %d/%d: %s' % (i + 1, nr_batches, 'SENT')) else: job = execute(circuit_list, backend=backendname, shots=shots) jobs.append(job) job_data.append({ 'Date': job.creation_date, 'Jobid': job.id, 'runtype': run_type, 'batchno': i }) print('Batch %d/%d: %s' % (i + 1, nr_batches, 'SENT')) ############################################################################### store.save_jobdata(circuit_name, job_data, tomo_set, backendname, shots, nr_batches, run_type, Unitary) store.save_last(circuit_name, job_data, tomo_set, backendname, shots, nr_batches, run_type, Unitary) unregister(provider)