I am writing a small quantum program for supporting polynomial arithmetic, implemented from Space-efficient quantum multiplication of polynomials for binary finite fields with sub-quadratic Toffoli gate count and Concrete quantum cryptanalysis of binary elliptic curves. To run the code, I am using the simulator_stabilizer backend provided by IBM.

service = QiskitRuntimeService()
qc = QuantumCircuit()
backend = service.backend("simulator_stabilizer")

However, when I run it, I get the following error:

Traceback (most recent call last):                                                                                                                    
  File "/home/adarsh/NITK/MP/Project/qbpolynomial.py", line 333, in <module>                                                                          
  File "/home/adarsh/NITK/MP/Project/qbpolynomial.py", line 300, in __str__                                                                           
    coeffs = self.measure()                                                                                                                           
  File "/home/adarsh/NITK/MP/Project/qbpolynomial.py", line 221, in measure                                                                           
    return list(job.result().get_counts().keys())[0][::-1]                                                                                            
  File "/home/adarsh/NITK/MP/venv/lib/python3.10/site-packages/qiskit_ibm_runtime/runtime_job.py", line 222, in result                                
    raise RuntimeJobFailureError(f"Unable to retrieve job result. {error_message}")                                                                   
qiskit_ibm_runtime.exceptions.RuntimeJobFailureError: 'Unable to retrieve job result. TranspilerError: "Unable to translate the operations in the circ
uit: [\'ccx\', \'measure\', \'x\', \'cx\', \'swap\'] to the backend\'s (or manually specified) target basis: [\'y\', \'sx\', \'if_else\', \'delay\', \
'swap\', \'save_amplitudes_sq\', \'while_loop\', \'snapshot\', \'z\', \'save_state\', \'continue_loop\', \'save_expval\', \'barrier\', \'cx\', \'for_l
oop\', \'save_probabilities_dict\', \'break_loop\', \'s\', \'sxdg\', \'cz\', \'sdg\', \'save_expval_var\', \'reset\', \'id\', \'save_clifford\', \'roe
rror\', \'quantum_channel\', \'measure\', \'h\', \'save_stabilizer\', \'cy\', \'save_probabilities\', \'qerror_loc\', \'x\', \'pauli\', \'set_stabiliz
er\']. This likely means the target basis is not universal or there are additional equivalence rules needed in the EquivalenceLibrary being used. For 
more details on this error see: https://qiskit.org/documentation/stubs/qiskit.transpiler.passes.BasisTranslator.html#translation_errors'

This program works without issues when using the AerSimulator of Qiskit. Can anyone point out what is my mistake or guide me in the right direction?


1 Answer 1


In seems like a problem related with the supported instruction set on that specific backend. Probably a bug, because the list should cover your circuit instructions.

A possible workaround is to transpile it on client-side before submitting:

from qiskit import transpile
transpiled_qc = transpile(qc, basis_gates=backend.configuration().basis_gates)
  • $\begingroup$ Thanks, but unfortunately, the error is still coming, this time from the local transpile function. The circuit is dynamically constructed, could that be a possible reason? $\endgroup$ Dec 14, 2023 at 14:26
  • 1
    $\begingroup$ same error? it could be indeed from a the dynamic part. Very hard to debug without the circuit. Probably at this point you should submit and issue github.com/Qiskit/qiskit/issues/new $\endgroup$
    – luciano
    Dec 14, 2023 at 15:36
  • $\begingroup$ Alright, I will do that. Meanwhile, I have switched to a different backend for now where it works fine. Thanks $\endgroup$ Dec 14, 2023 at 16:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.