Git Product home page Git Product logo

qe-compiler's Introduction

OpenQASM

OpenQASM is an imperative programming language for describing quantum circuits. It is capable of describing universal quantum computing using the circuit model, measurement-based model, and near-term quantum computing experiments.

This repo contains the OpenQASM specification, examples, and tools for the OpenQASM intermediate representation.

OpenQASM is a Qiskit project.

Current version: 3.0

About this project

In this repository, you'll find all the documentation related to OpenQASM, some useful OpenQASM examples, and plugins for some text editors.

Language specs

The live language documentation specification.

Examples

An example of OpenQASM 3.0 source code is given below. Several more examples may be found in the examples folder.

/*
 * Repeat-until-success circuit for Rz(theta),
 * cos(theta-pi)=3/5, from Nielsen and Chuang, Chapter 4.
 */
OPENQASM 3;
include "stdgates.inc";

/*
 * Applies identity if out is 01, 10, or 11 and a Z-rotation by
 * theta + pi where cos(theta)=3/5 if out is 00.
 * The 00 outcome occurs with probability 5/8.
 */
def segment qubit[2] anc, qubit psi -> bit[2] {
  bit[2] b;
  reset anc;
  h anc;
  ccx anc[0], anc[1], psi;
  s psi;
  ccx anc[0], anc[1], psi;
  z psi;
  h anc;
  measure anc -> b;
  return b;
}

qubit input;
qubit[2] ancilla;
bit[2] flags = "11";
bit output;

reset input;
h input;

// braces are optional in this case
while(int(flags) != 0) {
  flags = segment ancilla, input;
}
rz(pi - arccos(3 / 5)) input;
h input;
output = measure input;  // should get zero

Citation format

For research papers, we encourage authors to reference.

  • [Version 3.0] Andrew W. Cross, Ali Javadi-Abhari, Thomas Alexander, Niel de Beaudrap, Lev S. Bishop, Steven Heidel, Colm A. Ryan, John Smolin, Jay M. Gambetta, Blake R. Johnson "OpenQASM 3: A broader and deeper quantum assembly language" [arxiv:2104.14722].
  • [Previous Version: 2.0] Andrew W. Cross, Lev S. Bishop, John A. Smolin, Jay M. Gambetta "Open Quantum Assembly Language" [arXiv:1707.03429].

Governance

The OpenQASM project has a process for accepting changes to the language and making decisions codified in its governance model.

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Contributing

If you'd like to help please take a look to our contribution guidelines. This project adheres to a Code of Conduct. By participating, you are expected to uphold this code.

Release Notes

See the section on Release Notes contribution guidelines.

qe-compiler's People

Contributors

bcdonovan avatar blakejohnson avatar donjan avatar hhorii avatar ibm-wakizaka avatar jgsogo avatar jwildstr-ibm avatar kevinhartman avatar kevinsung avatar kitbarton avatar mbhealy avatar mhillenbrand avatar oliverdial avatar reza-j avatar royelkabetz avatar sooluthomas avatar taalexander avatar tuxu avatar vrpascuzzi avatar zhaoyilunnn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

qe-compiler's Issues

Add support for operation precedance in expression

#263 adds support for binary/unary expressions on integers and floats to the compiler. However, currently these are evaluated with left-right infix ordering. This means that if parentheses aren't added expressions like a * b ** c will be evaluated as (a * b) ** c) which disobeys standard arithmetic operation precedence. The qe-qasm parser has a ASTOperatorPrecdeanceController that can be used to build the correct expressions.

Lowering to Pulse Dialect

Running qss-compiler 128c937

After building a target pipeline with qss-compiler/include/Dialect/Pulse/Transforms/* passes, qss-compiler currently can not parse OpenQASM 3 input with said target.

Additional info
This issue exists to track the Pulse Dialect feature, and to enable us to post links to someplace. In case this is premature or a better location exists, please notify and close.

Python bindings to QSSC AST/IR

Running qss-compiler 128c937

Currently handing off processing to a Python-based program requires writing/reading a text-based MLIR dump. This is clumsy, slow and involves additional parsing. Any parser needs to formally define QSSC-specific dialects.

In the ideal case, the AST/IR tree could be walked from a Python program.

Additional info
This issue exists to track the downstream vendor Python stack interaction, and to enable us to post links to someplace. In case this is premature or a better location exists, please notify and close.

`qss-qasm` `conan` build broken

System

  • Apple M1 Max
  • macOS 13.1 (22C65)
  • Apple clang version 14.0.0 (clang-1400.0.29.202); Target: arm64-apple-darwin22.2.0

Problem

mpc fails to build after #80 introduces the following:
https://github.com/Qiskit/qss-compiler/blob/cb29d2e0db8f9806548d1a93bc0042ab3d75d8f2/conan/qasm/conanfile.py#L27-L33

Reproduce

conan install .. -pr macos_arm64_apple-clang_14_release -o qasm:shared=True --build=missing --build=gtest

Observed

<...>

configure:3788: gcc -O3 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -arch arm64 -I/Users/vrpascuzzi/.conan/data/mpfr/4.1.0/_/_/package/af76b3032063867730da46ec5e9b40ac59d3532e/include -I/Users/vrpascuzzi/.conan/data/gmp/6.2.1/_/_/package/357093134535fd7246c58058fb3584d8f7d26c34/include -DNDEBUG -L/Users/vrpascuzzi/.conan/data/mpfr/4.1.0/_/_/package/af76b3032063867730da46ec5e9b40ac59d3532e/lib -L/Users/vrpascuzzi/.conan/data/gmp/6.2.1/_/_/package/357093134535fd7246c58058fb3584d8f7d26c34/lib conftest.c -lmpfr -lgmpxx -lgmp >&5
configure:3792: $? = 0
configure:3840: result: yes
configure:3843: checking for C compiler default output file name
configure:3845: result: a.out
configure:3851: checking for suffix of executables
configure:3858: gcc -o conftest -O3 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -arch arm64 -I/Users/vrpascuzzi/.conan/data/mpfr/4.1.0/_/_/package/af76b3032063867730da46ec5e9b40ac59d3532e/include -I/Users/vrpascuzzi/.conan/data/gmp/6.2.1/_/_/package/357093134535fd7246c58058fb3584d8f7d26c34/include -DNDEBUG -L/Users/vrpascuzzi/.conan/data/mpfr/4.1.0/_/_/package/af76b3032063867730da46ec5e9b40ac59d3532e/lib -L/Users/vrpascuzzi/.conan/data/gmp/6.2.1/_/_/package/357093134535fd7246c58058fb3584d8f7d26c34/lib conftest.c -lmpfr -lgmpxx -lgmp >&5
configure:3862: $? = 0
configure:3884: result: 
configure:3906: checking whether we are cross compiling
configure:3914: gcc -o conftest -O3 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -arch arm64 -I/Users/vrpascuzzi/.conan/data/mpfr/4.1.0/_/_/package/af76b3032063867730da46ec5e9b40ac59d3532e/include -I/Users/vrpascuzzi/.conan/data/gmp/6.2.1/_/_/package/357093134535fd7246c58058fb3584d8f7d26c34/include -DNDEBUG -L/Users/vrpascuzzi/.conan/data/mpfr/4.1.0/_/_/package/af76b3032063867730da46ec5e9b40ac59d3532e/lib -L/Users/vrpascuzzi/.conan/data/gmp/6.2.1/_/_/package/357093134535fd7246c58058fb3584d8f7d26c34/lib conftest.c -lmpfr -lgmpxx -lgmp >&5
configure:3918: $? = 0
configure:3925: ./conftest
dyld[25403]: Library not loaded: libgmpxx.4.dylib
  Referenced from: <ABC1A17C-9B7E-318C-B2B8-F181EC3ACD18> /Users/vrpascuzzi/.conan/data/mpc/1.2.0/_/_/build/02453b5a41cfd72adb4b7842b2cd3f45b945168b/conftest
  Reason: tried: 'libgmpxx.4.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibgmpxx.4.dylib' (no such file), 'libgmpxx.4.dylib' (no such file), '/usr/local/lib/libgmpxx.4.dylib' (no such file), '/usr/lib/libgmpxx.4.dylib' (no such file, not in dyld cache), '/Users/vrpascuzzi/.conan/data/mpc/1.2.0/_/_/build/02453b5a41cfd72adb4b7842b2cd3f45b945168b/libgmpxx.4.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/vrpascuzzi/.conan/data/mpc/1.2.0/_/_/build/02453b5a41cfd72adb4b7842b2cd3f45b945168b/libgmpxx.4.dylib' (no such file), '/Users/vrpascuzzi/.conan/data/mpc/1.2.0/_/_/build/02453b5a41cfd72adb4b7842b2cd3f45b945168b/libgmpxx.4.dylib' (no such file), '/usr/local/lib/libgmpxx.4.dylib' (no such file), '/usr/lib/libgmpxx.4.dylib' (no such file, not in dyld cache)
source_subfolder/configure: line 3927: 25403 Abort trap: 6           ./conftest$ac_cv_exeext
configure:3929: $? = 134
configure:3936: error: in `/Users/vrpascuzzi/.conan/data/mpc/1.2.0/_/_/build/02453b5a41cfd72adb4b7842b2cd3f45b945168b':
configure:3938: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.

<...>

libgmpxx.4.dylib library is not loaded. (rpath problem?)

Expected

Successful build.

FYI: @kevinhartman

Fix find_package(qasm <...>)

We should have a coherent naming convention for the QASM library:
https://github.com/Qiskit/qss-compiler/blob/main/CMakeLists.txt#L43
and
https://github.ibm.com/IBM-Q-Software/qss-qasm/blob/master/CMakeLists.txt#L170-L180

I propose the following options:
(a) qss-compiler adheres to qss-qasm naming, i.e.,
find_package(qasm REQUIRED) -> find_package(OpenQASM REQUIRED); or
(b) qss-qasm adheres to qss-compiler, namely,
OpenQASMConfig.cmake -> qasmConfig.cmake
OpenQASMConfigVersion.cmake -> qasmConfigVersion.cmake

I'm, in a sense, torn between the options, but believe that we should go with (a), i.e., qss-compiler (and thusly Conan) conformance to qss-qasm conventions, esp. if qss-qasm will be open sourced.

In general, coherence is needed to prevent divergence between build envs/systems for all developers/users.

Building python_lib fails, missing file VERSION.txt

qss-compiler: 3019de5
os: fedora

EDIT: It looks like this problem is caused by building qss-compiler via a submodule that includes a sort of out-of-tree build. So python_lib itself does not contain expected compiled shared libraries at the time pip install -e is run.

I'm following instructions in the README:
https://github.com/Qiskit/qss-compiler/blob/b1c39741a67804801d7d9bb4ddbaac6c5cd944e7/python_lib/README.md?plain=1#L43-L45

This fails (using venv with each of Python 3.9 and 3.10)

$ cd python_lib
$ pip install -e .

with error messages that end with:

   File "/home/lapeyre/github/IBM-Q-Software/ibm-qss-compiler/ \
  .venvs/py310-venv1/lib64/python3.10/site-packages/setuptools/config.py", line 553, in _parse_version
     raise DistutilsOptionError(tmpl.format(**locals()))
distutils.errors.DistutilsOptionError: Version loaded from file: VERSION.txt does not comply with PEP 440:

Investigating setuptools/config.py shows that the error message is misleading. In fact setup is trying to read ./python_lib/VERSION.txt. But the file does not exist.

This line is relevant:
https://github.com/Qiskit/qss-compiler/blob/b1c39741a67804801d7d9bb4ddbaac6c5cd944e7/python_lib/setup.cfg#L3

Perhaps related to ibm-qss-compiler #866

[crash] Python lib exception depending on variable name

Running qss-compiler 4986bfd on Ubuntu 22.04 with Python 3.10.6.

Observed behaviour

The following file:

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import multiprocessing

from qss_compiler import compile as compiler

program = """\
    OPENQASM 3.0;

    qubit $0;
    bit c;
    U(1.5707963, 0.0, 1.5707963) $0;
    measure $0 -> c;
"""

copts = compiler.CompileOptions(
    target="mock",
    config_path="auxiliary.cfg",
    output_type=compiler.OutputType.MLIR,
    extra_args=["--mlir-print-op-generic", "--canonicalize"],
)

if __name__ == "__main__":
    multiprocessing.freeze_support()
    with open("compiler_input", "w") as fp:
        fp.write(program)
    mlir = compiler.compile_file("compiler_input", compile_options=copts)

Throws an exception:

$ ./main.py
params passed from python to C++:
qss-compiler
-X=qasm
--emit=mlir
--target=mock
--config=auxiliary.cfg
--mlir-print-op-generic
--canonicalize
compiler_input
Config:
num_qubits 2
multiplexing_ratio 5
Warning while parsing OpenQASM 3 input
File: compiler_input, Line: 1, Col: 1 Possible loss of precision in calculating multiple-precision Pi.
compiler_input:1:1: warning: 
    OPENQASM 3.0;
^

Warning while parsing OpenQASM 3 input
File: compiler_input, Line: 1, Col: 1 Possible loss of precision in calculating multiple-precision Pi.
compiler_input:1:1: warning: 
    OPENQASM 3.0;
^

Warning while parsing OpenQASM 3 input
File: compiler_input, Line: 1, Col: 1 Possible loss of precision in calculating multiple-precision sinh(1) and cosh(1).
compiler_input:1:1: warning: 
    OPENQASM 3.0;
^

Warning while parsing OpenQASM 3 input
File: compiler_input, Line: 1, Col: 1 Possible loss of precision in calculating multiple-precision Euler Number.
compiler_input:1:1: warning: 
    OPENQASM 3.0;
^

Warning while parsing OpenQASM 3 input
File: compiler_input, Line: 1, Col: 1 Possible loss of precision in calculating multiple-precision Pi.
compiler_input:1:1: warning: 
    OPENQASM 3.0;
^

Warning while parsing OpenQASM 3 input
File: compiler_input, Line: 1, Col: 1 Possible loss of precision in calculating multiple-precision Pi.
compiler_input:1:1: warning: 
    OPENQASM 3.0;
^

Warning while parsing OpenQASM 3 input
File: compiler_input, Line: 1, Col: 1 Possible loss of precision in calculating multiple-precision sinh(1) and cosh(1).
compiler_input:1:1: warning: 
    OPENQASM 3.0;
^

Warning while parsing OpenQASM 3 input
File: compiler_input, Line: 1, Col: 1 Possible loss of precision in calculating multiple-precision Euler Number.
compiler_input:1:1: warning: 
    OPENQASM 3.0;
^

OK.
Process ForkServerProcess-1:
Traceback (most recent call last):
  File "/usr/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/usr/lib/python3.10/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/home/donjan/code/qiskit/qss-compiler/build/python_lib/build/__editable__.qss_compiler-0.1.dev64+g6d5dc3b.d20230413-cp310-cp310-linux_x86_64/qss_comr
    status, output = _compile_child_backend(execution, on_diagnostic)
  File "/home/donjan/code/qiskit/qss-compiler/build/python_lib/build/__editable__.qss_compiler-0.1.dev64+g6d5dc3b.d20230413-cp310-cp310-linux_x86_64/qss_comd
    success, output = _compile_with_args(args, output_as_return, on_diagnostic)
ValueError: stoi
Traceback (most recent call last):
  File "/home/donjan/code/qiskit/qss-compiler/build/python_lib/build/__editable__.qss_compiler-0.1.dev64+g6d5dc3b.d20230413-cp310-cp310-linux_x86_64/qss_come
    received = parent_side.recv()
  File "/usr/lib/python3.10/multiprocessing/connection.py", line 250, in recv
    buf = self._recv_bytes()
  File "/usr/lib/python3.10/multiprocessing/connection.py", line 414, in _recv_bytes
    buf = self._recv(4)
  File "/usr/lib/python3.10/multiprocessing/connection.py", line 383, in _recv
    raise EOFError
EOFError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/donjan/code/qiskit/openqasm_demo/qss-compiler/foo.py", line 27, in <module>
    mlir = compiler.compile_file("compiler_input", compile_options=copts)
  File "/home/donjan/code/qiskit/qss-compiler/build/python_lib/build/__editable__.qss_compiler-0.1.dev64+g6d5dc3b.d20230413-cp310-cp310-linux_x86_64/qss_come
    return _do_compile(execution)
  File "/home/donjan/code/qiskit/qss-compiler/build/python_lib/build/__editable__.qss_compiler-0.1.dev64+g6d5dc3b.d20230413-cp310-cp310-linux_x86_64/qss_come
    raise QSSCompilerError(
qss_compiler.compile.QSSCompilerError: compile process exited before delivering output.
Warning: OpenQASM 3 parse error
File: compiler_input, Line: 1, Col: 1
Possible loss of precision in calculating multiple-precision Pi.
compiler_input:1:1: warning: 
    OPENQASM 3.0;
^

Warning: OpenQASM 3 parse error
File: compiler_input, Line: 1, Col: 1
Possible loss of precision in calculating multiple-precision Pi.
compiler_input:1:1: warning: 
    OPENQASM 3.0;
^

Warning: OpenQASM 3 parse error
File: compiler_input, Line: 1, Col: 1
Possible loss of precision in calculating multiple-precision sinh(1) and cosh(1).
compiler_input:1:1: warning: 
    OPENQASM 3.0;
^

Warning: OpenQASM 3 parse error
File: compiler_input, Line: 1, Col: 1
Possible loss of precision in calculating multiple-precision Euler Number.
compiler_input:1:1: warning: 
    OPENQASM 3.0;
^

Warning: OpenQASM 3 parse error
File: compiler_input, Line: 1, Col: 1
Possible loss of precision in calculating multiple-precision Pi.
compiler_input:1:1: warning: 
    OPENQASM 3.0;
^

Warning: OpenQASM 3 parse error
File: compiler_input, Line: 1, Col: 1
Possible loss of precision in calculating multiple-precision Pi.
compiler_input:1:1: warning: 
    OPENQASM 3.0;
^

Warning: OpenQASM 3 parse error
File: compiler_input, Line: 1, Col: 1
Possible loss of precision in calculating multiple-precision sinh(1) and cosh(1).
compiler_input:1:1: warning: 
    OPENQASM 3.0;
^

Warning: OpenQASM 3 parse error
File: compiler_input, Line: 1, Col: 1
Possible loss of precision in calculating multiple-precision Euler Number.
compiler_input:1:1: warning: 
    OPENQASM 3.0;
^

If we change the qubit variable name from q to $0:

program = """\
    OPENQASM 3.0;

    qubit $0;
    bit c;
    U(1.5707963, 0.0, 1.5707963) $0;
    measure $0 -> c;
"""

Then the program runs to completion with:

$ ./main.py
params passed from python to C++:
qss-compiler
-X=qasm
--emit=mlir
--target=mock
--config=auxiliary.cfg
--mlir-print-op-generic
--canonicalize
compiler_input
Config:
num_qubits 2
multiplexing_ratio 5
Warning while parsing OpenQASM 3 input
File: compiler_input, Line: 1, Col: 1 Possible loss of precision in calculating multiple-precision Pi.
compiler_input:1:1: warning: 
    OPENQASM 3.0;
^

Warning while parsing OpenQASM 3 input
File: compiler_input, Line: 1, Col: 1 Possible loss of precision in calculating multiple-precision Pi.
compiler_input:1:1: warning: 
    OPENQASM 3.0;
^

Warning while parsing OpenQASM 3 input
File: compiler_input, Line: 1, Col: 1 Possible loss of precision in calculating multiple-precision sinh(1) and cosh(1).
compiler_input:1:1: warning: 
    OPENQASM 3.0;
^

Warning while parsing OpenQASM 3 input
File: compiler_input, Line: 1, Col: 1 Possible loss of precision in calculating multiple-precision Euler Number.
compiler_input:1:1: warning: 
    OPENQASM 3.0;
^

Warning while parsing OpenQASM 3 input
File: compiler_input, Line: 1, Col: 1 Possible loss of precision in calculating multiple-precision Pi.
compiler_input:1:1: warning: 
    OPENQASM 3.0;
^

Warning while parsing OpenQASM 3 input
File: compiler_input, Line: 1, Col: 1 Possible loss of precision in calculating multiple-precision Pi.
compiler_input:1:1: warning: 
    OPENQASM 3.0;
^

Warning while parsing OpenQASM 3 input
File: compiler_input, Line: 1, Col: 1 Possible loss of precision in calculating multiple-precision sinh(1) and cosh(1).
compiler_input:1:1: warning: 
    OPENQASM 3.0;
^

Warning while parsing OpenQASM 3 input
File: compiler_input, Line: 1, Col: 1 Possible loss of precision in calculating multiple-precision Euler Number.
compiler_input:1:1: warning: 
    OPENQASM 3.0;
^

OK.
Compile successful

Also tested calling the variable $1, which compiles successfully.

Expected behaviour
The compilation success should not depend on the variable name.

Additional info

$ cat auxiliary.cfg
num_qubits 1
acquire_multiplexing_ratio_to_1 5
controllerNodeId 1000

Compiler CLI --direct and python_lib compile_str() doesn't work

Running qss-compiler 128c937 on a fresh Ubuntu 22.04 VM with Python 3.10.6.

Observed behaviour

from qss_compiler import compile as compiler
res = compiler.compile_str("OPENQASM 3.0; qubit $0;")

Does not change depending on the input string. The corresponding MLIR output is an empty 1000-shot experiment.

Digging deeper, a command line such as:

qss-compiler/build/bin/qss-compiler -X=qasm --emit=mlir --target=mock --config=auxiliary.cfg --mlir-print-op-generic --canonicalize --direct 'OPENQASM 3.0; qubit $0; bit c; U(1.57079632679, 0.0, 3.14159265359) $0; measure $0 -> c;' 2> 0

Also yields the same empty experiment.

Expected behaviour
Seeing output from the target pipeline's processed MLIR of the input code.

Additional info
The two described issues seem tightly related to me, but feel free to split in case additional complexity in the Python case needs to be addressed.

$ cat auxiliary.cfg
num_qubits 1
acquire_multiplexing_ratio_to_1 5
controllerNodeId 1000

Add patch from upstream LLVM to fix ssa value names for long integer constants

For constant ops from arithmetic constants, MLIR chooses SSA value names that reflect the constant. That failed for ints with > 64 bits as the function that derived that name used a shortcut that did not apply (and assert(), as here) for ints with more than 64 bits.

We have contributed a fix to upstream LLVM in llvm/llvm-project@1ef32e7 and need to add this patch into our build of LLVM 14.0.6. (the fix will be included in LLVM 15).

Surfaced by #43

Revise SSA transformation for OpenQASM 3 variables

Description

qss-compiler expresses variable references and assignments in OpenQASM 3 source code as MLIR operations that directly reflect these references and assignments in the initial MLIR -- that is, the initial MLIR uses memory semantics for variables. For later optimization, it is beneficial to resolve these operations with memory semantics such that the use of a variable directly uses the SSA value that has been assigned to the variable at that point.

Currently, the compiler uses the pass VariableElimination towards that goal. That pass takes a detour through the affine dialect and its scalar replacement pass. As a downside, that approach currently cannot resolve variable memory semantics around control flow.

We should revise the VariableElimination pass to fully resolve the OpenQASM 3 variable operations into SSA form.

Tasks

  • Identify test cases first.
  • Revise the VariableElimination pass.

Acceptance Criteria

  • New test cases check corner cases.

Proposal

  • The transformation could be integrated into quirgen. Yet, it should remain its own pass to facilitate debugging and unit testing.
  • Consider Marc M. Brandis, Hanspeter Mössenböck

Notes

  • The paper Marc M. Brandis, Hanspeter Mössenböck: Single-pass generation of static single-assignment form for structured languages describes an algorithm for transforming structured control flow into SSA form in a single pass and may serve as a starting point. The algorithm generates "classical SSA" with phi nodes, while MLIR has block and region arguments (and yield values), so there's some transformation required.

Default Conan profile on Ubuntu 22 uses libstdc++ instead of libstdc++11.

This problem was reported by ZI when trying to build qss-compiler on a vanilla Ubuntu 22 image.
The Default conan profile is using libstdc++ instead of libstdc++11. Hopefully there is a way to update the Conan profile to indicate that it needs to use libstdc++11. At the very least, we should add a comment in the README to indicate this.

Enforce copyright notices at pre-commit or CI level

From #63 (comment)

Every source file needs to have a copyright notice in the first lines. When changing a file, we have to update this copyright notice with the year it was last modified. Of course it can happen at most once every year for each file.... however many contributors (and reviewers) might forget about it.

Is there anything we can do as a pre-commit hook or CI level to check that these notes are updated?

cc/ @taalexander

Test failure with qasm/0.2.12

Failing tests on latest 2283e40 with qasm/02.12.

Test machine

  • Apple M1 Max
  • Ventura 13.1
  • Apple clang version 14.0.0 (clang-1400.0.29.202)
    for architecture arm64e (Mach-O 64-bit executable arm64e)

Steps to reproduce

$ . conan_deps.sh
$ cd build && \
    conan install .. -pr macos_arm64_apple-clang_14_debug \
    -o qasm:shared=True --build=missing --build=gtest
$ cmake ../ -G "Ninja" -DCONAN=ON -DINSTALL_CONAN_DEPS=OFF \
    -DCMAKE_BUILD_TYPE=Debug
$ ninja check-tests

Partial output

<...>

[2/3] Running the QSS Compiler Core regression tests
-- Testing: 122 tests, 10 workers --
Testing:  0.
FAIL: QSS Compiler Core :: Frontend/OpenQASM3/bitstring-init.qasm (6 of 122)
******************** TEST 'QSS Compiler Core :: Frontend/OpenQASM3/bitstring-init.qasm' FAILED ********************

<...>

File: "/Users/vrpascuzzi/devel/ibm-q-restricted-system/qic-rta-driver/compiler/qss-compiler/test/Frontend/OpenQASM3/bitstring-init.qasm", Line: 28, Col: 13 Assignment may result in truncation.
Assertion failed: (getSignificantBits() <= 64 && "Too many bits for int64_t"), function getSExtValue, file APInt.h, line 1482.

<...>

Full log with stack dump: err-test-bitstring-init.qasm.log

Upgrade MLIR interfaces to work with LLVM 16.

This work is to upgrade the uses of MLIR in the qss-source compiler repo to work with the MLIR interfaces provided in LLVM 16 (the latest release of LLVM).

I have not done such an upgrade before, but I expect some of the interfaces in the open source MLIR APIs will have changed between LLVM 14 and LLVM 16 and we will need to change our code accordingly.

This will also require updating the conandata.yml file to use LLVM 16.0.5 branch, instead of the current 14.0.6-2 branch.

Building conan cache is slow on vanilla Ubuntu 22.04

Running qss-compiler 128c937 on a fresh Ubuntu 22.04 VM with Python 3.10.6.
Default Conan 1.59.0 profile and CMake updated to 3.26.1.
By default, Conan goes for compiler=gcc.

Observed behaviour
Compiling from scratch (calling Conan with --build=missing) can take a few hours depending on hardware. If anything goes wrong, the whole single big chunk has to be redone.
This is tedious for the initial development encounter as well as for further build deployment.

Expected behaviour
Help the contributor out by either chunking the dependency into multiple units, or (under the assumption that ld is the performance culprit, TBD?) providing instructions for setting the build system up with lld.

Rename from qss (quantum systems software) to qe (quantum engine) - compiler

As part of migrating to the open source we are renaming this project from the qss (quantum systems software) prefix to qe (quantum engine).

Steps:

  • Point this repositories dependencies to the migrated qss-qasm
  • Point internal repositories dependencies to the migrated qss-qasm
  • Update internal repositories
  • Rename the repository and migrate to the openqasm organization
  • Migrate all code references from qss->qe and quantum systems software to quantum engine
  • Update the readme
    • Remove the repository name migration notice added in #209
  • Update all internal production usages to migrate to the new name wherever used
  • Update the internal repository to point to the updated references

Support QASM's `const` in QUIR

QUIR should support const in statements like: const int[64] x = 2.

The QASM code uint x = 1; and const uint x = 1; emit the same mlir. Furthermore, in both cases, x may be mutated.

Suggestions

The information is available in the AST via node->IsConst(). So you would discrimination when processing the variable -declaration node here
https://github.com/Qiskit/qss-compiler/blob/7180bf9a96b6109c0ff9491c15f8330f5a4ff7ef/lib/Frontend/OpenQASM3/QUIRVariableBuilder.cpp#L34-L36
by including another parameter bool isConst. And select either
https://github.com/Qiskit/qss-compiler/blob/7180bf9a96b6109c0ff9491c15f8330f5a4ff7ef/lib/Frontend/OpenQASM3/QUIRVariableBuilder.cpp#L49
as now or declareOp = builder.create<mlir::quir::DeclareConstantOp>.

Then copy/paste this
https://github.com/Qiskit/qss-compiler/blob/7180bf9a96b6109c0ff9491c15f8330f5a4ff7ef/include/Dialect/QUIR/IR/QUIROps.td#L137-L138
like this:

def QUIR_DeclareConstantOp : QUIR_Op<"declare_constant", [Symbol]> {

And give the constant the same semantics except that it can't be assigned to. Even if adding an operation declare_constant is the right approach, some kind of refactoring rather than copying 50 lines verbatim should be done.

Mock tests are failing with debug builds

I am seeing the following four tests fail with a debug build of qe-compiler:

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. 
********************
Failed Tests (4):
  Mock Static :: static/Conversion/QUIRToStd/llvmgen.mlir
  Mock Static :: static/integration/mlir/mlir-timing.mlir
  Mock Static :: static/integration/openqasm3/example.qasm
  Mock Static :: static/integration/openqasm3/reset-v0.qasm

All of these failures have the same output:

loc("-":0:0): error: empty block: expect at least a terminator

Note that there are currently more failures then this, but I have branches/PRs that fix all but these four tests.

Segmentation fault while running unit tests on macOS Ventura / arm64 / Xcode 14.3

Tested on current master, 128c937.

ninja fails while trying to execute the unit tests:

CMake Error at /Users/tinow/venv-py311/lib/python3.11/site-packages/cmake/data/share/cmake-3.26/Modules/GoogleTestAddTests.cmake:112 (message):
  Error running test executable.

    Path: '/Users/tinow/zi/git/ibm/qss-compiler/build-release/test/unittest/unittest-qss-compiler'
    Result: Segmentation fault
    Output:

Debugger output (release build, but it has some context):

❯ lldb ./test/unittest/unittest-qss-compiler
(lldb) target create "./test/unittest/unittest-qss-compiler"
Current executable set to '/Users/tinow/zi/git/ibm/qss-compiler/build-release/test/unittest/unittest-qss-compiler' (arm64).
(lldb) run
Process 5819 launched: '/Users/tinow/zi/git/ibm/qss-compiler/build-release/test/unittest/unittest-qss-compiler' (arm64)
Process 5819 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    frame #0: 0x00000001022aa6cc unittest-qss-compiler`QASM::ASTDeclarationContextTracker::Init() [inlined] std::__1::__tree<std::__1::__value_type<unsigned int, QASM::ASTDeclarationContext const*>, std::__1::__map_value_compare<unsigned int, std::__1::__value_type<unsigned int, QASM::ASTDeclarationContext const*>, std::__1::less<unsigned int>, true>, std::__1::allocator<std::__1::__value_type<unsigned int, QASM::ASTDeclarationContext const*> > >::__insert_node_at(this=<unavailable>, __parent=0x0000000103108bd8, __child=0x0000000103108bd8, __new_node=0x0000600000c001e0) at __tree:2078:25 [opt]
   2075	    __new_node->__parent_ = __parent;
   2076	    // __new_node->__is_black_ is initialized in __tree_balance_after_insert
   2077	    __child = __new_node;
-> 2078	    if (__begin_node()->__left_ != nullptr)
   2079	        __begin_node() = static_cast<__iter_pointer>(__begin_node()->__left_);
   2080	    _VSTD::__tree_balance_after_insert(__end_node()->__left_, __child);
   2081	    ++size();
Target 0: (unittest-qss-compiler) stopped.
warning: unittest-qss-compiler was compiled with optimization - stepping may behave oddly; variables may not be available.
(lldb)

Additional info:

❯ conan install .. --profile default --update --build=outdated
Configuration:
[settings]
arch=armv8
arch_build=armv8
build_type=Release
compiler=apple-clang
compiler.libcxx=libc++
compiler.version=14
os=Macos
os_build=Macos
[options]
[build_requires]
[env]

...
❯ clang --version
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm64-apple-darwin22.2.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Assertion: Unnamed expressions not supported by QUIRGen yet when compiling nadder_n4.qasm test

I'm seeing the following assertion error when compiling the adder_n4.qasm test from the QASMBench Benchmark Suite

File: "qelib1.inc", Line: 220, Col: 5 ASTGateQOp c3sqrtx does not have a Local SymbolTable Entry.
OK.
loc("small/adder_n4/adder_n4.qasm":10:25): error: Unnamed expressions not supported by QUIRGen yet, assign to an identifier
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.      Program arguments: /Users/kbarton/bin/qss-compiler --emit=qem -o test.qem -I . small/adder_n4/adder_n4.qasm
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0  qss-compiler             0x00000001071ddc54 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 56
1  qss-compiler             0x00000001071dcc4c llvm::sys::RunSignalHandlers() + 112
2  qss-compiler             0x00000001071de2e0 SignalHandler(int) + 344
3  libsystem_platform.dylib 0x000000019e2bf2a4 _sigtramp + 56
4  qss-compiler             0x00000001071066d4 mlir::Operation::create(mlir::Location, mlir::OperationName, mlir::TypeRange, mlir::ValueRange, mlir::DictionaryAttr, mlir::BlockRange, unsigned int) + 560
5  qss-compiler             0x00000001071066d4 mlir::Operation::create(mlir::Location, mlir::OperationName, mlir::TypeRange, mlir::ValueRange, mlir::DictionaryAttr, mlir::BlockRange, unsigned int) + 560
6  qss-compiler             0x00000001071068b0 mlir::Operation::create(mlir::OperationState const&) + 168
7  qss-compiler             0x00000001070a69c4 mlir::OpBuilder::createOperation(mlir::OperationState const&) + 28
8  qss-compiler             0x0000000105148978 mlir::quir::Builtin_UOp mlir::OpBuilder::create<mlir::quir::Builtin_UOp, mlir::Value&, mlir::Value&, mlir::Value&, mlir::Value&>(mlir::Location, mlir::Value&, mlir::Value&, mlir::Value&, mlir::Value&) + 168
9  qss-compiler             0x0000000105148760 qssc::frontend::openqasm3::QUIRGenQASM3Visitor::visit(QASM::ASTUGateOpNode const*) + 1124
10 qss-compiler             0x0000000105146fb0 qssc::frontend::openqasm3::QUIRGenQASM3Visitor::visit(QASM::ASTGateDeclarationNode const*) + 928
11 qss-compiler             0x0000000105135c2c qssc::frontend::openqasm3::BaseQASM3Visitor::visit(QASM::ASTStatementList const*) + 168
12 qss-compiler             0x0000000105142058 qssc::frontend::openqasm3::QUIRGenQASM3Visitor::walkAST() + 20
13 qss-compiler             0x0000000105134f04 qssc::frontend::openqasm3::parse(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, bool, bool, bool, mlir::ModuleOp&) + 788
14 qss-compiler             0x0000000104cb9d2c compile(int, char const**, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) + 2968
15 dyld                     0x000000019df67e50 start + 2544

This requires a recent version of qss-qasm to fix an issue in the Qasm parser (Jan 27, 2023 or newer).

Reproduce with the following command:

bin/qss-compiler --emit=qem -o test.qem -I . adder_n4.qasm

adder_n4.qasm.txt
qelib1.inc.txt

This error is preventing all the benchmarks from the QASMBench suite from building using the qss-compiler.

Note If you get the files directly from the QASMBench repo, you may need to run dos2unix on the files first to eliminate the Windows special characters in the file.

Allow omitting shot loop

EDIT: You can turn off the shot loop when compiling qasm code. And --add-shot-loop does what it should when the input is mlir. @mhillenbrand explains below.

A shot loop wrapping all code is inserted unconditionally when producing quir dialect from the QASM AST. As part of broadening the uses of quir, the shot loop should be made optional.

EDIT: Setting the option num-shots to zero, that is --num-shots=0, causes the loop to be omitted. (still a useless variable numShots is inserted in the mlir code) However the option add-shot-loop appears to do nothing. Perhaps it should be removed.

Although there is a cli option --add-shot-loop, I think the shot loop may be hardwired here:
https://github.com/Qiskit/qss-compiler/blob/7180bf9a96b6109c0ff9491c15f8330f5a4ff7ef/lib/Dialect/QUIR/Transforms/AddShotLoop.cpp#L96

VariableEliminationPass (quir-eliminate-variables) causing test failures on M1

The VariableEliminationPass is causing unit test failures on Apple M1 due to the assertion error:

Assertion failed: (op->use_empty() && "expected 'op' to have no uses"), function eraseOp, file PatternMatch.cpp, line 260.

The failing tests are:

 LesPaul Static :: integration/openqasm3/bitindices.qasm
 LesPaul Static :: integration/openqasm3/bool_conditional_assign.qasm

The cause has been determined to be the fact that erasing a user while iterating over getUsers is changing the results of the iteration causing some users not to be dropped. This causes the assert when the op is erased. See https://github.com/Qiskit/qss-compiler/blob/e1e4dd3dae9baab14de76eae27a9ea8d7ec0b3d1/lib/Dialect/QUIR/Transforms/VariableElimination.cpp#L282-L286

Copying the users into a SmallVector and then erasing while iterating over the SmallVector fixes the assert.

MockTarget QUIRToStandard broken

To translate operations from a dialect to LLVMIR, the dialect must have a registered implementation of LLVMTranslationDialectInterface. Due to changes during the migration to LLVM-14, the mock_target implementation of QUIRToStandard was not updated to accommodate the new interface. When testing the generation of a QuantumExecutionModule (QEM) from a QASM 3.0 input, the following error is observed:

$ /path/to/qss-compiler --target=mock --config /path/to/mock_target/test/test.cfg /path/to/qic-rta-driver/compiler/qss-compiler/test/Frontend/OpenQASM3/bell-v0.qasm --emit=qem --plaintext-payload
<...>
error: cannot be converted to LLVM IR: missing
`LLVMTranslationDialectInterface` registration for dialect for
op: builtin.unrealized_conversion_cast
<...>

ultimately, producing no controller binary for the mock target. Furthermore, there is presently no test to check for this failure.

libzip build issue on vanilla Ubuntu 22.04

Running qss-compiler 128c937 on a fresh Ubuntu 22.04 VM with Python 3.10.6.
Default Conan 1.59.0 profile and CMake updated to 3.26.1.

Observed behaviour

The build fails with

CMake Error at cmake/AddQSSC.cmake:115 (target_link_libraries):
  Target "QSSCPayloadZip" links to:

    libzip::zip

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Expected behaviour
The build system should pick up on libzip.

Workaround
Telling CMake to use the OS's zip library works, but requires additional intervention.

--- a/lib/Payload/ZipPayload/CMakeLists.txt
+++ b/lib/Payload/ZipPayload/CMakeLists.txt
@@ -24,7 +24,7 @@ qssc_add_plugin(QSSCPayloadZip QSSC_PAYLOAD_PLUGIN
 
         LINK_LIBS
         QSSCPayload
-        libzip::zip
+        zip

[feature request] alternative to --config CLI flag

Running qss-compiler 128c937

The compiler CLI flag --config expects a file on drive, such as:

num_qubits 1
acquire_multiplexing_ratio_to_1 5
controllerNodeId 1000

In our use case, it would be preferable to either pass the whole as a string, or enable passing the individual lines as options.

This is a minor issue: the current workaround is to write the file to drive on the fly where it's needed.

Edit: to avoid a XY-problem description... what we're actually after is not having to write the file to disk in the Python library interface.

Python library segfaulting on macOS Montery, Intel Core I9, python 3.9 with Conda

Invoking pytest test/python_lib gives:

Current thread 0x0000000108bc6600 (most recent call first):
  File "<frozen importlib._bootstrap>", line 228 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 1173 in create_module
  File "<frozen importlib._bootstrap>", line 565 in module_from_spec
  File "<frozen importlib._bootstrap>", line 666 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 986 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1007 in _find_and_load
  File "/Users/thomas/Devel/ibm/internal/qss-compiler/build/qss-compiler/python_lib/qss_compiler/__init__.py", line 7 in <module>
  File "<frozen importlib._bootstrap>", line 228 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 855 in exec_module
  File "<frozen importlib._bootstrap>", line 680 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 986 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1007 in _find_and_load
  File "/Users/thomas/Devel/ibm/internal/qss-compiler/qss-compiler/test/python_lib/test_compile.py", line 11 in <module>
  File "/Users/thomas/opt/anaconda3/envs/qss-compiler/lib/python3.9/site-packages/_pytest/assertion/rewrite.py", line 171 in exec_module
  File "<frozen importlib._bootstrap>", line 680 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 986 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1007 in _find_and_load
  File "<frozen importlib._bootstrap>", line 1030 in _gcd_import
  File "/Users/thomas/opt/anaconda3/envs/qss-compiler/lib/python3.9/importlib/__init__.py", line 127 in import_module
  File "/Users/thomas/opt/anaconda3/envs/qss-compiler/lib/python3.9/site-packages/_pytest/pathlib.py", line 533 in import_path
  File "/Users/thomas/opt/anaconda3/envs/qss-compiler/lib/python3.9/site-packages/_pytest/python.py", line 599 in _importtestmodule
  File "/Users/thomas/opt/anaconda3/envs/qss-compiler/lib/python3.9/site-packages/_pytest/python.py", line 510 in _getobj
  File "/Users/thomas/opt/anaconda3/envs/qss-compiler/lib/python3.9/site-packages/_pytest/python.py", line 296 in obj
  File "/Users/thomas/opt/anaconda3/envs/qss-compiler/lib/python3.9/site-packages/_pytest/python.py", line 527 in _inject_setup_module_fixture
  File "/Users/thomas/opt/anaconda3/envs/qss-compiler/lib/python3.9/site-packages/_pytest/python.py", line 513 in collect
  File "/Users/thomas/opt/anaconda3/envs/qss-compiler/lib/python3.9/site-packages/_pytest/runner.py", line 371 in <lambda>
  File "/Users/thomas/opt/anaconda3/envs/qss-compiler/lib/python3.9/site-packages/_pytest/runner.py", line 340 in from_call
  File "/Users/thomas/opt/anaconda3/envs/qss-compiler/lib/python3.9/site-packages/_pytest/runner.py", line 371 in pytest_make_collect_report
  File "/Users/thomas/opt/anaconda3/envs/qss-compiler/lib/python3.9/site-packages/pluggy/_callers.py", line 39 in _multicall
  File "/Users/thomas/opt/anaconda3/envs/qss-compiler/lib/python3.9/site-packages/pluggy/_manager.py", line 80 in _hookexec
  File "/Users/thomas/opt/anaconda3/envs/qss-compiler/lib/python3.9/site-packages/pluggy/_hooks.py", line 265 in __call__
  File "/Users/thomas/opt/anaconda3/envs/qss-compiler/lib/python3.9/site-packages/_pytest/runner.py", line 544 in collect_one_node
  File "/Users/thomas/opt/anaconda3/envs/qss-compiler/lib/python3.9/site-packages/_pytest/main.py", line 825 in genitems
  File "/Users/thomas/opt/anaconda3/envs/qss-compiler/lib/python3.9/site-packages/_pytest/main.py", line 657 in perform_collect
  File "/Users/thomas/opt/anaconda3/envs/qss-compiler/lib/python3.9/site-packages/_pytest/main.py", line 332 in pytest_collection
  File "/Users/thomas/opt/anaconda3/envs/qss-compiler/lib/python3.9/site-packages/pluggy/_callers.py", line 39 in _multicall
  File "/Users/thomas/opt/anaconda3/envs/qss-compiler/lib/python3.9/site-packages/pluggy/_manager.py", line 80 in _hookexec
  File "/Users/thomas/opt/anaconda3/envs/qss-compiler/lib/python3.9/site-packages/pluggy/_hooks.py", line 265 in __call__
  File "/Users/thomas/opt/anaconda3/envs/qss-compiler/lib/python3.9/site-packages/_pytest/main.py", line 321 in _main
  File "/Users/thomas/opt/anaconda3/envs/qss-compiler/lib/python3.9/site-packages/_pytest/main.py", line 268 in wrap_session
  File "/Users/thomas/opt/anaconda3/envs/qss-compiler/lib/python3.9/site-packages/_pytest/main.py", line 315 in pytest_cmdline_main
  File "/Users/thomas/opt/anaconda3/envs/qss-compiler/lib/python3.9/site-packages/pluggy/_callers.py", line 39 in _multicall
  File "/Users/thomas/opt/anaconda3/envs/qss-compiler/lib/python3.9/site-packages/pluggy/_manager.py", line 80 in _hookexec
  File "/Users/thomas/opt/anaconda3/envs/qss-compiler/lib/python3.9/site-packages/pluggy/_hooks.py", line 265 in __call__
  File "/Users/thomas/opt/anaconda3/envs/qss-compiler/lib/python3.9/site-packages/_pytest/config/__init__.py", line 165 in main
  File "/Users/thomas/opt/anaconda3/envs/qss-compiler/lib/python3.9/site-packages/_pytest/config/__init__.py", line 188 in console_main
  File "/Users/thomas/opt/anaconda3/envs/qss-compiler/bin/pytest", line 8 in <module>
zsh: segmentation fault  pytest ../qss-compiler/test/python_lib

Similarily import qss_compiler segfaults.

Of note when building is ld: warning: -undefined dynamic_lookup may not work with chained fixups

CMake project target CXX build issue on vanilla Ubuntu 22.04

Running qss-compiler 128c937 on a fresh Ubuntu 22.04 VM with Python 3.10.6.
Default Conan 1.59.0 profile and CMake updated to 3.26.1.

Observed behaviour

The build fails with

CMake Error at CMakeLists.txt:81 (string):
  string sub-command REGEX, mode MATCHALL needs at least 5 arguments total to
  command.

Expected behaviour
Should build.

Workaround
Telling CMake explicitly that qss-compiler is a C++ target lets it compile successfully:

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -106,7 +106,7 @@ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
     endif()
 endif()
 
-project(qss-compiler)
+project(qss-compiler CXX)

Curiously, but not investigated further: after a successful build, removing the CXX continues to build just fine.

Doxygen comments and documentation - Add CI to generate it

From #63 review, some of the /// comments were a bit of unexpected for reviewers. They are doxygen-style comments for documentation.

We need to decide if we want to document the source or not so we can enforce it in either direction in our reviews.

  • "we do wish to support Doxygen comments" ✍️ (Here)

cc/ @vrpascuzzi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.