diff --git a/.github/SECURITY.md b/.github/SECURITY.md new file mode 100644 index 00000000000..f9826a4ffc6 --- /dev/null +++ b/.github/SECURITY.md @@ -0,0 +1,30 @@ +# Reporting security issues + +The Cirq developers and community take security bugs in Cirq seriously. We +appreciate your efforts to responsibly disclose your findings, and will make +every effort to acknowledge your contributions. + +Please **do not** use GitHub issues to report security vulnerabilities; GitHub +issues are public, and doing so could allow someone to exploit the information +before the problem can be addressed. Instead, please use the GitHub ["Report +a Vulnerability"](https://github.com/quantumlib/cirq/security/advisories/new) +interface from the _Security_ tab of the Cirq repository. + +Please security bugs in third-party modules to the person or team maintaining +the module rather than the Cirq project stewards, unless you believe that some +action needs to be taken with Cirq in order to guard against the effects of a +security vulnerability in a third-party module. + +## Responses to security reports + +The project stewards at Google Quantum AI will send a response indicating the +next steps in handling your report. After the initial reply to your report, the +project stewards will keep you informed of the progress towards a fix and full +announcement, and may ask for additional information or guidance. + +## Additional points of contact + +Please contact the project stewards at Google Quantum AI via email at +quantum-oss-maintainers@google.com if you have questions or other concerns. If +for any reason you are uncomfortable reaching out to the project stewards, +please email opensource@google.com. diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 00000000000..b2e402babaa --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,32 @@ +cff-version: 1.2.0 +message: If you use this software, please cite it as below. +authors: + - name: Cirq Developers + website: https://github.com/quantumlib/Cirq/graphs/contributors +title: Cirq +abstract: Python package for writing, manipulating, and running quantum circuits on quantum computers and simulators. +version: 1.4.1 +date-released: 2024-06-26 +url: https://quantumai.google/cirq +repository-code: https://github.com/quantumlib/Cirq +license: Apache-2.0 +identifiers: + - type: doi + value: 10.5281/zenodo.4062499 + description: Archival DOI for Cirq software releases. +type: software +keywords: + - api + - nisq + - noisy intermediate-scale quantum + - python + - quantum algorithms + - quantum circuit simulation + - quantum circuits + - quantum computing + - quantum programming + - quantum programming languages + - quantum simulation + - sdk + - simulation + - software diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 81e329bafc3..848e07cdeda 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,14 +5,15 @@ We do have some guidelines to follow, covered in this document, but don't worry about (or expect to) get everything right the first time! Create a pull request and we'll nudge you in the right direction. Please also note that we have a [code of conduct](CODE_OF_CONDUCT.md) to make Cirq an -open and welcoming environment. +open and welcoming community environment. ## Contributor License Agreement -Contributions to this project must be accompanied by a Contributor License -Agreement. You (or your employer) retain the copyright to your contribution; +Contributions to this project must be accompanied by a [Contributor License +Agreement](https://cla.developers.google.com/about) (CLA). You +(or your employer) retain the copyright to your contribution; this simply gives us permission to use and redistribute your contributions as -part of the project. Head over to to see +part of the project. Head over to https://cla.developers.google.com/ to see your current agreements on file or to sign a new one. 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. [GitHub Help](https://help.github.com/articles/about-pull-requests/) has information on using pull requests. -The preferred manner for submitting pull requests is for users to fork -the Cirq [repo](https://github.com/quantumlib/Cirq) and then use a -branch from this fork to create a pull request to the main Cirq repo. - -The basic process for setting up a fork is -1. Fork the Cirq repo (Fork button in upper right corner of -[repo page](https://github.com/quantumlib/Cirq)). -Forking creates a new github repo at the location -```https://github.com/USERNAME/cirq``` where ```USERNAME``` is -your github id. Use the directions on the +The preferred manner for submitting pull requests is for developers to fork +the Cirq [repository](https://github.com/quantumlib/Cirq) and then use a [git +branch](https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell) +from this fork to create a pull request to the main Cirq repo. The basic process for setting +up a fork is as follows: + +1. Fork the Cirq repository (you can use the _Fork_ button in upper right +corner of the [repository page](https://github.com/quantumlib/Cirq)). +Forking creates a new GitHub repo at the location +`https://github.com/USERNAME/Cirq`, where `USERNAME` is +your GitHub user name. Use the instructions on the [development page](docs/dev/development.md) to download a copy to your local machine. You need only do this once. -1. Checkout main and create a new branch from this main +1. Check out the `main` branch and create a new branch from `main`: ```shell git checkout main -b new_branch_name ``` - where ```new_branch_name``` is the name of your new branch. + where `new_branch_name` is the name of your new branch. 1. Do your work and commit your changes to this branch. -1. If you have drifted out of sync with the main from the -main cirq repo you may need to merge in changes. To do this, -first update your local main and then merge the local main +1. If your local copy has drifted out of sync with the `main` branch of the +main Cirq repo, you may need to merge in the latest changes. To do this, +first update your local `main` and then merge your local `main` into your branch: ```shell # Track the upstream repo (if your local repo hasn't): @@ -60,46 +62,48 @@ into your branch: git checkout new_branch_name git merge main ``` - You may need to fix merge conflicts for both of these merge - commands. -1. Finally, push your change to your clone + You may need to fix [merge conflicts]( + https://docs.github.com/articles/about-merge-conflicts) + during one or both of these merge processes. +1. Finally, push your changes to your forked copy of the Cirq repo on GitHub: ```shell git push origin new_branch_name ``` -1. Now when you navigate to the cirq page on github, -[https://github.com/quantumlib/cirq](https://github.com/quantumlib/cirq) +1. Now when you navigate to the Cirq repository on GitHub +(https://github.com/quantumlib/Cirq), you should see the option to create a new pull request from -your clone repository. Alternatively you can create the pull request +your clone repository. Alternatively, you can create the pull request by navigating to the "Pull requests" tab in the page, and selecting the appropriate branches. -1. The reviewer will comment on your code and may ask for changes, -you can perform these locally, and then push the new commit following -the same process as above. +1. A reviewer will comment on your code and may ask for changes. +You can perform the necessary changes locally, and then push the new commit +following the same process as above. ## Development Environment Setup -Please refer to our [development page](docs/dev/development.md) for instructions -on setting up your local development environment. +Please refer to our [development page](docs/dev/development.md) for +instructions on setting up your local development environment. ## Code Testing Standards When a pull request is created or updated, various automatic checks will -run to ensure that the change won't break Cirq and meets our coding standards. +run on GitHub to ensure that the changes won't break Cirq, as well as to make +sure they meet the Cirq project's coding standards. -Cirq contains a continuous integration tool to verify testing. See our +Cirq includes a continuous integration tool to perform testing. See our [development page](docs/dev/development.md) on how to run the continuous integration checks locally. -Please be aware of the following code standards that will be applied to any +Please be aware of the following coding standards that will be applied to any new changes. - **Tests**. Existing tests must continue to pass (or be updated) when new changes are -introduced. We use [pytest](https://docs.pytest.org/en/latest/) to run our +introduced. We use [pytest](https://docs.pytest.org) to run our tests. - **Coverage**. Code should be covered by tests. -We use [pytest-cov](https://pytest-cov.readthedocs.io/en/latest/) to compute +We use [pytest-cov](https://pytest-cov.readthedocs.io) to compute coverage, and custom tooling to filter down the output to only include new or changed code. We don't require 100% coverage, but any uncovered code must be annotated with `# pragma: no cover`. To ignore coverage of a single line, @@ -107,23 +111,25 @@ place `# pragma: no cover` at the end of the line. To ignore coverage for an entire block, start the block with a `# pragma: no cover` comment on its own line. - **Lint**. -Code should meet common style standards for python and be free of error-prone -constructs. We use [pylint](https://www.pylint.org/) to check for lint. +Code should meet common style standards for Python and be free of error-prone +constructs. We use [Pylint](https://www.pylint.org/) to check for code lint. To see which lint checks we enforce, see the -[dev_tools/conf/.pylintrc](dev_tools/conf/.pylintrc) file. When pylint produces -a false positive, it can be squashed with annotations like -`# pylint: disable=unused-import`. +[dev_tools/conf/.pylintrc](dev_tools/conf/.pylintrc) file. When Pylint produces +a false positive, it can be silenced with annotations. For example, the +annotation `# pylint: disable=unused-import` would silence a warning about +an unused import. - **Types**. Code should have [type annotations](https://www.python.org/dev/peps/pep-0484/). We use [mypy](http://mypy-lang.org/) to check that type annotations are correct. -When type checking produces a false positive, it can be ignored with -annotations like `# type: ignore`. +When type checking produces a false positive, it can be silenced with +annotations such as `# type: ignore`. ## Request For Comment Process for New Major Features -For larger contributions that will benefit from design reviews, please use the +For larger contributions that will benefit from design reviews, please use the Cirq [Request for Comment](docs/dev/rfc_process.md) process. ## Developing notebooks -Please refer to our [notebooks guide](docs/dev/notebooks.md) on how to develop iPython notebooks for documentation. +Please refer to our [notebooks guide](docs/dev/notebooks.md) on how to develop +iPython notebooks for documentation. diff --git a/SUPPORT.md b/SUPPORT.md new file mode 100644 index 00000000000..647d5108a9b --- /dev/null +++ b/SUPPORT.md @@ -0,0 +1,28 @@ +# Support + +Thank you for your interest in this project! If you are experiencing problems +or have questions, the following are some suggestions for how to get help. + +> [!NOTE] +> Before participating in our community, please read our [code of +> conduct](CODE_OF_CONDUCT.md). By interacting with this repository, +> organization, or community, you agree to abide by its terms. + +## Report an issue or request a feature + +To report an issue or request a feature in Cirq, please first search the [issue +tracker on GitHub](https://github.com/quantumlib/Cirq/issues) to check if there +is already an open issue identical or similar to your bug report/feature +request. If there is none, go ahead and file a new issue in the issue tracker. + +## Attend the developer meetings + +_Cirq Cynq_ is our biweekly virtual meeting of contributors to discuss +everything from issues to ongoing efforts, as well as to ask questions. Join +the [`cirq-dev` Google Group](https://groups.google.com/forum/#!forum/cirq-dev) +to get an automatic meeting invitation. + +## Contact the maintainers + +For any questions or concerns not addressed here, please email +[quantum-oss-maintainers@google.com](mailto:quantum-oss-maintainers@google.com).