Skip to content

rickbonavigo/atplt

Repository files navigation

QPL - Quantum Programming Language

Compile and Run with build.py

The easiest way to work with QPL programs is using the build.py script:

# Compile and execute a program
python3 build.py source.qpl

# Compile without running
python3 build.py source.qpl --no-run

# Show source and compiled code
python3 build.py source.qpl --show-code

# Save to custom output file and run with 500 shots
python3 build.py source.qpl -o output.qasm --shots 500

See python3 build.py --help for full documentation.

Run Examples

# Run all examples
python3 run_examples.py

# Run specific example
python3 run_examples.py local_qbit.qpl

# Save compiled files to compiled_output/
python3 run_examples.py --save-compiled

# Clean up compiled files
python3 run_examples.py --clean

# List available examples
python3 run_examples.py --list

Compile and Run Manually

# Compile QPL source to assembly
python3 compile.py source.qpl -o output.qasm

# Run compiled assembly
python3 runtime/run_from_file.py output.qasm

Run Tests

python3 run_tests.py
python3 run_tests.py -v  # Verbose output

File Extensions

  • .qpl - High-level QPL source files
  • .qasm - Compiled assembly files

About

Project for: Advanced Topics In Programming Languages Theory

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors