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

IBMBackend.target_history() doesn't include the historical calibrations #1615

Open
TsafrirA opened this issue Apr 14, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@TsafrirA
Copy link
Contributor

Describe the bug
When you retrieve a historical Target using IBMBackend.target_history(), the calibrations defined in the target are the same as the current ones.

Steps to reproduce

from qiskit_ibm_runtime import QiskitRuntimeService
from datetime import timezone, datetime

service = QiskitRuntimeService()
backend = service.get_backend("ibm_cusco")

times = [datetime(day=1, month=4,year=2024, tzinfo=timezone.utc), datetime(day=10, month=4,year=2024, tzinfo=timezone.utc)]
for time in times:
    target = backend.target_history(datetime=time)
    amp = target.get_calibration("x", (0, )).instructions[0][1].pulse.amp
    print(amp)
    
target = backend.target
amp = target.get_calibration("x", (0, )).instructions[0][1].pulse.amp
print(amp)

All three amplitudes are the same, indicating that the historical calibrations are not retrieved.

Expected behavior
The function definition suggests that the Target will be the same as the historical one, and the calibrations will be the ones used at that time.

Suggested solutions
Either return the correct calibrations, or clarify that they are not retrieved. (Return empty calibrations to avoid confusions?)

Additional Information
I am guessing that in the transition to Target a while back, this function was built on top of a similar option existing for the legacy properties() which didn't include the calibrations at the time.

  • qiskit-ibm-runtime version: 0.22
  • Python version: 3.9
  • Operating system: windows
@TsafrirA TsafrirA added the bug Something isn't working label Apr 14, 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