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

Stabilizer simulator runs parallel shots even when measure sampling #369

Closed
chriseclectic opened this issue Sep 30, 2019 · 1 comment
Closed
Labels
bug Something isn't working QasmSimulator Issues related to qasm simulator

Comments

@chriseclectic
Copy link
Member

Informations

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

What is the current behavior?

When running a circuit with measure sampling the stabilizer simulation method sets number of shot threads to the available threads.

This leads to different behaviour for this backend when using a snapshot since it will return one snapshot for each parallel thread rather than a single snapshot as with the statevector simulator.

Steps to reproduce the problem

from qiskit import *
circ = QuantumCircuit(1, 1)
circ.h(0)
circ.measure(0, 0)

results = execute(circ, Aer.get_backend('qasm_simulator'),
                  backend_options={'method': 'stabilizer'}).result()
results.results[0].metadata

returns (on my system)

{'measure_sampling': True,
 'method': 'stabilizer',
 'parallel_shots': 12,
 'parallel_state_update': 1}

What is the expected behavior?

It should return

{'measure_sampling': True,
 'method': 'stabilizer',
 'parallel_shots': 1,
 'parallel_state_update': N}

where N is either 1 (since stabilizer doesn't support OpenMP for state update atm), or the available threads if we add OpenMP support to the method.

Suggested solutions

@chriseclectic chriseclectic added bug Something isn't working QasmSimulator Issues related to qasm simulator labels Sep 30, 2019
@chriseclectic
Copy link
Member Author

Closed by #355

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working QasmSimulator Issues related to qasm simulator
Projects
None yet
Development

No branches or pull requests

1 participant