Skip to content

Commit 69b5c0e

Browse files
authored
Merge branch 'master' into upgrade-vectorized-risk
2 parents ebdec57 + 3c9cc7e commit 69b5c0e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1353
-1349
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ sudo: false
22
language: python
33
python:
44
- "2.7"
5-
- "3.3"
65
- "3.4"
76
- "3.5"
7+
- "3.6"
88

99
addons:
1010
apt:

COPYING.txt

Lines changed: 6 additions & 656 deletions
Large diffs are not rendered by default.

doc/source/apiref/derived_models.rst

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a
55
letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View,
66
California, 94041, USA.
7-
7+
88
.. _derived_models:
9-
9+
1010
.. currentmodule:: qinfer
1111

1212
Derived Models
@@ -30,6 +30,12 @@ additional functionality or changing the behaviors of underlying models.
3030
.. autoclass:: BinomialModel
3131
:members:
3232

33+
:class:`GaussianHyperparameterizedModel` - Model over Gaussian outcomes conditioned on two-outcome experiments
34+
--------------------------------------------------------------------------------------------------------------
35+
36+
.. autoclass:: GaussianHyperparameterizedModel
37+
:members:
38+
3339
:class:`MultinomialModel` - Model over batches of D-outcome experiments
3440
----------------------------------------------------------------------
3541

@@ -41,13 +47,13 @@ additional functionality or changing the behaviors of underlying models.
4147

4248
.. autoclass:: MLEModel
4349
:members:
44-
50+
4551
:class:`RandomWalkModel` - Model for adding fixed random walk to parameters
4652
---------------------------------------------------------------------------
4753

4854
.. autoclass:: RandomWalkModel
4955
:members:
50-
56+
5157
:class:`GaussianRandomWalkModel` - Model for adding gaussian random walk to parameters
5258
--------------------------------------------------------------------------------------
5359

doc/source/apiref/test_models.rst

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,28 @@ built on top of QInfer.
2828
.. autoclass:: SimplePrecessionModel
2929
:members:
3030

31+
:class:`UnknownT2Model` - Model of a single qubit undergoing Larmor precession with finite decoherence
32+
------------------------------------------------------------------------------------------------------
33+
34+
.. autoclass:: UnknownT2Model
35+
:members:
36+
3137
:class:`NoisyCoinModel` - Classical coin flip model corrupted by a noisy process
3238
--------------------------------------------------------------------------------
3339

3440
.. autoclass:: NoisyCoinModel
3541
:members:
36-
37-
:class:`NDieModel`
42+
43+
:class:`NDieModel`
3844
------------------
3945

4046
.. autoclass:: NDieModel
4147
:members:
42-
48+
4349
Custom Models
4450
-------------
4551

46-
Writing custom models is standard practice for QInfer users.
52+
Writing custom models is standard practice for QInfer users.
4753
See :ref:`CustomModels`.
4854

4955
.. currentmodule:: qinfer.tests.base_test

doc/source/conf.py

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -66,19 +66,17 @@
6666
\let\footnotesize\small
6767
\let\footnoterule\relax
6868
\rule{\textwidth}{1pt}%
69-
\ifsphinxpdfoutput
70-
\begingroup
71-
% These \defs are required to deal with multi-line authors; it
72-
% changes \\ to ', ' (comma-space), making it pass muster for
73-
% generating document info in the PDF file.
74-
\def\\{, }
75-
\def\and{and }
76-
\pdfinfo{
77-
/Author (\@author)
78-
/Title (\@title)
79-
}
80-
\endgroup
81-
\fi
69+
\begingroup
70+
% These \defs are required to deal with multi-line authors; it
71+
% changes \\ to ', ' (comma-space), making it pass muster for
72+
% generating document info in the PDF file.
73+
\def\\{, }
74+
\def\and{and }
75+
\pdfinfo{
76+
/Author (\@author)
77+
/Title (\@title)
78+
}
79+
\endgroup
8280
\begin{flushright}%
8381
\sphinxlogo%
8482
{\rm\Huge\py@HeaderFamily \@title \par}%
@@ -298,6 +296,11 @@
298296

299297
# Additional stuff for the LaTeX preamble.
300298
latex_preamble = preamble
299+
# In Sphinx 1.5, this now appears as latex_elements, so we pack the
300+
# preamble that way, too.
301+
latex_elements = {
302+
'preamble': preamble
303+
}
301304

302305
# Documents to append as an appendix to all manuals.
303306
#latex_appendices = []

setup.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,17 @@ def write_version(filename=VERSION_TARGET):
6363
'Bayesian particle filtering for parameter estimation in quantum '
6464
'information applications.',
6565
long_description=long_description,
66-
license='http://www.gnu.org/licenses/agpl-3.0.en.html',
66+
license='https://opensource.org/licenses/BSD-3-Clause',
6767
classifiers=[
6868
'Development Status :: 4 - Beta',
6969
'Intended Audience :: Science/Research',
70-
'License :: OSI Approved :: GNU Affero General Public License v3',
70+
'License :: OSI Approved :: BSD License',
7171
'Natural Language :: English',
7272
'Operating System :: OS Independent',
7373
'Programming Language :: Python :: 2.7',
74-
'Programming Language :: Python :: 3.3',
7574
'Programming Language :: Python :: 3.4',
75+
'Programming Language :: Python :: 3.5',
76+
'Programming Language :: Python :: 3.6',
7677
'Programming Language :: Python :: Implementation :: CPython',
7778
'Topic :: Scientific/Engineering :: Physics',
7879
],

src/qinfer/__init__.py

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,36 @@
11
#!/usr/bin/python
22
# -*- coding: utf-8 -*-
33
##
4-
# __init__.py: Root of Qinfer package.
4+
# __init__.py: Root of QInfer package.
55
##
6-
# © 2012 Chris Ferrie (csferrie@gmail.com) and
7-
# Christopher E. Granade (cgranade@gmail.com)
8-
#
9-
# This file is a part of the Qinfer project.
10-
# Licensed under the AGPL version 3.
11-
##
12-
# This program is free software: you can redistribute it and/or modify
13-
# it under the terms of the GNU Affero General Public License as published by
14-
# the Free Software Foundation, either version 3 of the License, or
15-
# (at your option) any later version.
6+
# © 2017, Chris Ferrie (csferrie@gmail.com) and
7+
# Christopher Granade (cgranade@cgranade.com).
8+
#
9+
# Redistribution and use in source and binary forms, with or without
10+
# modification, are permitted provided that the following conditions are met:
11+
#
12+
# 1. Redistributions of source code must retain the above copyright
13+
# notice, this list of conditions and the following disclaimer.
14+
#
15+
# 2. Redistributions in binary form must reproduce the above copyright
16+
# notice, this list of conditions and the following disclaimer in the
17+
# documentation and/or other materials provided with the distribution.
1618
#
17-
# This program is distributed in the hope that it will be useful,
18-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
19-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20-
# GNU Affero General Public License for more details.
19+
# 3. Neither the name of the copyright holder nor the names of its
20+
# contributors may be used to endorse or promote products derived from
21+
# this software without specific prior written permission.
2122
#
22-
# You should have received a copy of the GNU Affero General Public License
23-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
23+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26+
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
27+
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28+
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29+
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30+
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31+
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32+
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33+
# POSSIBILITY OF SUCH DAMAGE.
2434
##
2535

2636
from __future__ import absolute_import

src/qinfer/_exceptions.py

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,36 @@
11
#!/usr/bin/python
22
# -*- coding: utf-8 -*-
33
##
4-
# _exceptions.py: Derived classes for Errors and Warnings specific to Qinfer.
4+
# _exceptions.py: Derived classes for Errors and Warnings specific to QInfer.
55
##
6-
# © 2012 Chris Ferrie (csferrie@gmail.com) and
7-
# Christopher E. Granade (cgranade@gmail.com)
8-
#
9-
# This file is a part of the Qinfer project.
10-
# Licensed under the AGPL version 3.
11-
##
12-
# This program is free software: you can redistribute it and/or modify
13-
# it under the terms of the GNU Affero General Public License as published by
14-
# the Free Software Foundation, either version 3 of the License, or
15-
# (at your option) any later version.
6+
# © 2017, Chris Ferrie (csferrie@gmail.com) and
7+
# Christopher Granade (cgranade@cgranade.com).
8+
#
9+
# Redistribution and use in source and binary forms, with or without
10+
# modification, are permitted provided that the following conditions are met:
11+
#
12+
# 1. Redistributions of source code must retain the above copyright
13+
# notice, this list of conditions and the following disclaimer.
14+
#
15+
# 2. Redistributions in binary form must reproduce the above copyright
16+
# notice, this list of conditions and the following disclaimer in the
17+
# documentation and/or other materials provided with the distribution.
1618
#
17-
# This program is distributed in the hope that it will be useful,
18-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
19-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20-
# GNU Affero General Public License for more details.
19+
# 3. Neither the name of the copyright holder nor the names of its
20+
# contributors may be used to endorse or promote products derived from
21+
# this software without specific prior written permission.
2122
#
22-
# You should have received a copy of the GNU Affero General Public License
23-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
23+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26+
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
27+
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28+
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29+
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30+
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31+
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32+
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33+
# POSSIBILITY OF SUCH DAMAGE.
2434
##
2535

2636
## FEATURES ###################################################################

src/qinfer/_lib/__init__.py

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,32 @@
66
# licensed as described within each file, or by the corresponding
77
# LICENSE and/or COPYING files.
88
##
9-
# © 2012 Chris Ferrie (csferrie@gmail.com) and
10-
# Christopher E. Granade (cgranade@gmail.com)
11-
#
12-
# This file is a part of the Qinfer project.
13-
# Licensed under the AGPL version 3.
14-
##
15-
# This program is free software: you can redistribute it and/or modify
16-
# it under the terms of the GNU Affero General Public License as published by
17-
# the Free Software Foundation, either version 3 of the License, or
18-
# (at your option) any later version.
9+
# © 2017, Chris Ferrie (csferrie@gmail.com) and
10+
# Christopher Granade (cgranade@cgranade.com).
11+
#
12+
# Redistribution and use in source and binary forms, with or without
13+
# modification, are permitted provided that the following conditions are met:
14+
#
15+
# 1. Redistributions of source code must retain the above copyright
16+
# notice, this list of conditions and the following disclaimer.
17+
#
18+
# 2. Redistributions in binary form must reproduce the above copyright
19+
# notice, this list of conditions and the following disclaimer in the
20+
# documentation and/or other materials provided with the distribution.
1921
#
20-
# This program is distributed in the hope that it will be useful,
21-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
22-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23-
# GNU Affero General Public License for more details.
22+
# 3. Neither the name of the copyright holder nor the names of its
23+
# contributors may be used to endorse or promote products derived from
24+
# this software without specific prior written permission.
2425
#
25-
# You should have received a copy of the GNU Affero General Public License
26-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
26+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
27+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29+
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
30+
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31+
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32+
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33+
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34+
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35+
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36+
# POSSIBILITY OF SUCH DAMAGE.
2737
##
28-

src/qinfer/abstract_model.py

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,34 @@
44
# abstract_model.py: Abstract interfaces for models with different levels of
55
# functionality.
66
##
7-
# © 2012 Chris Ferrie (csferrie@gmail.com) and
8-
# Christopher E. Granade (cgranade@gmail.com)
9-
#
10-
# This file is a part of the Qinfer project.
11-
# Licensed under the AGPL version 3.
12-
##
13-
# This program is free software: you can redistribute it and/or modify
14-
# it under the terms of the GNU Affero General Public License as published by
15-
# the Free Software Foundation, either version 3 of the License, or
16-
# (at your option) any later version.
7+
# © 2017, Chris Ferrie (csferrie@gmail.com) and
8+
# Christopher Granade (cgranade@cgranade.com).
9+
#
10+
# Redistribution and use in source and binary forms, with or without
11+
# modification, are permitted provided that the following conditions are met:
12+
#
13+
# 1. Redistributions of source code must retain the above copyright
14+
# notice, this list of conditions and the following disclaimer.
15+
#
16+
# 2. Redistributions in binary form must reproduce the above copyright
17+
# notice, this list of conditions and the following disclaimer in the
18+
# documentation and/or other materials provided with the distribution.
1719
#
18-
# This program is distributed in the hope that it will be useful,
19-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
20-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21-
# GNU Affero General Public License for more details.
20+
# 3. Neither the name of the copyright holder nor the names of its
21+
# contributors may be used to endorse or promote products derived from
22+
# this software without specific prior written permission.
2223
#
23-
# You should have received a copy of the GNU Affero General Public License
24-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
24+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27+
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
28+
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29+
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30+
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31+
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32+
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33+
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34+
# POSSIBILITY OF SUCH DAMAGE.
2535
##
2636

2737
## FEATURES ##################################################################

0 commit comments

Comments
 (0)