* 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
* 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>
* 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
* 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>