{"id":20669609,"url":"https://github.com/iitis/quantum-stochastic-optimization-railways","last_synced_at":"2025-10-17T07:36:23.804Z","repository":{"id":242891327,"uuid":"717104242","full_name":"iitis/quantum-stochastic-optimization-railways","owner":"iitis","description":"application of quantum computation for stochastic optimization on example of railway/tramway network in Baltimore ","archived":false,"fork":false,"pushed_at":"2024-06-11T12:47:48.000Z","size":135493,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-17T13:32:34.708Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iitis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-10T15:09:02.000Z","updated_at":"2024-06-13T11:13:23.000Z","dependencies_parsed_at":"2025-01-17T13:41:08.214Z","dependency_job_id":null,"html_url":"https://github.com/iitis/quantum-stochastic-optimization-railways","commit_stats":null,"previous_names":["iitis/quantum-stochastic-optimization-railways"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iitis%2Fquantum-stochastic-optimization-railways","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iitis%2Fquantum-stochastic-optimization-railways/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iitis%2Fquantum-stochastic-optimization-railways/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iitis%2Fquantum-stochastic-optimization-railways/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iitis","download_url":"https://codeload.github.com/iitis/quantum-stochastic-optimization-railways/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242886324,"owners_count":20201536,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T20:15:06.980Z","updated_at":"2025-10-17T07:36:23.795Z","avatar_url":"https://github.com/iitis.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# quantum-stochastic-optimization-railways\nApplication of quantum computation for stochastic optimization on the example of railway/tramway network in Baltimore.\n\nFiles:\n\n1. ```QTrains``` - source code\n2. ```tests``` - testing source code\n\n3. ```solutions``` - stored solutions of railway problems, if for particular parameters setting computations have already been stored, new computation will not be performed and the particular file will not be overwritten\n4. ```QUBOs``` - qubos of railway problems\n5. ```QAOA Results``` - results of quantum gate computing via QAOA\n6. ```histograms``` - histograms from data analysis\n7. ```histograms_soft``` - histograms from data analysis with a soft check of minimal passing time constrain.\n\n\n#### Quantum annealing \n\nIn ```process_q_annealing.py ``` trains scheduling problems are solved via Integer Linear Programming and quantum (or simulated) annealing\n\nArguments:\n\n- --mode MODE: process mode: 0: prepare only QUBO, 1: make, computation (ILP and annealing), 2: analyze outputs, 3: count q-bits, 4: prepare Ising model 5: CPLEX benchmark  - by default: ```2```\n- --simulation SIMULATION: if True solve/analyze output of simulated annealing (via DWave software), if False real annealing - by default: False\n- --softern_pass SOFTERN_PASS: if true analyze output without feasibility check on a minimal passing time constrain - by default: False\n\n\nExample usage:\n\n```python3 process_q_annealing.py --mode 1 --sim True```\n\nSolve the series of problems by simulated annealing (does not perform calculations already performed and saved).\n\n```python3 process_q_annealing.py --mode 1```\n\nSolve the series of problems by real D-Wave annealing (does not perform calculations already performed and saved).\n\n```python3 process_q_annealing.py --mode 2 --softern_pass True```\n\n\n\n#### Quantum gate computing\n\nScript ```process_q_gates.py``` saves QUBO and the ground state as well as analyses output dedicated to gates computing.\n\nArguments:\n\n- --notrains NOTRAINS  number of trains, 1,2,4 are supported, by default: ``2``\n- --savequbo SAVEQUBO  if True prepare qubo else to analyze outputs, by default: False\n- --nolayers NOLAYERS  number of layers of QAOA in analyzed data, by default: ```1```\n- --datafile DATAFILE  file with data, by default:  ```\"QAOA Results/IonQ Simulations/\"```\n\n\nExample usage:\n\n```python3 process_q_gates.py --notrains 2 --nolayer 1 --datafile \"QAOA Results/IonQ Simulations/\" ```\n\nAnalyzes ```2``` trains results in ```\"QAOA Results/IonQ Simulations/\" ``` where ```2``` layers of QAOA was used\n\n```python3 process_q_gates.py --notrains 2 --savequbo true ```\n\nPrepared QUBOs for ```2``` trains problems and save them in ```QUBOs/gates/2trains/```\n\n#### Preparing plots for the article\n\nScript ```plots4article.py``` creates .csv files for high-quality plots for article, and saves them in the ```article_plots``` folder.\n\n\n# Funding\n\nScientific work co-financed from the state budget under the program of the Minister of Education and Science, Poland (pl. Polska) under the name \"Science for Society II\" project number NdS-II/SP/0336/2024/01 funding amount ```1000000``` PLN total value of the project ```1000000``` PLN \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiitis%2Fquantum-stochastic-optimization-railways","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiitis%2Fquantum-stochastic-optimization-railways","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiitis%2Fquantum-stochastic-optimization-railways/lists"}