Skip to content

Commit

Permalink
Fix incorrect syntax in broadcasting example. (#536)
Browse files Browse the repository at this point in the history
* Fix incorrect syntax in broadcasting example.

* Add release note

---------

Co-authored-by: Jake Lishman <[email protected]>
  • Loading branch information
dlyongemallo and jakelishman authored May 9, 2024
1 parent 9ecf27e commit 4ca1d79
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
fixes:
- |
Fixed mistaken ``qubit`` declarations in broadcasting code example.
8 changes: 4 additions & 4 deletions source/language/gates.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ this syntax is a convenient shorthand for broadcasting over the qubits of the re

.. code-block::
qubit qr0[1];
qubit qr1[3];
qubit qr2[2];
qubit qr3[3];
qubit[1] qr0;
qubit[3] qr1;
qubit[2] qr2;
qubit[3] qr3;
g4 qr0[0], qr1, qr2[0], qr3; // ok
g4 qr0[0], qr2, qr1[0], qr3; // error! qr2 and qr3 differ in size
Expand Down

0 comments on commit 4ca1d79

Please sign in to comment.