Skip to content

gzquse/DEAL_QUBO

Repository files navigation

## Depp wiki
https://deepwiki.com/gzquse/DEAL_QUBO/4.3-traveling-salesperson-problem-(tsp)

`pip install -r requirements.txt`

`./pl_sum.py -p a -Y`

## For MVRP D-Wave quantum annealing:


2. Configure D-Wave credentials:
   - Sign up for a D-Wave Leap account at https://cloud.dwavesys.com/leap/
   - Install and configure D-Wave CLI:
     ```
     dwave config create --full
     ```
   - Follow prompts to enter your API token

3. Run MVRP solver:
   ```
   cd mvrp
   dwave solvers  --list --all
   python app.py
   ```

   Optional arguments:
   - `--vehicles`: Number of vehicles (default: 3)
   - `--customers`: Number of customer locations (default: 10) 
   - `--annealing-time`: Annealing time in microseconds (default: 20)
   - `--num-reads`: Number of samples to collect (default: 1000)

4. Results will be saved to `results/` directory including:
   - Solution visualization
   - Route assignments
   - Computation statistics


### distribute training

./launch.sh

### Jupyter kernel
shifter --image=nersc/pytorch:24.06.01 \
    $SCRATCH/qml_env -m ipykernel install \
    --prefix $SCRATCH/qml_env --name qml_env --display-name qml_env


# latest qiskit
IMG=gzquse/qiskit-gpu:p1
podman-hpc run -it --gpu -e DISPLAY  -v $SCRATCH/QML_2025:$QML_2025 -e SCRATCH  $IMG  bash

## get optimized circ qubo
1. ./benchmark.py  -m hybrid -s qiskit.statevector_simulator --prjName kp
## switch conda env
2. conda activate qiskit
## dry run qiskit locally
3. ./np_backends.py  --prjName maxcut
## dry run qpy circuit compiled from benchmark
4. ./np_backends.py  --prjName qpy --infPath circ/hybrid_95a850.qpy --dryRun
## send to real quantum computer
5. export QISKIT_IBM_TOKEN="MY_IBM_CLOUD_API_KEY"
6. ./np_backends.py  --prjName qpy --infPath circ/hybrid_95a850.qpy
wait until it finished and retrieve the results
7. ./np_backends.py  --prjName plot --jobID cz4ynz710wx0008bhvvg --backend ibm_kyiv

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors