Try Your Hand

Solutions to these exercises are given in Quantum Tagging and Entangling Solutions.

For any code listing in the exercises, assume the following header lines:

 OPENQASM 2.0;
 include ​"qelib1.inc"​;
  1. The Z gate inverts triangle images/_pragprog/svg-18.png qubelets but leaves the pentagon images/_pragprog/svg-17.png qubelets alone.

    1. Design a circuit that mimics the Z gate for the pentagon images/_pragprog/svg-17.png qubelets. That is, your circuit should leave triangle qubelets alone but invert pentagon qubelets: ...

Get Quantum Computing now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.