Skip to content

generate_preset_pass_manager generates transpiler error on efficientSU2 at 12 qubits #11784

@nonhermitian

Description

@nonhermitian

Environment

  • Qiskit version: 1.0.0rc1 or 0.45.3
  • Python version: 3.12
  • Operating system: Linux

What is happening?

Running benchmarks that were presented at Summit now error when using generate_preset_pass_manager.
It fails at 12 qubits with the error:

TranspilerError: 'Fewer qubits in the circuit (12) than the coupling map (127). Have you run a layout pass and then expanded your DAG with ancillas? See FullAncillaAllocation, EnlargeWithAncilla and ApplyLayout.'

Oddly enough it works for smaller numbers .

How can we reproduce the issue?

service = QiskitRuntimeService()
backend = service.get_backend('ibm_kyiv')

target = backend.target
pm = generate_preset_pass_manager(target=target, optimization_level=3)
    
qubits = list(range(2, 128))

qiskit_times = []
qiskit_depth = []
qiskit_2q = []

for N in qubits:
    print('Starting', N, 'qubits')
    qc = EfficientSU2(N, entanglement='circular')
    print('circuit building done')
    st = time.perf_counter()
    trans_qc = pm.run(qc)
    #trans_qc = transpile(qc, backend, optimization_level=3)
    fin = time.perf_counter()
    qiskit_times.append(fin-st)
    qiskit_depth.append(trans_qc.depth())
    qiskit_2q.append(trans_qc.count_ops().get('cx', 0))
    print('Qiskit', fin-st, qiskit_2q[-1])
    print()

What should happen?

It should work like it did in previous versions

Any suggestions?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions