-
Notifications
You must be signed in to change notification settings - Fork 23
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
Issue 41 cimulator buid #47
Open
alex124585
wants to merge
73
commits into
bump-build-version
Choose a base branch
from
issue_41_cimulator_buid
base: bump-build-version
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 22 commits
Commits
Show all changes
73 commits
Select commit
Hold shift + click to select a range
c5aab9c
add tests for simulators build and timing
alex124585 0a6b0b3
black format
alex124585 182fdea
fix numpy
alex124585 ceff2dc
Code refactor
alex124585 a61a7d5
fix pyhton test
alex124585 dfc96c8
Update test_simulators_builds.py
alex124585 09757b3
Update setup.py
alex124585 9170337
Update qokit-python-only.yml
alex124585 762d6a0
Update qokit-package.yml
alex124585 26c8ee3
ran black
1c2c483
Update setup.py
alex124585 ebce252
Update setup.py
alex124585 88e346e
ran black
473a90a
Merge branch 'issue_41_cimulator_buid' of https://github.com/jpmorgan…
2526bc3
Update setup.py
alex124585 4f931ca
Update test_simulators_builds.py
alex124585 1262f89
remove dup logic for QOKIT_PYTHON_ONLY
13b2616
black fix
2ce3526
Check for pypi failure
eb842dc
Check for pypi failure
0d1b067
Check for pypi failure
7f174d1
Check for pypi failure
53b86e5
added pypi test for all environment
35bb1aa
added pypi test for all environment
aafca21
Update test_simulators_builds.py
alex124585 b254d52
Update test_simulators_builds.py
alex124585 031709d
Update pypi-test-publish.yml
alex124585 c3b337b
add code for graceful test handling
fb7e4ef
Merge branch 'issue_41_cimulator_buid' of https://github.com/jpmorgan…
24dbfdf
Merge branch 'main' into issue_41_cimulator_buid
alex124585 3fc210e
Update qokit-python-only.yml
alex124585 1bf6ac0
Merge branch 'main' into issue_41_cimulator_buid
rsln-s 6d48cf3
Update qokit-python-only.yml
alex124585 66df968
Update qokit-python-only.yml
alex124585 84680bf
Merge branch 'bump-build-version' into issue_41_cimulator_buid
rsln-s b7406cb
cleanup
rsln-s ed4d664
fix flag
rsln-s a1177d0
cleanup
rsln-s d92aa65
change how environment variable is handled
rsln-s f8d31b9
black
rsln-s 83da77c
rename
rsln-s 18d0757
no need to skip the tests
rsln-s d81c7cf
catch windows-specific exception
rsln-s e0ebef8
now build tests are run correctly
rsln-s 617763b
timeout is hard to get right in GH actions, removing
rsln-s 2ff4228
add another flag
rsln-s c01ccd2
revert change
rsln-s c33d328
removing unused flag
rsln-s ad6f002
change the order of installs
rsln-s 16f4890
Revert "change the order of installs"
rsln-s 295a89c
try adding explicit dependency on types-pkg-resources==0.1.3
rsln-s 8740ced
debug: try building in GH actions manualy
rsln-s 66d3c0b
Revert "debug: try building in GH actions manualy"
rsln-s 385f305
drop windows (losing battle), install gcc on mac
rsln-s ac8dff8
fix GCC install
rsln-s aa73b13
debug: try building in GH actions manualy
rsln-s 1d9204c
Update setup.py
alex124585 952f05b
Update qokit-python-only-unix.yml
alex124585 f369822
Update qokit-python-only-unix.yml
alex124585 9189ab2
Update qokit-package.yml
alex124585 3d3f230
Update qokit-package.yml
alex124585 97b741a
Update qokit-python-only-unix.yml
alex124585 3616e58
Update qokit-package.yml
alex124585 17c0854
Update test_simulator_build.py
alex124585 6d488e2
Update test_simulator_build.py
alex124585 ff64638
black run
6d93092
Update qokit-package.yml
alex124585 fd42d6d
Update qokit-python-only-unix.yml
alex124585 7194c2c
Update test_simulator_build.py
alex124585 2c6d1fd
black format
6170795
Update test_simulator_build.py
alex124585 694a6d3
black format
d624e21
Update test_simulator_build.py
alex124585 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
############################################################################### | ||
# // SPDX-License-Identifier: Apache-2.0 | ||
# // Copyright : JP Morgan Chase & Co | ||
############################################################################### | ||
import pytest | ||
import os | ||
import numpy as np | ||
from qokit import get_qaoa_labs_objective | ||
from qokit.fur import get_available_simulator_names | ||
|
||
# when fail tests only runs in Github actions. Change to true to run locally | ||
IN_GITHUB_ACTIONS = os.getenv("GITHUB_ACTIONS") == "fales" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Typo! "fales" -> "fails" |
||
|
||
|
||
@pytest.mark.skipif(IN_GITHUB_ACTIONS, reason="Test runs only in Github Actions.") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TODO: add graceful handling of this in python pipeline |
||
def test_simulator_c_bild(): | ||
assert "c" in get_available_simulator_names("x") | ||
assert "c" in get_available_simulator_names("xyring") | ||
assert "c" in get_available_simulator_names("xycomplete") | ||
|
||
|
||
@pytest.mark.skipif(IN_GITHUB_ACTIONS, reason="Test runs only in Github Actions.") | ||
def test_simulator_python_build(): | ||
assert "python" in get_available_simulator_names("x") | ||
assert "python" in get_available_simulator_names("xyring") | ||
assert "python" in get_available_simulator_names("xycomplete") | ||
|
||
|
||
@pytest.mark.skipif(IN_GITHUB_ACTIONS, reason="Test runs only in Github Actions.") | ||
@pytest.mark.timeout(15) | ||
def test_simulator_timing_test(): | ||
theta = np.random.uniform(0, 1, 280) | ||
f = get_qaoa_labs_objective(20, 140) | ||
f(theta) | ||
pass |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: add back macOS and (possibly) windows