A python client for the Quantinuum Nexus platform.
import qnexus as qnx
# Will open a browser window to login with Nexus credentials
qnx.login()
# Dataframe representation of all your pending jobs in Nexus
qnx.jobs.get_all(job_status=["SUBMITTED", "QUEUED", "RUNNING"]).df()
qnexus can be installed via pip
.
pip install qnexus
Usage examples and tutorials are available here.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Python >= 3.10
- Poetry
- commitizen
If you have Nix and direnv available on your system you can reuse the nix shell environment to provide a development environment.
Run the following to setup your virtual environment and install dependencies:
poetry install
You can then activate the virtual environment and work within it with:
poetry shell
To run a single command in the shell, just prefix it with poetry run
.
Formatting, linting and type-checking can be done with:
poetry run scripts/fmt.sh
Most of the test suite are integration tests that require the following environment variables:
NEXUS_HOST = "qa.myqos.com" NEXUS_QA_USER_EMAIL = ... NEXUS_QA_USER_PASSWORD = ...
And can be run with:
poetry run pytest integration/
These will only be available to internal team members. For external contributions we recommend writing unit tests and/or integration tests and requesting they be run by an internal reviewer.
Run basic unit tests using
poetry run pytest tests/
- Update
CHANGELOG.md
: this is automated. Usedevenv
and thecommitizen
tool:This will use the commit history and modifygit fetch --tags origin # make sure your local tags are same as in github cz bump --files-only # --files-only prevents the tool making a git tag
CHANGELOG.md
to include a heading with the new version number and the date. It also updates.cz.toml
. The tool automatically decides whether to increment the patch version, minor version or major version (major version changes are currently disabled in its config file). It also updates the version inpyproject.toml
at the same time. - If you like, you can manually edit
CHANGELOG.md
at this point. Consider moving important entries under these headings, or writing under them (see Keep A Changelog):- Deprecated
- Removed
- Security
- Create a release branch
git checkout -b release/vx.y.z
git add
the modifications, thengit commit
andgit push
them.- Create a PR (title:
docs: Update CHANGELOG for vx.y.z
) - Ask a colleague to review the changes (should be just
CHANGELOG.md
,pyproject.toml
and.cz.toml
) - Squash merge the PR into
main
- Go to https://github.com/CQCL-DEV/qnexus/releases/new
- Select
create new tag... on publish
when choosing the tag, with name in the formatvx.y.z
. - Choose the target branch/commit for the release (normally
main
) - Put the version number in the "release title" box
- Copy/paste the new sections from
CHANGELOG.md
into the "Describe this release" box - Click "Publish release"
This project is licensed under Apache License, Version 2.0 (LICENSE or http://www.apache.org/licenses/LICENSE-2.0).
Copyright 2024 Quantinuum Ltd.