Codync
A free, open-source 1:1 alternative to Grok Bot and Muse. Message Claude Code, Codex, Cursor and 40+ coding agents as persistent bots from your iPhone, Mac or Linux desktop. Group chats, threads, appr
Quantum circuits API with Qiskit, FastAPI, PostgreSQL and Vercel
Developer toolsHTML · PythonGitHub @dandresssOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full README ↗API + frontend para simular circuitos cuánticos con Qiskit, servida con FastAPI en
Vercel y con historial de ejecuciones en PostgreSQL (SQL plano con psycopg, sin ORM).
Producción: https://quantum-iota-ashen.vercel.app
main.py # entrypoint de Vercel (exporta `app`)
quantum_app/
api.py # rutas FastAPI (/api/...)
circuits.py # circuitos Qiskit + simulación (StatevectorSampler)
crud.py # CRUD en SQL plano sobre circuit_runs
db.py # conexión psycopg (una por request, apta para serverless)
config.py # settings desde env / .env
migrations/*.sql # migraciones SQL, aplicadas en orden
scripts/migrate.py # runner de migraciones (tabla schema_migrations)
public/index.html # frontend estático (CDN de Vercel)
tests/ # pytest
| Método | Ruta | Descripción |
|---|---|---|
| GET | /api/health | Estado de la API y de la BD |
| GET | /api/maze | Genera un laberinto (algorithm=binary_tree|backtracker, width, height, braid 0–1, seed) |
| POST | /api/bot/play | Entrena el bot de Q-learning (bot.py/agent.py) en {"grid": ...} (máx. 31×31) y devuelve 4 intentos de escape con la tabla Q al 10%, 30%, 60% y 100% del entrenamiento |
| GET | /api/circuits | Circuitos disponibles (bell, ghz, superposition) |
| POST | /api/circuits/run | Ejecuta un circuito y (opcional) lo guarda |
| GET | /api/runs | Lista ejecuciones (limit, offset) |
| GET | /api/runs/{id} | Detalle de una ejecución |
| PATCH | /api/runs/{id} | Cambia la etiqueta |
| DELETE | /api/runs/{id} | Borra la ejecución |
Docs interactivas en /api/docs.
curl -X POST localhost:8000/api/circuits/run \
-H 'content-type: application/json' \
-d '{"circuit": "ghz", "num_qubits": 3, "shots": 1024, "label": "prueba"}'
Requisitos: uv y PostgreSQL.
uv sync # crea .venv con Python 3.12
cp .env.example .env # ajusta DATABASE_URL
# Base de datos local (una sola vez)
sudo -u postgres psql -c "CREATE ROLE quantum LOGIN PASSWORD 'quantum';"
sudo -u postgres createdb -O quantum quantum
sudo -u postgres createdb -O quantum quantum_test
uv run python scripts/migrate.py # aplica migrations/*.sql
uv run uvicorn main:app --reload # http://localhost:8000
Sin DATABASE_URL la API sigue funcionando: simula circuitos pero no guarda historial
(/api/runs responde 503).
uv run pytest # los tests de BD se saltan si no hay TEST_DATABASE_URL
uv run ruff check . && uv run ruff format --check .
TEST_DATABASE_URL debe apuntar a una base desechable: los tests hacen TRUNCATE.
Añade un archivo nuevo migrations/NNN_descripcion.sql (numeración creciente) y ejecuta
uv run python scripts/migrate.py [DATABASE_URL]. Las ya aplicadas quedan registradas en
schema_migrations y no se repiten.
main. El workflow .github/workflows/ci.yml corre ruff y
pytest (con un Postgres de servicio) en cada push/PR.pyproject.toml/uv.lock y main.py; no hace falta vercel.json. Cada push a main
despliega a producción y cada PR genera un preview.DATABASE_URL (conexión pooled).vercel env pull .env.production.local # o copia DATABASE_URL desde el dashboard
uv run python scripts/migrate.py "<DATABASE_URL de producción>"
Notas:
.vercelignore excluye tests, scripts y migraciones.MAX_QUBITS (12) y MAX_SHOTS (10000) evitan
timeouts de la función.