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

ConfigurableFakeBackend qubit_readout_error throws Invalid probabilities randomly #11220

Open
dieser-max opened this issue Nov 9, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@dieser-max
Copy link

Environment

  • Qiskit version: 'qiskit': '0.45.0', 'qiskit-aer': '0.12.0'
  • Python version: 3.9.16
  • Operating system: Windows-10

What is happening?

When choosing a low values for qubit_readout_error in a ConfigurableFakeBackend a Noise_Error will be thrown inconsistency. This does not happen with higher readout error values >10%.
This also seems not to be happening when the errors are defined with a list qubit_readout_error=[0.001, 0.002, 0.0001]

How can we reproduce the issue?

from qiskit import QuantumCircuit
from qiskit.providers.fake_provider import ConfigurableFakeBackend
from qiskit.providers.aer import AerSimulator
configurableFBE = ConfigurableFakeBackend('test', 3, qubit_readout_error=0.004)
qc = QuantumCircuit(3)
qc.measure_all()
backend = AerSimulator.from_backend(configurableFBE)
counts = backend.run(qc).result().get_counts()

Throws
NoiseError: 'Invalid probabilities: [1.0060265594601663, -0.006026559460166213] contains a negative probability.' ~70 % of the time

In qiskit-aer 0.13.0 additonally the description error from qiskit-aer/issues/1987 is thrown.

What should happen?

As long as a valid probability is provided, no negative probability should be returned.

Any suggestions?

No response

@dieser-max dieser-max added the bug Something isn't working label Nov 9, 2023
@rrodenbusch
Copy link
Contributor

Regarding the NoiseError: In ConfigurableFakeBackend when qubit_readout_error is provided as a float then qubit_readout_error is used as the mean of a Guassian (normal) distribution to generate a list of nqubit readout error values. The default value of the standard deviation, std, for the Gaussian is std=0.01. So the probability of sampling a negative value from this distribution is significant which results in the NoiseError since the readout_error must be >= 0

Suggestion 1: Provide readout errors as a list

configurableFBE = ConfigurableFakeBackend('test', 3, qubit_readout_error=[0.004,0.004,0.004])

Suggestion 2: Provide a value for std so that the probability of a negative value from the Gaussian is minimal

configurableFBE = ConfigurableFakeBackend('test', 3, qubit_readout_error=0.004, std=0.001)

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

2 participants