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

Setting scheduling method in generate preset passmanager raises error #12464

Open
nonhermitian opened this issue May 27, 2024 · 1 comment
Open
Labels
bug Something isn't working mod: pulse Related to the Pulse module

Comments

@nonhermitian
Copy link
Contributor

Environment

  • Qiskit version: 1.1
  • Python version:
  • Operating system:

What is happening?

backend = service.get_backend('ibm_brisbane')
pm = generate_preset_pass_manager(backend=backend, optimization_level=3, scheduling_method="alap")

gives

File ~/mambaforge/envs/qiskit/lib/python3.11/site-packages/qiskit/transpiler/preset_passmanagers/common.py:573, in generate_scheduling(instruction_durations, scheduling_method, timing_constraints, inst_map, target)
566 scheduling.append(ContainsInstruction("delay"))
567 scheduling.append(
568 ConditionalController(
569 TimeUnitConversion(instruction_durations, target=target), condition=_contains_delay
570 )
571 )
572 if (
--> 573 timing_constraints.granularity != 1
574 or timing_constraints.min_length != 1
575 or timing_constraints.acquire_alignment != 1
576 or timing_constraints.pulse_alignment != 1
577 ):
578 # Run alignment analysis regardless of scheduling.
580 def _require_alignment(property_set):
581 return property_set["reschedule_required"]

AttributeError: 'NoneType' object has no attribute 'granularity'

How can we reproduce the issue?

run above

What should happen?

it should work

Any suggestions?

No response

@nonhermitian nonhermitian added the bug Something isn't working label May 27, 2024
@ElePT
Copy link
Contributor

ElePT commented May 30, 2024

I think that this issue comes up because of the lack of input-handling logic in generate_preset_pass_manager, all of the transpiler constraint resolution logic takes place in transpile. In principle, #12185 should fix this problem (tested it locally and it works).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working mod: pulse Related to the Pulse module
Projects
None yet
Development

No branches or pull requests

3 participants