Skip to content

Commit

Permalink
Merge branch 'main' into quantum-time-evo
Browse files Browse the repository at this point in the history
  • Loading branch information
Dariusz Lasecki committed Dec 7, 2021
2 parents 3868bcb + 8c9e01d commit 5831cad
Show file tree
Hide file tree
Showing 552 changed files with 23,824 additions and 6,031 deletions.
30 changes: 0 additions & 30 deletions .github/ISSUE_TEMPLATE/BUG_REPORT.md

This file was deleted.

50 changes: 50 additions & 0 deletions .github/ISSUE_TEMPLATE/BUG_REPORT.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: 🐛 Bug report
description: Create a report to help us improve 🤔.
labels: ["bug"]

body:
- type: markdown
attributes:
value: Thank you for reporting! Please also use the search to see if there are any other relevant issues or pull requests.

- type: textarea
attributes:
label: Environment
description: For the version of Terra, please give the actual version number (_e.g._ 0.18.3) if you are using a release version, or the first 7-8 characters of the commit hash if you have installed from `git`. If anything else is relevant, you can add it to the list.
# The trailing spaces on the following lines are to make filling the form
# in easier. The type is 'textarea' rather than three separate 'input's
# to make the resulting issue body less noisy with headings.
value: |
- **Qiskit Terra version**:
- **Python version**:
- **Operating system**:
validations:
required: true

- type: textarea
attributes:
label: What is happening?
description: A short description of what is going wrong, in words.
validations:
required: true

- type: textarea
attributes:
label: How can we reproduce the issue?
description: Give some steps that show the bug. A [minimal working example](https://stackoverflow.com/help/minimal-reproducible-example) of code with output is best. If you are copying in code, please remember to enclose it in triple backticks (` ``` [multiline code goes here] ``` `) so that it [displays correctly](https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax).
validations:
required: true

- type: textarea
attributes:
label: What should happen?
description: A short description, including about the expected output of any code in the previous section.
validations:
required: true

- type: textarea
attributes:
label: Any suggestions?
description: Not required, but if you have suggestions for how a contributor should fix this, or any problems we should be aware of, let us know.
validations:
required: false
12 changes: 0 additions & 12 deletions .github/ISSUE_TEMPLATE/ENHANCEMENT_REQUEST.md

This file was deleted.

14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/ENHANCEMENT_REQUEST.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: 💅 Enhancement request
description: Suggest an improvement for this project 🆒!
labels: ["type: enhancement"]

body:
- type: markdown
attributes:
value: Please make sure to browse the opened and closed issues to make sure that this idea has not previously been discussed.

- type: textarea
attributes:
label: What is the expected enhancement?
validations:
required: true
12 changes: 0 additions & 12 deletions .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md

This file was deleted.

14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/FEATURE_REQUEST.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: 🚀 Feature request
description: Suggest an idea for this project 💡!
labels: ["type: feature request"]

body:
- type: markdown
attributes:
value: Please make sure to browse the opened and closed issues to make sure that this idea has not previously been discussed.

- type: textarea
attributes:
label: What should we add?
validations:
required: true
3 changes: 3 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ on:
push:
pull_request:
branches: ['main']
concurrency:
group: ${{ github.repository }}-${{ github.ref }}-${{ github.head_ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
coverage:
name: Coverage
Expand Down
2 changes: 1 addition & 1 deletion .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ pull_request_rules:
actions:
backport:
branches:
- stable/0.18
- stable/0.19
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ unsafe-load-any-extension=no
# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code
extension-pkg-whitelist=retworkx, numpy, tweedledum
extension-pkg-allow-list=retworkx, numpy, tweedledum


[MESSAGES CONTROL]
Expand Down
22 changes: 22 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,28 @@ https://qiskit.org/documentation/contributing_to_qiskit.html
In addition to the general guidelines there are specific details for
contributing to terra, these are documented below.

### Contents
* [Choose an issue to work on](#Choose-an-issue-to-work-on)
* [Pull request checklist](#pull-request-checklist)
* [Changelog generation](#changelog-generation)
* [Release Notes](#release-notes)
* [Installing Qiskit Terra from source](#installing-qiskit-terra-from-source)
* [Test](#test)
* [Snapshot testing for visualizations](#snapshot-testing-for-visualizations)
* [Style and Lint](#style-and-lint)
* [Development Cycle](#development-cycle)
* [Branches](#branches)
* [Release Cycle](#release-cycle)
* [Adding deprecation warnings](#adding-deprecation-warnings)
* [Dealing with git blame ignore list](#dealing-with-the-git-blame-ignore-list)

### Choose an issue to work on
Qiskit Terra uses the following labels to help non-maintainers find issues best suited to their interests and experience level:

* [good first issue](https://github.com/Qiskit/qiskit-terra/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) - these issues are typically the simplest available to work on, perfect for newcomers. They should already be fully scoped, with a clear approach outlined in the descriptions.
* [help wanted](https://github.com/Qiskit/qiskit-terra/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) - these issues are generally more complex than good first issues. They typically cover work that core maintainers don't currently have capacity to implement and may require more investigation/discussion. These are a great option for experienced contributors looking for something a bit more challenging.
* [short project](https://github.com/Qiskit/qiskit-terra/issues?q=is%3Aopen+is%3Aissue+label%3A%22short+project%22) - these issues are bigger pieces of work that require greater time commitment. Good options for hackathons, internship projects etc.

### Pull request checklist

When submitting a pull request and you feel it is ready for review,
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pip install qiskit

PIP will handle all dependencies automatically and you will always install the latest (and well-tested) version.

To install from source, follow the instructions in the [documentation](https://qiskit.org/documentation/contributing_to_qiskit.html#install-terra-from-source).
To install from source, follow the instructions in the [documentation](https://qiskit.org/documentation/contributing_to_qiskit.html#install-install-from-source-label).

## Creating Your First Quantum Program in Qiskit Terra

Expand Down
16 changes: 4 additions & 12 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ stages:
variables:
python.version: '3.7'
CIBW_BEFORE_BUILD: pip install -U Cython
CIBW_SKIP: cp27-* cp34-* cp35-* pp*
CIBW_SKIP: cp27-* cp34-* cp35-* cp36-* pp*
TWINE_USERNAME: qiskit
CIBW_TEST_COMMAND: python {project}/examples/python/stochastic_swap.py
steps:
Expand Down Expand Up @@ -72,7 +72,7 @@ stages:
variables:
python.version: '3.7'
CIBW_BEFORE_BUILD: pip install -U Cython
CIBW_SKIP: cp27-* cp34-* cp35-* pp*
CIBW_SKIP: cp27-* cp34-* cp35-* cp36-* pp*
TWINE_USERNAME: qiskit
CIBW_TEST_COMMAND: python {project}/examples/python/stochastic_swap.py
steps:
Expand All @@ -96,7 +96,7 @@ stages:
variables:
python.version: '3.7'
CIBW_BEFORE_BUILD: pip install -U Cython
CIBW_SKIP: cp27-* cp34-* cp35-* pp*
CIBW_SKIP: cp27-* cp34-* cp35-* cp36-* pp*
CIBW_ARCHS_MACOS: universal2
TWINE_USERNAME: qiskit
CIBW_TEST_COMMAND: python {project}/examples/python/stochastic_swap.py
Expand All @@ -120,12 +120,10 @@ stages:
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags')
variables:
CIBW_BEFORE_BUILD: pip install -U Cython
CIBW_SKIP: cp27-* cp34-* cp35-* pp*
CIBW_SKIP: cp27-* cp34-* cp35-* cp36-* pp*
TWINE_USERNAME: qiskit
CIBW_TEST_COMMAND: python {project}\examples\python\stochastic_swap.py
steps:
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.6', architecture: x86}}
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.6', architecture: x64}}
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.7', architecture: x86}}
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.7', architecture: x64}}
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.8', architecture: x86}}
Expand Down Expand Up @@ -506,8 +504,6 @@ stages:
pool: {vmImage: 'windows-latest'}
strategy:
matrix:
Python36:
python.version: '3.6'
Python38:
python.version: '3.8'
Python39:
Expand Down Expand Up @@ -587,8 +583,6 @@ stages:
pool: {vmImage: 'ubuntu-latest'}
strategy:
matrix:
Python36:
python.version: '3.6'
Python38:
python.version: '3.8'
Python39:
Expand Down Expand Up @@ -671,8 +665,6 @@ stages:
pool: {vmImage: 'macOS-10.15'}
strategy:
matrix:
Python36:
python.version: '3.6'
Python38:
python.version: '3.8'
Python39:
Expand Down
6 changes: 6 additions & 0 deletions docs/apidocs/synthesis.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. _qiskit-synthesis:

.. automodule:: qiskit.synthesis
:no-members:
:no-inherited-members:
:no-special-members:
6 changes: 6 additions & 0 deletions docs/apidocs/synthesis_aqc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. _qiskit-transpiler-synthesis-aqc:

.. automodule:: qiskit.transpiler.synthesis.aqc
:no-members:
:no-inherited-members:
:no-special-members:
2 changes: 2 additions & 0 deletions docs/apidocs/terra.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Qiskit Terra API Reference
providers_models
pulse
scheduler
synthesis
qasm
qobj
qpy
Expand All @@ -32,6 +33,7 @@ Qiskit Terra API Reference
transpiler_passes
transpiler_preset
transpiler_plugins
transpiler_builtin_plugins
utils
utils_mitigation
opflow
Expand Down
10 changes: 10 additions & 0 deletions docs/apidocs/transpiler_builtin_plugins.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. _qiskit-transpiler-builtin-plugins:

=====================================
Built-in Transpiler Synthesis Plugins
=====================================

.. toctree::
:maxdepth: 2

synthesis_aqc
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# The short X.Y version
version = ""
# The full version, including alpha/beta/rc tags
release = "0.19.0"
release = "0.20.0"

extensions = [
"sphinx.ext.napoleon",
Expand Down
2 changes: 1 addition & 1 deletion qiskit/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.19.0
0.20.0
26 changes: 17 additions & 9 deletions qiskit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import pkgutil
import sys
import warnings
import os

# qiskit errors operator
from qiskit.exceptions import QiskitError, MissingOptionalLibraryError
Expand Down Expand Up @@ -59,14 +58,6 @@
__qiskit_version__ = QiskitVersion()


if sys.version_info < (3, 7):
warnings.warn(
"Using Qiskit with Python 3.6 is deprecated as of qiskit-terra 0.17.0. "
"Support for running Qiskit with Python 3.6 will be removed in qiskit-terra 0.20.0.",
DeprecationWarning,
)


class AerWrapper:
"""Lazy loading wrapper for Aer provider."""

Expand Down Expand Up @@ -127,3 +118,20 @@ def __getattr__(self, attr):

Aer = AerWrapper()
IBMQ = IBMQWrapper()

__all__ = [
"Aer",
"AncillaRegister",
"BasicAer",
"ClassicalRegister",
"IBMQ",
"MissingOptionalLibraryError",
"QiskitError",
"QuantumCircuit",
"QuantumRegister",
"assemble",
"execute",
"schedule",
"sequence",
"transpile",
]
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ def __init__(
if the ``oracle`` argument has an ``evaluate_bitstring`` method (currently only
provided by the :class:`~qiskit.circuit.library.PhaseOracle` class) this will be
used, otherwise this kwarg is required and **must** be specified.
Raises:
TypeError: if ``is_good_state`` is not provided and is required
"""
self._oracle = oracle
self._state_preparation = state_preparation
Expand All @@ -68,7 +65,7 @@ def __init__(
elif hasattr(oracle, "evaluate_bitstring"):
self._is_good_state = oracle.evaluate_bitstring
else:
raise TypeError("A is_good_state function is required with the provided oracle")
self._is_good_state = None

@property
def oracle(self) -> Union[QuantumCircuit, Statevector]:
Expand Down Expand Up @@ -166,8 +163,8 @@ def is_good_state(self) -> Callable[[str], bool]:
A callable that takes in a bitstring and returns True if the measurement is a good
state, False otherwise.
"""
if callable(self._is_good_state):
return self._is_good_state
if (self._is_good_state is None) or callable(self._is_good_state):
return self._is_good_state # returns None if no is_good_state arg has been set
elif isinstance(self._is_good_state, list):
if all(isinstance(good_bitstr, str) for good_bitstr in self._is_good_state):
return lambda bitstr: bitstr in self._is_good_state
Expand Down
Loading

0 comments on commit 5831cad

Please sign in to comment.