-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathevolution.py
36 lines (28 loc) · 1.61 KB
/
evolution.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
"""Launches the adiabatic evolution benchmark script for user given arguments."""
import argparse
from benchmarks.scripts import evolution_benchmark
parser = argparse.ArgumentParser()
parser.add_argument("--nqubits", default=4, type=int,
help="Number of qubits in the system to evolve.")
parser.add_argument("--dt", default=1e-2, type=float,
help="Time step size to use for time discretization.")
parser.add_argument("--nreps", default=1, type=int,
help="Number of repetitions to run the evolution.")
parser.add_argument("--precision", default=None, type=str,
help="Numerical precision of the simulation. "
"Choose between 'double' and 'single'.")
parser.add_argument("--solver", default="exp", type=str,
help="Which solver to use for integration (exponential or RK methods)")
parser.add_argument("--dense", action="store_true",
help="If ``True`` it uses the full Hamiltonian matrix "
"otherwise the Trotter decomposition is used.")
parser.add_argument("--backend", default="qibojit", type=str,
help="Qibo backend to use.")
parser.add_argument("--platform", default=None, type=str,
help="Qibo platform to use.")
parser.add_argument("--filename", default=None, type=str,
help="Directory of file to save the logs in json format. "
"If not given the logs will only be printed and not saved.")
if __name__ == "__main__":
args = vars(parser.parse_args())
evolution_benchmark(**args)