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

Circuit with identity gate fail when using skip_transpilation #1633

Open
nonhermitian opened this issue Apr 23, 2024 · 0 comments
Open

Circuit with identity gate fail when using skip_transpilation #1633

nonhermitian opened this issue Apr 23, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@nonhermitian
Copy link
Contributor

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
@nonhermitian nonhermitian added the bug Something isn't working label Apr 23, 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

1 participant