Comments (4)
I've done some looking into why PyTest found some classes with the Tester
suffix before I changed pytest.ini
. I think this has something to do with class inheritance structures.
Here are the full names used in definitions of relevant classes.
QiboEvotypeTester(BaseCase)
- where
BaseCase
inherits fromunittest.TestCase
and is defined in..util.py
.
- where
InterpygateConstructionTester(BaseCase)
- using the same
BaseCase
from above.
- using the same
LinearOpTester(OpBase)
OpBase
inherits directly fromobject
and is defined earlier in the same file.
RawObjectiveFunctionTester(object)
.TimeIndependentMDSObjectiveFunctionTester(ObjectiveFunctionData)
ObjectiveFunctionData
inherits directly fromobject
and is defined earlier in the same file.
TimeDependentMDSObjectiveFunctionTester(ObjectiveFunctionData)
- using the same
ObjectiveFunctionData
from above.
- using the same
So it seems that with the current pytest.ini
, PyTest automatically finds classes with the Tester
suffix if (and only if) the class inherits from unittest.TestCase
. If we change pytest.ini
then PyTest finds all classes with the Tester
suffix.
(For reproducibility's sake, I'll note that I'm using PyTest 7.4.3.)
from pygsti.
GitHub actions tests are using older version of an optional dependency called "qibo" (v 0.1.7). See here for the qibo version in the passing the test logs. Using qibo 0.2.1 causes tests to fail at this commit without any changes to pytest.ini
.
Looks like I would have gotten the older (correct / safe) version of qibo if I installed pyGSTi with pip install -e .['testing']
. Unfortunately for me, I installed pyGSTi as follows:
pip install -r requirements.txt
pip install -r optional-requirements.txt
pip install -e .
The difference is that optional_requirements.txt
doesn't enforce a version bound on qibo
.
If I had installed with pip install -e .['testing']
then I also would have gotten the csaps
optional dependency. Luckily it's easy to modify the failing test in InterpygateConstructionTester
to gracefully handle when csaps
is not installed. Note: csaps is not listed in optional-requirements.txt
.
from pygsti.
We might want to add a version check for qibo at runtime. We need to do a similar thing in CVXPY when we have to check if a third-party numerical solver has some feature. I'm not sure where we'd place the check for qibo, though.
Edit: opened #363 to document that desire.
from pygsti.
Closed with release of 0.9.12.
from pygsti.
Related Issues (20)
- Have pyGSTi check qibo version before attempting to execute qibo functions HOT 1
- Per Sequence Detail Bugfix HOT 3
- Gate staticized, unitarized during gate reassignment HOT 1
- LGST doesn't work with TP-parameterized target models
- Reparameterizing model doesn't propagate to model members dictionaries HOT 2
- Cannot compute product of editable circuit
- Nondeterministic Unit Test Failures HOT 5
- Re-evaluating Skipped Unit Tests HOT 3
- OpenQASM returned by convert_to_openqasm includes opaque gates. HOT 8
- Gauge transformations on SPAM HOT 2
- Faster unit tests/notebooks HOT 10
- Unexpected file in test_packages HOT 2
- ProtocolResults Incompletely Loads From Directory HOT 4
- Target & True Models Should Be Static HOT 5
- Idea: Switch macOS tests to run against beta branch HOT 4
- Pygsti is incompatible with scipy 1.12 HOT 1
- Fiducial selection for prep fiducials generates wrong qubit labels HOT 8
- Avoid unintended calls to ``ComplementPOVMEffect.to_vector()`` HOT 3
- Get number of calls to np.dot down to at most 1000 (replace with ``@``) HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pygsti.