-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
530242b
commit 19a3c35
Showing
2 changed files
with
46 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,18 +14,16 @@ pip install --no-index --upgrade pip | |
pip install --no-index numpy scipy opt_einsum tqdm qecstruct more_itertools networkx | ||
pip install git+ssh://[email protected]/quicophy/matrex.git | ||
|
||
# Define arrays of lattice sizes, bond dimensions, error rates, and seeds | ||
lattice_sizes=(3 5 7) | ||
bond_dims=(20) | ||
seeds=( | ||
123 124 125 126 127 128 129 130 131 132 | ||
) # 10 random seeds | ||
num_experiments=100 # Per each random seed | ||
error_model="Bitflip" # Error model used in the experiments | ||
bias_prob=0.1 # The decoder bias probability | ||
tolerance=1e-6 # The numerical tolerance for the MPS within the decoder. | ||
num_processes=16 # Number of processes to use in parallel | ||
silent=true # Whether to suppress the output of the Python script | ||
lattice_sizes=(2 4) # Array of lattice sizes | ||
bond_dims=(10) # Array of bond dimensions | ||
seeds=(123 124 125 126 127 128 129 130 131 132) # Array of (10) random seeds | ||
num_experiments=10000 # Runs per each random seed | ||
error_model="Bitflip" # The error model | ||
bias_probs=(1e-8 1e-4 1e-3 1e-2 1e-1) # Array of decoder bias probabilities | ||
tolerances=(1e-17 1e-12 1e-8 1e-4 1e-2 1e-1) # Array of numerical tolerances for the MPS within the decoder | ||
cuts=(1e-17 1e-12 1e-8 1e-6 1e-4 1e-3 1e-2) # Array of SVD cut-offs for the MPS within the decoder | ||
num_processes=16 # The number of processes to use in parallel | ||
silent=false # Whether to suppress the output of the Python script | ||
|
||
error_rates=() | ||
start=0.105 | ||
|
@@ -43,12 +41,15 @@ for seed in "${seeds[@]}"; do | |
for lattice_size in "${lattice_sizes[@]}"; do | ||
for bond_dim in "${bond_dims[@]}"; do | ||
for error_rate in "${error_rates[@]}"; do | ||
# Define job script filename | ||
job_script="submit-job-${lattice_size}-${bond_dim}-${error_rate}-${error_model}-${seed}.sh" | ||
# Create the job submission script | ||
cat > "$job_script" <<EOS | ||
for bias_prob in "${bias_probs[@]}"; do | ||
for tolerance in "${tolerances[@]}"; do | ||
for cut in "${cuts[@]}"; do | ||
# Define job script filename | ||
job_script="submit-job-${lattice_size}-${bond_dim}-${error_rate}-${error_model}-${seed}.sh" | ||
# Create the job submission script | ||
cat > "$job_script" <<EOS | ||
#!/bin/bash | ||
#SBATCH --time=96:00:00 # Time limit (hh:mm:ss) | ||
#SBATCH --time=12:00:00 # Time limit (hh:mm:ss) | ||
#SBATCH --cpus-per-task=${num_processes} # Number of CPU cores per task | ||
#SBATCH --mem=16000 # Memory per node | ||
#SBATCH --job-name=decoding-${lattice_size}-${bond_dim}-${error_rate}-${error_model}-${seed} # Descriptive job name | ||
|
@@ -58,11 +59,14 @@ module load python/3.11.5 | |
source "$HOME/envs/myenv/bin/activate" | ||
# Run the Python script with the specified arguments | ||
python examples/decoding/quantum_surface.py --lattice_size ${lattice_size} --bond_dim ${bond_dim} --error_rate ${error_rate} --bias_prob ${bias_prob} --num_experiments ${num_experiments} --error_model "${error_model}" --seed ${seed} --num_processes ${num_processes} --silent ${silent} --tolerance ${tolerance} | ||
python examples/decoding/quantum_surface.py --lattice_size ${lattice_size} --bond_dim ${bond_dim} --error_rate ${error_rate} --bias_prob ${bias_prob} --num_experiments ${num_experiments} --error_model "${error_model}" --seed ${seed} --num_processes ${num_processes} --silent ${silent} --tolerance ${tolerance} --cut ${cut} | ||
EOS | ||
echo "Submitting the job for lattice size ${lattice_size}, bond dimension ${bond_dim}, error rate ${error_rate}, error model ${error_model}, bias probability ${bias_prob} and seed ${seed}." | ||
sbatch "$job_script" | ||
rm "$job_script" | ||
echo "Submitting the job for lattice size ${lattice_size}, bond dimension ${bond_dim}, error rate ${error_rate}, error model ${error_model}, bias probability ${bias_prob} and seed ${seed}." | ||
sbatch "$job_script" | ||
rm "$job_script" | ||
done | ||
done | ||
done | ||
done | ||
done | ||
done | ||
|