Skip to content

Commit

Permalink
Fixing the result parsing and the tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
carstenblank committed Feb 27, 2019
1 parent 001ae9b commit e3f036f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion providers/acquantum/acquantumjob.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,9 @@ def _result_from_job_response(self, job_response):
"header": self._qobj.experiments[0].header.as_dict()
}

from dateutil.parser import parser
date = parser().parse(result_details['finish_time'])

result_dict = {
'results': [result_details],
'backend_name': config.backend_name,
Expand All @@ -302,7 +305,7 @@ def _result_from_job_response(self, job_response):
'header': {
"backend_name": config.backend_name
},
"date": result_details['finish_time']
"date": date.isoformat()
}

result = Result.from_dict(result_dict)
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ qiskit==0.7.0
acquantum-connector==0.0.5
jsonschema<2.7
marshmallow

python-dateutil
2 changes: 1 addition & 1 deletion test/providers/acquantum/test_acQuantumJob.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def test__gates_from_qobj(self):
qobj = qiskit.compile(qc, backend=backend)

gates = AcQuantumJob._gates_from_qobj(qobj)
self.assertEqual(len(gates), 6)
self.assertEqual(len(gates), 8)

def test_submit(self):
import qiskit.extensions.standard as standard
Expand Down

0 comments on commit e3f036f

Please sign in to comment.