qiskit-community / qiskit-dynamics

Tools for building and solving models of quantum systems in Qiskit
https://qiskit-community.github.io/qiskit-dynamics/
Apache License 2.0
105 stars 61 forks source link

The probability solved in Dynamicsbackend exceeds 1. #237

Closed to24toro closed 1 year ago

to24toro commented 1 year ago

Informations

What is the current behavior?

Dynamicsbackend is utilized for a pulse simulation and useful for the simulation of the calibration. When we pull the above PR and simulate the rough amplitude calibration of a cross resonance gate, we have the probability dynamics backend calculated exceeds 1.

Suggested solutions

This error raises because there may be a rounding error in the way the probability is calculated and the deviation from one is too large to surpress an error when rng.choice is called. We need to fix the way of normalizing stetes (https://github.com/Qiskit-Extensions/qiskit-dynamics/blob/37d12ac33fffd57daea3c9d5f9cda3f00acc37ea/qiskit_dynamics/backend/dynamics_backend.py#L795) We could fix it to normalize the probabilities instead of normalizing the state.