Skip to content

Commit

Permalink
Merge branch 'stable/0.25' into mergify/bp/stable/0.25/pr-10610
Browse files Browse the repository at this point in the history
  • Loading branch information
1ucian0 committed Aug 16, 2023
2 parents da224f1 + 91ca2c4 commit 31f845d
Show file tree
Hide file tree
Showing 109 changed files with 48,803 additions and 45 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ celerybeat-schedule
.env

# virtualenv
.asv/
.venv
venv/
ENV/
Expand Down
117 changes: 111 additions & 6 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,114 @@
<!-- Copyright Contributors to the Qiskit project. -->

# Code of Conduct
All members of this project agree to adhere to the Qiskit Code of Conduct listed at [https://github.com/Qiskit/qiskit/blob/master/CODE_OF_CONDUCT.md](https://github.com/Qiskit/qiskit/blob/master/CODE_OF_CONDUCT.md)

----
## Our Pledge

The Qiskit Community is dedicated to our values of treating every individual
with respect and dignity. In the interest of fostering an open and welcoming
environment, all participants, including attendees, speakers, sponsors,
volunteers, online contributors, and IBM employees are expected to show
courtesy for each other and our community by creating a harassment-free
experience for everyone, regardless of age, personal appearance, disability,
ethnicity, gender identity and expression, body size, level of experience,
nationality, race, religion, caste, or sexual identity and orientation.
Expected behavior applies to both online and offline engagement within the
Qiskit Community.

## Scope

The purpose of this Code of Conduct is to define and enforce the values and
conduct of contributors and participants in the Qiskit open source community.
The Code of Conduct applies both within project spaces and in public spaces
when an individual is engaging with the Qiskit open source community. Examples
include attending a Qiskit event, contributing to online projects, commentary
on Slack, or representing a project or community, including using an official
project e-mail address, posting via an official social media account, or
acting as an appointed representative at an online or offline event.
Representation of a project may be further defined and clarified by project
maintainers.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints, experiences, and cultures
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
- Being mindful of your surroundings and your fellow participants and listening
to others
- Valuing the contributions of all participants
- Engaging in collaboration before conflict
- Pointing out unintentionally racist, sexist, casteist, or biased comments and
jokes made by community members when they happen

Examples of unacceptable behavior by participants, even when presented as
"ironic" or "joking," include:

- The use of sexualized language or imagery and unwelcome physical contact,
sexual attention, or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment, including offensive or degrading language
- Publishing others' private information, such as a physical or electronic
address, without explicit permission. This includes any sort of "outing" of
any aspect of someone's identity without their consent.
- "Doxxing," Publishing screenshots or quotes, especially from identity slack
channels, private chat, or public events, without all quoted users' explicit
consent.
- Engaging in spamming activities, such as repeatedly sending unsolicited messages, LLMs (Large Language Models) output, advertisements, or promotional content to community members without previous IBM authorization.
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Responsibilities & Enforcement

The entire Qiskit community is responsible for upholding the terms of the Code
of Conduct in Qiskit Community events and spaces and reporting violations if
they see them. The internal Qiskit team at IBM is ultimately responsible for
clarifying the standards of acceptable behavior and enforcement, and is expected
to take appropriate and fair corrective action in response to any instances of
unacceptable behavior.

If a participant or contributor engages in negative or harmful behavior, IBM
will take any action they deem appropriate, including but not limited to
issuing warnings, expulsion from an event with no refund, deleting comments,
permanent banning from future events or online community, or calling local law
enforcement. IBM has the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, or to temporarily or permanently ban any
contributor or participant for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

If you see a Code of Conduct violation:

1. If you feel comfortable, let the person know that what they did is not
appropriate and ask them to stop and/or edit or delete their message(s) or
comment(s).
2. If the person does not immediately stop the behavior or correct the issue,
or if you're uncomfortable speaking up, flag a moderator and, if appropriate,
fill out the anonymous
[Code of Conduct violation form](https://airtable.com/shrl5mEF4Eun1aIDm).
3. The Qiskit Community will open an investigation upon receiving your form
entry. When reporting, please include any relevant details, links,
screenshots, context, or other information that may be used to better
understand and resolve the situation.
4. If the code of conduct violation occurs at an event and requires immediate
response or contains a concern about an individual attending an upcoming
event, contact the event's on-call Code of Conduct point of contact listed
in the event specific code of conduct document. If you don't feel comfortable
speaking to the point of contact in person, fill out a Code of Conduct
violation form entry and include the details of the event so that the Code of
Conduct enforcement board can contact the event's on-call Code of Conduct
point of contact.
5. If an IBM employee witnesses a Code of Conduct violation at any time, such as
at events, in a Slack channel, or open source forums, it is their
responsibility to file a Code of Conduct violation report.

License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/),
Copyright Contributors to Qiskit.
This Code of Conduct does not supersede existing IBM corporate policies, such as
the IBM Business Conduct Guidelines and IBM Business Partner Code of Conduct.
IBM employees must follow IBM's Business Conduct Guidelines. IBM's business
partners must follow the IBM Business Partner Code of Conduct. IBM employees
concerned with a fellow IBMer's behavior should follow IBM's own internal HR
reporting protocols, which include engaging the offending IBMer's manager and
involving IBM Concerns and Appeals. IBM employees concerned with an IBM
business partner's behavior should notify tellibm@us.ibm.com.
25 changes: 25 additions & 0 deletions asv.conf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"version": 1,
"project": "qiskit",
"project_url": "https://qiskit.org",
"repo": ".",
"install_command": [
"in-dir={env_dir} python -mpip install {wheel_file}[all] python-constraint qiskit-experiments==0.3.0"
],
"uninstall_command": [
"return-code=any python -mpip uninstall -y {project}"
],
"build_command": [
"pip install -U setuptools-rust",
"python setup.py build_rust --release",
"PIP_NO_BUILD_ISOLATION=false python -mpip wheel --no-deps --no-index -w {build_cache_dir} {build_dir}"
],
"branches": ["main"],
"dvcs": "git",
"environment_type": "virtualenv",
"show_commit_url": "http://github.com/Qiskit/qiskit-terra/commit/",
"pythons": ["3.8", "3.9", "3.10", "3.11"],
"benchmark_dir": "test/benchmarks",
"env_dir": ".asv/env",
"results_dir": ".asv/results"
}
Binary file added docs/_static/images/ibm_qlab.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/images/strangeworks.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions docs/apidocs/terra.rst → docs/apidoc/index.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.. module:: qiskit

==========================
Qiskit Terra API Reference
==========================
=============
API Reference
=============

.. toctree::
:maxdepth: 1
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
75 changes: 64 additions & 11 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

# pylint: disable=invalid-name
# pylint: disable=invalid-name,missing-function-docstring

"""Sphinx documentation builder."""

import datetime
import doctest
import os
import subprocess

project = "Qiskit"
project_copyright = f"2017-{datetime.date.today().year}, Qiskit Development Team"
Expand All @@ -25,9 +26,6 @@
# The short X.Y version
version = "0.25"
# The full version, including alpha/beta/rc tags
<<<<<<< HEAD
release = "0.25.0"
=======
release = "0.45.0"

# The language for content autogenerated by Sphinx or the default for gettext content translation.
Expand All @@ -38,7 +36,12 @@
docs_url_prefix = "documentation"

rst_prolog = f".. |version| replace:: {version}"
>>>>>>> 80e95d11c (Add GitHub Actions documentation-deployment pipeline (#10610))

# For 'qiskit_sphinx_theme' tells it we're based at 'https://qiskit.org/<docs_url_prefix>'.
# Should not include the subdirectory for the stable version.
docs_url_prefix = "documentation"

rst_prolog = f".. |version| replace:: {version}"

extensions = [
"sphinx.ext.napoleon",
Expand Down Expand Up @@ -83,6 +86,12 @@

pygments_style = "colorful"

panels_css_variables = {
"tabs-color-label-active": "rgb(138, 63, 252)",
"tabs-color-label-inactive": "rgb(221, 225, 230)",
}


# This adds the module name to e.g. function API docs. We use the default of True because our
# module pages sometimes have functions from submodules on the page, and we want to make clear
# that you must include the submodule to import it. We should strongly consider reorganizing our
Expand All @@ -95,6 +104,19 @@
# (e.g., if this is set to ['foo.'], then foo.bar is shown under B, not F).
modindex_common_prefix = ["qiskit."]

# ----------------------------------------------------------------------------------
# Extlinks
# ----------------------------------------------------------------------------------
# Refer to https://www.sphinx-doc.org/en/master/usage/extensions/extlinks.html
extlinks = {
"pull_terra": ("https://github.com/Qiskit/qiskit-terra/pull/%s", "qiskit-terra #%s"),
"pull_aer": ("https://github.com/Qiskit/qiskit-aer/pull/%s", "qiskit-aer #%s"),
"pull_ibmq-provider": (
"https://github.com/Qiskit/qiskit-ibmq-provider/pull/%s",
"qiskit-ibmq-provider #%s",
),
}

intersphinx_mapping = {
"rustworkx": ("https://qiskit.org/ecosystem/rustworkx/", None),
"qiskit-ibm-runtime": ("https://qiskit.org/ecosystem/ibm-runtime/", None),
Expand All @@ -108,21 +130,19 @@
# HTML theme
# ----------------------------------------------------------------------------------

html_theme = "qiskit_sphinx_theme"
html_theme = "qiskit"
html_favicon = "images/favicon.ico"
html_last_updated_fmt = "%Y/%m/%d"
<<<<<<< HEAD
html_theme_options = {
"logo_only": True,
"display_version": True,
"prev_next_buttons_location": "bottom",
"style_external_links": True,
}
=======
html_context = {
"analytics_enabled": bool(os.getenv("QISKIT_ENABLE_ANALYTICS", ""))
} # enable segment analytics for qiskit.org/documentation
html_static_path = ["_static"]
>>>>>>> 80e95d11c (Add GitHub Actions documentation-deployment pipeline (#10610))

# ----------------------------------------------------------------------------------
# Autodoc
Expand All @@ -139,6 +159,8 @@
# return type is always added to the description (if in the signature).
autodoc_typehints_description_target = "documented_params"

autoclass_content = "both"

autosummary_generate = True
autosummary_generate_overwrite = False

Expand All @@ -159,8 +181,6 @@
"qiskit.pulse.library.Sech": "qiskit.pulse.library.Sech_fun.rst",
}

autoclass_content = "both"

# We only use Google-style docstrings, and allowing Napoleon to parse Numpy-style docstrings both
# slows down the build (a little) and can sometimes result in _regular_ section headings in
# module-level documentation being converted into surprising things.
Expand All @@ -185,6 +205,14 @@
# output
doctest_test_doctest_blocks = ""


# ----------------------------------------------------------------------------------
# Plot directive
# ----------------------------------------------------------------------------------

plot_html_show_formats = False


# ----------------------------------------------------------------------------------
# Nbsphinx
# ----------------------------------------------------------------------------------
Expand All @@ -208,3 +236,28 @@
__ https://github.com/Qiskit/qiskit-terra/blob/main/{{ docname }}
"""


def add_versions_to_config(_app, config):
"""Add a list of old documentation versions that should have links generated to them into the
context, so the theme can use them to generate a sidebar."""
# First 0.x version where Qiskit/Terra and the metapackage aligned on number.
first_unified_zero_minor = 45

# Start with the hardcoded versions of the documentation that were managed while the metapackage
# still existed, so are based on tags that don't exist in the Qiskit package repo.
versions = ["0.19"] + [f"0.{x}" for x in range(24, first_unified_zero_minor)]

proc = subprocess.run(["git", "describe", "--abbrev=0"], capture_output=True, check=True)
current_version = proc.stdout.decode("utf8")
current_version_info = current_version.split(".")
if current_version_info[0] != "0":
raise Exception("TODO: handle major versions")
versions.extend(
f"0.{x}" % x for x in range(first_unified_zero_minor, int(current_version_info[1]) + 1)
)
config.html_context["version_list"] = versions


def setup(app):
app.connect("config-inited", add_versions_to_config)

0 comments on commit 31f845d

Please sign in to comment.