Skip to content

Commit 252a686

Browse files
committed
Merge remote-tracking branch 'origin/master' into feature-dirichlet-distribution
2 parents bd06e8b + 3c9cc7e commit 252a686

Some content is hidden

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

48 files changed

+1358
-1353
lines changed

.travis.yml

Lines changed: 3 additions & 2 deletions
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:
@@ -18,6 +18,7 @@ addons:
1818
- texlive
1919
- texlive-latex-extra
2020
- texlive-fonts-extra
21+
- latexmk
2122

2223
# Explicitly add doctest support as separate parts of the build matrix,
2324
# since these tests require additional packages that should be optional.
@@ -79,7 +80,7 @@ script:
7980
- if [[ "${DOCTEST}" == "1" ]]; then
8081
cd $TRAVIS_BUILD_DIR/doc;
8182
make doctest;
82-
make latexpdf;
83+
make latexpdf LATEXOPTS="--interaction=nonstopmode";
8384
fi
8485

8586
after_success:

COPYING.txt

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

doc/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ help:
2626
@echo " devhelp to make HTML files and a Devhelp project"
2727
@echo " epub to make an epub"
2828
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
29-
@echo " latexpdf to make LaTeX files and run them through pdflatex"
29+
@echo " latexpdf to make LaTeX files and run them through latexmk"
3030
@echo " text to make text files"
3131
@echo " man to make manual pages"
3232
@echo " changes to make an overview of all changed/added/deprecated items"
@@ -99,9 +99,9 @@ latex:
9999

100100
latexpdf:
101101
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
102-
@echo "Running LaTeX files through pdflatex..."
102+
@echo "Running LaTeX files through latexmk..."
103103
$(MAKE) -C $(BUILDDIR)/latex all-pdf
104-
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
104+
@echo "latexmk finished; the PDF files are in $(BUILDDIR)/latex."
105105

106106
text:
107107
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text

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-

0 commit comments

Comments
 (0)