Skip to content

Commit

Permalink
First public commit just cloning development code over
Browse files Browse the repository at this point in the history
We needed to remove committ history as we hard coded various
things whic we would prefer to keep private for now. To do this,
we needed to make a fresh commit with just public code in a new
public repo.
  • Loading branch information
naezzell committed Jul 8, 2022
1 parent bc81c25 commit 3a86011
Show file tree
Hide file tree
Showing 28 changed files with 13,528 additions and 0 deletions.
16 changes: 16 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: "edd"
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Nic Ezzell
email: [email protected]
affiliation: University of Southern California
version: 1.0.0
date-released: 2022-06-09
url: "https://github.com/USCqserver/edd-dev"
244 changes: 244 additions & 0 deletions README.md

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
qiskit
jupyterlab
matplotlib
pyyaml
45 changes: 45 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import io
import os

from setuptools import setup, find_packages

# read the __version__ variable from nisqai/_version.py
exec(open("src/edd/_version.py").read())

# readme file as long description
long_description = ("======\n" +
"EDD\n" +
"======\n")
stream = io.open("README.md", encoding="utf-8")
stream.readline()
long_description += stream.read()

# read in requirements.txt
requirements = open("requirements.txt").readlines()
requirements = [r.strip() for r in requirements]

setup(
name="edd",
version=__version__,
author="Nic Ezzell, Bruno Avritzer, Bibek Pokharel, Vinay Tripathi",
author_email="[email protected]",
url="https://github.com/naezzell/edd-dev",
description="Library for implementing dynamical decoupling schemes on NISQ-era quantum computers.",
long_description=long_description,
install_requires=requirements,
license="Apache 2",
packages=find_packages(where="src"),
package_dir={"": "src"}
)
59 changes: 59 additions & 0 deletions setup_commands.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
******** basic repo set up/ work flow guide ********

1. git clone [email protected]:naezzell/gadd.git
--> if you don't have ssh keys set up with github: https://help.github.com/en/enterprise/2.15/user/articles/adding-a-new-ssh-key-to-your-github-account

** This will create a directory called gadd. I recommend renaming it to your desired feature name, i.e. gadd-ibmsim if working on ibm simulator

2. git checkout dev
** this makes it so you are on dev branch instead of master

3. $ git checkout -b myfeature dev
** this creates a local branch called myfeature which forks off of dev

4. conda create -n gadd
** creates a conda environment called gadd

5. conda activate gadd
** activates gadd environment

--> now make sure you are in gadd directory with setup.py file

6. pip install -e .
** this builds the gadd package to your conda env while installing necessary dependencies like qiskit along the way
** building the package let's commands like:
from gadd import ibmsim
work from any directory so as long as your conda env is active

7. make code changes
** DO NOT make changes to same files at once. This causes merge conflicts. That's why we have feature branches... only work on feature that branch is related to.

8. git commit
** as you add features to myfeature, commit them and add comments regularly

-->Once you're satisfied with your feature, you can merge it to dev

9. git checkout dev
** puts you back on local copy of dev branch which is hosted remotely

10. git fetch origin dev
** this fetches any changes pushed to dev by other users (i.e. updates your local dev with remote changes)

11. git merge --no-ff myfeature
** merges changes on 'myfeature' branch to 'dev' branch locally
** btw, no-ff flag causes merge to always make new commit object which prevents loss of historical info about feature branch

--> after you are done with features, you want to delete local branch before pushing merged features to remote
--> this makes cleaner commit log history
12. git branch -d myfeature

13. git push origin dev
** this pushes altered features to remote

************ links to useful guides/ stackoverflow posts ************
1. https://nvie.com/posts/a-successful-git-branching-model/
2. https://stackoverflow.com/questions/15838192/best-way-to-manage-local-feature-branches-with-git
3. https://alex.dzyoba.com/blog/python-import/
4. https://stackoverflow.com/questions/49474575/how-to-install-my-own-python-module-package-via-conda-and-watch-its-changes
5. https://help.github.com/en/enterprise/2.15/user/articles/adding-a-new-ssh-key-to-your-github-account
6. https://help.github.com/en/github/using-git/getting-changes-from-a-remote-repository
18 changes: 18 additions & 0 deletions src/edd/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import edd.backend
import edd.circuit
import edd.experiments
import edd.data

from ._version import __version__
14 changes: 14 additions & 0 deletions src/edd/_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Define version number here and read it from setup.py automatically."""
__version__ = "0.0.1"
13 changes: 13 additions & 0 deletions src/edd/backend/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from edd.backend._backend import IBMQBackend
Loading

0 comments on commit 3a86011

Please sign in to comment.