From 8b3415b924c0cf8aed170b7cc3b46d94064a1f95 Mon Sep 17 00:00:00 2001 From: Mariia Mykhailova Date: Wed, 24 Jul 2024 08:21:52 -0700 Subject: [PATCH] Fix ApplyPauliFromBitString error message (#1782) The bits and qubits in this operation are not used as controls, so we shouldn't refer to them as such. (I got this error message when working on a kata, and it took me longer than it should to figure out that it is not coming from any of the controlled gates.) --- library/qs_source/src/std/canon.qs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/qs_source/src/std/canon.qs b/library/qs_source/src/std/canon.qs index 2e09e8259f..727c672a0e 100644 --- a/library/qs_source/src/std/canon.qs +++ b/library/qs_source/src/std/canon.qs @@ -348,7 +348,7 @@ namespace Microsoft.Quantum.Canon { /// ``` operation ApplyPauliFromBitString(pauli : Pauli, bitApply : Bool, bits : Bool[], qubits : Qubit[]) : Unit is Adj + Ctl { let nBits = Length(bits); - Fact(nBits == Length(qubits), "Number of control bits must be equal to number of control qubits."); + Fact(nBits == Length(qubits), "Number of bits must be equal to number of qubits."); for i in 0..nBits - 1 { if bits[i] == bitApply { ApplyP(pauli, qubits[i]);