Welcome to OpenQL’s documentation!¶
OpenQL is a framework for high-level quantum programming in C++/Python. The framework provides a compiler for compiling and optimizing quantum code. Compared to competing frameworks, such as Qiskit, OpenQL’s focus lies more on retargetability and compiling all the way down to assembly code for the various control (micro)architectures used by QuTech, and less on high-level constructs such as circuit conjugation: in general, the input you provide is a complete circuit and a platform description, and the output is an equivalent circuit that complies to platform constraints and/or machine code for running that circuit on a real quantum computer.
How to read the documentation¶
The documentation is roughly split into three main parts:
the user manual;
the user reference; and
the developer documentation.
The user manual portion is intended to be read like a book, to give new users
an overview of how to use OpenQL and build intuition for what does what. It
culminates in a few tutorials that take you from a basic algorithm all the way
to simulation of the compiled algorithm. The reference may then be used for more
exhaustive information about particular topics of interest to you, such as
particular API functions, passes, architectures, and so on. Note that most of
the contents of the reference section are also available from within Python
using the various dump_*()
functions; this document only provides a more
pleasingly laid-out version of the same information.
The developer documentation is only intended for (new) contributors. That is to say: unless you’re intending to understand or change OpenQL’s internal C++ implementation, the information here is not relevant to you. Rather, the section provides an overview of the codebase and the conventions used, and includes internal interface documentation as generated by Doxygen. Note however, that the intention is that the code is “self-documenting,” in the sense that the relevant documentation is placed inside the code as long comment blocks, to incentivize keeping the code and documentation synchronized. Ideally this would all be generated into the Doxygen documentation, but not everything has been converted to Doxygen-recognized docstrings yet.
User manual
Reference
- Python API
- C++ API
- Configuration
- Supported architectures
- Supported global options
log_level
use_default_gates
decompose_toffoli
issue_skip_319
unique_output
clifford_prescheduler
prescheduler
clifford_postscheduler
clifford_premapper
clifford_postmapper
output_dir
write_qasm_files
write_report_files
scheduler
scheduler_uniform
scheduler_heuristic
scheduler_commute
scheduler_commute_rotations
print_dot_graphs
initialplace
initialplace2qhorizon
mapper
mapmaxalters
mapinitone2one
mapassumezeroinitstate
mapprepinitsstate
maplookahead
mappathselect
mapselectswaps
maprecNN2q
mapselectmaxlevel
mapselectmaxwidth
maptiebreak
mapusemoves
mapreverseswap
quantumsim
cz_mode
scheduler_post179
optimize
generate_code
- Supported passes
- Statistics cleaner
- Statistics reporter
- Circuit visualizer
- Qubit interaction graph visualizer
- Qubit mapping graph visualizer
- Central Controller code generator
- Diamond microcode generator
- Instruction generalizer
- Instruction decomposer
- Instruction specializer
- Structure decomposer
- cQASM reader
- cQASM writer
- Mapper
- MIP-based initial placer
- Constant propagator
- Dead code eliminator
- Clifford gate optimizer
- List scheduler
- Scheduler
- Supported resources
Developer documentation
- Where to begin
- Build instructions
- Build automation
- Release procedure
- C++ coding conventions
- File and directory organization
- Naming conventions
- Namespaces
- Header files and
#include
syntax - “Runtime” documentation and dump() functions
- Utility types and functions
- Indentation
- Comments
- Macros and other preprocessor directives
- If statements
- Switch statements
- Loops
- Enumerations
- Typedefs
- Classes
- Variables and fields
- Functions and methods
- Expressions and function calls
- Intermediate representation
- Options (of various degrees)
- Passes
- Resources
- Doxygen documentation
Colophon
- Changelog
- [ next ] - [ TBD ]
- [ 0.10.0 ] - [ 2021-07-15 ]
- [ 0.9.0 ] - [ 2021-05-27 ]
- [ 0.8.0 ] - [ 2019-10-31 ]
- [ 0.7.1 ] - [ 2019-09-02 ]
- [ 0.7.0 ] - [ 2019-06-03 ]
- [ 0.6 ] - [ 2018-10-29 ]
- [ 0.5.5 ] - [ 2018-10-25 ]
- [ 0.5.4 ] - [ 2018-10-17 ]
- [ 0.5.3 ] - [ 2018-10-11 ]
- [ 0.5.2 ] - [ 2018-10-10 ]
- [ 0.5.1 ] - [ 2018-09-12 ]
- [ 0.5 ] - [ 2018-06-26 ]
- [ 0.4.1 ] - [ 2018-05-31 ]
- [ 0.4 ] - [ 2018-05-19 ]
- [ 0.3 ] - [ 2017-10-24 ]
- [ 0.2 ] - [ 2017-08-18 ]
- Contributors