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

Derive offline simulators circuits from API payload. #93

Merged
merged 6 commits into from
Oct 20, 2023

Conversation

airwoodix
Copy link
Collaborator

@airwoodix airwoodix commented Oct 20, 2023

Summary

Use the API payload to derive the circuit submitted to the Aer simulator backend for offline simulators.

This ensures that the memory map is the same for the simulator and the remote devices and prevents double-application of the memory map in the offline simulators (by the simulator backend and the result logic in this package).

Resolves #85.

Details and comments

  • simplify the qiskit -> aqt conversion by using the flattened quantum registers view provided by QuantumCircuit.find_bit. This is done in preparation of tackling Remove usage of deprecated Bit.index and Bit.register #80.
  • the implementation of the aqt -> qiskit conversion is less elegant than that used in cloud portal due to the cumbersome generated models and the absence of pattern matching in Python 3.8-3.9.
  • the OfflineSimulatorResource still uses the implicit knowledge that all circuits in the API payload have the same number of repetitions. This makes the simulator call simpler, but will lilkely change in the future.

@airwoodix airwoodix merged commit bc2123c into master Oct 20, 2023
6 checks passed
@airwoodix airwoodix deleted the fix-85-use-json-payload branch October 20, 2023 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

backend offline_simulator_no_noise/noise does not keep the measurement bit order
2 participants