/Restless-Quantum-Volume

Primary LanguagePythonApache License 2.0Apache-2.0

Restless Quantum Volume

License

A restless quantum volume experiment with restless analysisnd restless mixin for quantum volume

This is a Python package template for creating an extension experiment for Qiskit Experiments.

Once installed it can imported using

import restless_quantum_volume

Installation

This package can be installed from the downloaded repository using pip as

cd restless-quantum-volume
pip install .

If this package is hosted on GitHub you can install it directly using the command

pip install git+https://github.com/danielazaidenberg/restless-quantum-volume

Development Scripts

This package includes several pre-configured tox scripts for automating development of your package. These commands can be run from the command line

cd restless-quantum-volume
tox -e <command>
Command Description
``py` Run unit tests for the package using stestr
black Auto-format your package files using Black
lint Run PyLint on your package to check code formatting. Note that linting will fail if running black would modify any files
docs Generate documentation for the package using Sphinx

If you do not already have the tox command installed, install it by running

pip install tox

Testing Your Package

This package is configured with stestr and tox scripts to run unit tests added to the restless-quantum-volume/test folder.

These can be run directly via stestr using the command

cd restless-quantum-volume
stestr run

Or using to tox script tox -e py to install all dependencies and run the tests in an isolated virtual environment.

To add tests to your package you must including them in a files prefixed as test_*.py in the test/ folder or a subfolder. Tests should be written using the unittest framework to make a test class containing each test as a separate method prefixed as test_*.

For example:

class BasicTests(unittest.TestCase):
    """Some basic tests for Restless Quantum Volume"""

    def test_something(self):
        """A basic test of something"""
        # Write some code here
        some_value = ...
        target = ...
        self.assertTrue(some_value, target)

Documenting Your Package

You can add documentation or tutorials to your package by including it in the restless-quantum-volume/docs folder and building it locally using the tox -edocs command.

Documentation is build using Sphinx. By default will include any API documentation added to your packages main __init__.py file.

License

Apache License 2.0