|
| 1 | +.. |
| 2 | + This work is licensed under the Creative Commons Attribution- |
| 3 | + NonCommercial-ShareAlike 3.0 Unported License. To view a copy of this |
| 4 | + license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a |
| 5 | + letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, |
| 6 | + California, 94041, USA. |
| 7 | + |
| 8 | +.. _citing_guide: |
| 9 | + |
| 10 | +.. currentmodule:: qinfer |
| 11 | + |
| 12 | +Citing QInfer and Related Projects |
| 13 | +================================== |
| 14 | + |
| 15 | +Citing Released Versions |
| 16 | +------------------------ |
| 17 | + |
| 18 | +If you use **QInfer** in your publication or presentation, we would appreciate it |
| 19 | +if you cited our work. We recommend citing **QInfer** by using the BibTeX |
| 20 | +entry:: |
| 21 | + |
| 22 | + @misc{qinfer-1_0, |
| 23 | + author = {Christopher Granade and |
| 24 | + Christopher Ferrie and |
| 25 | + Steven Casagrande and |
| 26 | + Ian Hincks and |
| 27 | + Michal Kononenko and |
| 28 | + Thomas Alexander and |
| 29 | + Yuval Sanders}, |
| 30 | + title = {{QInfer}: Library for Statistical Inference in Quantum Information}, |
| 31 | + month = september, |
| 32 | + year = 2016, |
| 33 | + doi = {10.5281/zenodo.157007}, |
| 34 | + url = {http://dx.doi.org/10.5281/zenodo.157007} |
| 35 | + } |
| 36 | + |
| 37 | + |
| 38 | +Pre-Release Versions |
| 39 | +-------------------- |
| 40 | + |
| 41 | +If you wish to cite **QInfer** functionality that has not yet appeared in a |
| 42 | +released version, it may be helpful |
| 43 | +to cite a given SHA hash as listed on |
| 44 | +`GitHub <https://github.com/QInfer/python-qinfer/commits/master>`_ (the |
| 45 | +hashes of each commit are listed on the right hand side of the page). |
| 46 | +A recommended BibTeX entry for citing a particular commit is:: |
| 47 | + |
| 48 | + @misc{qinfer-prerelease, |
| 49 | + author = {Christopher Granade and |
| 50 | + Christopher Ferrie and |
| 51 | + Steven Casagrande and |
| 52 | + Ian Hincks and |
| 53 | + Michal Kononenko and |
| 54 | + Thomas Alexander and |
| 55 | + Yuval Sanders}, |
| 56 | + title = {{QInfer}: Library for Statistical Inference in Quantum Information}, |
| 57 | + month = may, |
| 58 | + year = 2016, |
| 59 | + url = "https://github.com/QInfer/python-qinfer/commit/bc3736c", |
| 60 | + note = {Version \texttt{bc3736c}.} |
| 61 | + } |
| 62 | + |
| 63 | +In this example, ``bc3736c`` should be replaced by the |
| 64 | +particular commit being cited, and the date should be replaced by the date |
| 65 | +of that commit. |
| 66 | + |
| 67 | +Automatic Citation Collection |
| 68 | +----------------------------- |
| 69 | + |
| 70 | +QInfer also supports the use of the `duecredit`_ project to automatically |
| 71 | +collect citations for a bibliography. This support is still experimental, |
| 72 | +and may not yet generate complete bibliographies, so please manually check |
| 73 | +the resulting bibliography. In any case, to get started, install `duecredit`_:: |
| 74 | + |
| 75 | + $ pip install duecredit |
| 76 | + |
| 77 | +If your project then uses a script to generate and/or analyze data, then you |
| 78 | +can use `duecredit`_ to collect citations for Python modules and functions |
| 79 | +called by your script. For example, if your project can be run as |
| 80 | +`python script.py`, use the following command to collect a bibliography:: |
| 81 | + |
| 82 | + $ python -m duecredit script.py |
| 83 | + |
| 84 | +Alternatively, it may be more reliable to use environment variables to turn |
| 85 | +on `duecredit`_ collection, since this approach also works with |
| 86 | +Jupyter Notebook:: |
| 87 | + |
| 88 | + $ export DUECREDIT_ENABLE=yes # Bash |
| 89 | + PS> $Env:DUECREDIT_ENABLE = "yes" # PowerShell |
| 90 | + |
| 91 | +Or, from within an Jupyter Notebook, environment variables can be set before |
| 92 | +import using:: |
| 93 | + |
| 94 | + import os |
| 95 | + os.environ['DUECREDIT_ENABLE'] = 'yes' |
| 96 | + import qinfer as qi |
| 97 | + |
| 98 | +Whenever it is detected that this variable is true, any uses of **Qinfer** in a |
| 99 | +given folder (even multiple distinct runs) will maintain |
| 100 | +a file in the same folder called ``.duecredit.p`` that contains |
| 101 | +a representation of your bibliography. This file is updated whenever **Qinfer** |
| 102 | +uses a module, class, or method that is appropriately tagged with a citation. |
| 103 | + |
| 104 | +If you wish to see the citation compilaton of a *single* python session, |
| 105 | +you can dump the current state with:: |
| 106 | + |
| 107 | + qi.due.dump() |
| 108 | + |
| 109 | +On the other hand, to print it out the entire ``.duecredit.p`` collection |
| 110 | +in BibTeX form, use the summary functionality of `duecredit`_:: |
| 111 | + |
| 112 | + $ duecredit summary --format=bibtex |
| 113 | + |
| 114 | +Note that this summary will also include projects such as NumPy and SciKit-Learn |
| 115 | +that are supported by `duecredit`_, as well as any other projects which natively |
| 116 | +host citation metadata through `duecredit`_. For example:: |
| 117 | + |
| 118 | + $ export DUECREDIT_ENABLE=yes |
| 119 | + $ ipython |
| 120 | + In [1]: import qinfer as qi |
| 121 | + In [2]: exit |
| 122 | + |
| 123 | + DueCredit Report: |
| 124 | + - Scientific tools library / numpy (v 1.11.1) [1] |
| 125 | + - Bayesian inference for quantum information / qinfer (v 1.0) [2] |
| 126 | + - Machine Learning library / sklearn (v 0.17.1) [3] |
| 127 | + - Affinity propagation clustering algorithm / sklearn.cluster.affinity_propagation_ (v 0.17.1) [4] |
| 128 | + |
| 129 | + 3 packages cited |
| 130 | + 1 module cited |
| 131 | + 0 functions cited |
| 132 | + |
| 133 | + References |
| 134 | + ---------- |
| 135 | + |
| 136 | + [1] Van Der Walt, S., Colbert, S.C. & Varoquaux, G., 2011. The NumPy array: a structure for efficient numerical computation. Computing in Science & Engineering, 13(2), pp.22–30. |
| 137 | + [2] Granade, C. et al., 2016. QInfer: Statistical Inference Software for Quantum Applications. arXiv:1610.00336 [physics, physics:quant-ph, stat]. |
| 138 | + [3] Pedregosa, F. et al., 2011. Scikit-learn: Machine learning in Python. The Journal of Machine Learning Research, 12, pp.2825–2830. |
| 139 | + [4] Frey, B.J. & Dueck, D., 2007. Clustering by Passing Messages Between Data Points. Science, 315(5814), pp.972–976. |
| 140 | + |
| 141 | +The bibliography entries defined by QInfer are organized according to different |
| 142 | +*tags*, making it easier to filter through the results of `duecredit`_. In particular, |
| 143 | +QInfer uses the following citation tags, as defined in the `duecredit documentation |
| 144 | +<https://github.com/duecredit/duecredit/blob/master/README.md>`_: |
| 145 | + |
| 146 | +- ``implementation``: The tagged function is an implementation of the cited work. |
| 147 | +- ``experiment``: Concerns experimental demonstrations of an algorithm or procedure. This tag |
| 148 | + is similar to, but distinct from, the ``use`` tag defined by `duecredit`_. |
| 149 | + |
| 150 | +These tags can be controlled using the ``DUECREDIT_REPORT_ALL`` and ``DUECREDIT_REPORT_TAGS`` |
| 151 | +environment variables. By default, all tags by ``implementation`` are hidden, such that |
| 152 | +summaries of the collected bibliography describe which software implementations are used |
| 153 | +in the course of a project. |
| 154 | + |
| 155 | +For more details on how to use `duecredit`_, please see their `documentation on |
| 156 | +GitHub <https://github.com/duecredit/duecredit/blob/master/README.md>`_. |
| 157 | + |
| 158 | + |
| 159 | +.. _duecredit: https://github.com/duecredit/duecredit/ |
0 commit comments