Skip to content

Commit

Permalink
fix: removed K and fixed a result
Browse files Browse the repository at this point in the history
  • Loading branch information
BrunoLiegiBastonLiegi committed Jan 26, 2024
1 parent f1706c4 commit 807c944
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions benchmarks/scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import time
from benchmarks.logger import JsonLogger

from qibo.backends import GlobalBackend

def circuit_benchmark(nqubits, backend, circuit_name, circuit_options=None,
nreps=1, nshots=None, transfer=False,
Expand Down Expand Up @@ -30,7 +31,7 @@ def circuit_benchmark(nqubits, backend, circuit_name, circuit_options=None,
qibo.set_backend(backend=backend, platform=platform)
qibo.set_precision(precision)
logs.log(backend=qibo.get_backend(),
platform=qibo.K.get_platform(),
platform=GlobalBackend().platform,
precision=qibo.get_precision(),
device=qibo.get_device(),
version=qibo.__version__)
Expand All @@ -53,7 +54,7 @@ def circuit_benchmark(nqubits, backend, circuit_name, circuit_options=None,
if transfer:
result = result.numpy()
logs.log(dry_run_transfer_time=time.time() - start_time)
dtype = str(result.dtype)
dtype = str(result.state().dtype)
del(result)

simulation_times, transfer_times = [], []
Expand Down Expand Up @@ -148,7 +149,7 @@ def evolution_benchmark(nqubits, dt, solver, backend, platform=None,
qibo.set_backend(backend=backend, platform=platform)
qibo.set_precision(precision)
logs.log(backend=qibo.get_backend(),
platform=qibo.K.get_platform(),
platform=GlobalBackend().platform,
precision=qibo.get_precision(),
device=qibo.get_device(),
threads=qibo.get_threads(),
Expand Down

0 comments on commit 807c944

Please sign in to comment.