Commit Graph

17 Commits

Author SHA1 Message Date
Christian Clauss
24d3cf8244
The black formatter is no longer beta (#5960)
* The black formatter is no longer beta

* pre-commit autoupdate

* pre-commit autoupdate

* Remove project_euler/problem_145 which is killing our CI tests

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-01-30 20:29:54 +01:00
Christian Clauss
ef9827166e
Approve functions used as default arguments (#4699)
* Approve functions used as default argumenets

* The default value for **seed** is the result of a function call

The default value for **seed** is the result of a function call which is not normally recommended and causes flake8-bugbear to raise a B008 error. However, in this case, it is accptable because `LinearCongruentialGenerator.__init__()` will only be called once per instance and it ensures that each instance will generate a unique sequence of numbers.

* The default value for **backend** is the result of a function call

The default value for **backend** is the result of a function call which is not normally recommended and causes flake8-bugbear to raise a B008 error. However, in this case, it is accptable because `Aer.get_backend()` is called when the function is definition and that same backend is then reused for function calls.

* Update linear_congruential_generator.py

* Update ripple_adder_classic.py

* Update ripple_adder_classic.py

* Update ripple_adder_classic.py

* Update ripple_adder_classic.py

* Update ripple_adder_classic.py
2021-08-31 07:56:19 +02:00
algobytewise
959507901a
[mypy] fix small folders (#4292)
* add final else-statement

* fix file_transfer

* fix quantum folder

* fix divide_and_conquer-folder

* Update build.yml

* updating DIRECTORY.md

* Update ripple_adder_classic.py

* Update .github/workflows/build.yml

* removed imports from typing

* removed conversion to string

* Revert "removed conversion to string"

This reverts commit 2f7c4731d1.

* implemented suggested changes

* Update receive_file.py

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2021-03-23 16:51:50 +01:00
Rupansh
9f6188cc40
Add Quantum Full Adder circuit for classical integers (#2954)
* requirements: add qiskit

major library required for quantum computing

* quantum: add quantum ripple adder implementation

right now we are essentially performing the same task as a classic ripple adder

Signed-off-by: rupansh-arch <rupanshsekar@hotmail.com>
2020-11-11 19:24:31 +08:00
Abhinand C
fd7da5ff8f
Add IBM Qiskit References (#2561)
* Added IBM Qiskit References

* space

Co-authored-by: John Law <johnlaw.po@gmail.com>
2020-10-29 08:43:34 +08:00
Christian Clauss
a481bfa231
Fix broken build: Remove trailing spaces (#3501)
* Fix broken build: Remove trailing spaces

* updating DIRECTORY.md

* One more trailing space

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-10-18 18:07:27 +02:00
Abhishek Jaisingh
beb2c35dd8
Implement Deutsch-Jozsa Algorithm In Qiskit (#3447)
* Implement Deutsch-Jozsa Algorithm In Qiskit

Signed-off-by: Abhishek Jaisingh <abhi2254015@gmail.com>

* Add Changes Requested In Review

Signed-off-by: Abhishek Jaisingh <abhi2254015@gmail.com>

* Address Further Review Comments

* fixup! Format Python code with psf/black push

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-10-18 16:54:46 +02:00
Christian Clauss
f34434a214
Fix the build -- 88 chars per line max. (#3437)
* Fix the build -- 88 chars per line max.

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-10-17 13:42:29 +02:00
Abhishek Jaisingh
a88006d04a
Qiskit: Add Quantum Half Adder (#3405)
* Qiskit: Add Quantum Half Adder

* fixup! Format Python code with psf/black push

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-10-17 07:41:24 +02:00
NAVEEN S R
75a9b460ad
added script to perform quantum entanglement (#3270)
* added code to perform quantum entanglement

* Update quantum_entanglement.py
2020-10-14 12:25:20 +02:00
Dhruv
23ab159f30
Fix errors in Quantum algorithm (#3273)
* Fix pre-commit errors in Quantum algorithm

* updating DIRECTORY.md

* Fix doctest

* Update not_gate.py

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-10-14 07:58:52 +02:00
Abhishek Jaisingh
ca2d269ed2
Add Qiskit Quantum NOT Gate Example Code (#3255)
* Add Qiskit Quantum NOT Gate Example Code

* Address Review Comments

Signed-off-by: Abhishek Jaisingh <abhi2254015@gmail.com>
2020-10-13 18:34:24 +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
Dhruv
48357cea5b
Add __init__.py files in all the directories (#2503) 2020-09-28 19:42:36 +02:00
hackercyclops12
1b65309dca
Update README.md (#1842) 2020-04-07 23:56:21 +02:00
Christian Clauss
3d129a4964
Create Python/quantum/README.md (#1834)
* Create Python/quantum/README.md

Started at #1831

* fixup! Format Python code with psf/black push

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-04-07 11:58:23 +02:00