Skip to content
This repository was archived by the owner on Aug 21, 2023. It is now read-only.

Commit 35a78c7

Browse files
authored
Correction in quantum register declaration for composite Gates exampl… (#996)
* Correction in quantum register declaration for composite Gates example. q --> qr. * Correction in quantum register declaration for composite Gates examples.
1 parent c8d0233 commit 35a78c7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tutorials/circuits_advanced/1_advanced_circuits.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,12 @@
146146
"# Convert to a gate and stick it into an arbitrary place in the bigger circuit\n",
147147
"sub_inst = sub_circ.to_instruction()\n",
148148
"\n",
149-
"q = QuantumRegister(3, 'q')\n",
150-
"circ = QuantumCircuit(q)\n",
149+
"qr = QuantumRegister(3, 'q')\n",
150+
"circ = QuantumCircuit(qr)\n",
151151
"circ.h(qr[0])\n",
152152
"circ.cx(qr[0], qr[1])\n",
153153
"circ.cx(qr[1], qr[2])\n",
154-
"circ.append(sub_inst, [q[1], q[2]])\n",
154+
"circ.append(sub_inst, [qr[1], qr[2]])\n",
155155
"\n",
156156
"circ.draw()"
157157
]

0 commit comments

Comments
 (0)