Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transpiler optimization_method="zxpass" gives wrong result #12531

Open
BankNatchapol opened this issue Jun 8, 2024 · 1 comment
Open

Transpiler optimization_method="zxpass" gives wrong result #12531

BankNatchapol opened this issue Jun 8, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@BankNatchapol
Copy link

Environment

  • Qiskit version: 1.1.0
  • Python version: 3.10.12
  • Operating system: Google Colab

What is happening?

Circuits after Transpilation should give similar result, but not.

How can we reproduce the issue?

from qiskit.quantum_info import Statevector
from qiskit.compiler import transpile

with open('acircuit.qpy', 'rb') as handle:
    qc = qpy.load(handle)
wo = transpile(qc, basis_gates=['cz', 'swap', 'cx', 'tdg', 's', 'sdg', 'h', 'rz'], optimization_level=1)[0]
w = transpile(wo, basis_gates=['cz', 'swap', 'cx', 'tdg', 's', 'sdg', 'h', 'rz'], optimization_method="zxpass")

print(Statevector(wo))
print(Statevector(w))

ill attach acircuit.qpy
acircuit.zip

What should happen?

the statevector should be the same.

Any suggestions?

If it's correct, please guide me how to make the statevector output to be the same. Thank you in advance.

@BankNatchapol BankNatchapol added the bug Something isn't working label Jun 8, 2024
@jakelishman
Copy link
Member

We don't define an optimization_method called zxpass; you must be pulling that in from some external plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants