Skip to content
This repository was archived by the owner on Jun 12, 2023. It is now read-only.

Move Ignis to its own package#456

Closed
mtreinish wants to merge 5 commits into
qiskit-community:masterfrom
mtreinish:namespace-no-more
Closed

Move Ignis to its own package#456
mtreinish wants to merge 5 commits into
qiskit-community:masterfrom
mtreinish:namespace-no-more

Conversation

@mtreinish
Copy link
Copy Markdown
Collaborator

Summary

Namespace packages are constant source of problems for users. The python
packaging ecosystem around splitting packages across namespaces is
fragile at the best of times and can often leave a you with an
environment that isn't recoverable (especially when mixing install
methods). There is also a performance hit whenever there is a piece of
the namespace we allow external packages to extend since it requires
doing a full python path search which can be slow depending on the
backing I/O and the number of paths in sys.path for an environment. This
commit addresses the piece from the ignis perspective by moving
qiskit.ignis to it's own package and namespace 'qiskit_ignis'.

This will be coupled with a change in terra that removes the arbitrary
namespace hook points and hard coding the element namespace maps via a
custom import loader at the root of the namespace. This has 2 advantages
it removes the use of namespace packages so the fragility and
performance impact are fixed since every element will be renamed to use
'qiskit_' instead of 'qiskit.', but it also makes it explicit where we
extend the namespace. The previous method allowed any package to extend
qiskit.* and qiskit.providers.* with whatever they wanted. This commit
will need to be coordinated with the terra change to ensure we don't
block development, because while it's not breaking for end users as a
coordinated code release piecewise it's a breaking change for each
element, including Ignis.

Details and comments

Depends-On: Qiskit/qiskit#4767

Fixes Qiskit/qiskit#559

@mtreinish mtreinish added the on hold Can not fix yet label Jul 21, 2020
Namespace packages are constant source of problems for users. The python
packaging ecosystem around splitting packages across namespaces is
fragile at the best of times and can often leave a you with an
environment that isn't recoverable (especially when mixing install
methods). There is also a performance hit whenever there is a piece of
the namespace we allow external packages to extend since it requires
doing a full python path search which can be slow depending on the
backing I/O and the number of paths in sys.path for an environment. This
commit addresses the piece from the ignis perspective by moving
qiskit.ignis to it's own package and namespace 'qiskit_ignis'.

This will be coupled with a change in terra that removes the arbitrary
namespace hook points and hard coding the element namespace maps via a
custom import loader at the root of the namespace. This has 2 advantages
it removes the use of namespace packages so the fragility and
performance impact are fixed since every element will be renamed to use
'qiskit_*' instead of 'qiskit.*', but it also makes it explicit where we
extend the namespace. The previous method allowed any package to extend
qiskit.* and qiskit.providers.* with whatever they wanted. This commit
will need to be coordinated with the terra change to ensure we don't
block development, because while it's not breaking for end users as a
coordinated code release piecewise it's a breaking change for each
element, including Ignis.

Depends-On: Qiskit/qiskit#4767

Fixes Qiskit/qiskit#559
@mtreinish mtreinish removed the on hold Can not fix yet label Aug 31, 2020
@mtreinish mtreinish added the on hold Can not fix yet label Aug 31, 2020
@mtreinish
Copy link
Copy Markdown
Collaborator Author

Setting this as on hold because other elements are having issues with this in their CI, so a revert is proposed at Qiskit/qiskit#5006

@mtreinish
Copy link
Copy Markdown
Collaborator Author

With the creation of the qiskit-experiments repo this isn't needed anymore because that project will subsume this when it's ready and already exists in a separate namespace.

@mtreinish mtreinish closed this Mar 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

on hold Can not fix yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stop using namespace packages

1 participant