Skip to content

filipw/qsharp-examples

Repository files navigation

Q# Examples

A collection of various interesting Q# examples.

Algorithms

Sample Name Description Blog Post Type
💻 Christmas Tree 📝 Decorating a Christmas tree with a quantum computer. Uses both Q# and Qiskit (Aer) simulators. Link Executable
💻 Quokka 📝 A Jupyter notebook showing how to run Q# code on a Quokka quantum simulator. Link Jupyter Notebook
💻 Certified deletion 📝 Q# sample illustrating Quantum encryption with certified deletion from Anne Broadbent and Rabib Islam. Link Executable
💻 Elitzur-Vaidman tester 📝 Elitzur-Vaidman bomb tester thought experiment, as a playful Q# Santa-themed sample Link Executable
💻 Hidden shift 📝 Hidden shift problem N/A Executable
💻 Simon's algorithm 📝 A toy demonstration of Simon's algorithm N/A Executable
💻 Certified randomness amplification 📝 Q# sample illustrating Certified randomness amplification, Liu et al, arXiv:2511.03686, 2025. Link Jupyter Notebook

Errors

Sample Name Description Blog Post Type
💻 Cat state with noise 📝 A simple 8-qubit GHZ state, with a basic noise model and, optionally, qubit loss, illustrating their impact on measurement. Run with 1000 shots. N/A Executable
💻 Bit flip error correction 📝 Bit flip error correction samples (auxiliary qubit-based syndrome extraction, automatic correction with auxiliary qubits and direct parity measurement) N/A Executable
💻 Phase flip error correction 📝 Phase flip error correction samples (auxiliary qubit-based syndrome extraction, automatic correction with auxiliary qubits and direct parity measurement) N/A Executable

Language features

Sample Name Description Blog Post Type
💻 Array shuffle 📝 Shuffling an array using Q# (classical logic). Link Executable
💻 New array update syntax 📝 The improved array update syntax introduced in Q# 1.17 Link Executable
💻 Q# Testing (Bell state) 📝 Bell state tests demonstrating different Q# testing approaches N/A Tests

Further samples

You can find more Q# samples in my Introduction to Quantum Computing with Q# and QDK book repository.

About

A collection of various interesting Q# examples.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors