Qiskit / qiskit-aer

Aer is a high performance simulator for quantum circuits that includes noise models
https://qiskit.github.io/qiskit-aer/
Apache License 2.0
464 stars 354 forks source link

Transpile with multiple circuits fails after qiskit 1.1 #2141

Closed nkanazawa1989 closed 1 month ago

nkanazawa1989 commented 1 month ago

Informations

What is the current behavior?

Transpile with multiple circuits fails in MacOS and Windows. Details are in https://github.com/Qiskit/qiskit/issues/12425

Suggested solutions

In qiskit 1.1 there is a behavior change in the transpile. In many cases (especially in MacOS and Windows) the transpiler disables multiprocessing feature because of performance reason. In the parallel transpile backend Target information is deep copied via dill, but now all pass manager run shares the internal state. So Target should not be mutated.

mtreinish commented 1 month ago

I think the simplest fix is probably to just delete the custom translation stage plugin and the associated pass. It was added as a workaround for a previous bug in the 1q gate peephole optimization pass in qiskit with noiseless backends, which should have been fixed quite some time ago, I don't think that the pass is serving a purpose anymore.