summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.m2
-rw-r--r--simulate.m5
-rw-r--r--source/simulate.py2
3 files changed, 6 insertions, 3 deletions
diff --git a/config.m b/config.m
index 849dcca..b88adc6 100644
--- a/config.m
+++ b/config.m
@@ -10,6 +10,8 @@ drive = drive(1:1); % Select which drives you want here
detuning1 = [-15]; % Single photon detuning
dephase_bc = [0]; % Ground state dephasing
+global n = 3; %Number of processes to run
+
format long
global source_dir = 'source/';
diff --git a/simulate.m b/simulate.m
index 6cd2689..d459192 100644
--- a/simulate.m
+++ b/simulate.m
@@ -1,10 +1,11 @@
function simulate()
global source_dir;
- n = 4;
+ global n;
+
target = [source_dir, 'simulate.py'];
tic();
- runCommand(sprintf('python %s %s', target, source_dir));
+ runCommand(sprintf('python %s %s %0.0f', target, source_dir, n));
toc();
end
diff --git a/source/simulate.py b/source/simulate.py
index a4b3145..5a316f4 100644
--- a/source/simulate.py
+++ b/source/simulate.py
@@ -127,7 +127,7 @@ def main():
global time_multiplier
time_multiplier = 100
- n = 1 # Number of processes to run
+ n = sys.argv[2] # Number of processes to run
decays_ab = readArgs('decay_ab')
decays_bc = readArgs('decay_bc')