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

EchoRZXWeylDecomposition incompatible with GenericBackendV2? #12759

Open
1ucian0 opened this issue Jul 11, 2024 · 2 comments
Open

EchoRZXWeylDecomposition incompatible with GenericBackendV2? #12759

1ucian0 opened this issue Jul 11, 2024 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@1ucian0
Copy link
Member

1ucian0 commented Jul 11, 2024

Environment

  • Qiskit version: 1.2.0.dev0+8f6714d
  • Python version: 3.8.19
  • Operating system: MacOs

What is happening?

Why trying to move the tests from Fake27QPulseV1 to GenericBackendV2 (see #12660), I noticed that EchoRZXWeylDecomposition seems to fail very deeply in because len(cr_tones) == 1 and len(comp_tones) == 2 is not a possible condition in

__

How can we reproduce the issue?

from qiskit import QuantumRegister, QuantumCircuit
from qiskit.providers.fake_provider import GenericBackendV2
from qiskit.quantum_info import Operator
from qiskit.transpiler.passes import EchoRZXWeylDecomposition

backend = GenericBackendV2(num_qubits=27, calibrate_instructions=True, control_flow=True, seed=42)

qr = QuantumRegister(2, "qr")
circuit = QuantumCircuit(qr)
circuit.cx(qr[0], qr[1])

unitary_circuit = Operator(circuit).data

after = EchoRZXWeylDecomposition(backend.instruction_schedule_map)(circuit)
qiskit.exceptions.QiskitError: 'Schedule((0, Shi [...] is undefined pulse sequence. Check if this is a calibration for cross resonance operation."

Notice that the following works:

from qiskit import QuantumRegister, QuantumCircuit
from qiskit.providers.fake_provider import Fake27QPulseV1
from qiskit.quantum_info import Operator
from qiskit.transpiler.passes import EchoRZXWeylDecomposition

backend = Fake27QPulseV1()
qr = QuantumRegister(2, "qr")
circuit = QuantumCircuit(qr)
circuit.cx(qr[0], qr[1])

unitary_circuit = Operator(circuit).data

after = EchoRZXWeylDecomposition(backend.defaults().instruction_schedule_map)(circuit)

What should happen?

I think GenericBackendV2(num_qubits=27, calibrate_instructions=True, control_flow=True, coupling_map=[[0, 1], [1, 0], [1, 2], [1, 4], [2, 1], [2, 3], [3, 2], [3, 5], [4, 1], [4, 7], [5, 3], [5, 8], [6, 7], [7, 4], [7, 6], [7, 10], [8, 5], [8, 9], [8, 11], [9, 8], [10, 7], [10, 12], [11, 8], [11, 14], [12, 10], [12, 13], [12, 15], [13, 12], [13, 14], [14, 11], [14, 13], [14, 16], [15, 12], [15, 18], [16, 14], [16, 19], [17, 18], [18, 15], [18, 17], [18, 21], [19, 16], [19, 20], [19, 22], [20, 19], [21, 18], [21, 23], [22, 19], [22, 25], [23, 21], [23, 24], [24, 23], [24, 25], [25, 22], [25, 24], [25, 26], [26, 25]], seed=42) should work like Fake27QPulseV1, but maybe I'm setting something wrong.

Any suggestions?

No response

@1ucian0 1ucian0 added the bug Something isn't working label Jul 11, 2024
@1ucian0
Copy link
Member Author

1ucian0 commented Jul 11, 2024

@nkanazawa1989 can you confirm it?

@Cryoris
Copy link
Contributor

Cryoris commented Aug 16, 2024

This looks like it might be related to #12834, as the above works with other BackendV2s (such as qiskit_ibm_runtime.fake_provider.FakeSherbrooke.

@Cryoris Cryoris changed the title EchoRZXWeylDecomposition incompatible with BackendV2? EchoRZXWeylDecomposition incompatible with GenericBackendV2? Aug 16, 2024
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