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

Aer estimator returning complex number for variance #1764

Closed
nonhermitian opened this issue Mar 27, 2023 · 1 comment · Fixed by #1767
Closed

Aer estimator returning complex number for variance #1764

nonhermitian opened this issue Mar 27, 2023 · 1 comment · Fixed by #1767
Labels
bug Something isn't working
Milestone

Comments

@nonhermitian
Copy link
Contributor

Informations

  • Qiskit Aer version: latest
  • Python version:
  • Operating system:

What is the current behavior?

Estimator is returning a complex type for the variance

EstimatorResult(values=array([0.4376]), metadata=[{'shots': 10000, 'variance': (0.80850624+0j), 'simulator_metadata': [{'parallel_state_update': 8, 'parallel_shots': 1, 'sample_measure_time': 0.010197875, 'noise': 'ideal', 'batched_shots_optimization': False, 'remapped_qubits': False, 'device': 'CPU', 'active_input_qubits': [0, 1, 2, 3, 4, 5], 'measure_sampling': True, 'num_clbits': 6, 'input_qubit_map': [[0, 0], [1, 1], [2, 2], [3, 3], [4, 4], [5, 5]], 'num_qubits': 6, 'method': 'statevector', 'fusion': {'applied': False, 'max_fused_qubits': 5, 'threshold': 14, 'enabled': True}}]}])

Steps to reproduce the problem

What is the expected behavior?

Variance should be real

Suggested solutions

@nonhermitian nonhermitian added the bug Something isn't working label Mar 27, 2023
@ikkoham
Copy link
Collaborator

ikkoham commented Mar 29, 2023

Thank you for finding and reporting the bug!

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

Successfully merging a pull request may close this issue.

3 participants