Qiskit / qiskit-ibm-catalog

Apache License 2.0
6 stars 2 forks source link

Qedma function fails on empty circuit #28

Open nonhermitian opened 3 days ago

nonhermitian commented 3 days ago

Steps to reproduce the problem


N = 6
qc = QuantumCircuit(N)

op = SparsePauliOp('Z'*6)

qesem_function  = catalog.load('qedma/qesem')

qesem_job = qesem_function.run(
    backend_name=backend.name,
    action = "execute",
    instance = backend._instance,
    pubs = pubs,
)

What is the current behavior?

Gives

{'error': 'An unexpected error occurred. Please try again later. If the issue persists, please contact support.'}

What is the expected behavior?

Should work like it does on other circuit functions

pandasa123 commented 3 days ago

After talking to the internal team, this should actually raise an exception across all circuit functions during the input validation phase

nonhermitian commented 2 days ago

Why is that? It is a valid circuit, and is useful for testing; it basically verifies if a circuit function can cleanup spam errors.

nonhermitian commented 2 days ago

This is probably fixed in the same manner as #27 where it is an incompatibility with the standard pubs specification