1 / 32

Silq: A High-level Quantum Programming Language

Silq: A High-level Quantum Programming Language. Benjamin Bichsel. Maximilian Baader. Timon Gehr. Martin Vechev. Quantum Programming Languages. Existing languages: Describe circuits. Silq: Describes high-level operations. Qiskit. Quipper. Reduce & simplify code. Static safety /

tracie
Download Presentation

Silq: A High-level Quantum Programming Language

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Silq: A High-level Quantum Programming Language Benjamin Bichsel Maximilian Baader Timon Gehr Martin Vechev

  2. Quantum Programming Languages Existing languages: Describe circuits Silq: Describes high-level operations Qiskit Quipper Reduce & simplify code Static safety / Prevent errors Q# ProjectQ QWire More intuitive semantics Safe automatic uncomputation LIQ𝑈𝑖|〉 QASM Forest … Downstream applications Physicality Source of icons: https://fontawesome.com

  3. Quantum Programming Languages Comparison on Microsoft’s Q# coding contests, seehttps://silq.ethz.ch/comparison

  4. Goals of this Lecture Discuss & compare languages Learn Silq’s language concepts Try out Silq Report issues Source of icons: https://fontawesome.com

  5. Background (minimal)

  6. Basic Features of Silq if x {     // controlled on x, y:=H(y); // apply H to y } y:=H(x); x:=H(x);

  7. Grover’s Algorithm - Recap for all

  8. Grover’s Algorithm in Silq

  9. Grover’s Algorithm in Silq Time

  10. Grover’s Algorithm in Silq

  11. Grover’s Algorithm in Silq

  12. Grover’s Algorithm in Silq

  13. Grover’s Algorithm in Silq

  14. Grover’s Algorithm in Silq

  15. Grover’s Algorithm in Silq classical bijection

  16. Grover’s Algorithm in Silq y:=f(x); qfree with

  17. Grover’s Algorithm in Silq

  18. Grover’s Algorithm in Silq

  19. Automatic Uncomputation iff(cand){   phase(); } implicit measurement

  20. Automatic Uncomputation const iff(cand){   phase(); } qfree

  21. Live Coding

  22. Summary of Type Annotations Documentation on http://silq.ethz.ch/documentation#/documentation/1_annotations const mfree qfree classical Source of icons: https://fontawesome.com

  23. Downstream Applications Compilation Simulation Teaching Research Source of icons: https://fontawesome.com

  24. Try Silq Yourself! Install Follow instructions on http://www.silq.ethz.ch/install Try examples Try to solve tasks / run solutions from http://www.silq.ethz.ch/examples Source of icons: https://fontawesome.com

  25. Interested in Silq? Ask & Complain! Contact us! Bachelor/Master thesis Research projects PhD Benjamin Bichsel Max Baader Timon Gehr Prof. Martin Vechev (ETH Zürich) https://www.sri.inf.ethz.ch/ Source of icons: https://fontawesome.com

  26. Invalid Programs From Live Coding • The following slides are here for completeness.

  27. Preventing Errors- Use Consumed defuseConsumed(x:𝔹){ y := H(x); return(x,y); // undefined identifier x } defduplicateConst(constx:𝔹){ y := H(x); return(x,y); // no error }

  28. Preventing Errors- Implicit Measurements defimplicitMeas[n:!ℕ](x:uint[n]){ y := x % 2; returny; } // parameter 'x' is not consumed defunconsumedConst[n:!ℕ](constx:uint[n]){ y := x % 2; returny; } // no error

  29. Preventing Errors- Conditional Measurements defcondMeas(constc:𝔹,x:𝔹){ ifc{ x:= measure(x); } returnx; } // cannot call function 'measure[𝔹]' in 'mfree' context defclassCondMeas(constc:!𝔹,x:𝔹){ ifc{ x:= measure(x):𝔹; } returnx; } // no error

  30. Preventing Errors- Reverse Measurements defrevMeas(){ returnreverse(measure); } // reversed function must be mfree

  31. Preventing Errors- Invalid Uncomputation defnonConst(y:𝔹){ ifX(y) { // X consumes y phase(π); } } // non-'lifted' quantum expression must be consumed defsignFlipOf0(consty:𝔹){ ifX(y) { // X consumes a copy of y phase(π); } } // no error

  32. Preventing Errors- Invalid Uncomputation defnonQfree(consty:𝔹,z:𝔹){ ifH(y) { z := X(z); } returnz; } // non-'lifted' quantum expression must be consumed

More Related