Expert guide for developing and contributing to QuantumOptics.jl, a numerical framework for simulating quantum systems in Julia
Expert guide for developing and contributing to QuantumOptics.jl, a numerical framework for simulating quantum systems including time evolution, master equations, stochastic processes, and more.
QuantumOptics.jl is built on QuantumOpticsBase.jl and provides dynamic solvers for closed and open quantum systems. It supports GPU acceleration (CUDA, AMDGPU, OpenCL) and automatic differentiation.
**First, check if you're in the correct directory:**
**Install dependencies:**
```bash
julia --project=. -e "using Pkg; Pkg.instantiate()"
```
**Verify installation:**
```bash
julia --project=. -e "using Pkg; Pkg.status()"
```
**Run full test suite:**
```bash
julia --project=. -e "using Pkg; Pkg.test()"
```
**Run specific test categories:**
```bash
julia --project=. -e "using TestItemRunner; @run_package_tests filter=ti->contains(string(ti.name), \"schroedinger\")"
julia --project=. -e "using TestItemRunner; @run_package_tests filter=ti->contains(string(ti.name), \"master\")"
CUDA_TEST=true julia --project=. -e "using Pkg; Pkg.test()"
AMDGPU_TEST=true julia --project=. -e "using Pkg; Pkg.test()"
JET_TEST=true julia --project=. -e "using Pkg; Pkg.test()"
```
**Always run full test suite before creating/updating PRs.**
**Key source files:**
**Test files mirror source structure in `test/` directory.**
**Before committing, format code:**
```bash
find . -type f -name '*.jl' -exec sed --in-place 's/[[:space:]]\+$//' {} \+
find . -type f -name '*.jl' -exec sed -i '$a\' {} \+
```
**Formatting guidelines:**
**Always follow this workflow:**
1. **Pull latest changes first:**
```bash
git pull origin master
```
2. **Create feature branch:**
```bash
git checkout -b feature/your-feature-name
```
3. **Before continuing work on existing branch:**
```bash
git pull origin feature/your-feature-name
```
4. **Make changes and commit:**
```bash
git add <files>
git commit -m "Description of changes"
```
5. **Push to remote:**
```bash
git push origin feature/your-feature-name
```
6. **Run full test suite before PR:**
```bash
julia --project=. -e "using Pkg; Pkg.test()"
```
**Contributing guidelines:**
**Testing considerations:**
**Update dependencies:**
```bash
julia --project=. -e "using Pkg; Pkg.update()"
```
**Run benchmarks:**
```bash
julia --project=benchmark benchmark/benchmarks.jl
```
```bash
cd QuantumOptics.jl
julia --project=. -e "using Pkg; Pkg.instantiate()"
git pull origin master
git checkout -b feature/improve-master-solver
find . -type f -name '*.jl' -exec sed --in-place 's/[[:space:]]\+$//' {} \+
julia --project=. -e "using Pkg; Pkg.test()"
git add src/master.jl test/test_master.jl
git commit -m "Improve master equation solver performance"
git push origin feature/improve-master-solver
```
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/quantumopticsjl-development-guide/raw