question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

execute function does not recognize ScheduleBlock

See original GitHub issue

Information

  • Qiskit Terra version: main
  • Python version: N/A
  • Operating system: N/A

What is the current behavior?

When pulse.build produces a ScheduleBlock and it is submitted to be executed by the backend via execute(schedule_block, backend) an error AttributeError: 'ScheduleBlock' object has no attribute 'calibrations' . is raised.

Steps to reproduce the problem

# Importing standard Qiskit libraries
from qiskit import QuantumCircuit, transpile, Aer, IBMQ, pulse, execute

provider = IBMQ.load_account()
backend = provider.get_backend("ibmq_armonk")

with pulse.build() as sched_block:
    pulse.play(pulse.Constant(160, 1.0), pulse.DriveChannel(0))

execute(sched_block, backend)

What is the expected behavior?

Execute should accept a ScheduleBlock as well as execute and this should be submitted to backend.run.

Suggested solutions

Within execute when matching on Schedule instead match on a Union[Schedule, ScheduleBlock].

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
jakelishmancommented, Sep 24, 2021

I think this is a bug in Terra’s FakeBackend caller - #7059. Abby: PulseSystemModel is in Aer (qiskit-aer/qiskit/providers/aer/pulse/system_models/pulse_system_mode.py), so it doesn’t appear in the Terra repo.

1reaction
mtreinishcommented, Sep 20, 2021

We also only install aer on a subset of ci jobs and only from a release on pypi. We do this very specifically to avoid adding an accidental bidirectional dependency between aer and terra (where aer depends on aer and aer depends on terra, even if just for testing) because the dependency should only be in a single direction (and aer depends on terra).

Read more comments on GitHub >

github_iconTop Results From Across the Web

ScheduleBlock
A schedule block is always relatively scheduled. Instead of taking individual instructions with absolute execution time t0 , the schedule block defines a ......
Read more >
node-schedule job does not working in function
Every scheduled job in Node Schedule is represented by a Job object. You can create jobs manually, then execute the schedule() method to...
Read more >
Degree Works
If you execute a search in Degree Works, it does not automatically display an audit. Click the “Select Student” drop-down to select a...
Read more >
Scheduling
Student course alternates can be scheduled if the associated regular request is not scheduled. • Provides the ability to run the scheduler selectively...
Read more >
Sequence Schedule Overview
Purpose The purpose of this article is to provide information to ... will move forward so the following steps do not play 'catch...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found