Skip to content

Commit

Permalink
Remove qiskit aer translation stage
Browse files Browse the repository at this point in the history
This commit removes the qiskit aer translation plugin. This was added as
a workaround for a Qiskit/qiskit#11351. This has been fixed in Qiskit
since 0.45.2 and is no longer necessary. The mechanism by which the
workaround worked was unsound in practice as it was mutating the target
and also explicitly using private attributes of the Target. This is
causing real issues now as it only worked by assuming the target wasn't
shared between passmanagers which is never guaranteed. Similarly the
reliance on internal private attributes of the Target class will cause
issues in the future when the target internals change (see
Qiskit/qiskit#12292). This commit opts to remove the plugin in its
entirity as it's no longer necessary and actively causing issues with
Qiskit 1.1 and transpiling targeting aer backends with >1 circuit. As
it's private internal detail there isn't a release note.

Fixes Qiskit/qiskit#12425
Fixes Qiskit#2141
  • Loading branch information
mtreinish committed May 17, 2024
1 parent 18987e0 commit b65a621
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 139 deletions.
7 changes: 0 additions & 7 deletions qiskit_aer/backends/aerbackend.py
Original file line number Diff line number Diff line change
Expand Up @@ -737,10 +737,3 @@ def __repr__(self):
name = self.__class__.__name__
display = f"'{self.name}'"
return f"{name}({display})"

def get_translation_stage_plugin(self):
"""use custom translation method to avoid gate exchange"""
if self._target is None:
return "aer_backend_plugin"
else:
return None
Empty file.
126 changes: 0 additions & 126 deletions qiskit_aer/backends/plugin/aer_backend_plugin.py

This file was deleted.

7 changes: 1 addition & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
extras_requirements = {"dask": ["dask", "distributed"]}

requirements = [
"qiskit>=0.45.0",
"qiskit>=0.45.2",
"numpy>=1.16.3",
"scipy>=1.0",
"psutil>=5",
Expand Down Expand Up @@ -114,9 +114,4 @@
cmake_args=cmake_args,
keywords="qiskit, simulator, quantum computing, backend",
zip_safe=False,
entry_points={
"qiskit.transpiler.translation": [
"aer_backend_plugin = qiskit_aer.backends.plugin.aer_backend_plugin:AerBackendPlugin",
]
},
)

0 comments on commit b65a621

Please sign in to comment.