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

# Decomposition problem with Qiskit circuits #2578

Open
andreamari opened this issue Nov 16, 2024 · 1 comment
Open

# Decomposition problem with Qiskit circuits #2578

andreamari opened this issue Nov 16, 2024 · 1 comment
Labels
interface-and-conversions How Mitiq interfaces with quantum software packages.

Comments

@andreamari
Copy link
Member

andreamari commented Nov 16, 2024

If an error is obtained during the qiskit -> qasm -> cirq conversion, Mitiq tries to decompose the Qiskit circuit into
more elementary gates.

This trick works in some simple cases but not in many other similar cases. It looks like the Qiskit circuit sometimes is not fully decomposed.

The consequences are quite relevant since one gets errors for e.g. the very common gate 'rzz' .

Code to reproduce the issue:

from mitiq.interface import convert_to_mitiq

test_qc = QuantumCircuit(2)
test_qc.rx(0.1, 0)
test_qc.rzz(0.1, 0, 1)  # If you remove this line it works!
print(test_qc)
convert_to_mitiq(test_qc)
@andreamari andreamari added the interface-and-conversions How Mitiq interfaces with quantum software packages. label Nov 16, 2024
@gluonhiggs gluonhiggs mentioned this issue Nov 17, 2024
6 tasks
@gluonhiggs
Copy link

gluonhiggs commented Nov 17, 2024

I have created a PR to resolve this issue here.
P/s:
Initially I thought we could decompose the circuit before using convert_to_mitiq, however that's just a workaround. Mitiq should automatically do that for us. Hence, I tried to resolve the issue as in the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interface-and-conversions How Mitiq interfaces with quantum software packages.
Projects
None yet
Development

No branches or pull requests

2 participants