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

The simulators need more testing #314

Closed
ajavadia opened this issue Feb 27, 2018 · 0 comments · Fixed by #435
Closed

The simulators need more testing #314

ajavadia opened this issue Feb 27, 2018 · 0 comments · Fixed by #435
Assignees
Labels
good first issue Good for newcomers type: qa Issues and PRs that relate to testing and code quality

Comments

@ajavadia
Copy link
Member

ajavadia commented Feb 27, 2018

There is currently very little testing of simulators against expected behavior.

Each test will be in the form of an input Qobj (JSON) and the results should be checked against an expected output JSON. The input JSON will specify the circuit, as well as the config options on how to run it. Available config options are here.

Below are some things to test:

1- There are already some stuff in src/qiskit_simulator/test with input Qobj (JSON) and expected output Qobj (JSON). These are currently not used within the QISKit test framework, and should be.

2- Test local_clifford_simulator by providing circuits containing these gates: cx,id,x,y,z,h,s,sdg,wait,noise,save,load

3- Test local_qiskit_simulator by providing circuits containing these gates: u1,u2,u3,cx,id,x,y,z,h,s,sdg,t,tdg,wait,noise,save,load,uzz. (note: this simulator will undergo a namechange soon to become local_qasm_simulator).

4- Test local_statevector_simulator by providing configs with no shots, measure, noise, reset and same gate set as 3 (note: this simulator doesn't exist now, but it will soon)

4- Test circuits with 1, 2, 5 qubits.

5- Test circuits with "shots" : 1 and "shots" : 1024.

6- Test circuits with no measurement.
Test circuits with measurement only at the end.
Test circuits with measure in the middle + conditional if depending on that measure result.
Test circuits with measure in the middle but no subsequent if depending on the measurement result.

8- Test circuits with reset in the middle.

9- Test circuits containing a snapshot command (note: this currently does not exist but will be added soon for the local_statevector_simulator. Syntax similar to the save command in the tests mentioned in 1). Vary the data field of the config to get different outputs from the snapshot.

10 - Test noise by providing noise_params to the config.

Expected Behavior

Current Behavior

Possible Solution

Steps to Reproduce (for bugs)

Context

Your Environment

  • Version used:
  • Environment name and version (e.g. Python 3.6.1):
  • Operating System and version:
@ajavadia ajavadia added good first issue Good for newcomers type: qa Issues and PRs that relate to testing and code quality labels Feb 27, 2018
This was referenced Apr 22, 2018
jakelishman pushed a commit to jakelishman/qiskit-terra that referenced this issue Jul 28, 2023
* Move CONTRIBUTING.md to top level

The CONTRIBUTING.md doc contains a lot of useful information about the
not only contributing to the project but also some useful information
about project policy and conventions. But it's currently in a hidden
directory so that github ui will show it on a help menu. So unless you
know to click on that help menu or that it's hiding in the .github
directory you'll never see it. This commit addresses this by moving the
file to the repo root so it's more obvious where it is.

Mirror of Qiskit#2359 Qiskit/qiskit-aer#229
qiskit-community/qiskit-ignis#216 qiskit-community/qiskit-aqua#556
Qiskit/qiskit-ibmq-provider#149 and Qiskit/qiskit-chemistry#163

* Move code of conduct and switch CHANGELOG to markdown

* Update changelog title formatting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers type: qa Issues and PRs that relate to testing and code quality
Projects
None yet
3 participants