This repository is a showcase of a project focused on optimizing workforce distribution using Discrete Quadratic Models (DQM) via D-Wave Systems Quantum Computing.
- Python 3.x
- D-Wave Ocean SDK
The primary aim of this project is to utilize D-Wave's Discrete Quadratic Models for workforce optimization, which involves the efficient allocation of employees to different shifts.
The crux of the project revolves around the implementation of D-Wave's Discrete Quadratic Model (DQM).
from dimod import DiscreteQuadraticModel
# Initialize the DQM object
dqm = DiscreteQuadraticModel()
To build the DQM, we start by adding variables for each employee's name.
# Add variables to DQM for each employee
for name in employees:
dqm.add_variable(num_shifts, label=name)
Explanation: Here dqm.add_variable(num_shifts, label=name)
adds a variable representing each employee to the DQM.
The variable has as many possible values as there are shifts (num_shifts
), and it's labeled with the employee's name for identification.
To get started, clone this repository and install the D-Wave Ocean SDK.
git clone https://github.com/your-username/your-repo-name.git
cd your-repo-name
pip install dwave-ocean-sdk
Then, run the main Python script:
python main.py
results, efficiency, and visualizations