Skip to content

Commit

Permalink
Changed macOS test version to 13 instead of latest due to missing Pyt…
Browse files Browse the repository at this point in the history
…hon versions, increased QuOCS version number, added plt.close() to pytests
  • Loading branch information
ThomasReisser90 committed Apr 29, 2024
1 parent a1c3737 commit 378d7e4
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/unit_testing_macOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

jobs:
test:
runs-on: macOS-latest
runs-on: macOS-13
strategy:
matrix:
python-version: [ '3.6', '3.7', '3.8', '3.9', '3.10', '3.11' ]
Expand Down
2 changes: 1 addition & 1 deletion src/quocslib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from __future__ import absolute_import, division, print_function, unicode_literals

__VERSION__ = "0.0.58"
__VERSION__ = "0.0.59"
2 changes: 2 additions & 0 deletions tests/test_custom_scaling_only_t.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def plot_FoM(result_path, FoM_filename):
plt.ylabel('FoM', fontsize=20)
# plt.savefig(os.path.join(folder, save_name + '.pdf'))
plt.savefig(os.path.join(result_path, save_name + '.png'))
plt.close()


def plot_controls(result_path):
Expand Down Expand Up @@ -88,6 +89,7 @@ def plot_controls(result_path):
plt.ylabel('Amplitude', fontsize=20)
# plt.savefig(os.path.join(folder, save_name + '.pdf'))
plt.savefig(os.path.join(result_path, save_name + '.png'))
plt.close()


def test_custom_scaling_only_t():
Expand Down
2 changes: 2 additions & 0 deletions tests/test_custom_scaling_t_and_pulse.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def plot_FoM(result_path, FoM_filename):
plt.ylabel('FoM', fontsize=20)
# plt.savefig(os.path.join(folder, save_name + '.pdf'))
plt.savefig(os.path.join(result_path, save_name + '.png'))
plt.close()


def plot_controls(result_path):
Expand Down Expand Up @@ -88,6 +89,7 @@ def plot_controls(result_path):
plt.ylabel('Amplitude', fontsize=20)
# plt.savefig(os.path.join(folder, save_name + '.pdf'))
plt.savefig(os.path.join(result_path, save_name + '.png'))
plt.close()


def test_custom_scaling_t_and_pulse():
Expand Down
2 changes: 2 additions & 0 deletions tests/test_dCRAB_Fourier_NM_OneQubit.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def plot_FoM(result_path, FoM_filename):
plt.ylabel('FoM', fontsize=20)
# plt.savefig(os.path.join(folder, save_name + '.pdf'))
plt.savefig(os.path.join(result_path, save_name + '.png'))
plt.close()


def plot_controls(result_path):
Expand Down Expand Up @@ -91,6 +92,7 @@ def plot_controls(result_path):
plt.ylabel('Amplitude', fontsize=20)
# plt.savefig(os.path.join(folder, save_name + '.pdf'))
plt.savefig(os.path.join(result_path, save_name + '.png'))
plt.close()


def main(optimization_dictionary: dict, args_dict: dict):
Expand Down
2 changes: 2 additions & 0 deletions tests/test_dCRAB_Fourier_NM_OneQubit_json_dump.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def plot_FoM(result_path, FoM_filename):
plt.ylabel('FoM', fontsize=20)
# plt.savefig(os.path.join(folder, save_name + '.pdf'))
plt.savefig(os.path.join(result_path, save_name + '.png'))
plt.close()


def plot_controls(result_path):
Expand Down Expand Up @@ -91,6 +92,7 @@ def plot_controls(result_path):
plt.ylabel('Amplitude', fontsize=20)
# plt.savefig(os.path.join(folder, save_name + '.pdf'))
plt.savefig(os.path.join(result_path, save_name + '.png'))
plt.close()


def main(optimization_dictionary: dict, args_dict: dict):
Expand Down
2 changes: 2 additions & 0 deletions tests/test_dCRAB_drift_compensation.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def plot_FoM(result_path, FoM_filename):
plt.ylabel('FoM', fontsize=20)
# plt.savefig(os.path.join(folder, save_name + '.pdf'))
plt.savefig(os.path.join(result_path, save_name + '.png'))
plt.close()


def plot_controls(result_path):
Expand Down Expand Up @@ -90,6 +91,7 @@ def plot_controls(result_path):
plt.ylabel('Amplitude', fontsize=20)
# plt.savefig(os.path.join(folder, save_name + '.pdf'))
plt.savefig(os.path.join(result_path, save_name + '.png'))
plt.close()


def test_drift_compensation_average_3_FoM_minimization():
Expand Down
2 changes: 2 additions & 0 deletions tests/test_dCRAB_noisy_and_reeval_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def plot_FoM(result_path, FoM_filename):
plt.ylabel('FoM', fontsize=20)
# plt.savefig(os.path.join(folder, save_name + '.pdf'))
plt.savefig(os.path.join(result_path, save_name + '.png'))
plt.close()


def plot_controls(result_path):
Expand Down Expand Up @@ -91,6 +92,7 @@ def plot_controls(result_path):
plt.ylabel('Amplitude', fontsize=20)
# plt.savefig(os.path.join(folder, save_name + '.pdf'))
plt.savefig(os.path.join(result_path, save_name + '.png'))
plt.close()


def main(optimization_dictionary: dict, args_dict: dict):
Expand Down
2 changes: 2 additions & 0 deletions tests/test_dCRAB_shrink_option.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def plot_FoM(result_path, FoM_filename):
plt.ylabel('FoM', fontsize=20)
# plt.savefig(os.path.join(folder, save_name + '.pdf'))
plt.savefig(os.path.join(result_path, save_name + '.png'))
plt.close()


def plot_controls(result_path):
Expand Down Expand Up @@ -90,6 +91,7 @@ def plot_controls(result_path):
plt.ylabel('Amplitude', fontsize=20)
# plt.savefig(os.path.join(folder, save_name + '.pdf'))
plt.savefig(os.path.join(result_path, save_name + '.png'))
plt.close()


def test_pulse_shrinking():
Expand Down
2 changes: 2 additions & 0 deletions tests/test_mixed_dCRAB_Fourier_NM_OneQubit.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def plot_FoM(result_path, FoM_filename):
plt.ylabel('FoM', fontsize=20)
# plt.savefig(os.path.join(folder, save_name + '.pdf'))
plt.savefig(os.path.join(result_path, save_name + '.png'))
plt.close()


def plot_controls(result_path):
Expand Down Expand Up @@ -91,6 +92,7 @@ def plot_controls(result_path):
plt.ylabel('Amplitude', fontsize=20)
# plt.savefig(os.path.join(folder, save_name + '.pdf'))
plt.savefig(os.path.join(result_path, save_name + '.png'))
plt.close()


def main(optimization_dictionary: dict, args_dict: dict):
Expand Down

0 comments on commit 378d7e4

Please sign in to comment.