Welcome to Quantum’s documentation!

Quantum is a financial modeling platform that makes financial modeling easy. Quantum gives you access to cutting edge high-performance computing technologies such as GPGPU without requiring you to know any low-level graphics card programming languages. Quantum also allows people to build models that take advantage of modern multi-core processors without requiring any knowledge of multi-threaded programming.

To achieve these usability goals, Quantum utilizes directed acyclic processing networks as its primary mode of logic representation. A processing network is essentially a flow chart that can be executed. Each node in the network represents a processing task having inputs and outputs. A scheduler traverses the graph and at each node, executes it to produce outputs. This is then passed on as inputs to subsequent nodes. In Quantum, graphs are called circuits and nodes are called cells.

Attention

Quantum is under heavy development and many components of the system are subject to change. Warning messages will accompany the documentation in cases where this is the case.

Because Quantum is built on Python, users have the ability to inspect the internal objects defined by the system through Python’s interpreter. The instant feedback and ease of experimentation is part of what makes the Quantum a joy to use. To get started, launch Quantum and try the following in the console:

>>> help()  # You will get a listing of variables, keyboard shortcuts, and
commands

Defined names:
==============
ui , root , QuScheduler , toggle_screencast , sys , rename , undo , new ,
QuCell , scheduler ,  debug_dump , conn , project , run , history , Cell , v,
refresh , Circuit , help ,  help_docs , list , delete , circuit , help_rst,
sweep_all

Other commands:
===============
sweep_all
toggle_screencast
undo
redo
history
load
open_console
list
new
delete
open
run
rename
help
profiler

Keyboard hotkeys:
=================
CmdLine:
     paste_cmd: ctrl + v
     stop_running: ctrl + z
     previous_cmd: up
     next_cmd: down
UI_Circuit:
     delete_selected: x
     delete_selected: delete
     open_select_menu: ctrl + tab
     connect_sockets: f
     open_cell_menu: shift + a
MainScreen:
     screen_sweep: `
     redo: shift + ctrl + z
     undo: ctrl + z
     all_sweep: ctrl + `

You can call help() on any object like so:

>>> help(QuKernel)

    Manages an instance of the Quantum application. To start Quantum, a single
    ``QuKernel`` must be instantiated. Once a kernel has been instanced, all
    subsequent attempts to instance a kernel will return a reference to the
    existing copy. Assign the instance to a variable in order to control the
    application. For example ::

        my_app = QuKernel()

Quantum.QuKernel has a function to list all cells that have been loaded from plugins. Let’s try listing them

>>> QuKernel().list_cells()
['Quantum::PyCell::Custom::Add', 'Quantum::PyCell::Custom::Add_To_Chart',
'Quantum::PyCell::Custom::AstColumn', 'Quantum::PyCell::Custom::Bitwise_And',
'Quantum::PyCell::Custom::Bitwise_Or', 'Quantum::PyCell::Custom::Column',
'Quantum::PyCell::Custom::Day', 'Quantum::PyCell::Custom::DayOfWeek',
'Quantum::PyCell::Custom::Differentiate', 'Quantum::PyCell::Custom::Div',
'Quantum::PyCell::Custom::Eq', 'Quantum::PyCell::Custom::Exp',
'Quantum::PyCell::Custom::Expand', 'Quantum::PyCell::Custom::Exponentiate',
'Quantum::PyCell::Custom::GroupBy', 'Quantum::PyCell::Custom::Gt',
'Quantum::PyCell::Custom::Gte', 'Quantum::PyCell::Custom::Head',
'Quantum::PyCell::Custom::Head_df', 'Quantum::PyCell::Custom::If',
'Quantum::PyCell::Custom::Int_Div', 'Quantum::PyCell::Custom::Integrate',
'Quantum::PyCell::Custom::IsNull', 'Quantum::PyCell::Custom::Len',
'Quantum::PyCell::Custom::Lt', 'Quantum::PyCell::Custom::Lte',
'Quantum::PyCell::Custom::Make_Chart', 'Quantum::PyCell::Custom::Merge',
'Quantum::PyCell::Custom::Month', 'Quantum::PyCell::Custom::Mul',
'Quantum::PyCell::Custom::NotNull', 'Quantum::PyCell::Custom::NumpyColumn',
'Quantum::PyCell::Custom::Pivot', 'Quantum::PyCell::Custom::Print',
'Quantum::PyCell::Custom::Read_CSV', 'Quantum::PyCell::Custom::Read_CSV_df',
'Quantum::PyCell::Custom::Select', 'Quantum::PyCell::Custom::Set_Index',
'Quantum::PyCell::Custom::Sleep', 'Quantum::PyCell::Custom::Sort_Index',
'Quantum::PyCell::Custom::Sort_Values', 'Quantum::PyCell::Custom::Stack',
'Quantum::PyCell::Custom::Start', 'Quantum::PyCell::Custom::Str_Contains',
'Quantum::PyCell::Custom::Str_Len', 'Quantum::PyCell::Custom::Str_StartsWith',
'Quantum::PyCell::Custom::Subtract', 'Quantum::PyCell::Custom::Sympify',
'Quantum::PyCell::Custom::Tail', 'Quantum::PyCell::Custom::To_List',
'Quantum::PyCell::Custom::Unstack', 'Quantum::PyCell::Custom::Update',
'Quantum::PyCell::Custom::Value_Counts', 'Quantum::PyCell::Custom::Variable',
'Quantum::PyCell::Custom::Year']
>>>
>>> # As you can see, it's a list. By itself, it's hard to read.
>>> # Fortunately we are working in Python, so let's format it!
>>> cells = '\n'.join(QuKernel().list_cells())
>>> print(cells)
Quantum::PyCell::Custom::Add
Quantum::PyCell::Custom::Add_To_Chart
Quantum::PyCell::Custom::AstColumn
Quantum::PyCell::Custom::Bitwise_And
Quantum::PyCell::Custom::Bitwise_Or
>>> # I've omitted the rest for brevity.

Because we’re in Python, you can also explore objects using their defined names like so:

>>> root.__dict__.keys() dict_keys(['select_menu', 'info', 'model',
'add_menu', 'cells_menu', 'scheduler', 'view', 'refresh', 'vertices',
'edges']) >>> >>> # Let's see what we can learn about root.model with the
help command: >>> help(root.model)

    The directed acyclic graph (DAG), also called a processing network. The
    ``QuCircuit`` object manages the connections between cells. >>> >>> # You
    can use the repr() command to determine what kind of object it is: >>>
    repr(root.model) '<Quantum.QuCircuit object at 0x1284a3af0>'