From 4ca1d793833b24a195dcb8a5db99f1bd21b0d32f Mon Sep 17 00:00:00 2001 From: David Yonge-Mallo Date: Fri, 10 May 2024 01:21:21 +0200 Subject: [PATCH] Fix incorrect syntax in broadcasting example. (#536) * Fix incorrect syntax in broadcasting example. * Add release note --------- Co-authored-by: Jake Lishman --- .../notes/fix-broadcast-example-ffb53ef1af8d8435.yaml | 4 ++++ source/language/gates.rst | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 releasenotes/notes/fix-broadcast-example-ffb53ef1af8d8435.yaml diff --git a/releasenotes/notes/fix-broadcast-example-ffb53ef1af8d8435.yaml b/releasenotes/notes/fix-broadcast-example-ffb53ef1af8d8435.yaml new file mode 100644 index 00000000..536c115a --- /dev/null +++ b/releasenotes/notes/fix-broadcast-example-ffb53ef1af8d8435.yaml @@ -0,0 +1,4 @@ +--- +fixes: + - | + Fixed mistaken ``qubit`` declarations in broadcasting code example. diff --git a/source/language/gates.rst b/source/language/gates.rst index 02b6f11f..5e97144f 100644 --- a/source/language/gates.rst +++ b/source/language/gates.rst @@ -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