Skip to content

Commit

Permalink
Release 2.0.4 (#125)
Browse files Browse the repository at this point in the history
# What's Changed
* Noise Module (by @[email protected] in [Commit from May 13, 2024](e797af9)): Brings noise simulation features from IBM Qiskit.
* Rollback of IBM Eagle Acces (#116) because of unresolvable dependency issues with new noise module. These issues will be adressed in the upcoming major update in which this feature will be included again. Until then, if you want to use this feature, please move to version 2.0.3
* Maximum Indepent Set (MIS) Application (by @chris-van-den-oetelaar in #120): Implementation of full benchmarking pipeline for the MIS use case, including a mapping, interface and solver for neutral-atom devices
* Minor changes: Debugging of RandomClassicPVC (#124), added unit test for MIS application and fixed linting errors
Full changelog: v2.0.3...v2.0.4
  • Loading branch information
Marvmann authored May 31, 2024
1 parent ea29c3e commit bfffc3f
Show file tree
Hide file tree
Showing 32 changed files with 2,434 additions and 81 deletions.
603 changes: 585 additions & 18 deletions .settings/module_db.json

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion .settings/requirements_full.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ more-itertools==9.0.0
qiskit-optimization==0.5.0
pyqubo==1.4.0
dwave_networkx==0.8.13
qiskit==0.40.0
qiskit==0.45.0
pandas==1.5.2
cma==3.3.0
tensorboard==2.13.0
tensorboardX==2.6.2
pulser==0.16.0
qiskit-aer==0.11.2
3 changes: 2 additions & 1 deletion src/Installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ def __init__(self):
{"name": "SAT", "class": "SAT", "module": "modules.applications.optimization.SAT.SAT"},
{"name": "TSP", "class": "TSP", "module": "modules.applications.optimization.TSP.TSP"},
{"name": "GenerativeModeling", "class": "GenerativeModeling",
"module": "modules.applications.QML.generative_modeling.GenerativeModeling"}
"module": "modules.applications.QML.generative_modeling.GenerativeModeling"},
{"name": "MIS", "class": "MIS", "module": "modules.applications.optimization.MIS.MIS"},
]

self.core_requirements = [
Expand Down
3 changes: 2 additions & 1 deletion src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import yaml

from Installer import Installer
from Plotter import Plotter
from utils import _expand_paths
from utils_mpi import MPIStreamHandler, MPIFileHandler, get_comm

Expand Down Expand Up @@ -157,6 +156,8 @@ def handle_benchmark_run(args: argparse.Namespace) -> None:
:rtype: None
"""
from BenchmarkManager import BenchmarkManager # pylint: disable=C0415
from Plotter import Plotter # pylint: disable=C0415

benchmark_manager = BenchmarkManager(fail_fast=args.failfast)

if args.summarize:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import pickle
import os
from qiskit import qpy

import numpy as np
import pandas as pd
Expand All @@ -25,7 +26,7 @@

class DataHandler(Core, ABC):
"""
The task of the DataHandler module is to translate the application’s data
The task of the DataHandler module is to translate the application’s data
and problem specification into preproccesed format.
"""

Expand Down Expand Up @@ -150,6 +151,10 @@ def postprocess(self, input_data: dict, config: dict, **kwargs):
with open(f"{store_dir_iter}/training_results-{kwargs['rep_count']}.pkl", 'wb') as f:
pickle.dump(input_data, f)

if "circuit_transpiled" in list(input_data.keys()):
with open(f"{store_dir_iter}/transpiled_circuit_{kwargs['rep_count']}.qpy", 'wb') as f:
qpy.dump(input_data.pop("circuit_transpiled"), f)

# Save variables transformed space
if "Transformation" in list(input_data.keys()):
self.metrics.add_metric_batch({"KL_best": input_data["KL_best_transformed"]})
Expand All @@ -164,7 +169,7 @@ def postprocess(self, input_data: dict, config: dict, **kwargs):
@abstractmethod
def data_load(self, gen_mod: dict, config: dict) -> dict:
"""
Helps to ensure that the model can effectively learn the underlying
Helps to ensure that the model can effectively learn the underlying
patterns and structure of the data, and produce high-quality outputs.
:param gen_mod: dictionary with collected information of the previous modules
Expand Down Expand Up @@ -207,12 +212,12 @@ def evaluate(self, solution: any) -> (dict, float):
@staticmethod
def tb_to_pd(logdir: str, rep: str) -> None:
"""
Converts TensorBoard event files in the specified log directory
Converts TensorBoard event files in the specified log directory
into a pandas DataFrame and saves it as a pickle file.
:param logdir: path to the log directory containing TensorBoard event files
:type logdir: str
:type logdir: str
"""
event_acc = EventAccumulator(logdir)
event_acc.Reload()
Expand Down
Loading

0 comments on commit bfffc3f

Please sign in to comment.