Skip to content

Commit 5d317ba

Browse files
authored
Add recommended files for community support & update CONTRIBUTING.md (#6898)
* Add ./github/SECURITY.md Per GitHub best practices, this give people instructions for reporting security vulnerabilities in this project. * Add SUPPORT.md file SUPPORT.md files are another GitHub best practice; they're used to to let people know about ways to get help with a project. * Add CITATION.cff file [`CITATION.cff`](https://citation-file-format.github.io/) files are plain text files with human- and machine-readable citation information for software. Code developers can include them in their repositories to let others know how to correctly cite their software. GitHub supports them, and uses `CITATION.cff` files to automatically produce citation metadata records for the "Cite this repository" button on a repository's front page. * Make small corrections & enhancements to CONTRIBUTING.md This contains a variety of small changes: - capitalization fixes (e.g., cirq → Cirq) - clarifications - links to more information * Update CITATION.cff Correction to capitalization. * Fixes for CONTRIBUTING.md issues raised during code review
1 parent de81235 commit 5d317ba

File tree

4 files changed

+140
-44
lines changed

4 files changed

+140
-44
lines changed

.github/SECURITY.md

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Reporting security issues
2+
3+
The Cirq developers and community take security bugs in Cirq seriously. We
4+
appreciate your efforts to responsibly disclose your findings, and will make
5+
every effort to acknowledge your contributions.
6+
7+
Please **do not** use GitHub issues to report security vulnerabilities; GitHub
8+
issues are public, and doing so could allow someone to exploit the information
9+
before the problem can be addressed. Instead, please use the GitHub ["Report
10+
a Vulnerability"](https://github.com/quantumlib/cirq/security/advisories/new)
11+
interface from the _Security_ tab of the Cirq repository.
12+
13+
Please security bugs in third-party modules to the person or team maintaining
14+
the module rather than the Cirq project stewards, unless you believe that some
15+
action needs to be taken with Cirq in order to guard against the effects of a
16+
security vulnerability in a third-party module.
17+
18+
## Responses to security reports
19+
20+
The project stewards at Google Quantum AI will send a response indicating the
21+
next steps in handling your report. After the initial reply to your report, the
22+
project stewards will keep you informed of the progress towards a fix and full
23+
announcement, and may ask for additional information or guidance.
24+
25+
## Additional points of contact
26+
27+
Please contact the project stewards at Google Quantum AI via email at
28+
[email protected] if you have questions or other concerns. If
29+
for any reason you are uncomfortable reaching out to the project stewards,
30+
please email [email protected].

CITATION.cff

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
cff-version: 1.2.0
2+
message: If you use this software, please cite it as below.
3+
authors:
4+
- name: Cirq Developers
5+
website: https://github.com/quantumlib/Cirq/graphs/contributors
6+
title: Cirq
7+
abstract: Python package for writing, manipulating, and running quantum circuits on quantum computers and simulators.
8+
version: 1.4.1
9+
date-released: 2024-06-26
10+
url: https://quantumai.google/cirq
11+
repository-code: https://github.com/quantumlib/Cirq
12+
license: Apache-2.0
13+
identifiers:
14+
- type: doi
15+
value: 10.5281/zenodo.4062499
16+
description: Archival DOI for Cirq software releases.
17+
type: software
18+
keywords:
19+
- api
20+
- nisq
21+
- noisy intermediate-scale quantum
22+
- python
23+
- quantum algorithms
24+
- quantum circuit simulation
25+
- quantum circuits
26+
- quantum computing
27+
- quantum programming
28+
- quantum programming languages
29+
- quantum simulation
30+
- sdk
31+
- simulation
32+
- software

CONTRIBUTING.md

+50-44
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@ We do have some guidelines to follow, covered in this document, but don't
55
worry about (or expect to) get everything right the first time!
66
Create a pull request and we'll nudge you in the right direction. Please also
77
note that we have a [code of conduct](CODE_OF_CONDUCT.md) to make Cirq an
8-
open and welcoming environment.
8+
open and welcoming community environment.
99

1010
## Contributor License Agreement
1111

12-
Contributions to this project must be accompanied by a Contributor License
13-
Agreement. You (or your employer) retain the copyright to your contribution;
12+
Contributions to this project must be accompanied by a [Contributor License
13+
Agreement](https://cla.developers.google.com/about) (CLA). You
14+
(or your employer) retain the copyright to your contribution;
1415
this simply gives us permission to use and redistribute your contributions as
15-
part of the project. Head over to <https://cla.developers.google.com/> to see
16+
part of the project. Head over to https://cla.developers.google.com/ to see
1617
your current agreements on file or to sign a new one.
1718

1819
You generally only need to submit a CLA once, so if you've already submitted one
@@ -26,27 +27,28 @@ use GitHub pull requests for this purpose.
2627
[GitHub Help](https://help.github.com/articles/about-pull-requests/) has
2728
information on using pull requests.
2829

29-
The preferred manner for submitting pull requests is for users to fork
30-
the Cirq [repo](https://github.com/quantumlib/Cirq) and then use a
31-
branch from this fork to create a pull request to the main Cirq repo.
32-
33-
The basic process for setting up a fork is
34-
1. Fork the Cirq repo (Fork button in upper right corner of
35-
[repo page](https://github.com/quantumlib/Cirq)).
36-
Forking creates a new github repo at the location
37-
```https://github.com/USERNAME/cirq``` where ```USERNAME``` is
38-
your github id. Use the directions on the
30+
The preferred manner for submitting pull requests is for developers to fork
31+
the Cirq [repository](https://github.com/quantumlib/Cirq) and then use a [git
32+
branch](https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell)
33+
from this fork to create a pull request to the main Cirq repo. The basic process for setting
34+
up a fork is as follows:
35+
36+
1. Fork the Cirq repository (you can use the _Fork_ button in upper right
37+
corner of the [repository page](https://github.com/quantumlib/Cirq)).
38+
Forking creates a new GitHub repo at the location
39+
`https://github.com/USERNAME/Cirq`, where `USERNAME` is
40+
your GitHub user name. Use the instructions on the
3941
[development page](docs/dev/development.md) to download a copy to
4042
your local machine. You need only do this once.
41-
1. Checkout main and create a new branch from this main
43+
1. Check out the `main` branch and create a new branch from `main`:
4244
```shell
4345
git checkout main -b new_branch_name
4446
```
45-
where ```new_branch_name``` is the name of your new branch.
47+
where `new_branch_name` is the name of your new branch.
4648
1. Do your work and commit your changes to this branch.
47-
1. If you have drifted out of sync with the main from the
48-
main cirq repo you may need to merge in changes. To do this,
49-
first update your local main and then merge the local main
49+
1. If your local copy has drifted out of sync with the `main` branch of the
50+
main Cirq repo, you may need to merge in the latest changes. To do this,
51+
first update your local `main` and then merge your local `main`
5052
into your branch:
5153
```shell
5254
# Track the upstream repo (if your local repo hasn't):
@@ -60,70 +62,74 @@ into your branch:
6062
git checkout new_branch_name
6163
git merge main
6264
```
63-
You may need to fix merge conflicts for both of these merge
64-
commands.
65-
1. Finally, push your change to your clone
65+
You may need to fix [merge conflicts](
66+
https://docs.github.com/articles/about-merge-conflicts)
67+
during one or both of these merge processes.
68+
1. Finally, push your changes to your forked copy of the Cirq repo on GitHub:
6669
```shell
6770
git push origin new_branch_name
6871
```
69-
1. Now when you navigate to the cirq page on github,
70-
[https://github.com/quantumlib/cirq](https://github.com/quantumlib/cirq)
72+
1. Now when you navigate to the Cirq repository on GitHub
73+
(https://github.com/quantumlib/Cirq),
7174
you should see the option to create a new pull request from
72-
your clone repository. Alternatively you can create the pull request
75+
your clone repository. Alternatively, you can create the pull request
7376
by navigating to the "Pull requests" tab in the page, and selecting
7477
the appropriate branches.
75-
1. The reviewer will comment on your code and may ask for changes,
76-
you can perform these locally, and then push the new commit following
77-
the same process as above.
78+
1. A reviewer will comment on your code and may ask for changes.
79+
You can perform the necessary changes locally, and then push the new commit
80+
following the same process as above.
7881

7982
## Development Environment Setup
8083

81-
Please refer to our [development page](docs/dev/development.md) for instructions
82-
on setting up your local development environment.
84+
Please refer to our [development page](docs/dev/development.md) for
85+
instructions on setting up your local development environment.
8386

8487
## Code Testing Standards
8588

8689
When a pull request is created or updated, various automatic checks will
87-
run to ensure that the change won't break Cirq and meets our coding standards.
90+
run on GitHub to ensure that the changes won't break Cirq, as well as to make
91+
sure they meet the Cirq project's coding standards.
8892

89-
Cirq contains a continuous integration tool to verify testing. See our
93+
Cirq includes a continuous integration tool to perform testing. See our
9094
[development page](docs/dev/development.md) on how to run the continuous
9195
integration checks locally.
9296

93-
Please be aware of the following code standards that will be applied to any
97+
Please be aware of the following coding standards that will be applied to any
9498
new changes.
9599

96100
- **Tests**.
97101
Existing tests must continue to pass (or be updated) when new changes are
98-
introduced. We use [pytest](https://docs.pytest.org/en/latest/) to run our
102+
introduced. We use [pytest](https://docs.pytest.org) to run our
99103
tests.
100104
- **Coverage**.
101105
Code should be covered by tests.
102-
We use [pytest-cov](https://pytest-cov.readthedocs.io/en/latest/) to compute
106+
We use [pytest-cov](https://pytest-cov.readthedocs.io) to compute
103107
coverage, and custom tooling to filter down the output to only include new or
104108
changed code. We don't require 100% coverage, but any uncovered code must
105109
be annotated with `# pragma: no cover`. To ignore coverage of a single line,
106110
place `# pragma: no cover` at the end of the line. To ignore coverage for
107111
an entire block, start the block with a `# pragma: no cover` comment on its
108112
own line.
109113
- **Lint**.
110-
Code should meet common style standards for python and be free of error-prone
111-
constructs. We use [pylint](https://www.pylint.org/) to check for lint.
114+
Code should meet common style standards for Python and be free of error-prone
115+
constructs. We use [Pylint](https://www.pylint.org/) to check for code lint.
112116
To see which lint checks we enforce, see the
113-
[dev_tools/conf/.pylintrc](dev_tools/conf/.pylintrc) file. When pylint produces
114-
a false positive, it can be squashed with annotations like
115-
`# pylint: disable=unused-import`.
117+
[dev_tools/conf/.pylintrc](dev_tools/conf/.pylintrc) file. When Pylint produces
118+
a false positive, it can be silenced with annotations. For example, the
119+
annotation `# pylint: disable=unused-import` would silence a warning about
120+
an unused import.
116121
- **Types**.
117122
Code should have [type annotations](https://www.python.org/dev/peps/pep-0484/).
118123
We use [mypy](http://mypy-lang.org/) to check that type annotations are correct.
119-
When type checking produces a false positive, it can be ignored with
120-
annotations like `# type: ignore`.
124+
When type checking produces a false positive, it can be silenced with
125+
annotations such as `# type: ignore`.
121126
122127
## Request For Comment Process for New Major Features
123128
124-
For larger contributions that will benefit from design reviews, please use the
129+
For larger contributions that will benefit from design reviews, please use the Cirq
125130
[Request for Comment](docs/dev/rfc_process.md) process.
126131
127132
## Developing notebooks
128133
129-
Please refer to our [notebooks guide](docs/dev/notebooks.md) on how to develop iPython notebooks for documentation.
134+
Please refer to our [notebooks guide](docs/dev/notebooks.md) on how to develop
135+
iPython notebooks for documentation.

SUPPORT.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Support
2+
3+
Thank you for your interest in this project! If you are experiencing problems
4+
or have questions, the following are some suggestions for how to get help.
5+
6+
> [!NOTE]
7+
> Before participating in our community, please read our [code of
8+
> conduct](CODE_OF_CONDUCT.md). By interacting with this repository,
9+
> organization, or community, you agree to abide by its terms.
10+
11+
## Report an issue or request a feature
12+
13+
To report an issue or request a feature in Cirq, please first search the [issue
14+
tracker on GitHub](https://github.com/quantumlib/Cirq/issues) to check if there
15+
is already an open issue identical or similar to your bug report/feature
16+
request. If there is none, go ahead and file a new issue in the issue tracker.
17+
18+
## Attend the developer meetings
19+
20+
_Cirq Cynq_ is our biweekly virtual meeting of contributors to discuss
21+
everything from issues to ongoing efforts, as well as to ask questions. Join
22+
the [`cirq-dev` Google Group](https://groups.google.com/forum/#!forum/cirq-dev)
23+
to get an automatic meeting invitation.
24+
25+
## Contact the maintainers
26+
27+
For any questions or concerns not addressed here, please email
28+

0 commit comments

Comments
 (0)