A qiskit experiments extension to calibrate single qutrit gates.
Project description
Qutrit Calibration
A qutrit experiment extension for Qiskit Experiments. This package allows for straightforward calibration of single qutrit gates.
Note:
A word of caution: this package is an alpha release and subject to breaking API changes without much notice.
Once installed it can imported using
import qiskit_qutrit_calibration
Installation
This package can be in one of three ways:
- Installed via pip as
pip install qiskit-qutrit-calibration
- Installed from the downloaded repository using pip as
cd qiskit-qutrit-calibration
pip install .
- Installed directly using the github url
pip install git+https://github.com/qiskit-community/qutrit-calibration
Usage
This package allows users to spin up their own calibration experiments for single qutrit gates SX12, X12, Sy12, Y12, and RZ12. The experiments to tune up these gates include:
RoughEFFrequencyCalRoughEFAmplitudeCalNarrowBandSpectroscopyCalRoughEFXDragCalFineEFXAmplitudeCal
Simply create a new QutritCalibrations object using
cals = QutritCalibrations.from_backend(backend)
Then execute an experiment using the instantiated QutritCalibrations, a Tuple of qubit indices, and backend to run on. For example,
from qiskit_qutrit_calibration import library
exp = library.RoughEFFrequencyCal( (qubit_index), calibrations=cals, backend=backend )
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 qutrit-calibration
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 qutrit-calibration/test folder.
These can be run directly via stestr using the command
cd qutrit-calibration
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 Qiskit Qutrit Calibration"""
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
qutrit-calibration/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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qiskit_qutrit_calibration-0.1.4.tar.gz.
File metadata
- Download URL: qiskit_qutrit_calibration-0.1.4.tar.gz
- Upload date:
- Size: 18.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.1 Linux/6.6.13-200.fc39.x86_64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
efcaace37ad211361c2ab96b1173b0d61439225d4a5e791b38e771325a4f4818
|
|
| MD5 |
69d89ecf62039928e5c5fff66cab11cd
|
|
| BLAKE2b-256 |
1bd7aec53e5342858a71e38d39dfee64ba9c02079c6d94836dac34e671cfe2fd
|
File details
Details for the file qiskit_qutrit_calibration-0.1.4-py3-none-any.whl.
File metadata
- Download URL: qiskit_qutrit_calibration-0.1.4-py3-none-any.whl
- Upload date:
- Size: 27.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.1 Linux/6.6.13-200.fc39.x86_64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93168fefaf70a8daade1ffdffe4dc892715ad001442b1d7f7acd191e05e3829c
|
|
| MD5 |
6fefdf0cf50f9dd5ed29a1582c1d63b7
|
|
| BLAKE2b-256 |
8b795c44735650cb4319fc7d3c266ff63019d7b56316662e86f6583f606ce89d
|