Skip to content

Commit

Permalink
Merge ef1a68d into daed76a
Browse files Browse the repository at this point in the history
  • Loading branch information
claretgrace0801 authored Jun 25, 2022
2 parents daed76a + ef1a68d commit 836185e
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
5 changes: 5 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,9 @@ def create_version_py_file(options):
# keep here are ones that we have done some compile-time processing on.
setup(
version=options['version'],
entry_points={
'qutip.about': [
'qutip_qip = qutip_qip:_about'
]
}
)
1 change: 1 addition & 0 deletions src/qutip_qip/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
from .version import version as __version__ # noqa
from .about import about, _about
27 changes: 27 additions & 0 deletions src/qutip_qip/about.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
"""
Command line output of information on QuTiP QIP and dependencies.
"""

import qutip
import qutip_qip
import os
import inspect


def _about():
"""
Meant to be called from qutip's about function
through qutip-qip's entrypoint.
"""
title = "QuTiP QIP: QuTiP Quantum Information Processing"
lines = []
lines.append("=" * len(title))
lines.append("QuTiP QIP Version: %s" % qutip_qip.__version__)
qutip_qip_install_path = os.path.dirname(inspect.getsourcefile(qutip_qip))
lines.append("Installation path: %s" % qutip_qip_install_path)
return title, lines


def about():
"""About box for QuTiP QIP."""
qutip.about()

0 comments on commit 836185e

Please sign in to comment.