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.

Pulse align_measures implicitly assumes u3 gate.

See original GitHub issue

What is the current behavior?

align_measures function can take arbitrary cal_gate to decide minimum alignment time, but actually we can only take u3 due to its implementation.

https://github.com/Qiskit/qiskit-terra/blob/fe458633cfc969a4ac4b5073396a30160b5cdaa8/qiskit/pulse/transforms.py#L30-L36

This is nested function to get the gate duration of input cal_gate. As you can see this tries to bind three parameters to generate a schedule of x gate with u3 instruction.

https://github.com/Qiskit/qiskit-terra/blob/fe458633cfc969a4ac4b5073396a30160b5cdaa8/qiskit/pulse/transforms.py#L118-L124

If we specify x in cal_gate, this binds three parameters though x instruction has no parameter.

Steps to reproduce the problem

What is the expected behavior?

This time should be a required duration to generate |1> and |0> state. However this seems to be requirements from our backend and should not be here because Qiskit is backend agnostic. This measurement discriminator cal should be handled by backend and we should be able to remove this from frontend. l think user cannot understand why this minimum duration requirement is here.

Suggested solutions

I think I have two approaches:

  1. Keep minimum duration and update schedule generation: Add cal_gate_parameters: List[float] to function argument. We need to check parameter number matching with specified instruction. But we can also remove instmap and cal_gate from argument to simplify the interface.

  2. Remove minimum duration requirements: User can set arbitrary acquisition time here and the backend should realign acquisition time if they need to insert measurement cal.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:14 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
paniashcommented, Sep 21, 2021

@kdk Hi! Sorry, life’s gotten in the way. Please feel free to take over or assign this to someone else.

1reaction
paniashcommented, Dec 8, 2020

Can I take this up? I’m quite new but would love to contribute and would appreciate some pointers.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pulse - GitHub
Pulse align_measures implicitly assumes u3 gate. ... Fix issue with assigning parameters to pulse gate definitions #5524 #5568 opened by ...
Read more >
U3Gate - Qiskit
Generic single-qubit rotation gate with 3 Euler angles. Warning. This gate is deprecated. Instead, the following replacements should be used.
Read more >
qml.U3 — PennyLane 0.27.0 documentation
If the U3 gate is not supported on the targeted device, PennyLane will attempt to decompose the gate into PhaseShift and Rot gates....
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