bench

Implements abstract interfaces for instance storage and QPU solvers.

Classes

DataBase(directory[, file_ext, filter_fun, ...])

Implements storage/access to instances to be solved on QPUs.

Solver(name, db)

Implements abstract QPU Solver interface.

class bench.DataBase(directory, file_ext='.json', filter_fun=None, sort_fun=None)[source]

Implements storage/access to instances to be solved on QPUs.

_gather_data()[source]
_preprocess_qubo_data(Q, P, a, b)[source]
get_data(instance_id)[source]
get_qubo_data(instance_id, a, b)[source]
get_instance_ids()[source]
get_filename_from_instance_id(instance_id)[source]
class bench.Solver(name, db)[source]

Implements abstract QPU Solver interface.

See device-specific code in bench_qubo.

abstract _run(instance_id, *args)[source]
abstract get_data(instance_id, *args)[source]
_stringify_keys(d)[source]
_save(path, data)[source]
_setup_logger(log_file, file_mode='w', log_name='bench', log_level=10, save_logger=True)[source]
_run_multiple(run_list, save_file_path, logger)[source]
run(save_file_path, logger, instance_id, *args)[source]
run_multiple(run_list, save_file_path=None, logger=None)[source]
benchmark(run_list, save_file_path)[source]