Skip to main content

Python client library for the OpenAI API

Project description

Fermioniq client for pure state emulation

Pre-requisites

  • Python3.10

Installation

For Production

In a production environment, you can download the latest version with pip install fermioniq.

The repository can be found here: https://pypi.org/project/fermioniq/

The test versions are upload to pypi-test: https://test.pypi.org/project/fermioniq/.

For Development

To develop the client locally, it is best to install it together with all development packages. We recommend to first create a virtualenv and source it.

Install dependencies: pip install -e .[dev]

The -e flag installs the project with pip (just like a regular module) but uses the current directory as location. This way, you can easily import the client in your projects or notebooks while at the same time updating its code.

Install fermioniq_common

The fermioniq_common submodule shares common code with the Emulator. This should make sure that the data exchange is working properly between client and emulator.

To checkout the fermioniq_common submodule, run:

git submodule update --init --remote.

The --init flag will download the submodule. The --remote flag will make sure that it tracks the remote repository. This way you can easily pull the latest changes.

Pre-Commit Hook

It is best practice to run the pre-commit before committing to Github. To enforce this, please run pre-commit install once.

Unit Tests

In the project directory. Run pytest.

Github Actions

There are three Github actions in place right now.

  1. Integration Tests

    This Action runs whenever a PR to master or develop is made (or being pushed to).

    It will run the linter, unit tests and pypi packager and check whether everything is in good order.

  2. Public to PyPi and Test-PyPi

    This Actions are being run whenever a tag is begin pushed. For Test-PyPi, any tag works. For PyPi itself, the tag must start with a v and end with -release.

    Please make sure to update fermioniq/version.py accordingly, as the script will use it to set the PyPi version. If the version already exists on PyPi, it will fail.

Setup:

Sending jobs to the emulator requires a user-specific 'access_token_id' and 'access_token_secret'. They are tied to your Fermioniq user account.

You can either define them as environment variables

- export FERMIONIQ_ACCESS_TOKEN_ID=""
- export FERMIONIQ_ACCESS_TOKEN_SECRET=""

Or alternatively provide them as input arguments to the fermioniq.Client constructor.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

fermioniq-1.1.4-py2.py3-none-any.whl (90.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file fermioniq-1.1.4-py2.py3-none-any.whl.

File metadata

  • Download URL: fermioniq-1.1.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 90.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.13

File hashes

Hashes for fermioniq-1.1.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7734615fb19aae30d41e6947433c71779e333be5b7b38e5fb01fe1486a3997e6
MD5 3cfa9d4642a8c9279c5073aee719ecd1
BLAKE2b-256 4a9f62cad397686751b5582b439e5156d4c217bf95ff93271510cb90f0075d0c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page