-
Notifications
You must be signed in to change notification settings - Fork 23
Splitting the QNET Package into components
The QNET
package should be split into different components. The rationale is the following:
- the different components of QNET have a different audience. E.g. QHDL modeling is of interest mainly to experimentalist, whereas code generation is for people doing numerics
- different components have different level of maturity. Some parts are stable, others very much in "alpha".
- different components can be more easily maintained by different people
- the code base will be easier to work with, and easier to test
- we can isolate dependencies
To a large extent, we would simply be separating current sub-packages of QNET into standalone components (i.e., full packages)
Possible components include:
Goal: provide a parser for the QHDL language, resulting in an SLH object / SLH network object
Will contain the code currently in the QNET.qhdl
sub-packages
Goal: provide a graphical Jupyter-Notebook-based tool to build abstract quantum networks graphically (resulting in an SLH object / SLH network object)
Goal: provide a library of quantum network components (beamsplitters, cavities, OPOs, ...)
Currently, these are in the QNET.circuit_components
sub-package. It makes sense to have this separate, as people might want to contribute new components, without having to deal with the rest of QNET
Goal: provide a structure for the abstract description of connected SLH objects. Apply the SLH algebra to derive an effective SLH
object for the entire network.
Should we have a data structure SLHNetwork
that reflects a "unevaluated" network of SLH objects?
Currently, this functionality is mostly in the qnet.algebra.circuit_algebra
. Can the core SLH algebra be separated from the rest of the packages in qnet.algebra
, e.g. operator algebra? Ideally, we would define a duck-typed API so that we wouldn't even have to rely on qnet-algebra
(see below) explicitly
Question: should ABCD algebra be separated out?
Goal: Provide a computer-algebra framework for quantum mechanics (i.e., operators). Allow for symbolic manipulation and model reduction.
Currently, this functionality is in sub-modules in the qnet.algebra
package.
This will likely depend on qnet-sympy
, as a lot of symbolic manipulation might be performed by leveraging sympy (i.e., converting to sympy expression, doing simplification there, then converting back. Maybe qnet-algebra
and qnet-sympy
should not even be separate.
Goal: Convert between QNET algebra objects and numeric QuTiP object
Goal: Convert symbolic expressions into C++ code, within the QSD framework
Goal: convert between qnet-algebra
and purely symbolic sympy expressions.
This can (and should) be possible at two levels:
- convert each operator to a symbol, so that we can do (non-commutative) algebra
- convert operators into sympy matrices with symbolic (scalar) entries