Commit Graph

3 Commits

Author SHA1 Message Date
Tianyi Zheng
2859d4bf3a
Remove references to depreciated QasmSimulator (#7417)
* Fix typos

* Replace depreciated QasmSimulator in Deutsch-Jozsa algorithm

* Replace depreciated QasmSimulator in half adder algorithm

* Replace depreciated QasmSimulator in not gate algorithm

* Replace depreciated QasmSimulator in full adder algorithm

* Simplify qiskit import

* Make formatting more consistent

* Replace depreciated QasmSimulator in quantum entanglement algorithm

* Replace depreciated QasmSimulator in ripple adder algorithm

* Replace depreciated QasmSimulator in qubit measure algorithm

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* updating DIRECTORY.md

* updating DIRECTORY.md

* Remove qiskit import alias for clarity

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-10-19 22:12:44 +02:00
Dhruv
29b32d3553
Improve validate solutions script & fix pre-commit error (#3253)
* Trying to time every solution

* Proposal 2 for timing PE solutions:

- Use pytest fixture along with --capture=no flag to print out the
  top DURATIONS slowest solution at the end of the test sessions.
- Remove the print part and try ... except ... block from the test
  function.

* Proposal 3 for timing PE solutions:

Completely changed the way I was performing the tests. Instead of
parametrizing the problem numbers and expected output, I will
parametrize the solution file path.

Steps:
- Collect all the solution file paths
- Convert the paths into a Python module
- Call solution on the module
- Assert the answer with the expected results

For assertion, it was needed to convert the JSON list object to
Python dictionary object which required changing the JSON file itself.

* Add type hints for variables

* Fix whitespace in single_qubit_measure
2020-10-13 15:41:12 +05:30
Abhishek Jaisingh
6e01004535
Add First Quantum Qiskit Code Tutorial (#3173)
* Add First Quantum Qiskit Code Tutorial

* Add Qiskit Requirement

* Address Review Comments

* fixup! Format Python code with psf/black push

* Update q1.py

* updating DIRECTORY.md

* Update and rename q1.py to single_qubit_measure.py

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2020-10-12 21:41:05 +02:00