GitHub and git in the Playground
Keep your Playground code in your own GitHub repository. QubitLab follows the usual git steps (change, stage, commit, push), with a panel to click through and a git prompt in the Terminal. You can also import files from any public repository and save IDE circuits to GitHub.
1. Connect GitHub
- Open the Playground, click the GitHub icon in the Explorer, then Connect GitHub (or Dashboard → Providers → GitHub). You need a free account with a confirmed email.
- GitHub asks you to allow access to your repositories. QubitLab stores the access encrypted, never shows it to the browser, and only uses it when you push, list your repositories or import.
- Disconnect any time in the same place. Signing in with GitHub is separate: it only reads your email.
2. Choose a repository
- New repository: give it a name, choose Public or Private, and keep “Add a README.md” ticked. The repository is made on GitHub at your first push.
- Existing repository: pick one you can write to. Its default branch is used.
- The README.md lists your files and how to run them; edit it like any other file.
3. Change, stage, commit, push
| Step | In the panel | In the Terminal |
|---|---|---|
| See what changed | Changes list: U new, M modified, D deleted (also shown in the Explorer) | git status |
| Stage files | Tick files, or Stage all | git add . · git add bell-states.py · git add data/ |
| Unstage | Untick | git reset <file> |
| Commit | Write a message, then Commit | git commit -m "Add Bell state" |
| Push | Push N (or Commit & push) | git push |
| History | The queue under the form | git log |
git init my-quantum-lab --private # new private repository, adds README.md git add . git commit -m "First circuits" git push git remote add origin your-name/qubits main # or use an existing one git status
The push queue
Each commit waits in a queue and is pushed in order, as its own commit on GitHub. You see its state (waiting, pushing, done with a link, or failed with the reason). If one fails, for example because of a limit, the queue stops there: fix the cause and press Push again. Pushed commits stay listed for git log until you clear them.
Import from GitHub
- GitHub → Import: type owner/name or paste a github.com link (or pick one of yours), tick the files, choose a folder, Import.
- Only Playground files come in: .py, .qasm, .csv, .tsv, .txt, .json, .md and .dat. Imported code runs only in the sandbox, like your own.
- Public repositories work without connecting; your private ones need the connection.
Save IDE circuits to GitHub
In the IDE, open the code download menu and choose Save to GitHub · OpenQASM 3 or · Python. Pick the repository, the file path (circuits/<name> by default) and a message; it is pushed as one commit.
Limits and rules
| Rule | Limit |
|---|---|
| Files per commit or import | 40 |
| Size of one file | 100 KB |
| Size of one push or import | 1 MB |
| Pushes per hour | 10 |
| File names | Letters, digits, . - _ and folders; no .. or hidden secrets files |
| Repositories | Only ones you can write to |
What QubitLab's git does not do (yet): branches other than the one you linked, pull, merge and history from GitHub. The commit history lives in this browser for your account; GitHub always keeps the pushed code. To work on another device, import from your repository there.