Skip to content
This repository was archived by the owner on May 17, 2022. It is now read-only.

Commit 6f4c834

Browse files
author
Rajib Chakravorty
authored
Merge pull request #2 from qctrl/first-commit
Initiate Q-CTRL Qiskit Adapter
2 parents cd6c4f8 + f039995 commit 6f4c834

File tree

11 files changed

+153
-67
lines changed

11 files changed

+153
-67
lines changed

.circleci/config.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

.github/workflows/on-push.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Push workflow
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
8+
jobs:
9+
10+
housekeeping:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v1
14+
- name: Perform housekeeping checks
15+
env:
16+
GCLOUD_CONTAINER_AUTH: ${{ secrets.GCLOUD_CONTAINER_AUTH }}
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
run: |
19+
source <(curl -sL http://ci.q-ctrl.com)
20+
./ci docker run asia.gcr.io/q-ctrl-api-development/python-37 /scripts/housekeeping.sh
21+
22+
linting:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v1
26+
- name: Install Python dependencies
27+
env:
28+
GCLOUD_CONTAINER_AUTH: ${{ secrets.GCLOUD_CONTAINER_AUTH }}
29+
run: |
30+
source <(curl -sL http://ci.q-ctrl.com)
31+
./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }}
32+
./ci docker run asia.gcr.io/q-ctrl-api-development/python-37 /scripts/install-python-dependencies.sh
33+
- name: Run Pylint
34+
run: |
35+
./ci docker run asia.gcr.io/q-ctrl-api-development/python-37 poetry run pylint_runner || true
36+
- name: Run Pylama
37+
run: |
38+
./ci docker run asia.gcr.io/q-ctrl-api-development/python-37 poetry run pylama || true
39+
- name: Run Markdownlint
40+
run: |
41+
./ci docker run asia.gcr.io/q-ctrl-api-development/python-37 mdl -- -ig . || true
42+
43+
pytest:
44+
runs-on: ubuntu-latest
45+
strategy:
46+
matrix:
47+
python: [36, 37]
48+
steps:
49+
- uses: actions/checkout@v1
50+
- name: Install Python dependencies
51+
env:
52+
GCLOUD_CONTAINER_AUTH: ${{ secrets.GCLOUD_CONTAINER_AUTH }}
53+
run: |
54+
source <(curl -sL http://ci.q-ctrl.com)
55+
./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }}
56+
./ci docker run asia.gcr.io/q-ctrl-api-development/python-${{ matrix.python }} /scripts/install-python-dependencies.sh
57+
- name: Run Pytest
58+
run: |
59+
./ci docker run asia.gcr.io/q-ctrl-api-development/python-${{ matrix.python }} /scripts/pytest.sh
60+
61+
publish_internally:
62+
runs-on: ubuntu-latest
63+
steps:
64+
- uses: actions/checkout@v1
65+
- name: Publish development version
66+
env:
67+
GCLOUD_CONTAINER_AUTH: ${{ secrets.GCLOUD_CONTAINER_AUTH }}
68+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69+
run: |
70+
source <(curl -sL http://ci.q-ctrl.com)
71+
./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }}
72+
./ci docker run asia.gcr.io/q-ctrl-api-development/python-37 /scripts/publish-dev-version.sh

.github/workflows/on-release.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Release workflow
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
9+
release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v1
13+
- name: Update version in code
14+
env:
15+
GCLOUD_CONTAINER_AUTH: ${{ secrets.GCLOUD_CONTAINER_AUTH }}
16+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
run: |
18+
source <(curl -sL http://ci.q-ctrl.com)
19+
./ci docker run asia.gcr.io/q-ctrl-api-development/python-37 /scripts/housekeeping.sh
20+
- name: Publish publicly
21+
env:
22+
GCLOUD_CONTAINER_AUTH: ${{ secrets.GCLOUD_CONTAINER_AUTH }}
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
run: |
25+
source <(curl -sL http://ci.q-ctrl.com)
26+
./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }}
27+
./ci docker run asia.gcr.io/q-ctrl-api-development/python-37 /scripts/publish-release-publicly.sh
28+
- name: Publish internally
29+
env:
30+
GCLOUD_CONTAINER_AUTH: ${{ secrets.GCLOUD_CONTAINER_AUTH }}
31+
run: |
32+
./ci docker run asia.gcr.io/q-ctrl-api-development/python-37 /scripts/publish-release-internally.sh

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Q-CTRL Qiskit
1+
# Q-CTRL Qiskit Adaptor
22

3-
The aim of the Q-CTRL Qiskit package is to provide export functions allowing
3+
The aim of the Q-CTRL Qiskit Adaptor package is to provide export functions allowing
44
users to deploy established error-robust quantum control protocols from the
55
open literature and defined in Q-CTRL Open Controls on IBM Quantum hardware.
66

@@ -17,13 +17,13 @@ Anyone interested in quantum control is welcome to contribute to this project.
1717

1818
## Installation
1919

20-
Q-CTRL Qiskit can be install through `pip` or from source. We recommend
20+
Q-CTRL Qiskit Adaptor can be installed through `pip` or from source. We recommend
2121
the `pip` distribution to get the most recent stable release. If you want the
2222
latest features then install from source.
2323

2424
### Requirements
2525

26-
To use Q-CTRL Qiskit you will need an installation of Python. We
26+
To use Q-CTRL Qiskit Adaptor you will need an installation of Python. We
2727
recommend using the [Anaconda](https://www.anaconda.com/) distribution of
2828
Python. Anaconda includes standard numerical and scientific Python packages
2929
which are optimally compiled for your machine. Follow the [Anaconda
@@ -37,7 +37,7 @@ jupyter notebook editor](https://jupyter.org/install) on its own.
3737

3838
### Using PyPi
3939

40-
Use `pip` to install the latest version of Q-CTRL Qiskit.
40+
Use `pip` to install the latest version of Q-CTRL Qiskit Adaptor.
4141

4242
```shell
4343
pip install qctrl-qiskit

README.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11

2-
Q-CTRL Qiskit
3-
=============
2+
Q-CTRL Qiskit Adaptor
3+
=====================
44

5-
The aim of the Q-CTRL Qiskit package is to provide export functions allowing
5+
The aim of the Q-CTRL Qiskit Adaptor package is to provide export functions allowing
66
users to deploy established error-robust quantum control protocols from the
77
open literature and defined in Q-CTRL Open Controls on IBM Quantum hardware.
88

@@ -11,6 +11,7 @@ Anyone interested in quantum control is welcome to contribute to this project.
1111
Table of Contents
1212
-----------------
1313

14+
1415
* `Installation <#installation>`_
1516
* `Usage <#usage>`_
1617
* `Contributing <#contributing>`_
@@ -20,14 +21,14 @@ Table of Contents
2021
Installation
2122
------------
2223

23-
Q-CTRL Qiskit can be installed through ``pip`` or from source. We recommend
24+
Q-CTRL Qiskit Adaptor can be installed through ``pip`` or from source. We recommend
2425
the ``pip`` distribution to get the most recent stable release. If you want the
2526
latest features then install from source.
2627

2728
Requirements
2829
^^^^^^^^^^^^
2930

30-
To use Q-CTRL Qiskit you will need an installation of Python. We
31+
To use Q-CTRL Qiskit Adaptor you will need an installation of Python. We
3132
recommend using the `Anaconda <https://www.anaconda.com/>`_ distribution of
3233
Python. Anaconda includes standard numerical and scientific Python packages
3334
which are optimally compiled for your machine. Follow the `Anaconda
@@ -42,7 +43,7 @@ jupyter notebook editor <https://jupyter.org/install>`_ on its own.
4243
Using PyPi
4344
^^^^^^^^^^
4445

45-
Use ``pip`` to install the latest version of Q-CTRL Qiskit.
46+
Use ``pip`` to install the latest version of Q-CTRL Qiskit Adaptor.
4647

4748
.. code-block:: shell
4849

docs/index.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11

2-
Q-CTRL Qiskit
3-
=============
2+
Q-CTRL Qiskit Adaptor
3+
=====================
44

5-
Aim of the Q-CTRL Qiskit package is to provide easy to use export functions
5+
Aim of the Q-CTRL Qiskit Adaptor package is to provide easy to use export functions
66
allowing users to deploy the quantum controls techniques, define in Q-CTRL Open
7-
control on IBMQ quantum hardware.
7+
Controls, on IBMQ quantum hardware.
88

99
Installation
1010
------------
1111

12-
Q-CTRL Qiskit can be install through ``pip`` or from source. We recommend
12+
Q-CTRL Qiskit Adaptor can be install through ``pip`` or from source. We recommend
1313
the ``pip`` distribution to get the most recent stable release. If you want the
1414
latest features then install from source.
1515

1616
Requirements
1717
^^^^^^^^^^^^
1818

19-
To use Q-CTRL Qiskit you will need an installation of Python. We
19+
To use Q-CTRL Qiskit Adaptor you will need an installation of Python. We
2020
recommend using the `Anaconda <https://www.anaconda.com/>`_ distribution of
2121
Python. Anaconda includes standard numerical and scientific Python packages
2222
which are optimally compiled for your machine. Follow the `Anaconda
@@ -31,7 +31,7 @@ jupyter notebook editor <https://jupyter.org/install>`_ on its own.
3131
Using PyPi
3232
^^^^^^^^^^
3333

34-
Use ``pip`` to install the latest version of Q-CTRL Qiskit.
34+
Use ``pip`` to install the latest version of Q-CTRL Qiskit Adaptor.
3535

3636
.. code-block:: shell
3737
@@ -73,7 +73,7 @@ Once the clone is complete, you have two options:
7373
**Note:** if you are on Windows, you'll need to install
7474
`Poetry <https://poetry.eustace.io>`_ manually, and use:
7575

76-
.. code-block:: cmd
76+
.. code-block:: shell
7777
7878
cd python-qiskit
7979
poetry install

poetry.lock

Lines changed: 17 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
[tool.poetry]
22
name = "qctrl-qiskit"
3-
version = "0.0.1"
4-
description = "Q-CTRL Qiskit"
3+
version = "0.0.0"
4+
description = "Q-CTRL Qiskit Adapter"
55
license = "Apache-2.0"
66
authors = ["Q-CTRL <[email protected]>"]
77
readme = "README.md"
88
keywords = [
99
"quantum",
1010
"computing",
1111
"open source",
12-
"engineering"
12+
"engineering",
13+
"qiskit"
1314
]
1415
classifiers = [
1516
"Development Status :: 5 - Production/Stable",
@@ -38,6 +39,8 @@ scipy = "^1.3"
3839
toml = "^0.10.0"
3940
qiskit-ibmq-provider = "^0.3.3"
4041
qiskit-terra = "^0.10.0"
42+
qctrl-open-controls = "^3.0.0"
43+
4144

4245
[tool.poetry.dev-dependencies]
4346
pytest = "*"

qctrlqiskit/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
===========
1919
"""
2020

21-
__version__ = "0.0.1"
21+
__version__ = "0.0.0"
2222

2323
from .quantum_circuit import convert_dds_to_qiskit_quantum_circuit
2424

qctrlqiskit/quantum_circuit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def convert_dds_to_qiskit_quantum_circuit(
9494
the real-circuit is :math:`gate\\_time \\times number\\_of\\_identity\\_gates +
9595
pulse\\_gate\\_time \\times number\\_of\\_pulses`.
9696
97-
Q-CTRL Open Controls support operation resulting in rotation around at most one axis at
97+
Q-CTRL Qiskit Adapter supports operation resulting in rotation around at most one axis at
9898
any offset.
9999
"""
100100

0 commit comments

Comments
 (0)