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

[WIP] Simulator backends refactor #351

Closed

Conversation

chriseclectic
Copy link
Member

Description

WIP on refactoring simulator backends (related to issues #281, and #314). This is a rebased version of WIP #319 to clean up the commit history and merge with recent commits to master.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Current changes

  • Added TensorIndex C++ class (tensor_index.hpp) for multi-partite qubit vector indexing
  • Added QubitVector C++ class (qubit_vector.hpp) for multi-partite qubit vector algebra
  • Reworked C++ simulator backends to use QubitVector class and methods instead of std::vector.
  • Added snapshot command for simulator for caching a copy of the current simulator state and returning in the output
  • Added snapshot circuit extension as Gate (will introduce pragmas after this release)
  • Removed the ability to return the cached states from the save command (use snapshot instead)
  • Removed the ability to return the final quantum state of the simulator (use snapshot instead)
  • Includes pull request Fix bug with auto-generated CNOT coherent error matrix in C++ simulator #318 for fixing coherent error bug
  • Added example qobj circuits for simulator testing

ajavadia and others added 22 commits March 28, 2018 15:02
- parameters ‘calibration_error’, ‘detuning_error’, ‘zz_error’ for CX
and X90 gates are now converted to U_error matrices in python before
being passed to simulator
- fixed incorrect matrix used for CX calibration errors
- added check in C++ code that U_error is unitary
- added python unit tests to test U_error building matrices
- fixed directory change in makefile

Updated modified JSON library to version 3.1.1

Modification is so that pretty printing of arrays doesn’t add new lines.
- Encapsulated multi-partite qubit state vector updates in a
QubitVector class
- Added TensorIndex class used for indexing in the QubitVector class.
- Reworked ideal_backend and qubit_backend to use QubitVector methods
- merged sampleshots_engine into vector_engine
- removed ability to display final and saved quantum states
- added “snapshot” instruction and added ability to display snapshots
of quantum state
- renamed qiskit backend
- renamed qiskit_simulator -> qasm_simulator_cpp
- Started modifying CHANGELOG for v0.5
Fixed missing parentheses for some snapshot statements
Added auto check to makefile for GCC7 compiler on macOS
…, allowed sample shots to compute probability vector in place to save memory
* new dependencies target (make depend) for the qasm-simulator-cpp

(cherry picked from commit 3b25390)

* changed to executable and bug fix

(cherry picked from commit ce8be89)

* assume yes for automatic pkg install

(cherry picked from commit 2cd7607)

* -march not supported on ppc64le. Use -mcpu instead

(cherry picked from commit 7cdab8f)

* bugfix

(cherry picked from commit 831692e)
@chriseclectic chriseclectic force-pushed the cpp-simulator-refactor branch from 848107b to 2ad63ba Compare March 28, 2018 19:54
chriseclectic and others added 3 commits March 30, 2018 15:17
- added default qubit, clbit values to qobj circuit header
- added virtual destructors to C++ base classes
@chriseclectic chriseclectic mentioned this pull request Apr 4, 2018
9 tasks
@chriseclectic
Copy link
Member Author

This PR has been split into #386, #387, #388

@chriseclectic chriseclectic deleted the cpp-simulator-refactor branch September 14, 2018 21:07
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.

4 participants