Shipyard is an openQASM 3 compiler developed by Atlantic Quantum to compile openQASM + openPulse code to vendor specific instructions. Currently supports compilation to Zurich Instruments SEQC, more instrument vendors will be supported in the future.
AQ Compiler is in daily use by Atlantic Quantum to perform quantum experiments.
The compiler will take information from three sources and compile them to instrument instructions.
- A QASM file to be executed, can contain
openPulse
definitions of gate operations - A Configuration file that maps 'Frames' and 'Ports' to specific instrument channels.
- An optional dictionary, of input name value pairs, used to populate any 'input' variables in the qasm file during compilation
from shipyard import Compiler
qasm_file = "path/to/some/qasm/file.qasm"
setup_file = "path/to/some/setup/file.yml" # or json file
# create a compiler instance with qasm and setup files
compiler = Compiler(qasm_file, setup_file)
# compile the qasm program with optional 'input' values
input_dict = {"input1": 1e-7, "input2": 0.34} # optional
compiler.compile(input_dict)
# access combined full qasm program
compiler.program: openqasm3.ast.Program
# access per FPGA core qasm program
compiler.split_program: dict[core, openqasm3.ast.Program]
# access per FPGA core instrument specific instructions
compiler.split_compiled: dict[core, str]