mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-03-11 17:19:48 +00:00
Fix failing pytest quantum/bb84.py (#8838)
* Fix failing pytest quantum/bb84.py * Update bb84.py test results to match current qiskit
This commit is contained in:
parent
3bfa89dacf
commit
d764eec655
1
.github/workflows/build.yml
vendored
1
.github/workflows/build.yml
vendored
@ -24,7 +24,6 @@ jobs:
|
|||||||
- name: Run tests
|
- name: Run tests
|
||||||
# TODO: #8818 Re-enable quantum tests
|
# TODO: #8818 Re-enable quantum tests
|
||||||
run: pytest
|
run: pytest
|
||||||
--ignore=quantum/bb84.py
|
|
||||||
--ignore=quantum/q_fourier_transform.py
|
--ignore=quantum/q_fourier_transform.py
|
||||||
--ignore=project_euler/
|
--ignore=project_euler/
|
||||||
--ignore=scripts/validate_solutions.py
|
--ignore=scripts/validate_solutions.py
|
||||||
|
@ -64,10 +64,10 @@ def bb84(key_len: int = 8, seed: int | None = None) -> str:
|
|||||||
key: The key generated using BB84 protocol.
|
key: The key generated using BB84 protocol.
|
||||||
|
|
||||||
>>> bb84(16, seed=0)
|
>>> bb84(16, seed=0)
|
||||||
'1101101100010000'
|
'0111110111010010'
|
||||||
|
|
||||||
>>> bb84(8, seed=0)
|
>>> bb84(8, seed=0)
|
||||||
'01011011'
|
'10110001'
|
||||||
"""
|
"""
|
||||||
# Set up the random number generator.
|
# Set up the random number generator.
|
||||||
rng = np.random.default_rng(seed=seed)
|
rng = np.random.default_rng(seed=seed)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user