Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
362 changes: 289 additions & 73 deletions src/TransformerVCA/VCA_TRANSFORMERv10_7.ipynb

Large diffs are not rendered by default.

963 changes: 963 additions & 0 deletions src/algorithms/mcpg/ising_mcpg_single_file.py

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions src/tutorials/.ipynb_checkpoints/eco_dqn-checkpoint.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"cells": [],
"metadata": {},
"nbformat": 4,
"nbformat_minor": 5
}
118 changes: 118 additions & 0 deletions src/tutorials/MCPG/.ipynb_checkpoints/mcpg-checkpoint.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "cc5968fb-06de-4d8c-a212-da153e2c171d",
"metadata": {},
"source": [
"# MCPG Tutorial (Quickstart Notebook)\n",
"\n",
"This notebook walks you through setting up and exploring the **[optsuite/MCPG](https://github.com/optsuite/MCPG)** repository locally, including:\n",
"\n",
"1. Environment setup (conda / pip)\n",
"2. Cloning the repository\n",
"3. Adding the project to `PYTHONPATH`\n",
"4. Exploring the configuration files under `config/`\n",
"5. A minimal workflow to **train** and **evaluate** with the provided drivers (if available)\n",
"6. Tips for customizing experiments and logging results\n",
"\n",
"> **Note:** This notebook is designed to be run on your machine (or Colab). Some cells use shell commands like `git` or `python` that require internet access and a proper environment.\n"
]
},
{
"cell_type": "markdown",
"id": "4171ae3d-aa26-4367-8353-f9946b0c6a57",
"metadata": {},
"source": [
"## 0) Prerequisites\n",
"\n",
"- **Python 3.10+** (match the repo's `environment.yaml` if provided)\n",
"- **conda** or **mamba** (recommended)\n",
"- **git**\n",
"- (Optional) **CUDA** if you plan to use GPU acceleration\n",
"\n",
"If the repository provides an `environment.yaml`, you can create a conda environment with:\n",
"\n",
"```bash\n",
"conda env create -f environment.yaml -n mcpg\n",
"conda activate mcpg\n",
"```\n",
"\n",
"If you prefer `mamba`:\n",
"```bash\n",
"mamba env create -f environment.yaml -n mcpg\n",
"mamba activate mcpg\n",
"```\n"
]
},
{
"cell_type": "markdown",
"id": "c40445b5-47a5-4658-b752-1605101db4d6",
"metadata": {},
"source": [
"## 1) Clone the repository\n",
"\n",
"Run the following cell to clone the repo next to this notebook (skip if you've already cloned it)."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "d4e4f8b3-356f-444a-9de0-058d8a63eea0",
"metadata": {},
"outputs": [],
"source": [
"# If running locally/Colab, uncomment to clone:\n",
"# !git clone https://github.com/optsuite/MCPG.git\n",
"# %cd MCPG\n",
"print('If you run this notebook locally, uncomment the git commands above.')"
]
},
{
"cell_type": "markdown",
"id": "647b2dc7-2729-44ad-a1c5-b3321f43c98d",
"metadata": {},
"source": [
"## 2) Add project to PYTHONPATH\n",
"\n",
"Many repos use a `src/` layout. We'll add it to `sys.path` so Python can find the modules."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "aed436cd-eeb4-41b6-8be8-d3a74b69cd2e",
"metadata": {},
"outputs": [],
"source": [
"import os, sys\n",
"repo_root = os.path.abspath('.') # if you've done %cd MCPG already\n",
"src_path = os.path.join(repo_root, 'src')\n",
"if os.path.isdir(src_path) and src_path not in sys.path:\n",
" sys.path.insert(0, src_path)\n",
"print('Added to sys.path:', src_path)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python (maxcut)",
"language": "python",
"name": "maxcut"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.3"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Loading