Skip to content

Commit

Permalink
clean up json (#352)
Browse files Browse the repository at this point in the history
  • Loading branch information
Roger-luo authored Aug 1, 2023
1 parent d57fe00 commit 48f5ac2
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/test_mock_submit.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import bloqade.ir.location as location
import tempfile
from bloqade.ir import Linear, Constant
from bloqade.task import HardwareBatchTask, HardwareBatchResult

Expand All @@ -25,12 +26,14 @@
)

# print(len(quantum_task.task_result.shot_outputs))
quantum_job.save_json("job.json")
quantum_job = HardwareBatchTask.load_json("job.json")
job_file = tempfile.mktemp(suffix=".json")
quantum_job.save_json(job_file)
quantum_job = HardwareBatchTask.load_json(job_file)

future_file = tempfile.mktemp(suffix=".json")
quantum_future = quantum_job.submit()
quantum_future.save_json("future.json")
quantum_future = HardwareBatchResult.load_json("future.json")
quantum_future.save_json(future_file)
quantum_future = HardwareBatchResult.load_json(future_file)


quantum_future.json()
Expand Down

0 comments on commit 48f5ac2

Please sign in to comment.