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

fix bit mapping inconsistency in inline of AerCompiler #2175

Closed hhorii closed 2 weeks ago

hhorii commented 2 weeks ago

Summary

Resolve #2171

Details and comments

Qubit mapping is not correctly resolved in control flow since cf510a2. This PR is to fix this issue.

In AerCompiler, all of instructions are inlined. Qubits and clbits of a sub-circuit may be different from of its parent. Therefore, previously, they are inlined by using decomposition of trranspiler and transpiler coordinates correct qubits and clbits. However, in cf510a2, decomposition is implemented in AerCompier and mapping of qubits and clbits may be broken.

With this PR, qubits and clbits of top-parent are always used in the inlined circuits.

Siddharthgolecha commented 1 week ago

When will this be released as stable release version?

doichanj commented 4 days ago

This will be included in Aer 0.15, please build from source until it will be released

Siddharthgolecha commented 4 days ago

Thanks a lot @doichanj 😄