qiskit-ibm-runtime
qiskit-ibm-runtime copied to clipboard
Circuit with identity gate fail when using skip_transpilation
Describe the bug This fails:
qc = qiskit.QuantumCircuit(1)
qc.id(0)
qc.measure_all()
trans_qc = transpile(qc, backend, optimization_level=0)
options = {
"experimental": {
"skip_transpilation": True,
}}
sampler = SamplerV2(backend=backend, options=options)
sampler.run([qc])
with the error
04/23/2024 15:54:35.230 - user_logger - ERROR Failed to execute program: File: "-", Line: 159, Col: 1 Identifier id type (ASTTypeUndefined) is not callable.
error:
barrier $0;
^
Error: OpenQASM 3 parse error
File: "-", Line: 159, Col: 1 Identifier id type (ASTTypeUndefined) is not callable.
error:
barrier $0;
^
Steps to reproduce Run above
Expected behavior AS the circuit is transpiled for the target backend, it is an ISA circuit that should be executable.
Suggested solutions
Additional Information
- qiskit-ibm-runtime version: latest
- Python version: 3.12
- Operating system: Linux