forked from Qiskit/qiskit
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into unitary-synthesis-unroll
In Qiskit#6124 which recently merged the UnitarySynthesis pass was added to preset passmanager to enable synthesis plugins that operate on > 2q from having an impact (otherwise they wouldn't be called). However that PR didn't have the option to avoid synthesizing 2q unitaries too early. This commit updates the base branch to the latest state of main which includes Qiskit#6124. This means this PR just adds a min_qubits option to UnitarySynthesis and leverages it for the unroll3q stage in the preset pass managers.
- Loading branch information
Showing
483 changed files
with
13,430 additions
and
4,940 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
name: Wheel Builds | ||
on: | ||
push: | ||
tags: | ||
- '*' | ||
jobs: | ||
build_wheels_aarch64: | ||
name: Build wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
name: Install Python | ||
with: | ||
python-version: '3.7' | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
with: | ||
platforms: all | ||
- name: Install cibuildwheel | ||
run: | | ||
python -m pip install cibuildwheel==2.0.1 twine | ||
- name: Build wheels | ||
run: | | ||
python -m cibuildwheel --output-dir wheelhouse | ||
env: | ||
CIBW_SKIP: cp27-* cp34-* cp35-* pp* | ||
CIBW_BEFORE_BUILD: pip install -U Cython | ||
CIBW_TEST_COMMAND: python {project}/examples/python/stochastic_swap.py | ||
CIBW_ARCHS_LINUX: aarch64 | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
path: ./wheelhouse/*.whl | ||
- name: Upload to PyPI | ||
run: twine upload ./wheelhouse/*.whl | ||
env: | ||
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} | ||
TWINE_USERNAME: qiskit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,41 @@ | ||
{% if referencefile %} | ||
.. include:: {{ referencefile }} | ||
{% endif %} | ||
{# | ||
The general principle of this is that we manually document attributes here in | ||
the same file, but give all methods their own page. By default, we document | ||
all methods, including those defined by parent classes. | ||
-#} | ||
|
||
{{ objname }} | ||
{{ underline }} | ||
{{ objname | escape | underline }} | ||
|
||
.. currentmodule:: {{ module }} | ||
|
||
.. autoclass:: {{ objname }} | ||
{#- | ||
Avoid having autodoc populate the class with the members we're about to | ||
summarize to avoid duplication. | ||
#} | ||
:no-members: | ||
:no-inherited-members: | ||
:no-special-members: | ||
|
||
{% block attributes_summary %} | ||
{% if attributes %} | ||
|
||
.. rubric:: Attributes | ||
|
||
.. autosummary:: | ||
:toctree: ../stubs/ | ||
{% for item in all_attributes %} | ||
{%- if not item.startswith('_') %} | ||
{{ name }}.{{ item }} | ||
{%- endif -%} | ||
{%- endfor %} | ||
{% endif %} | ||
{% endblock %} | ||
|
||
{% block methods_summary %} | ||
{% if methods %} | ||
|
||
:show-inheritance: | ||
{# | ||
Methods all get their own separate page, with their names and the first lines | ||
of their docstrings tabulated. The documentation from `__init__` is | ||
automatically included in the standard class documentation, so we don't want | ||
to repeat it. | ||
-#} | ||
{% block methods_summary %}{% set wanted_methods = (methods | reject('==', '__init__') | list) %}{% if wanted_methods %} | ||
.. rubric:: Methods | ||
|
||
.. autosummary:: | ||
:nosignatures: | ||
:toctree: ../stubs/ | ||
{% for item in all_methods %} | ||
{%- if not item.startswith('_') or item in ['__call__', '__mul__', '__getitem__', '__len__'] %} | ||
{{ name }}.{{ item }} | ||
{%- endif -%} | ||
{%- endfor %} | ||
{% for item in inherited_members %} | ||
{%- if item in ['__call__', '__mul__', '__getitem__', '__len__'] %} | ||
{{ name }}.{{ item }} | ||
{%- endif -%} | ||
{%- endfor %} | ||
{% for item in wanted_methods %} | ||
~{{ name }}.{{ item }} | ||
{%- endfor %} | ||
{% endif %}{% endblock %} | ||
|
||
{% endif %} | ||
{% endblock %} | ||
{% block attributes_summary %}{% if attributes %} | ||
.. rubric:: Attributes | ||
{# Attributes should all be summarized directly on the same page. -#} | ||
{% for item in attributes %} | ||
.. autoattribute:: {{ item }} | ||
{%- endfor %} | ||
{% endif %}{% endblock -%} |
38 changes: 38 additions & 0 deletions
38
docs/_templates/autosummary/class_no_inherited_members.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{# | ||
This is very similar to the default class template, except this one is used | ||
when we don't want to generate any inherited methods. | ||
-#} | ||
|
||
{{ objname | escape | underline }} | ||
|
||
.. currentmodule:: {{ module }} | ||
|
||
.. autoclass:: {{ objname }} | ||
{#- | ||
Avoid having autodoc populate the class with the members we're about to | ||
summarize to avoid duplication. | ||
#} | ||
:no-members: | ||
:show-inheritance: | ||
{# | ||
Methods all get their own separate page, with their names and the first lines | ||
of their docstrings tabulated. | ||
-#} | ||
{% block methods_summary %}{% set wanted_methods = (methods | reject('in', inherited_members) | reject('==', '__init__') | list) %}{% if wanted_methods %} | ||
.. rubric:: Methods Defined Here | ||
|
||
.. autosummary:: | ||
:nosignatures: | ||
:toctree: ../stubs/ | ||
{% for item in wanted_methods %} | ||
~{{ name }}.{{ item }} | ||
{%- endfor %} | ||
{% endif %}{% endblock %} | ||
|
||
{% block attributes_summary %}{% if attributes %} | ||
.. rubric:: Attributes | ||
{# Attributes should all be summarized directly on the same page. -#} | ||
{% for item in attributes %} | ||
.. autoattribute:: {{ item }} | ||
{%- endfor %} | ||
{% endif %}{% endblock -%} |
Oops, something went wrong.