qsharp-lang 1.6.2-dev → 1.6.3-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (304) hide show
  1. package/dist/browser.d.ts +3 -3
  2. package/dist/browser.js +2 -2
  3. package/dist/compiler/compiler.d.ts +6 -2
  4. package/dist/compiler/compiler.js +19 -5
  5. package/dist/katas-content.generated.js +111 -64
  6. package/dist/katas-content.generated.md.js +111 -64
  7. package/dist/language-service/language-service.d.ts +1 -0
  8. package/dist/language-service/language-service.js +2 -0
  9. package/dist/samples.generated.js +4 -4
  10. package/docs/Microsoft.Quantum.Arrays/All.md +1 -1
  11. package/docs/Microsoft.Quantum.Arrays/Any.md +1 -1
  12. package/docs/Microsoft.Quantum.Arrays/Chunks.md +1 -1
  13. package/docs/Microsoft.Quantum.Arrays/CircularlyShifted.md +1 -1
  14. package/docs/Microsoft.Quantum.Arrays/ColumnAt.md +1 -1
  15. package/docs/Microsoft.Quantum.Arrays/Count.md +1 -1
  16. package/docs/Microsoft.Quantum.Arrays/Diagonal.md +1 -1
  17. package/docs/Microsoft.Quantum.Arrays/DrawMany.md +1 -1
  18. package/docs/Microsoft.Quantum.Arrays/Enumerated.md +1 -1
  19. package/docs/Microsoft.Quantum.Arrays/Excluding.md +1 -1
  20. package/docs/Microsoft.Quantum.Arrays/Filtered.md +1 -1
  21. package/docs/Microsoft.Quantum.Arrays/FlatMapped.md +1 -1
  22. package/docs/Microsoft.Quantum.Arrays/Flattened.md +1 -1
  23. package/docs/Microsoft.Quantum.Arrays/Fold.md +1 -1
  24. package/docs/Microsoft.Quantum.Arrays/ForEach.md +1 -1
  25. package/docs/Microsoft.Quantum.Arrays/Head.md +1 -1
  26. package/docs/Microsoft.Quantum.Arrays/HeadAndRest.md +1 -1
  27. package/docs/Microsoft.Quantum.Arrays/IndexOf.md +1 -1
  28. package/docs/Microsoft.Quantum.Arrays/IndexRange.md +1 -1
  29. package/docs/Microsoft.Quantum.Arrays/Interleaved.md +1 -1
  30. package/docs/Microsoft.Quantum.Arrays/IsEmpty.md +1 -1
  31. package/docs/Microsoft.Quantum.Arrays/IsRectangularArray.md +1 -1
  32. package/docs/Microsoft.Quantum.Arrays/IsSorted.md +1 -1
  33. package/docs/Microsoft.Quantum.Arrays/IsSquareArray.md +1 -1
  34. package/docs/Microsoft.Quantum.Arrays/Mapped.md +1 -1
  35. package/docs/Microsoft.Quantum.Arrays/MappedByIndex.md +1 -1
  36. package/docs/Microsoft.Quantum.Arrays/MappedOverRange.md +1 -1
  37. package/docs/Microsoft.Quantum.Arrays/Most.md +1 -1
  38. package/docs/Microsoft.Quantum.Arrays/MostAndTail.md +1 -1
  39. package/docs/Microsoft.Quantum.Arrays/Padded.md +1 -1
  40. package/docs/Microsoft.Quantum.Arrays/Partitioned.md +1 -1
  41. package/docs/Microsoft.Quantum.Arrays/Rest.md +1 -1
  42. package/docs/Microsoft.Quantum.Arrays/Reversed.md +1 -1
  43. package/docs/Microsoft.Quantum.Arrays/SequenceI.md +1 -1
  44. package/docs/Microsoft.Quantum.Arrays/SequenceL.md +1 -1
  45. package/docs/Microsoft.Quantum.Arrays/Sorted.md +1 -1
  46. package/docs/Microsoft.Quantum.Arrays/Subarray.md +1 -1
  47. package/docs/Microsoft.Quantum.Arrays/Swapped.md +1 -1
  48. package/docs/Microsoft.Quantum.Arrays/Tail.md +1 -1
  49. package/docs/Microsoft.Quantum.Arrays/Transposed.md +1 -1
  50. package/docs/Microsoft.Quantum.Arrays/Unzipped.md +1 -1
  51. package/docs/Microsoft.Quantum.Arrays/Where.md +1 -1
  52. package/docs/Microsoft.Quantum.Arrays/Windows.md +1 -1
  53. package/docs/Microsoft.Quantum.Arrays/Zipped.md +1 -1
  54. package/docs/Microsoft.Quantum.Canon/ApplyCNOTChain.md +1 -1
  55. package/docs/Microsoft.Quantum.Canon/ApplyControlledOnBitString.md +1 -1
  56. package/docs/Microsoft.Quantum.Canon/ApplyControlledOnInt.md +1 -1
  57. package/docs/Microsoft.Quantum.Canon/ApplyP.md +1 -1
  58. package/docs/Microsoft.Quantum.Canon/ApplyPauli.md +1 -1
  59. package/docs/Microsoft.Quantum.Canon/ApplyPauliFromBitString.md +1 -1
  60. package/docs/Microsoft.Quantum.Canon/ApplyPauliFromInt.md +1 -1
  61. package/docs/Microsoft.Quantum.Canon/ApplyQFT.md +1 -1
  62. package/docs/Microsoft.Quantum.Canon/ApplyToEach.md +1 -1
  63. package/docs/Microsoft.Quantum.Canon/ApplyToEachA.md +1 -1
  64. package/docs/Microsoft.Quantum.Canon/ApplyToEachC.md +1 -1
  65. package/docs/Microsoft.Quantum.Canon/ApplyToEachCA.md +1 -1
  66. package/docs/Microsoft.Quantum.Canon/ApplyXorInPlace.md +1 -1
  67. package/docs/Microsoft.Quantum.Canon/ApplyXorInPlaceL.md +1 -1
  68. package/docs/Microsoft.Quantum.Canon/CX.md +1 -1
  69. package/docs/Microsoft.Quantum.Canon/CY.md +1 -1
  70. package/docs/Microsoft.Quantum.Canon/CZ.md +1 -1
  71. package/docs/Microsoft.Quantum.Canon/Fst.md +1 -1
  72. package/docs/Microsoft.Quantum.Canon/Snd.md +1 -1
  73. package/docs/Microsoft.Quantum.Canon/SwapReverseRegister.md +1 -1
  74. package/docs/Microsoft.Quantum.Convert/BigIntAsBoolArray.md +1 -1
  75. package/docs/Microsoft.Quantum.Convert/BoolArrayAsBigInt.md +1 -1
  76. package/docs/Microsoft.Quantum.Convert/BoolArrayAsInt.md +1 -1
  77. package/docs/Microsoft.Quantum.Convert/BoolArrayAsResultArray.md +1 -1
  78. package/docs/Microsoft.Quantum.Convert/BoolAsResult.md +1 -1
  79. package/docs/Microsoft.Quantum.Convert/ComplexAsComplexPolar.md +1 -1
  80. package/docs/Microsoft.Quantum.Convert/ComplexPolarAsComplex.md +1 -1
  81. package/docs/Microsoft.Quantum.Convert/IntAsBigInt.md +1 -1
  82. package/docs/Microsoft.Quantum.Convert/IntAsBoolArray.md +1 -1
  83. package/docs/Microsoft.Quantum.Convert/IntAsDouble.md +1 -1
  84. package/docs/Microsoft.Quantum.Convert/ResultArrayAsBoolArray.md +1 -1
  85. package/docs/Microsoft.Quantum.Convert/ResultArrayAsInt.md +1 -1
  86. package/docs/Microsoft.Quantum.Convert/ResultAsBool.md +1 -1
  87. package/docs/Microsoft.Quantum.Core/IsRangeEmpty.md +1 -1
  88. package/docs/Microsoft.Quantum.Core/Length.md +1 -1
  89. package/docs/Microsoft.Quantum.Core/RangeEnd.md +1 -1
  90. package/docs/Microsoft.Quantum.Core/RangeReverse.md +1 -1
  91. package/docs/Microsoft.Quantum.Core/RangeStart.md +1 -1
  92. package/docs/Microsoft.Quantum.Core/RangeStep.md +1 -1
  93. package/docs/Microsoft.Quantum.Core/Repeated.md +1 -1
  94. package/docs/Microsoft.Quantum.Diagnostics/DumpMachine.md +1 -1
  95. package/docs/Microsoft.Quantum.Diagnostics/DumpRegister.md +1 -1
  96. package/docs/Microsoft.Quantum.Diagnostics/Fact.md +1 -1
  97. package/docs/Microsoft.Quantum.Intrinsic/AdjustForSingleControl.md +21 -0
  98. package/docs/Microsoft.Quantum.Intrinsic/ApplyGlobalPhase.md +18 -0
  99. package/docs/Microsoft.Quantum.Intrinsic/CCH.md +18 -0
  100. package/docs/Microsoft.Quantum.Intrinsic/CCNOT.md +1 -1
  101. package/docs/Microsoft.Quantum.Intrinsic/CCY.md +18 -0
  102. package/docs/Microsoft.Quantum.Intrinsic/CCZ.md +18 -0
  103. package/docs/Microsoft.Quantum.Intrinsic/CH.md +18 -0
  104. package/docs/Microsoft.Quantum.Intrinsic/CNOT.md +1 -1
  105. package/docs/Microsoft.Quantum.Intrinsic/CRxx.md +18 -0
  106. package/docs/Microsoft.Quantum.Intrinsic/CRyy.md +18 -0
  107. package/docs/Microsoft.Quantum.Intrinsic/CRz.md +18 -0
  108. package/docs/Microsoft.Quantum.Intrinsic/CRzz.md +18 -0
  109. package/docs/Microsoft.Quantum.Intrinsic/CS.md +18 -0
  110. package/docs/Microsoft.Quantum.Intrinsic/CT.md +18 -0
  111. package/docs/Microsoft.Quantum.Intrinsic/CollectControls.md +27 -0
  112. package/docs/Microsoft.Quantum.Intrinsic/ControllableGlobalPhase.md +18 -0
  113. package/docs/Microsoft.Quantum.Intrinsic/EntangleForJointMeasure.md +18 -0
  114. package/docs/Microsoft.Quantum.Intrinsic/Exp.md +1 -1
  115. package/docs/Microsoft.Quantum.Intrinsic/GlobalPhase.md +18 -0
  116. package/docs/Microsoft.Quantum.Intrinsic/H.md +1 -1
  117. package/docs/Microsoft.Quantum.Intrinsic/I.md +1 -1
  118. package/docs/Microsoft.Quantum.Intrinsic/IndicesOfNonIdentity.md +18 -0
  119. package/docs/Microsoft.Quantum.Intrinsic/M.md +1 -1
  120. package/docs/Microsoft.Quantum.Intrinsic/MapPauli.md +18 -0
  121. package/docs/Microsoft.Quantum.Intrinsic/Measure.md +1 -1
  122. package/docs/Microsoft.Quantum.Intrinsic/Message.md +1 -1
  123. package/docs/Microsoft.Quantum.Intrinsic/PhaseCCX.md +18 -0
  124. package/docs/Microsoft.Quantum.Intrinsic/R.md +1 -1
  125. package/docs/Microsoft.Quantum.Intrinsic/R1.md +1 -1
  126. package/docs/Microsoft.Quantum.Intrinsic/R1Frac.md +1 -1
  127. package/docs/Microsoft.Quantum.Intrinsic/RFrac.md +1 -1
  128. package/docs/Microsoft.Quantum.Intrinsic/RemovePauliI.md +18 -0
  129. package/docs/Microsoft.Quantum.Intrinsic/Reset.md +1 -1
  130. package/docs/Microsoft.Quantum.Intrinsic/ResetAll.md +1 -1
  131. package/docs/Microsoft.Quantum.Intrinsic/Rx.md +1 -1
  132. package/docs/Microsoft.Quantum.Intrinsic/Rxx.md +1 -1
  133. package/docs/Microsoft.Quantum.Intrinsic/Ry.md +1 -1
  134. package/docs/Microsoft.Quantum.Intrinsic/Ryy.md +1 -1
  135. package/docs/Microsoft.Quantum.Intrinsic/Rz.md +1 -1
  136. package/docs/Microsoft.Quantum.Intrinsic/Rzz.md +1 -1
  137. package/docs/Microsoft.Quantum.Intrinsic/S.md +1 -1
  138. package/docs/Microsoft.Quantum.Intrinsic/SWAP.md +1 -1
  139. package/docs/Microsoft.Quantum.Intrinsic/SpreadZ.md +18 -0
  140. package/docs/Microsoft.Quantum.Intrinsic/T.md +1 -1
  141. package/docs/Microsoft.Quantum.Intrinsic/X.md +1 -1
  142. package/docs/Microsoft.Quantum.Intrinsic/Y.md +1 -1
  143. package/docs/Microsoft.Quantum.Intrinsic/Z.md +1 -1
  144. package/docs/Microsoft.Quantum.Logical/Xor.md +1 -1
  145. package/docs/Microsoft.Quantum.Math/AbsComplex.md +1 -1
  146. package/docs/Microsoft.Quantum.Math/AbsComplexPolar.md +1 -1
  147. package/docs/Microsoft.Quantum.Math/AbsD.md +1 -1
  148. package/docs/Microsoft.Quantum.Math/AbsI.md +1 -1
  149. package/docs/Microsoft.Quantum.Math/AbsL.md +1 -1
  150. package/docs/Microsoft.Quantum.Math/AbsSquaredComplex.md +1 -1
  151. package/docs/Microsoft.Quantum.Math/AbsSquaredComplexPolar.md +1 -1
  152. package/docs/Microsoft.Quantum.Math/ApproximateFactorial.md +1 -1
  153. package/docs/Microsoft.Quantum.Math/ArcCos.md +1 -1
  154. package/docs/Microsoft.Quantum.Math/ArcCosh.md +1 -1
  155. package/docs/Microsoft.Quantum.Math/ArcSin.md +1 -1
  156. package/docs/Microsoft.Quantum.Math/ArcSinh.md +1 -1
  157. package/docs/Microsoft.Quantum.Math/ArcTan.md +1 -1
  158. package/docs/Microsoft.Quantum.Math/ArcTan2.md +1 -1
  159. package/docs/Microsoft.Quantum.Math/ArcTanh.md +1 -1
  160. package/docs/Microsoft.Quantum.Math/ArgComplex.md +1 -1
  161. package/docs/Microsoft.Quantum.Math/ArgComplexPolar.md +1 -1
  162. package/docs/Microsoft.Quantum.Math/Binom.md +1 -1
  163. package/docs/Microsoft.Quantum.Math/BitSizeI.md +1 -1
  164. package/docs/Microsoft.Quantum.Math/BitSizeL.md +1 -1
  165. package/docs/Microsoft.Quantum.Math/Ceiling.md +1 -1
  166. package/docs/Microsoft.Quantum.Math/Complex.md +1 -1
  167. package/docs/Microsoft.Quantum.Math/ComplexPolar.md +1 -1
  168. package/docs/Microsoft.Quantum.Math/ContinuedFractionConvergentI.md +1 -1
  169. package/docs/Microsoft.Quantum.Math/ContinuedFractionConvergentL.md +1 -1
  170. package/docs/Microsoft.Quantum.Math/Cos.md +1 -1
  171. package/docs/Microsoft.Quantum.Math/Cosh.md +1 -1
  172. package/docs/Microsoft.Quantum.Math/DivRemI.md +1 -1
  173. package/docs/Microsoft.Quantum.Math/DivRemL.md +1 -1
  174. package/docs/Microsoft.Quantum.Math/DividedByC.md +1 -1
  175. package/docs/Microsoft.Quantum.Math/DividedByCP.md +1 -1
  176. package/docs/Microsoft.Quantum.Math/E.md +1 -1
  177. package/docs/Microsoft.Quantum.Math/ExpModI.md +1 -1
  178. package/docs/Microsoft.Quantum.Math/ExpModL.md +1 -1
  179. package/docs/Microsoft.Quantum.Math/ExtendedGreatestCommonDivisorI.md +1 -1
  180. package/docs/Microsoft.Quantum.Math/ExtendedGreatestCommonDivisorL.md +1 -1
  181. package/docs/Microsoft.Quantum.Math/ExtendedTruncation.md +18 -0
  182. package/docs/Microsoft.Quantum.Math/FactorialI.md +1 -1
  183. package/docs/Microsoft.Quantum.Math/FactorialL.md +1 -1
  184. package/docs/Microsoft.Quantum.Math/Floor.md +1 -1
  185. package/docs/Microsoft.Quantum.Math/GreatestCommonDivisorI.md +1 -1
  186. package/docs/Microsoft.Quantum.Math/GreatestCommonDivisorL.md +1 -1
  187. package/docs/Microsoft.Quantum.Math/HammingWeightI.md +1 -1
  188. package/docs/Microsoft.Quantum.Math/InverseModI.md +1 -1
  189. package/docs/Microsoft.Quantum.Math/InverseModL.md +1 -1
  190. package/docs/Microsoft.Quantum.Math/IsCoprimeI.md +1 -1
  191. package/docs/Microsoft.Quantum.Math/IsCoprimeL.md +1 -1
  192. package/docs/Microsoft.Quantum.Math/IsInfinite.md +1 -1
  193. package/docs/Microsoft.Quantum.Math/IsNaN.md +1 -1
  194. package/docs/Microsoft.Quantum.Math/LargestFixedPoint.md +1 -1
  195. package/docs/Microsoft.Quantum.Math/Lg.md +1 -1
  196. package/docs/Microsoft.Quantum.Math/Log.md +1 -1
  197. package/docs/Microsoft.Quantum.Math/Log10.md +1 -1
  198. package/docs/Microsoft.Quantum.Math/LogFactorialD.md +1 -1
  199. package/docs/Microsoft.Quantum.Math/LogGammaD.md +1 -1
  200. package/docs/Microsoft.Quantum.Math/LogOf2.md +1 -1
  201. package/docs/Microsoft.Quantum.Math/Max.md +1 -1
  202. package/docs/Microsoft.Quantum.Math/MaxD.md +1 -1
  203. package/docs/Microsoft.Quantum.Math/MaxI.md +1 -1
  204. package/docs/Microsoft.Quantum.Math/MaxL.md +1 -1
  205. package/docs/Microsoft.Quantum.Math/Min.md +1 -1
  206. package/docs/Microsoft.Quantum.Math/MinD.md +1 -1
  207. package/docs/Microsoft.Quantum.Math/MinI.md +1 -1
  208. package/docs/Microsoft.Quantum.Math/MinL.md +1 -1
  209. package/docs/Microsoft.Quantum.Math/MinusC.md +1 -1
  210. package/docs/Microsoft.Quantum.Math/MinusCP.md +1 -1
  211. package/docs/Microsoft.Quantum.Math/ModulusI.md +1 -1
  212. package/docs/Microsoft.Quantum.Math/ModulusL.md +1 -1
  213. package/docs/Microsoft.Quantum.Math/NegationC.md +1 -1
  214. package/docs/Microsoft.Quantum.Math/NegationCP.md +1 -1
  215. package/docs/Microsoft.Quantum.Math/PI.md +1 -1
  216. package/docs/Microsoft.Quantum.Math/PNorm.md +1 -1
  217. package/docs/Microsoft.Quantum.Math/PNormalized.md +1 -1
  218. package/docs/Microsoft.Quantum.Math/PlusC.md +1 -1
  219. package/docs/Microsoft.Quantum.Math/PlusCP.md +1 -1
  220. package/docs/Microsoft.Quantum.Math/PowC.md +1 -1
  221. package/docs/Microsoft.Quantum.Math/PowCAsCP.md +24 -0
  222. package/docs/Microsoft.Quantum.Math/PowCP.md +1 -1
  223. package/docs/Microsoft.Quantum.Math/RealMod.md +1 -1
  224. package/docs/Microsoft.Quantum.Math/Round.md +1 -1
  225. package/docs/Microsoft.Quantum.Math/SignD.md +1 -1
  226. package/docs/Microsoft.Quantum.Math/SignI.md +1 -1
  227. package/docs/Microsoft.Quantum.Math/SignL.md +1 -1
  228. package/docs/Microsoft.Quantum.Math/Sin.md +1 -1
  229. package/docs/Microsoft.Quantum.Math/Sinh.md +1 -1
  230. package/docs/Microsoft.Quantum.Math/SmallestFixedPoint.md +1 -1
  231. package/docs/Microsoft.Quantum.Math/Sqrt.md +1 -1
  232. package/docs/Microsoft.Quantum.Math/SquaredNorm.md +1 -1
  233. package/docs/Microsoft.Quantum.Math/Tan.md +1 -1
  234. package/docs/Microsoft.Quantum.Math/Tanh.md +1 -1
  235. package/docs/Microsoft.Quantum.Math/TimesC.md +1 -1
  236. package/docs/Microsoft.Quantum.Math/TimesCP.md +1 -1
  237. package/docs/Microsoft.Quantum.Math/TrailingZeroCountI.md +1 -1
  238. package/docs/Microsoft.Quantum.Math/TrailingZeroCountL.md +1 -1
  239. package/docs/Microsoft.Quantum.Math/Truncate.md +1 -1
  240. package/docs/Microsoft.Quantum.Measurement/MResetEachZ.md +1 -1
  241. package/docs/Microsoft.Quantum.Measurement/MResetX.md +1 -1
  242. package/docs/Microsoft.Quantum.Measurement/MResetY.md +1 -1
  243. package/docs/Microsoft.Quantum.Measurement/MResetZ.md +1 -1
  244. package/docs/Microsoft.Quantum.Measurement/MeasureAllZ.md +1 -1
  245. package/docs/Microsoft.Quantum.Measurement/MeasureEachZ.md +1 -1
  246. package/docs/Microsoft.Quantum.Measurement/MeasureInteger.md +1 -1
  247. package/docs/Microsoft.Quantum.ResourceEstimation/AccountForEstimates.md +1 -1
  248. package/docs/Microsoft.Quantum.ResourceEstimation/AuxQubitCount.md +1 -1
  249. package/docs/Microsoft.Quantum.ResourceEstimation/BeginEstimateCaching.md +1 -1
  250. package/docs/Microsoft.Quantum.ResourceEstimation/BeginRepeatEstimates.md +1 -1
  251. package/docs/Microsoft.Quantum.ResourceEstimation/CczCount.md +1 -1
  252. package/docs/Microsoft.Quantum.ResourceEstimation/EndEstimateCaching.md +1 -1
  253. package/docs/Microsoft.Quantum.ResourceEstimation/EndRepeatEstimates.md +1 -1
  254. package/docs/Microsoft.Quantum.ResourceEstimation/MeasurementCount.md +1 -1
  255. package/docs/Microsoft.Quantum.ResourceEstimation/PSSPCLayout.md +1 -1
  256. package/docs/Microsoft.Quantum.ResourceEstimation/RepeatEstimates.md +1 -1
  257. package/docs/Microsoft.Quantum.ResourceEstimation/RotationCount.md +1 -1
  258. package/docs/Microsoft.Quantum.ResourceEstimation/RotationDepth.md +1 -1
  259. package/docs/Microsoft.Quantum.ResourceEstimation/SingleVariant.md +1 -1
  260. package/docs/Microsoft.Quantum.ResourceEstimation/TCount.md +1 -1
  261. package/docs/Microsoft.Quantum.Unstable.Arithmetic/AddLE.md +1 -1
  262. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyActionIfGreaterThanOrEqualConstant.md +23 -0
  263. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyActionIfSumOverflows.md +23 -0
  264. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyAsSinglyControlled.md +24 -0
  265. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfEqualL.md +1 -1
  266. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfEqualLE.md +1 -1
  267. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfGreaterL.md +1 -1
  268. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfGreaterLE.md +1 -1
  269. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfGreaterOrEqualL.md +1 -1
  270. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfGreaterOrEqualLE.md +1 -1
  271. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfLessL.md +1 -1
  272. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfLessLE.md +1 -1
  273. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfLessOrEqualL.md +1 -1
  274. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfLessOrEqualLE.md +1 -1
  275. package/docs/Microsoft.Quantum.Unstable.Arithmetic/FourierTDIncByLE.md +1 -1
  276. package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByI.md +1 -1
  277. package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByIUsingIncByLE.md +1 -1
  278. package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByL.md +1 -1
  279. package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByLE.md +1 -1
  280. package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByLEUsingAddLE.md +1 -1
  281. package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByLUsingIncByLE.md +1 -1
  282. package/docs/Microsoft.Quantum.Unstable.Arithmetic/LookAheadDKRSAddLE.md +1 -1
  283. package/docs/Microsoft.Quantum.Unstable.Arithmetic/MAJ.md +1 -1
  284. package/docs/Microsoft.Quantum.Unstable.Arithmetic/PhaseGradient.md +18 -0
  285. package/docs/Microsoft.Quantum.Unstable.Arithmetic/ReflectAboutInteger.md +1 -1
  286. package/docs/Microsoft.Quantum.Unstable.Arithmetic/RippleCarryCGAddLE.md +1 -1
  287. package/docs/Microsoft.Quantum.Unstable.Arithmetic/RippleCarryCGIncByLE.md +1 -1
  288. package/docs/Microsoft.Quantum.Unstable.Arithmetic/RippleCarryTTKIncByLE.md +1 -1
  289. package/docs/Microsoft.Quantum.Unstable.StatePreparation/ApproximatelyPreparePureStateCP.md +1 -1
  290. package/docs/Microsoft.Quantum.Unstable.StatePreparation/PreparePureStateD.md +1 -1
  291. package/docs/Microsoft.Quantum.Unstable.TableLookup/EncodeUnary.md +18 -0
  292. package/docs/Microsoft.Quantum.Unstable.TableLookup/MustBeFixed.md +18 -0
  293. package/docs/Microsoft.Quantum.Unstable.TableLookup/Select.md +1 -1
  294. package/docs/Microsoft.Quantum.Unstable.TableLookup/Unlookup.md +22 -0
  295. package/docs/Microsoft.Quantum.Unstable.TableLookup/WriteMemoryContents.md +18 -0
  296. package/docs/toc.yml +31 -1
  297. package/lib/node/qsc_wasm.cjs +55 -32
  298. package/lib/node/qsc_wasm.d.cts +22 -11
  299. package/lib/node/qsc_wasm_bg.wasm +0 -0
  300. package/lib/web/qsc_wasm.d.ts +23 -12
  301. package/lib/web/qsc_wasm.js +49 -30
  302. package/lib/web/qsc_wasm_bg.wasm +0 -0
  303. package/package.json +1 -1
  304. package/docs/Microsoft.Quantum.Intrinsic/AND.md +0 -33
@@ -81,7 +81,9 @@ export default {
81
81
  "content": "**Input:** An even integer $n$ (can be negative).\n\n**Goal:** Return the $n$-th power of $i$ ($i^n$).\n"
82
82
  },
83
83
  "sourceIds": [
84
- "complex_arithmetic__powers_of_i__Verification.qs"
84
+ "complex_arithmetic__powers_of_i__Verification.qs",
85
+ "KatasLibrary.qs",
86
+ "complex_arithmetic__Common.qs"
85
87
  ],
86
88
  "placeholderCode": "namespace Kata {\n function PowersOfI(n : Int) : Int {\n // Replace the return values with correct answers.\n if n % 4 == 0 {\n return 0;\n } else {\n return 0;\n }\n }\n}\n",
87
89
  "explainedSolution": {
@@ -120,6 +122,7 @@ export default {
120
122
  },
121
123
  "sourceIds": [
122
124
  "complex_arithmetic__complex_addition__Verification.qs",
125
+ "KatasLibrary.qs",
123
126
  "complex_arithmetic__Common.qs"
124
127
  ],
125
128
  "placeholderCode": "namespace Kata { \n open Microsoft.Quantum.Math;\n \n function ComplexAdd(x : Complex, y : Complex) : Complex { \n // Extract real and imaginary components of the inputs.\n let (a, b) = x!;\n let (c, d) = (y::Real, y::Imag);\n // Implement your solution here...\n return Complex(0., 0.);\n }\n}\n",
@@ -148,6 +151,7 @@ export default {
148
151
  },
149
152
  "sourceIds": [
150
153
  "complex_arithmetic__complex_multiplication__Verification.qs",
154
+ "KatasLibrary.qs",
151
155
  "complex_arithmetic__Common.qs"
152
156
  ],
153
157
  "placeholderCode": "namespace Kata {\n open Microsoft.Quantum.Math;\n \n function ComplexMult(x : Complex, y: Complex) : Complex {\n // Implement your solution here...\n return Complex(0., 0.);\n }\n}\n",
@@ -187,6 +191,7 @@ export default {
187
191
  },
188
192
  "sourceIds": [
189
193
  "complex_arithmetic__complex_conjugate__Verification.qs",
194
+ "KatasLibrary.qs",
190
195
  "complex_arithmetic__Common.qs"
191
196
  ],
192
197
  "placeholderCode": "namespace Kata { \n open Microsoft.Quantum.Math;\n \n function ComplexConjugate(x : Complex) : Complex { \n // Implement your solution here...\n return Complex(0., 0.);\n }\n}\n",
@@ -226,6 +231,7 @@ export default {
226
231
  },
227
232
  "sourceIds": [
228
233
  "complex_arithmetic__complex_division__Verification.qs",
234
+ "KatasLibrary.qs",
229
235
  "complex_arithmetic__Common.qs"
230
236
  ],
231
237
  "placeholderCode": "namespace Kata {\n open Microsoft.Quantum.Math; \n \n function ComplexDiv(x : Complex, y : Complex) : Complex {\n // Implement your solution here...\n return Complex(0., 0.);\n }\n}\n",
@@ -265,6 +271,7 @@ export default {
265
271
  },
266
272
  "sourceIds": [
267
273
  "complex_arithmetic__complex_modulus__Verification.qs",
274
+ "KatasLibrary.qs",
268
275
  "complex_arithmetic__Common.qs"
269
276
  ],
270
277
  "placeholderCode": "namespace Kata {\n open Microsoft.Quantum.Math;\n \n function ComplexModulus(x : Complex) : Double {\n // Implement your solution here...\n return 0.;\n }\n}\n",
@@ -304,6 +311,7 @@ export default {
304
311
  },
305
312
  "sourceIds": [
306
313
  "complex_arithmetic__complex_exponents__Verification.qs",
314
+ "KatasLibrary.qs",
307
315
  "complex_arithmetic__Common.qs"
308
316
  ],
309
317
  "placeholderCode": "namespace Kata {\n open Microsoft.Quantum.Math;\n \n function ComplexExponent(x : Complex) : Complex {\n // Implement your solution here...\n return Complex(0.0, 0.0);\n }\n}\n",
@@ -332,6 +340,7 @@ export default {
332
340
  },
333
341
  "sourceIds": [
334
342
  "complex_arithmetic__complex_powers_real__Verification.qs",
343
+ "KatasLibrary.qs",
335
344
  "complex_arithmetic__Common.qs"
336
345
  ],
337
346
  "placeholderCode": "namespace Kata {\n open Microsoft.Quantum.Math;\n\n function ComplexExpReal (r : Double, x : Complex) : Complex {\n // Implement your solution here...\n return Complex(0.0, 0.0);\n }\n}\n",
@@ -371,6 +380,7 @@ export default {
371
380
  },
372
381
  "sourceIds": [
373
382
  "complex_arithmetic__cartesian_to_polar__Verification.qs",
383
+ "KatasLibrary.qs",
374
384
  "complex_arithmetic__Common.qs"
375
385
  ],
376
386
  "placeholderCode": "namespace Kata {\n open Microsoft.Quantum.Math;\n \n function ComplexToComplexPolar(x : Complex) : ComplexPolar {\n // Implement your solution here...\n return ComplexPolar(0., 0.);\n }\n}\n",
@@ -399,6 +409,7 @@ export default {
399
409
  },
400
410
  "sourceIds": [
401
411
  "complex_arithmetic__polar_to_cartesian__Verification.qs",
412
+ "KatasLibrary.qs",
402
413
  "complex_arithmetic__Common.qs"
403
414
  ],
404
415
  "placeholderCode": "namespace Kata {\n open Microsoft.Quantum.Math;\n \n function ComplexPolarToComplex(x : ComplexPolar) : Complex {\n // Implement your solution here...\n return Complex(0., 0.);\n }\n}\n",
@@ -427,6 +438,7 @@ export default {
427
438
  },
428
439
  "sourceIds": [
429
440
  "complex_arithmetic__polar_multiplication__Verification.qs",
441
+ "KatasLibrary.qs",
430
442
  "complex_arithmetic__Common.qs"
431
443
  ],
432
444
  "placeholderCode": "namespace Kata {\n open Microsoft.Quantum.Math;\n \n function ComplexPolarMult(x : ComplexPolar, y: ComplexPolar) : ComplexPolar {\n // Implement your solution here...\n return ComplexPolar(0., 0.);\n }\n}\n",
@@ -506,6 +518,7 @@ export default {
506
518
  },
507
519
  "sourceIds": [
508
520
  "linear_algebra__addition__Verification.qs",
521
+ "KatasLibrary.qs",
509
522
  "linear_algebra__Common.qs"
510
523
  ],
511
524
  "placeholderCode": "namespace Kata {\n function Addition() : Double[][] {\n // Replace the return value with correct answer.\n return [[0., 0.],\n [0., 0.]];\n }\n}\n",
@@ -545,6 +558,7 @@ export default {
545
558
  },
546
559
  "sourceIds": [
547
560
  "linear_algebra__scalar_multiplication__Verification.qs",
561
+ "KatasLibrary.qs",
548
562
  "linear_algebra__Common.qs"
549
563
  ],
550
564
  "placeholderCode": "namespace Kata {\n function ScalarMultiplication() : Double[][] {\n // Replace the return value with correct answer.\n return [[0., 0.],\n [0., 0.]];\n }\n}\n",
@@ -584,6 +598,7 @@ export default {
584
598
  },
585
599
  "sourceIds": [
586
600
  "linear_algebra__multiplication__Verification.qs",
601
+ "KatasLibrary.qs",
587
602
  "linear_algebra__Common.qs"
588
603
  ],
589
604
  "placeholderCode": "namespace Kata {\n function Multiplication() : Double[][] {\n // Replace the return value with correct answer.\n return [[0., 0.],\n [0., 0.]];\n }\n}\n",
@@ -623,6 +638,7 @@ export default {
623
638
  },
624
639
  "sourceIds": [
625
640
  "linear_algebra__inverse__Verification.qs",
641
+ "KatasLibrary.qs",
626
642
  "linear_algebra__Common.qs"
627
643
  ],
628
644
  "placeholderCode": "namespace Kata {\n function Inverse() : Double[][] {\n // Replace the return value with correct answer.\n return [[0., 0.],\n [0., 0.]];\n }\n}\n",
@@ -662,6 +678,7 @@ export default {
662
678
  },
663
679
  "sourceIds": [
664
680
  "linear_algebra__transpose__Verification.qs",
681
+ "KatasLibrary.qs",
665
682
  "linear_algebra__Common.qs"
666
683
  ],
667
684
  "placeholderCode": "namespace Kata {\n function Transpose() : Double[][] {\n // Replace the return value with correct answer.\n return [[0., 0.],\n [0., 0.]];\n }\n}\n",
@@ -701,6 +718,7 @@ export default {
701
718
  },
702
719
  "sourceIds": [
703
720
  "linear_algebra__conjugate__Verification.qs",
721
+ "KatasLibrary.qs",
704
722
  "linear_algebra__Common.qs"
705
723
  ],
706
724
  "placeholderCode": "namespace Kata {\n open Microsoft.Quantum.Math;\n\n function Conjugate() : Complex[][] {\n // Replace the return value with correct answer.\n return [[Complex(0., 0.), Complex(0., 0.)],\n [Complex(0., 0.), Complex(0., 0.)]];\n }\n}\n",
@@ -740,6 +758,7 @@ export default {
740
758
  },
741
759
  "sourceIds": [
742
760
  "linear_algebra__adjoint__Verification.qs",
761
+ "KatasLibrary.qs",
743
762
  "linear_algebra__Common.qs"
744
763
  ],
745
764
  "placeholderCode": "namespace Kata {\n open Microsoft.Quantum.Math;\n\n function MatrixAdjoint() : Complex[][] {\n // Replace the return value with correct answer.\n return [[Complex(0., 0.), Complex(0., 0.)],\n [Complex(0., 0.), Complex(0., 0.)]];\n }\n}\n",
@@ -790,6 +809,7 @@ export default {
790
809
  },
791
810
  "sourceIds": [
792
811
  "linear_algebra__inner_product__Verification.qs",
812
+ "KatasLibrary.qs",
793
813
  "linear_algebra__Common.qs"
794
814
  ],
795
815
  "placeholderCode": "namespace Kata {\n open Microsoft.Quantum.Math;\n\n function InnerProduct() : Complex {\n // Replace the return value with correct answer.\n return Complex(0., 0.);\n }\n}\n",
@@ -818,6 +838,7 @@ export default {
818
838
  },
819
839
  "sourceIds": [
820
840
  "linear_algebra__normalized_vector__Verification.qs",
841
+ "KatasLibrary.qs",
821
842
  "linear_algebra__Common.qs"
822
843
  ],
823
844
  "placeholderCode": "namespace Kata {\n open Microsoft.Quantum.Math;\n\n function NormalizedVector() : Complex[][] {\n // Replace the return value with correct answer.\n return [[Complex(0., 0.)],\n [Complex(0., 0.)]];\n }\n}\n",
@@ -857,6 +878,7 @@ export default {
857
878
  },
858
879
  "sourceIds": [
859
880
  "linear_algebra__outer_product__Verification.qs",
881
+ "KatasLibrary.qs",
860
882
  "linear_algebra__Common.qs"
861
883
  ],
862
884
  "placeholderCode": "namespace Kata {\n open Microsoft.Quantum.Math;\n\n function OuterProduct() : Complex[][] {\n // Replace the return value with correct answer.\n return [[Complex(0., 0.), Complex(0., 0.)],\n [Complex(0., 0.), Complex(0., 0.)]];\n }\n}\n",
@@ -896,6 +918,7 @@ export default {
896
918
  },
897
919
  "sourceIds": [
898
920
  "linear_algebra__tensor_product__Verification.qs",
921
+ "KatasLibrary.qs",
899
922
  "linear_algebra__Common.qs"
900
923
  ],
901
924
  "placeholderCode": "namespace Kata {\n function TensorProduct() : Double[][] {\n // Replace the return value with correct answer.\n return [[0., 0., 0., 0.],\n [0., 0., 0., 0.],\n [0., 0., 0., 0.],\n [0., 0., 0., 0.]];\n }\n}\n",
@@ -3018,7 +3041,8 @@ export default {
3018
3041
  },
3019
3042
  "sourceIds": [
3020
3043
  "preparing_states__wstate_power_of_two__Verification.qs",
3021
- "KatasLibrary.qs"
3044
+ "KatasLibrary.qs",
3045
+ "preparing_states__Common.qs"
3022
3046
  ],
3023
3047
  "placeholderCode": "namespace Kata {\n operation WState_PowerOfTwo (qs : Qubit[]) : Unit {\n // Implement your solution here...\n\n }\n}\n",
3024
3048
  "explainedSolution": {
@@ -3055,7 +3079,8 @@ export default {
3055
3079
  },
3056
3080
  "sourceIds": [
3057
3081
  "preparing_states__wstate_arbitrary__Verification.qs",
3058
- "KatasLibrary.qs"
3082
+ "KatasLibrary.qs",
3083
+ "preparing_states__Common.qs"
3059
3084
  ],
3060
3085
  "placeholderCode": "namespace Kata {\n operation WState_Arbitrary (qs : Qubit[]) : Unit {\n // Implement your solution here...\n\n }\n}\n",
3061
3086
  "explainedSolution": {
@@ -3672,7 +3697,8 @@ export default {
3672
3697
  },
3673
3698
  "sourceIds": [
3674
3699
  "distinguishing_states__zero_one__Verification.qs",
3675
- "KatasLibrary.qs"
3700
+ "KatasLibrary.qs",
3701
+ "distinguishing_states__Common.qs"
3676
3702
  ],
3677
3703
  "placeholderCode": "namespace Kata {\n operation IsQubitOne (q : Qubit) : Bool {\n // Implement your solution here...\n\n return false;\n }\n}\n",
3678
3704
  "explainedSolution": {
@@ -3700,7 +3726,8 @@ export default {
3700
3726
  },
3701
3727
  "sourceIds": [
3702
3728
  "distinguishing_states__plus_minus__Verification.qs",
3703
- "KatasLibrary.qs"
3729
+ "KatasLibrary.qs",
3730
+ "distinguishing_states__Common.qs"
3704
3731
  ],
3705
3732
  "placeholderCode": "namespace Kata {\n operation IsQubitPlus(q : Qubit) : Bool {\n // Implement your solution here...\n\n return false;\n }\n}\n",
3706
3733
  "explainedSolution": {
@@ -3737,7 +3764,8 @@ export default {
3737
3764
  },
3738
3765
  "sourceIds": [
3739
3766
  "distinguishing_states__a_b__Verification.qs",
3740
- "KatasLibrary.qs"
3767
+ "KatasLibrary.qs",
3768
+ "distinguishing_states__Common.qs"
3741
3769
  ],
3742
3770
  "placeholderCode": "namespace Kata {\n operation IsQubitA(alpha : Double, q : Qubit) : Bool {\n // Implement your solution here...\n\n return false;\n }\n}\n",
3743
3771
  "explainedSolution": {
@@ -3765,7 +3793,8 @@ export default {
3765
3793
  },
3766
3794
  "sourceIds": [
3767
3795
  "distinguishing_states__zerozero_oneone__Verification.qs",
3768
- "KatasLibrary.qs"
3796
+ "KatasLibrary.qs",
3797
+ "distinguishing_states__Common.qs"
3769
3798
  ],
3770
3799
  "placeholderCode": "namespace Kata {\n operation ZeroZeroOrOneOne(qs : Qubit[]) : Int {\n // Implement your solution here...\n\n return 0;\n }\n}\n",
3771
3800
  "explainedSolution": {
@@ -3976,7 +4005,8 @@ export default {
3976
4005
  },
3977
4006
  "sourceIds": [
3978
4007
  "distinguishing_states__four_bell_states__Verification.qs",
3979
- "KatasLibrary.qs"
4008
+ "KatasLibrary.qs",
4009
+ "distinguishing_states__Common.qs"
3980
4010
  ],
3981
4011
  "placeholderCode": "namespace Kata {\n operation BellState(qs : Qubit[]) : Int {\n // Implement your solution here...\n\n return -1;\n }\n}\n",
3982
4012
  "explainedSolution": {
@@ -4102,7 +4132,8 @@ export default {
4102
4132
  },
4103
4133
  "sourceIds": [
4104
4134
  "distinguishing_states__zero_plus__Verification.qs",
4105
- "KatasLibrary.qs"
4135
+ "KatasLibrary.qs",
4136
+ "distinguishing_states__Common.qs"
4106
4137
  ],
4107
4138
  "placeholderCode": "namespace Kata {\n operation IsQubitZeroOrPlus (q : Qubit) : Bool {\n // Implement your solution here...\n return true;\n }\n}\n",
4108
4139
  "explainedSolution": {
@@ -4130,7 +4161,8 @@ export default {
4130
4161
  },
4131
4162
  "sourceIds": [
4132
4163
  "distinguishing_states__zero_plus_inc__Verification.qs",
4133
- "KatasLibrary.qs"
4164
+ "KatasLibrary.qs",
4165
+ "distinguishing_states__Common.qs"
4134
4166
  ],
4135
4167
  "placeholderCode": "namespace Kata {\n operation IsQubitZeroPlusOrInconclusive(q : Qubit) : Int {\n // Implement your solution here...\n return -2;\n }\n}\n",
4136
4168
  "explainedSolution": {
@@ -4158,7 +4190,8 @@ export default {
4158
4190
  },
4159
4191
  "sourceIds": [
4160
4192
  "distinguishing_states__peres_wooters_game__Verification.qs",
4161
- "KatasLibrary.qs"
4193
+ "KatasLibrary.qs",
4194
+ "distinguishing_states__Common.qs"
4162
4195
  ],
4163
4196
  "placeholderCode": "namespace Kata {\n operation IsQubitNotInABC(q : Qubit) : Int {\n // Implement your solution here...\n return -1;\n }\n}",
4164
4197
  "explainedSolution": {
@@ -4867,7 +4900,9 @@ export default {
4867
4900
  "content": "**Input:** An integer $N$.\n\n**Output** : A `Bool` array of length N, where each element is chosen at random as `true` or `false` with $50\\%$ probability.\n\n> This will be used by both Alice and Bob to choose either the sequence of bits to send or the sequence of bases \n> to use when encoding/measuring the bits.\n"
4868
4901
  },
4869
4902
  "sourceIds": [
4870
- "key_distribution__random_array__Verification.qs"
4903
+ "key_distribution__random_array__Verification.qs",
4904
+ "KatasLibrary.qs",
4905
+ "key_distribution__Common.qs"
4871
4906
  ],
4872
4907
  "placeholderCode": "namespace Kata {\n operation RandomArray(N : Int) : Bool[] {\n // Create a mutable array variable for storing the return value.\n mutable s = [];\n\n // Implement your solution here...\n\n return s;\n }\n}\n",
4873
4908
  "explainedSolution": {
@@ -4895,6 +4930,7 @@ export default {
4895
4930
  },
4896
4931
  "sourceIds": [
4897
4932
  "key_distribution__prepare_qubits__Verification.qs",
4933
+ "KatasLibrary.qs",
4898
4934
  "key_distribution__Common.qs"
4899
4935
  ],
4900
4936
  "placeholderCode": "namespace Kata {\n operation PrepareQubits(qs : Qubit[], bases : Bool[], bits : Bool[]) : Unit {\n // Implement your solution here...\n\n }\n}\n",
@@ -4923,6 +4959,7 @@ export default {
4923
4959
  },
4924
4960
  "sourceIds": [
4925
4961
  "key_distribution__measure_qubits__Verification.qs",
4962
+ "KatasLibrary.qs",
4926
4963
  "key_distribution__Common.qs"
4927
4964
  ],
4928
4965
  "placeholderCode": "namespace Kata {\n operation MeasureQubits(qs : Qubit[], bases : Bool[]) : Bool[] {\n // Implement your solution here...\n return [];\n }\n}\n",
@@ -4951,6 +4988,7 @@ export default {
4951
4988
  },
4952
4989
  "sourceIds": [
4953
4990
  "key_distribution__shared_key__Verification.qs",
4991
+ "KatasLibrary.qs",
4954
4992
  "key_distribution__Common.qs"
4955
4993
  ],
4956
4994
  "placeholderCode": "namespace Kata {\n function GenerateSharedKey(basesAlice : Bool[], basesBob : Bool[], bits : Bool[]) : Bool[] {\n // Create a mutable array variable for storing the key.\n mutable key = [];\n \n // Implement your solution here...\n\n return key;\n }\n}\n",
@@ -5530,6 +5568,7 @@ export default {
5530
5568
  },
5531
5569
  "sourceIds": [
5532
5570
  "superdense_coding__alice_sends_message__Verification.qs",
5571
+ "KatasLibrary.qs",
5533
5572
  "superdense_coding__Common.qs"
5534
5573
  ],
5535
5574
  "placeholderCode": "namespace Kata {\n operation EncodeMessageInQubit(qAlice : Qubit, message : (Bool, Bool)) : Unit {\n // Get the bits from the message\n let (bit1, bit2) = message;\n\n // Implement your solution here...\n\n }\n}\n",
@@ -5558,6 +5597,7 @@ export default {
5558
5597
  },
5559
5598
  "sourceIds": [
5560
5599
  "superdense_coding__bob_decodes_message__Verification.qs",
5600
+ "KatasLibrary.qs",
5561
5601
  "superdense_coding__Common.qs"
5562
5602
  ],
5563
5603
  "placeholderCode": "namespace Kata {\n operation DecodeMessageFromQubits(qAlice : Qubit, qBob : Qubit) : (Bool, Bool) {\n // Implement your solution here...\n\n return (false, false);\n }\n}\n",
@@ -5586,6 +5626,7 @@ export default {
5586
5626
  },
5587
5627
  "sourceIds": [
5588
5628
  "superdense_coding__protocol_e2e__Verification.qs",
5629
+ "KatasLibrary.qs",
5589
5630
  "superdense_coding__Common.qs"
5590
5631
  ],
5591
5632
  "placeholderCode": "namespace Kata {\n operation SuperdenseCodingProtocol(message : (Bool, Bool)) : (Bool, Bool) {\n // Implement your solution here...\n\n return (false, false);\n }\n\n // You might find these helper operations from earlier tasks useful.\n operation CreateEntangledPair(qAlice : Qubit, qBob : Qubit) : Unit is Adj {\n H(qAlice);\n CNOT(qAlice, qBob);\n }\n\n operation EncodeMessageInQubit(qAlice : Qubit, message : (Bool, Bool)) : Unit {\n let (bit1, bit2) = message;\n\n if bit2 {\n X(qAlice);\n }\n\n if bit1 {\n Z(qAlice);\n }\n }\n\n operation DecodeMessageFromQubits(qAlice : Qubit, qBob : Qubit) : (Bool, Bool) {\n CNOT(qAlice, qBob);\n H(qAlice);\n return (MResetZ(qAlice) == One, MResetZ(qBob) == One);\n }\n}\n",
@@ -6533,7 +6574,7 @@ export default {
6533
6574
  "items": [
6534
6575
  {
6535
6576
  "type": "text-content",
6536
- "content": "\nThis kata introduces you to Deutsch algorithm - the single-qubit variant of Deutsch–Jozsa algorithm, one of the most famous educational algorithms in quantum computing.\n\n**This kata covers the following topics:**\n\n- The problem solved by Deutsch algorithm and the classical solution to it\n- Single-qubit phase oracles (for a more detailed introduction to phase oracles, see Oracles kata)\n- Deutsch algorithm\n- Implementing oracles and end-to-end Deutsch algorithm in Q#\n\n**What you should know to start working on this kata:**\n\n- Basic single-qubit gates\n- Quantum measurements"
6577
+ "content": "\nThis kata introduces you to Deutsch algorithm - the single-qubit variant of Deutsch–Jozsa algorithm, one of the most famous educational algorithms in quantum computing.\n\n**This kata covers the following topics:**\n\n- The problem solved by Deutsch algorithm and the classical solution to it\n- Single-qubit phase oracles (for a more detailed introduction to phase oracles, see Oracles kata)\n- Deutsch algorithm\n- Implementing oracles and end-to-end Deutsch algorithm in Q#\n\n**What you should know to start working on this kata:**\n\n- Basic knowledge of single-qubit gates\n- Basic knowledge of quantum measurements"
6537
6578
  }
6538
6579
  ]
6539
6580
  },
@@ -6544,7 +6585,7 @@ export default {
6544
6585
  "items": [
6545
6586
  {
6546
6587
  "type": "text-content",
6547
- "content": "\nYou are given a classical function that takes one bit as an input and returns one bit: $f(x): \\{0, 1\\} \\to \\{0, 1\\}$. You are guaranteed that the function $f$ is\n\n- either *constant* (returns the same value for all inputs) \n- or *variable* (returns different values for different inputs). \n\nThe task is to figure out whether the function is constant or variable. In other words, you need to decide whether $f(0) = f(1)$ (which is the same as the function being constant for single-bit functions).\n\n**Examples**\n\n- $f(x) \\equiv 0$ or $f(x) \\equiv 1$ are constant functions (and they are actually the only constant functions in existence).\n- $f(x) = x$ and $f(x) = 1 - x$ are the only variable functions (and they are the only variable functions for single-bit functions).\n\nIf we solve this problem classically, how many calls to the given function will we need? \n\nThe first function call will give us no information - regardless of whether it returns $0$ or $1$, the function could still be constant or variable.\nWe'll need to call the function a second time to evaluate its return values for both possible inputs to be able to check whether these values are equal.\nThis means that the classical solution requires **2** function calls.\n\nWhat about the quantum scenario?"
6588
+ "content": "\nYou are given a classical function that takes one bit as an input and returns one bit: $f(x): \\{0, 1\\} \\to \\{0, 1\\}$. You are guaranteed that the function $f$ is\n\n- either *constant* (returns the same value for all inputs) \n- or *variable* (returns different values for different inputs). \n\nThe task is to figure out whether the function is constant or variable. In other words, you need to decide whether $f(0) = f(1)$ (which is the same as the function being constant for single-bit functions).\n\n**Examples**\n\n- $f(x) \\equiv 0$ or $f(x) \\equiv 1$ are constant functions (and they are actually the only constant functions in existence).\n- $f(x) = x$ and $f(x) = 1 - x$ are the only variable functions (and they are the only variable functions for single-bit functions).\n\nIf you solve this problem classically, how many calls to the given function will you need? \n\nThe first function call will give you no information - regardless of whether it returns $0$ or $1$, the function could still be constant or variable.\nYou'll need to call the function a second time to evaluate its return values for both possible inputs to be able to check whether these values are equal.\nThis means that the classical solution requires **2** function calls.\n\nWhat about the quantum scenario?"
6548
6589
  }
6549
6590
  ]
6550
6591
  },
@@ -6555,7 +6596,7 @@ export default {
6555
6596
  "items": [
6556
6597
  {
6557
6598
  "type": "text-content",
6558
- "content": "\nIn the quantum scenario, the classical function we're working with is implemented as a quantum oracle - a \"black box\" operation used as input to another algorithm. This operation is implemented in a way which allows to perform calculations not only on individual inputs, but also on superpositions of inputs. \n\nThe oracle has to act on quantum states instead of classical values. \nTo enable this, integer input $x$ is represented as a qubit state $\\ket{x}$.\n\nThe type of oracles used in this tutorial are called *phase oracles*. A phase oracle $U_f$ encodes the value of the classical function $f$ it implements in the phase of the qubit state as follows:\n\n$$U_f \\ket{x} = (-1)^{f(x)} \\ket{x}$$\n\nIn our case $f$ can return only two values, 0 or 1, which result in no phase change or multiplication by a relative phase $-1$, respectively.\n\nThe effect of such an oracle on any single basis state is not particularly interesting: it just adds a global phase which is not something you can observe. However, if you apply this oracle to a *superposition* of basis states, its effect becomes noticeable. \nRemember that quantum operations are linear: if you define the effect of an operation on the basis states, you'll be able to deduce its effect on superposition states (which are just linear combinations of the basis states) using its linearity.\n\nThere are only four single-bit functions, so we can see how to implement them all as phase oracles in Q#.\n\n1. $f(x) \\equiv 0$\n\nThis is the easiest function to implement: if $f(x) \\equiv 0$, \n\n$$U_f \\ket{x} \\equiv (-1)^0 \\ket{x} = \\ket{x}$$\n\nThis means that $U_f$ is an identity - a transformation which does absolutely nothing! \n\n2. $f(x) \\equiv 1$\n\nThe second constant function is slightly trickier: if $f(x) \\equiv 1$\n\n$$U_f \\ket{x} \\equiv (-1)^1 \\ket{x} = - \\ket{x}$$\n\nNow $U_f$ is a negative identity, i.e., a transformation which applies a global phase of $-1$ to the state. \nA lot of algorithms just ignore the global phase accumulated in them, since it is not observable. \nHowever, if we want to be really meticulous, we can use the $R$ gate which performs a given rotation around the given axis. \nWhen called with `PauliI` axis, this operation applies a global phase to the given qubit.\n\n3. $f(x) = x$\n\n$$U_f \\ket{x} = (-1)^{f(x)} \\ket{x} = (-1)^{x} \\ket{x}$$\n\nThis means that we need to do nothing if the qubit is in the $\\ket{0}$ state, and apply a phase of $-1$ if it is in the $\\ket{1}$ state. This is exactly the effect of the $Z$ gate!\n\nIn this demo we will see how to implement the first three one-bit functions as quantum oracles, and their effect on a qubit state.\nAfter that, you'll try to implement the oracle for the fourth function on your own!"
6599
+ "content": "\nIn the quantum scenario, the classical function you're working with is implemented as a quantum oracle - a \"black box\" operation used as input to another algorithm. This operation is implemented in a way which allows to perform calculations not only on individual inputs, but also on superpositions of inputs. \n\nThe oracle has to act on quantum states instead of classical values. \nTo enable this, integer input $x$ is represented as a qubit state $\\ket{x}$.\n\nThe type of oracles used in this tutorial are called *phase oracles*. A phase oracle $U_f$ encodes the value of the classical function $f$ it implements in the phase of the qubit state as follows:\n\n$$U_f \\ket{x} = (-1)^{f(x)} \\ket{x}$$\n\nIn our case $f$ can return only two values, 0 or 1, which result in no phase change or multiplication by a relative phase $-1$, respectively.\n\nThe effect of such an oracle on any single basis state isn't particularly interesting: it just adds a global phase which isn't something you can observe. However, if you apply this oracle to a *superposition* of basis states, its effect becomes noticeable. \nRemember that quantum operations are linear: if you define the effect of an operation on the basis states, you'll be able to deduce its effect on superposition states (which are just linear combinations of the basis states) using its linearity.\n\nThere are only four single-bit functions, so you can see how to implement them all as phase oracles in Q#.\n\n1. $f(x) \\equiv 0$\n\nThis is the easiest function to implement: if $f(x) \\equiv 0$, \n\n$$U_f \\ket{x} \\equiv (-1)^0 \\ket{x} = \\ket{x}$$\n\nThis means that $U_f$ is an identity - a transformation which does absolutely nothing! \n\n2. $f(x) \\equiv 1$\n\nThe second constant function is slightly trickier: if $f(x) \\equiv 1$\n\n$$U_f \\ket{x} \\equiv (-1)^1 \\ket{x} = - \\ket{x}$$\n\nNow $U_f$ is a negative identity, that is, a transformation which applies a global phase of $-1$ to the state. \nA lot of algorithms just ignore the global phase accumulated in them, since it isn't observable. \nHowever, if you want to be really meticulous, you can use the $R$ gate which performs a given rotation around the given axis. \nWhen called with `PauliI` axis, this operation applies a global phase to the given qubit.\n\n3. $f(x) = x$\n\n$$U_f \\ket{x} = (-1)^{f(x)} \\ket{x} = (-1)^{x} \\ket{x}$$\n\nThis means that you don't need to do anything if the qubit is in the $\\ket{0}$ state, and apply a phase of $-1$ if it is in the $\\ket{1}$ state. This is exactly the effect of the $Z$ gate!\n\nIn the following demo, you'll see how to implement the first three one-bit functions as quantum oracles, and their effect on a qubit state.\nAfter that, you'll try to implement the oracle for the fourth function on your own!"
6559
6600
  },
6560
6601
  {
6561
6602
  "type": "example",
@@ -6570,7 +6611,7 @@ export default {
6570
6611
  "title": "Oracle for f(x) = 1 - x",
6571
6612
  "description": {
6572
6613
  "type": "text-content",
6573
- "content": "**Input:** A qubit in an arbitrary state $\\ket{\\psi} = \\alpha\\ket{0} + \\beta\\ket{1}$.\n\n**Goal:** Apply the phase oracle $U_f$ for $f(x) = 1 - x$ to the qubit.\nThat is, apply a relative phase $(-1)^{f(x)}$ to each basis state $\\ket{x}$.\n\n<details>\n<summary><strong>Need a hint?</strong></summary>\nWe can represent the effect of the oracle as\n\n$$U_f \\ket{x} = (-1)^{1-x} \\ket{x} = (-1) \\cdot (-1)^x \\ket{x}$$\n\nCan you get this effect by combining some of the previous oracles implementations?\n</details>\n"
6614
+ "content": "**Input:** A qubit in an arbitrary state $\\ket{\\psi} = \\alpha\\ket{0} + \\beta\\ket{1}$.\n\n**Goal:** Apply the phase oracle $U_f$ for $f(x) = 1 - x$ to the qubit.\nThat is, apply a relative phase $(-1)^{f(x)}$ to each basis state $\\ket{x}$.\n\n<details>\n<summary><strong>Need a hint?</strong></summary>\nYou can represent the effect of the oracle as\n\n$$U_f \\ket{x} = (-1)^{1-x} \\ket{x} = (-1) \\cdot (-1)^x \\ket{x}$$\n\nCan you get this effect by combining some of the previous oracles implementations?\n</details>\n"
6574
6615
  },
6575
6616
  "sourceIds": [
6576
6617
  "deutsch_algo__one_minus_x_oracle__Verification.qs",
@@ -6582,7 +6623,7 @@ export default {
6582
6623
  "items": [
6583
6624
  {
6584
6625
  "type": "text-content",
6585
- "content": "\nWe can represent the effect of the oracle as\n\n$$U_f \\ket{x} = (-1)^{1-x} \\ket{x} = (-1) \\cdot (-1)^x \\ket{x}$$\n\nThis effect can be achieved as a combination of two oracles we've seen earlier, for functions $f(x) = 1$ and $f(x) = x$, applied consecutively."
6626
+ "content": "\nYou can represent the effect of the oracle as\n\n$$U_f \\ket{x} = (-1)^{1-x} \\ket{x} = (-1) \\cdot (-1)^x \\ket{x}$$\n\nThis effect can be achieved as a combination of two oracles you've seen earlier, for functions $f(x) = 1$ and $f(x) = x$, applied consecutively."
6586
6627
  },
6587
6628
  {
6588
6629
  "type": "solution",
@@ -6599,7 +6640,7 @@ export default {
6599
6640
  "items": [
6600
6641
  {
6601
6642
  "type": "text-content",
6602
- "content": "\nNow let's return to the problem of figuring out whether the given function is constant or variable for single-bit functions.\nWhat can we do if we are given a quantum oracle $U_f$ implementing the function $f(x)$?\n\nThere are two possible inputs to the function, $\\ket{0}$ and $\\ket{1}$. Let's see what happens if we apply the oracle to their superposition:\n\n$$U_f \\left( \\frac{1}{\\sqrt2} \\big( \\ket{0} + \\ket{1} \\big) \\right) \n= \\frac{1}{\\sqrt2} \\big( U_f \\ket{0} + U_f \\ket{1} \\big) \n= \\frac{1}{\\sqrt2} \\big( (-1)^{f(0)} \\ket{0} + (-1)^{f(1)} \\ket{1} \\big)$$.\n\n- If $f(0) = f(1)$, the relative phases of the two basis states are the same, and the resulting state is $\\ket{+} = \\frac{1}{\\sqrt2} \\big( \\ket{0} + \\ket{1} \\big)$ (up to a global phase). \n- If $f(0) \\neq f(1)$, the relative phases of the two basis states differ by a factor of $-1$, and the resulting state is $\\ket{-} = \\frac{1}{\\sqrt2} \\big( \\ket{0} - \\ket{1} \\big)$ (up to a global phase). \n\nNow, the states $\\ket{+}$ and $\\ket{-}$ can be distinguished using measurement: if you apply the H gate to each of them, you'll get $H\\ket{+} = \\ket{0}$ if $f(0) = f(1)$, or $H\\ket{-} = \\ket{1}$ if $f(0) \\neq f(1)$. This means that one oracle call does not let you calculate both $f(0)$ and $f(1)$, but it allows you to figure out whether $f(0) = f(1)$!\n\nOverll, the algorithm is very straightforward:\n\n1. Start with a qubit in the $\\ket{0}$ state.\n2. Apply the $H$ gate to the qubit.\n3. Apply the oracle.\n4. Apply the $H$ gate to the qubit again.\n5. Measure the qubit: if it is in the $\\ket{0}$ state, the function is constant, otherwise it is variable.\n\nNote that this algorithm requires only **1** oracle call, and always produces the correct result (is deterministic)."
6643
+ "content": "\nNow let's return to the problem of figuring out whether the given function is constant or variable for single-bit functions.\nWhat can we do if we are given a quantum oracle $U_f$ implementing the function $f(x)$?\n\nThere are two possible inputs to the function, $\\ket{0}$ and $\\ket{1}$. Let's see what happens if you apply the oracle to their superposition:\n\n$$U_f \\left( \\frac{1}{\\sqrt2} \\big( \\ket{0} + \\ket{1} \\big) \\right) \n= \\frac{1}{\\sqrt2} \\big( U_f \\ket{0} + U_f \\ket{1} \\big) \n= \\frac{1}{\\sqrt2} \\big( (-1)^{f(0)} \\ket{0} + (-1)^{f(1)} \\ket{1} \\big)$$.\n\n- If $f(0) = f(1)$, the relative phases of the two basis states are the same, and the resulting state is $\\ket{+} = \\frac{1}{\\sqrt2} \\big( \\ket{0} + \\ket{1} \\big)$ (up to a global phase). \n- If $f(0) \\neq f(1)$, the relative phases of the two basis states differ by a factor of $-1$, and the resulting state is $\\ket{-} = \\frac{1}{\\sqrt2} \\big( \\ket{0} - \\ket{1} \\big)$ (up to a global phase). \n\nNow, the states $\\ket{+}$ and $\\ket{-}$ can be distinguished using measurement: if you apply the H gate to each of them, you'll get $H\\ket{+} = \\ket{0}$ if $f(0) = f(1)$, or $H\\ket{-} = \\ket{1}$ if $f(0) \\neq f(1)$. This means that one oracle call doesn't let you calculate both $f(0)$ and $f(1)$, but it allows you to figure out whether $f(0) = f(1)$!\n\nOverall, the algorithm is very straightforward:\n\n1. Start with a qubit in the $\\ket{0}$ state.\n2. Apply the $H$ gate to the qubit.\n3. Apply the oracle.\n4. Apply the $H$ gate to the qubit again.\n5. Measure the qubit: if it's in the $\\ket{0}$ state, the function is constant, otherwise it's variable.\n\nNote that this algorithm requires only **1** oracle call, and always produces the correct result (the algorithm is deterministic)."
6603
6644
  }
6604
6645
  ]
6605
6646
  },
@@ -6610,7 +6651,7 @@ export default {
6610
6651
  "items": [
6611
6652
  {
6612
6653
  "type": "text-content",
6613
- "content": "\nWe can follow the steps of the algorithm for the constant and the balanced scenarios using a neat visualization. Since Deutsch algorithm deals only with states with real amplitudes, we can map all states on the unit circle, and follow the state evolution through the steps.\n\n1. Start with a qubit in the $\\ket{0}$ state and apply the $H$ gate to the qubit.\n <br/>\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<svg width=\"660\" height=\"334\" fill=\"none\" version=\"1.1\" viewBox=\"0 0 660 334\" xmlns=\"http://www.w3.org/2000/svg\"><g clip-path=\"url(#clip0_4_498)\"><g clip-rule=\"evenodd\" fill-rule=\"evenodd\"><path d=\"m7.1 146c0-76.8 62.3-139 139-139 76.8 0 139 62.3 139 139 0 76.8-62.3 139-139 139-76.8 0-139-62.3-139-139z\" stroke=\"#747474\" stroke-miterlimit=\"8\" stroke-width=\"1.38\"/><g fill=\"#fff\" stroke-miterlimit=\"8\" stroke-width=\"1.38\"><path d=\"m279 147c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9-2.69 5.9-6 5.9-6-2.64-6-5.9z\" stroke=\"#0070C0\"/><g stroke=\"#000\"><path d=\"m140 7.4c0-3.26 2.64-5.9 5.9-5.9s5.9 2.64 5.9 5.9-2.64 5.9-5.9 5.9-5.9-2.64-5.9-5.9z\"/><path d=\"m1.3 147c0-3.26 2.64-5.9 5.9-5.9 3.26 0 5.9 2.64 5.9 5.9s-2.64 5.9-5.9 5.9c-3.26 0-5.9-2.64-5.9-5.9z\"/><path d=\"m140 286c0-3.26 2.64-5.9 5.9-5.9s5.9 2.64 5.9 5.9-2.64 5.9-5.9 5.9-5.9-2.64-5.9-5.9z\"/></g></g><path d=\"m240 50.1c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9c0 3.26-2.69 5.9-6 5.9s-6-2.64-6-5.9z\" fill=\"#0070C0\"/><g fill=\"#fff\" stroke=\"#000\" stroke-miterlimit=\"8\" stroke-width=\"1.38\"><path d=\"m240 243c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9-2.69 5.9-6 5.9-6-2.64-6-5.9z\"/><path d=\"m40.3 50.2c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9c0 3.26-2.69 5.9-6 5.9s-6-2.64-6-5.9z\"/><path d=\"m40.3 243c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9-2.69 5.9-6 5.9-6-2.64-6-5.9z\"/></g><path d=\"m358 146c0-76.8 62.2-139 139-139s139 62.3 139 139c0 76.8-62.2 139-139 139s-139-62.3-139-139z\" stroke=\"#747474\" stroke-miterlimit=\"8\" stroke-width=\"1.38\"/><g fill=\"#fff\" stroke-miterlimit=\"8\" stroke-width=\"1.38\"><path d=\"m630 147c0-3.26 2.64-5.9 5.9-5.9s5.9 2.64 5.9 5.9-2.64 5.9-5.9 5.9-5.9-2.64-5.9-5.9z\" stroke=\"#0070C0\"/><g stroke=\"#000\"><path d=\"m491 7.4c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9-2.69 5.9-6 5.9-6-2.64-6-5.9z\"/><path d=\"m352 147c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9-2.69 5.9-6 5.9-6-2.64-6-5.9z\"/><path d=\"m491 286c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9-2.69 5.9-6 5.9-6-2.64-6-5.9z\"/></g></g><path d=\"m591 50.1c0-3.26 2.64-5.9 5.9-5.9s5.9 2.64 5.9 5.9c0 3.26-2.64 5.9-5.9 5.9s-5.9-2.64-5.9-5.9z\" fill=\"#0070C0\"/><g fill=\"#fff\" stroke=\"#000\" stroke-miterlimit=\"8\" stroke-width=\"1.38\"><path d=\"m591 243c0-3.26 2.64-5.9 5.9-5.9s5.9 2.64 5.9 5.9-2.64 5.9-5.9 5.9-5.9-2.64-5.9-5.9z\"/><path d=\"m391 50.2c0-3.26 2.64-5.9 5.9-5.9s5.9 2.64 5.9 5.9c0 3.26-2.64 5.9-5.9 5.9s-5.9-2.64-5.9-5.9z\"/><path d=\"m391 243c0-3.26 2.64-5.9 5.9-5.9s5.9 2.64 5.9 5.9-2.64 5.9-5.9 5.9-5.9-2.64-5.9-5.9z\"/></g></g><path d=\"m120 319c-0.941 0.455-2.17 0.683-3.68 0.683-1.98 0-3.53-0.581-4.66-1.74s-1.7-2.71-1.7-4.64c0-2.06 0.635-3.73 1.9-5.01 1.28-1.28 2.93-1.92 4.96-1.92 1.26 0 2.32 0.159 3.18 0.476v2.79c-0.863-0.515-1.84-0.773-2.95-0.773-1.21 0-2.19 0.381-2.93 1.14-0.743 0.761-1.11 1.79-1.11 3.09 0 1.25 0.35 2.24 1.05 2.98 0.701 0.737 1.64 1.1 2.83 1.1 1.13 0 2.17-0.276 3.11-0.827v2.65zm6.35 0.683c-1.53 0-2.74-0.429-3.62-1.28-0.875-0.863-1.31-2.03-1.31-3.5 0-1.52 0.455-2.71 1.37-3.57 0.91-0.862 2.14-1.29 3.69-1.29 1.53 0 2.73 0.432 3.59 1.29 0.869 0.857 1.3 1.99 1.3 3.4 0 1.53-0.449 2.73-1.35 3.62-0.892 0.886-2.12 1.33-3.67 1.33zm0.071-7.48c-0.67 0-1.19 0.23-1.56 0.691-0.371 0.462-0.557 1.11-0.557 1.96 0 1.77 0.713 2.65 2.14 2.65 1.36 0 2.04-0.907 2.04-2.72 0-1.72-0.686-2.58-2.06-2.58zm15.7 7.25h-2.83v-5.11c0-1.43-0.509-2.14-1.53-2.14-0.491 0-0.896 0.188-1.21 0.566-0.318 0.377-0.476 0.856-0.476 1.44v5.25h-2.84v-9.2h2.84v1.46h0.036c0.676-1.12 1.66-1.68 2.96-1.68 2.04 0 3.05 1.26 3.05 3.79v5.63zm1.65-0.243v-2.3c0.468 0.282 0.932 0.492 1.39 0.629 0.467 0.138 0.907 0.207 1.32 0.207 0.503 0 0.898-0.069 1.19-0.207 0.293-0.137 0.44-0.347 0.44-0.629 0-0.179-0.066-0.329-0.198-0.449s-0.302-0.224-0.512-0.314c-0.204-0.09-0.428-0.171-0.674-0.243-0.245-0.072-0.482-0.153-0.71-0.242-0.365-0.138-0.688-0.285-0.97-0.441-0.275-0.161-0.509-0.347-0.701-0.557-0.185-0.209-0.329-0.452-0.431-0.727-0.096-0.276-0.144-0.602-0.144-0.98 0-0.515 0.111-0.958 0.333-1.33 0.227-0.372 0.527-0.674 0.898-0.908 0.378-0.239 0.806-0.413 1.28-0.521 0.485-0.114 0.988-0.171 1.51-0.171 0.408 0 0.821 0.033 1.24 0.099 0.419 0.06 0.833 0.15 1.24 0.27v2.19c-0.359-0.21-0.746-0.365-1.16-0.467-0.407-0.108-0.809-0.162-1.2-0.162-0.186 0-0.362 0.018-0.53 0.054-0.162 0.03-0.305 0.078-0.431 0.144-0.126 0.06-0.225 0.14-0.297 0.242-0.072 0.096-0.107 0.207-0.107 0.333 0 0.167 0.053 0.311 0.161 0.431s0.249 0.225 0.422 0.314c0.174 0.084 0.366 0.162 0.575 0.234 0.216 0.066 0.429 0.135 0.638 0.207 0.378 0.131 0.719 0.275 1.02 0.431 0.305 0.156 0.566 0.338 0.781 0.548 0.222 0.21 0.39 0.455 0.503 0.737 0.12 0.281 0.18 0.617 0.18 1.01 0 0.545-0.12 1.01-0.359 1.4-0.234 0.384-0.548 0.698-0.944 0.944-0.389 0.239-0.841 0.413-1.36 0.521-0.509 0.114-1.04 0.171-1.59 0.171-1.01 0-1.95-0.156-2.81-0.468zm14.3 0.135c-0.42 0.222-1.05 0.333-1.9 0.333-2 0-3-1.04-3-3.12v-4.21h-1.49v-2.09h1.49v-1.99l2.83-0.808v2.79h2.07v2.09h-2.07v3.72c0 0.958 0.38 1.44 1.14 1.44 0.3 0 0.608-0.086 0.926-0.26v2.1zm9.26 0.108h-2.69v-1.32h-0.036c-0.617 1.03-1.53 1.55-2.74 1.55-0.893 0-1.6-0.252-2.11-0.755-0.51-0.509-0.764-1.19-0.764-2.03 0-1.78 1.06-2.82 3.17-3.09l2.5-0.333c0-1.01-0.545-1.51-1.64-1.51-1.1 0-2.14 0.326-3.13 0.979v-2.14c0.396-0.204 0.935-0.383 1.62-0.539 0.688-0.156 1.31-0.234 1.88-0.234 2.62 0 3.94 1.31 3.94 3.93v5.5zm-2.67-3.74v-0.62l-1.67 0.215c-0.922 0.12-1.38 0.536-1.38 1.25 0 0.323 0.111 0.59 0.333 0.8 0.227 0.203 0.533 0.305 0.916 0.305 0.533 0 0.968-0.183 1.3-0.548 0.335-0.371 0.503-0.838 0.503-1.4zm13.8 3.74h-2.83v-5.11c0-1.43-0.509-2.14-1.53-2.14-0.492 0-0.896 0.188-1.21 0.566-0.318 0.377-0.476 0.856-0.476 1.44v5.25h-2.84v-9.2h2.84v1.46h0.036c0.676-1.12 1.66-1.68 2.96-1.68 2.04 0 3.06 1.26 3.06 3.79v5.63zm7.82-0.108c-0.419 0.222-1.05 0.333-1.9 0.333-2 0-3-1.04-3-3.12v-4.21h-1.49v-2.09h1.49v-1.99l2.83-0.808v2.79h2.07v2.09h-2.07v3.72c0 0.958 0.38 1.44 1.14 1.44 0.3 0 0.608-0.086 0.925-0.26v2.1z\" fill=\"#000\"/><path d=\"m476 307-4.44 12.9h-3.29l-4.38-12.9h3.13l2.69 8.97c0.143 0.485 0.23 0.913 0.26 1.28h0.054c0.042-0.402 0.135-0.842 0.279-1.32l2.67-8.93h3.04zm7.54 12.9h-2.69v-1.32h-0.036c-0.617 1.03-1.53 1.55-2.74 1.55-0.892 0-1.6-0.252-2.11-0.755-0.509-0.509-0.764-1.19-0.764-2.03 0-1.78 1.06-2.82 3.17-3.09l2.5-0.333c0-1.01-0.545-1.51-1.64-1.51-1.1 0-2.14 0.326-3.13 0.979v-2.14c0.395-0.204 0.934-0.383 1.62-0.539 0.689-0.156 1.31-0.234 1.88-0.234 2.62 0 3.94 1.31 3.94 3.93v5.5zm-2.67-3.74v-0.62l-1.67 0.215c-0.922 0.12-1.38 0.536-1.38 1.25 0 0.323 0.11 0.59 0.332 0.8 0.228 0.203 0.533 0.305 0.916 0.305 0.533 0 0.968-0.183 1.3-0.548 0.336-0.371 0.503-0.838 0.503-1.4zm10.9-2.9c-0.341-0.186-0.739-0.279-1.2-0.279-0.617 0-1.1 0.228-1.45 0.683-0.348 0.449-0.521 1.06-0.521 1.84v4.39h-2.84v-9.2h2.84v1.71h0.036c0.449-1.25 1.26-1.87 2.42-1.87 0.3 0 0.534 0.036 0.701 0.108v2.62zm2.84-4.02c-0.479 0-0.871-0.141-1.18-0.423-0.305-0.287-0.458-0.638-0.458-1.05 0-0.425 0.153-0.773 0.458-1.04 0.306-0.27 0.698-0.404 1.18-0.404 0.485 0 0.878 0.134 1.18 0.404 0.306 0.269 0.458 0.617 0.458 1.04 0 0.431-0.152 0.785-0.458 1.06-0.299 0.276-0.692 0.414-1.18 0.414zm1.4 10.7h-2.84v-9.2h2.84v9.2zm10 0h-2.69v-1.32h-0.036c-0.617 1.03-1.53 1.55-2.74 1.55-0.893 0-1.6-0.252-2.11-0.755-0.51-0.509-0.764-1.19-0.764-2.03 0-1.78 1.06-2.82 3.17-3.09l2.5-0.333c0-1.01-0.545-1.51-1.64-1.51-1.1 0-2.14 0.326-3.13 0.979v-2.14c0.396-0.204 0.935-0.383 1.62-0.539 0.688-0.156 1.31-0.234 1.88-0.234 2.62 0 3.94 1.31 3.94 3.93v5.5zm-2.67-3.74v-0.62l-1.67 0.215c-0.922 0.12-1.38 0.536-1.38 1.25 0 0.323 0.111 0.59 0.333 0.8 0.227 0.203 0.533 0.305 0.916 0.305 0.533 0 0.968-0.183 1.3-0.548 0.335-0.371 0.503-0.838 0.503-1.4zm7.79 2.67h-0.036v1.07h-2.84v-13.6h2.84v5.8h0.036c0.7-1.07 1.7-1.61 2.99-1.61 1.19 0 2.1 0.408 2.74 1.22 0.64 0.815 0.961 1.93 0.961 3.34 0 1.53-0.374 2.76-1.12 3.69s-1.75 1.39-3 1.39c-1.13 0-1.99-0.432-2.57-1.29zm-0.081-3.88v0.943c0 0.593 0.17 1.08 0.512 1.47 0.341 0.39 0.778 0.584 1.31 0.584 0.647 0 1.15-0.248 1.5-0.745 0.359-0.503 0.539-1.21 0.539-2.13 0-0.76-0.165-1.35-0.494-1.78-0.324-0.431-0.788-0.646-1.39-0.646-0.569 0-1.04 0.212-1.42 0.638-0.372 0.425-0.557 0.979-0.557 1.66zm11.5 4.95h-2.84v-13.6h2.84v13.6zm10.7-3.79h-6c0.095 1.34 0.937 2 2.52 2 1.01 0 1.9-0.239 2.67-0.719v2.05c-0.851 0.455-1.96 0.683-3.32 0.683-1.48 0-2.64-0.411-3.46-1.23-0.82-0.827-1.23-1.98-1.23-3.45 0-1.53 0.443-2.74 1.33-3.63 0.887-0.892 1.98-1.34 3.27-1.34 1.34 0 2.38 0.399 3.11 1.2 0.737 0.797 1.1 1.88 1.1 3.24v1.2zm-2.63-1.74c0-1.32-0.533-1.98-1.6-1.98-0.456 0-0.851 0.189-1.19 0.566-0.33 0.377-0.53 0.848-0.602 1.41h3.39z\" fill=\"#000\"/><path d=\"m291 146h16.5l-0.688 0.688v-96.5l0.688 0.687h-54.6v-1.38h55.3v97.9h-17.2v-1.38zm-33-90.7-6.13-5.11 6.13-5.11c0.292-0.243 0.726-0.204 0.968 0.088 0.244 0.292 0.204 0.725-0.088 0.968l-5.5 4.58v-1.06l5.5 4.58c0.292 0.243 0.332 0.677 0.088 0.968-0.242 0.292-0.676 0.331-0.968 0.088z\" fill=\"#0070C0\"/><path d=\"m642 146h16.5l-0.688 0.688v-96.5l0.688 0.687h-54.6v-1.38h55.3v97.9h-17.2v-1.38zm-33-90.7-6.13-5.11 6.13-5.11c0.292-0.243 0.726-0.204 0.968 0.088 0.244 0.292 0.204 0.725-0.088 0.968l-5.5 4.58v-1.06l5.5 4.58c0.292 0.243 0.332 0.677 0.088 0.968-0.242 0.292-0.676 0.331-0.968 0.088z\" fill=\"#0070C0\"/><g clip-rule=\"evenodd\" fill=\"#000\" fill-rule=\"evenodd\"><path d=\"m242 141h1.25v15.1h-1.25v-15.1z\"/><path d=\"m250 142c-0.374 0-0.686 0.11-0.936 0.332-0.252 0.222-0.454 0.54-0.608 0.956-0.154 0.418-0.264 0.924-0.328 1.52-0.066 0.598-0.098 1.27-0.098 2.02 0 1.76 0.164 3.05 0.49 3.88 0.328 0.824 0.834 1.24 1.52 1.24 0.654 0 1.14-0.388 1.45-1.16 0.316-0.774 0.476-1.98 0.476-3.6 0-1.24-0.082-2.25-0.244-3.02s-0.388-1.32-0.676-1.66c-0.29-0.334-0.64-0.502-1.05-0.502zm0.04-0.688c1.18 0 2.06 0.456 2.64 1.37 0.578 0.912 0.868 2.29 0.868 4.14 0 1.91-0.31 3.36-0.928 4.34-0.62 0.98-1.52 1.47-2.71 1.47-1.17 0-2.04-0.458-2.61-1.38-0.57-0.918-0.854-2.31-0.854-4.18 0-0.994 0.088-1.85 0.262-2.58 0.176-0.724 0.422-1.32 0.738-1.79 0.316-0.474 0.696-0.824 1.14-1.05 0.442-0.228 0.926-0.34 1.45-0.34z\"/><path d=\"m256 140 3.23 7.28v0.6l-3.23 7.29-0.866-0.308 2.6-7.28-2.6-7.29 0.866-0.29z\"/><path d=\"m140 30.2h1.25v15.1h-1.25v-15.1z\"/><path d=\"m148 30.6h0.446c-0.033 0.519-0.049 1.24-0.049 2.16v6.92c0 0.313 0.018 0.55 0.053 0.709s0.097 0.289 0.186 0.389 0.218 0.178 0.385 0.235c0.168 0.0568 0.378 0.1 0.632 0.13 0.254 0.0296 0.589 0.05 1 0.0608v0.592h-5.99v-0.592c0.599-0.0272 1.03-0.0636 1.28-0.11 0.257-0.0458 0.453-0.115 0.588-0.207s0.234-0.222 0.296-0.389c0.062-0.168 0.093-0.44 0.093-0.819v-6.57c0-0.216-0.038-0.374-0.114-0.474-0.075-0.1-0.186-0.15-0.332-0.15-0.173 0-0.419 0.0892-0.737 0.268-0.319 0.178-0.714 0.424-1.18 0.738l-0.356-0.624 3.79-2.26z\"/><path d=\"m154 29.4 3.23 7.28v0.6l-3.23 7.29-0.867-0.308 2.6-7.28-2.6-7.29 0.867-0.292z\"/><path d=\"m208 73h1.25v15.1h-1.25v-15.1z\"/><path d=\"m217 74.6h1.15v4.67h4.42v1.08h-4.42v4.67h-1.15v-4.67h-4.42v-1.08h4.42v-4.67z\"/><path d=\"m226 72.3 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m208 206h1.25v15.1h-1.25v-15.1z\"/><path d=\"m213 212h9.99v1.08h-9.99v-1.08z\"/><path d=\"m226 205 3.23 7.28v0.598l-3.23 7.29-0.866-0.308 2.6-7.28-2.6-7.29 0.866-0.292z\"/><path d=\"m133 250h9.99v1.08h-9.99v-1.08z\"/><path d=\"m146 243h1.25v15.1h-1.25v-15.1z\"/><path d=\"m154 244h0.446c-0.033 0.518-0.049 1.24-0.049 2.16v6.92c0 0.312 0.018 0.55 0.053 0.708 0.035 0.16 0.097 0.29 0.186 0.39s0.218 0.178 0.385 0.234c0.168 0.058 0.378 0.1 0.632 0.13s0.59 0.05 1.01 0.062v0.59h-5.99v-0.59c0.599-0.028 1.03-0.064 1.28-0.11 0.257-0.046 0.453-0.114 0.588-0.206s0.234-0.222 0.296-0.39 0.093-0.44 0.093-0.818v-6.57c0-0.216-0.038-0.374-0.113-0.474-0.076-0.1-0.187-0.15-0.333-0.15-0.173 0-0.419 0.088-0.737 0.268-0.319 0.178-0.714 0.424-1.18 0.736l-0.356-0.624 3.79-2.26z\"/><path d=\"m160 243 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m28.4 147h9.99v1.08h-9.99v-1.08z\"/><path d=\"m41.6 141h1.25v15.1h-1.25v-15.1z\"/><path d=\"m49.5 142c-0.373 0-0.685 0.11-0.936 0.332s-0.454 0.54-0.608 0.956c-0.154 0.418-0.263 0.924-0.328 1.52-0.0648 0.598-0.0972 1.27-0.0972 2.02 0 1.76 0.163 3.05 0.49 3.88 0.327 0.824 0.833 1.24 1.52 1.24 0.654 0 1.14-0.388 1.45-1.16 0.316-0.774 0.474-1.98 0.474-3.6 0-1.24-0.081-2.25-0.243-3.02-0.162-0.77-0.388-1.32-0.677-1.66-0.289-0.334-0.639-0.502-1.05-0.502zm0.0406-0.688c1.18 0 2.06 0.456 2.64 1.37 0.578 0.912 0.867 2.29 0.867 4.14 0 1.91-0.309 3.36-0.928 4.34-0.619 0.98-1.52 1.47-2.71 1.47-1.17 0-2.04-0.458-2.61-1.38-0.57-0.918-0.855-2.31-0.855-4.18 0-0.994 0.0878-1.85 0.263-2.58s0.422-1.32 0.738-1.79c0.316-0.474 0.696-0.824 1.14-1.05 0.443-0.228 0.927-0.34 1.45-0.34z\"/><path d=\"m55.8 140 3.23 7.28v0.6l-3.23 7.29-0.867-0.308 2.6-7.28-2.6-7.29 0.867-0.29z\"/><path d=\"m57.9 212h9.99v1.08h-9.99v-1.08z\"/><path d=\"m71 206h1.25v15.1h-1.25v-15.1z\"/><path d=\"m79.9 207h1.15v4.67h4.42v1.08h-4.42v4.67h-1.15v-4.67h-4.42v-1.08h4.42v-4.67z\"/><path d=\"m88.4 205 3.23 7.28v0.6l-3.23 7.29-0.867-0.308 2.6-7.28-2.6-7.29 0.867-0.29z\"/><path d=\"m57.2 78.8h9.99v1.08h-9.99v-1.08z\"/><path d=\"m70.3 72.5h1.25v15.1h-1.25v-15.1z\"/><path d=\"m74.8 78.8h9.99v1.08h-9.99v-1.08z\"/><path d=\"m87.7 71.8 3.23 7.28v0.6l-3.23 7.29-0.867-0.308 2.6-7.28-2.6-7.29 0.867-0.292z\"/><path d=\"m592 141h1.25v15.1h-1.25v-15.1z\"/><path d=\"m600 142c-0.372 0-0.684 0.11-0.936 0.332-0.25 0.222-0.454 0.54-0.608 0.956-0.154 0.418-0.262 0.924-0.328 1.52-0.064 0.598-0.098 1.27-0.098 2.02 0 1.76 0.164 3.05 0.492 3.88 0.326 0.824 0.832 1.24 1.52 1.24 0.652 0 1.14-0.388 1.45-1.16 0.316-0.774 0.474-1.98 0.474-3.6 0-1.24-0.08-2.25-0.242-3.02-0.164-0.77-0.388-1.32-0.678-1.66-0.288-0.334-0.638-0.502-1.05-0.502zm0.042-0.688c1.18 0 2.06 0.456 2.64 1.37 0.578 0.912 0.866 2.29 0.866 4.14 0 1.91-0.308 3.36-0.928 4.34-0.618 0.98-1.52 1.47-2.71 1.47-1.17 0-2.04-0.458-2.61-1.38-0.57-0.918-0.856-2.31-0.856-4.18 0-0.994 0.088-1.85 0.264-2.58s0.422-1.32 0.738-1.79c0.316-0.474 0.696-0.824 1.14-1.05 0.444-0.228 0.926-0.34 1.45-0.34z\"/><path d=\"m606 140 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.29z\"/><path d=\"m489 30.2h1.25v15.1h-1.25v-15.1z\"/><path d=\"m498 30.6h0.446c-0.032 0.519-0.048 1.24-0.048 2.16v6.92c0 0.313 0.016 0.55 0.052 0.709 0.034 0.159 0.098 0.289 0.186 0.389 0.09 0.1 0.218 0.178 0.386 0.235 0.166 0.0568 0.378 0.1 0.632 0.13 0.254 0.0296 0.588 0.05 1 0.0608v0.592h-5.99v-0.592c0.6-0.0272 1.03-0.0636 1.29-0.11 0.256-0.0458 0.452-0.115 0.588-0.207 0.134-0.0918 0.232-0.222 0.294-0.389 0.064-0.168 0.094-0.44 0.094-0.819v-6.57c0-0.216-0.038-0.374-0.114-0.474s-0.186-0.15-0.332-0.15c-0.172 0-0.418 0.0892-0.738 0.268-0.318 0.178-0.712 0.424-1.18 0.738l-0.358-0.624 3.79-2.26z\"/><path d=\"m504 29.4 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m558 73h1.25v15.1h-1.25v-15.1z\"/><path d=\"m567 74.6h1.15v4.67h4.42v1.08h-4.42v4.67h-1.15v-4.67h-4.42v-1.08h4.42v-4.67z\"/><path d=\"m575 72.3 3.23 7.28v0.6l-3.23 7.29-0.866-0.308 2.6-7.28-2.6-7.29 0.866-0.292z\"/><path d=\"m558 206h1.25v15.1h-1.25v-15.1z\"/><path d=\"m563 212h9.99v1.08h-9.99v-1.08z\"/><path d=\"m575 205 3.23 7.28v0.598l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m483 250h9.99v1.08h-9.99v-1.08z\"/><path d=\"m496 243h1.25v15.1h-1.25v-15.1z\"/><path d=\"m504 244h0.446c-0.032 0.518-0.048 1.24-0.048 2.16v6.92c0 0.312 0.016 0.55 0.052 0.708 0.036 0.16 0.098 0.29 0.186 0.39 0.09 0.1 0.218 0.178 0.386 0.234 0.166 0.058 0.378 0.1 0.632 0.13s0.588 0.05 1 0.062v0.59h-5.99v-0.59c0.6-0.028 1.03-0.064 1.29-0.11 0.256-0.046 0.452-0.114 0.588-0.206 0.134-0.092 0.232-0.222 0.294-0.39 0.064-0.168 0.094-0.44 0.094-0.818v-6.57c0-0.216-0.038-0.374-0.114-0.474-0.074-0.1-0.186-0.15-0.332-0.15-0.172 0-0.418 0.088-0.738 0.268-0.318 0.178-0.712 0.424-1.18 0.736l-0.358-0.624 3.79-2.26z\"/><path d=\"m510 243 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m378 147h9.99v1.08h-9.99v-1.08z\"/><path d=\"m391 141h1.25v15.1h-1.25v-15.1z\"/><path d=\"m399 142c-0.372 0-0.684 0.11-0.936 0.332s-0.454 0.54-0.608 0.956c-0.154 0.418-0.264 0.924-0.328 1.52-0.064 0.598-0.098 1.27-0.098 2.02 0 1.76 0.164 3.05 0.492 3.88 0.326 0.824 0.832 1.24 1.52 1.24 0.654 0 1.14-0.388 1.46-1.16 0.316-0.774 0.474-1.98 0.474-3.6 0-1.24-0.082-2.25-0.244-3.02s-0.386-1.32-0.676-1.66c-0.29-0.334-0.638-0.502-1.05-0.502zm0.04-0.688c1.18 0 2.07 0.456 2.64 1.37 0.578 0.912 0.866 2.29 0.866 4.14 0 1.91-0.308 3.36-0.928 4.34-0.618 0.98-1.52 1.47-2.71 1.47-1.17 0-2.04-0.458-2.61-1.38-0.57-0.918-0.856-2.31-0.856-4.18 0-0.994 0.088-1.85 0.264-2.58s0.422-1.32 0.738-1.79c0.316-0.474 0.694-0.824 1.14-1.05 0.444-0.228 0.926-0.34 1.45-0.34z\"/><path d=\"m406 140 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.29z\"/><path d=\"m408 212h9.99v1.08h-9.99v-1.08z\"/><path d=\"m421 206h1.25v15.1h-1.25v-15.1z\"/><path d=\"m430 207h1.15v4.67h4.42v1.08h-4.42v4.67h-1.15v-4.67h-4.42v-1.08h4.42v-4.67z\"/><path d=\"m438 205 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.29z\"/><path d=\"m407 78.8h9.99v1.08h-9.99v-1.08z\"/><path d=\"m420 72.5h1.25v15.1h-1.25v-15.1z\"/><path d=\"m425 78.8h9.99v1.08h-9.99v-1.08z\"/><path d=\"m438 71.8 3.24 7.28v0.6l-3.24 7.29-0.866-0.308 2.6-7.28-2.6-7.29 0.866-0.292z\"/></g></g><defs><clipPath id=\"clip0_4_498\"><rect transform=\"translate(.6 .8)\" width=\"659\" height=\"332\" fill=\"#fff\"/></clipPath></defs></svg>\n\n2. Apply the oracle. \n Here, the difference between the two scenarios becomes noticeable. In the constant scenario, $\\ket{0}$ and $\\ket{1}$ states get the same phase (either $1$ or $-1$), so the state remains the same or acquires a global phase of $-1$, which is physically the same state. In the variable scenario, zero and one states get different phases, so the state changes!\n <br/>\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<svg width=\"738\" height=\"374\" fill=\"none\" version=\"1.1\" viewBox=\"0 0 738 374\" xmlns=\"http://www.w3.org/2000/svg\"><g clip-path=\"url(#clip0_5_635)\"><g clip-rule=\"evenodd\" fill-rule=\"evenodd\"><path d=\"m7.3 189c0-76.8 62.3-139 139-139 76.8 0 139 62.3 139 139 0 76.8-62.3 139-139 139-76.8 0-139-62.3-139-139z\" stroke=\"#747474\" stroke-miterlimit=\"8\" stroke-width=\"1.38\"/><g fill=\"#fff\" stroke=\"#000\" stroke-miterlimit=\"8\"><path d=\"m279 189c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9-2.69 5.9-6 5.9-6-2.64-6-5.9z\" stroke-width=\"1.15\"/><g stroke-width=\"1.38\"><path d=\"m140 49.4c0-3.26 2.64-5.9 5.9-5.9s5.9 2.64 5.9 5.9c0 3.26-2.64 5.9-5.9 5.9s-5.9-2.64-5.9-5.9z\"/><path d=\"m1.3 189c0-3.26 2.69-5.9 6-5.9 3.31 0 6 2.64 6 5.9s-2.69 5.9-6 5.9c-3.31 0-6-2.64-6-5.9z\"/><path d=\"m140 328c0-3.26 2.64-5.9 5.9-5.9s5.9 2.64 5.9 5.9-2.64 5.9-5.9 5.9-5.9-2.64-5.9-5.9z\"/></g></g><path d=\"m240 92.3c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9c0 3.26-2.69 5.9-6 5.9s-6-2.64-6-5.9z\" fill=\"#0070C0\"/><path d=\"m240 285c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9-2.69 5.9-6 5.9-6-2.64-6-5.9z\" fill=\"#fff\" stroke=\"#000\" stroke-miterlimit=\"8\" stroke-width=\"1.38\"/><path d=\"m40.5 92.4c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9-2.69 5.9-6 5.9-6-2.64-6-5.9z\" fill=\"#fff\" stroke=\"#000\" stroke-miterlimit=\"8\" stroke-width=\"1.38\"/><path d=\"m40.4 285c0-3.26 2.69-5.9 6-5.9 3.31 0 6 2.64 6 5.9s-2.69 5.9-6 5.9c-3.31 0-6-2.64-6-5.9z\" fill=\"#0070C0\"/><path d=\"m358 189c0-76.8 62.2-139 139-139s139 62.3 139 139c0 76.8-62.2 139-139 139s-139-62.3-139-139z\" stroke=\"#747474\" stroke-miterlimit=\"8\" stroke-width=\"1.38\"/><g fill=\"#fff\" stroke-miterlimit=\"8\" stroke-width=\"1.38\"><g stroke=\"#000\"><path d=\"m630 189c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9-2.69 5.9-6 5.9-6-2.64-6-5.9z\"/><path d=\"m491 49.4c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9c0 3.26-2.69 5.9-6 5.9s-6-2.64-6-5.9z\"/><path d=\"m352 189c0-3.26 2.64-5.9 5.9-5.9s5.9 2.64 5.9 5.9-2.64 5.9-5.9 5.9-5.9-2.64-5.9-5.9z\"/><path d=\"m491 328c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9-2.69 5.9-6 5.9-6-2.64-6-5.9z\"/></g><path d=\"m591 92.4c0-3.26 2.64-5.9 5.9-5.9s5.9 2.64 5.9 5.9-2.64 5.9-5.9 5.9-5.9-2.64-5.9-5.9z\" stroke=\"#0070C0\"/></g><path d=\"m591 285c0-3.26 2.64-5.9 5.9-5.9s5.9 2.64 5.9 5.9-2.64 5.9-5.9 5.9-5.9-2.64-5.9-5.9z\" fill=\"#0070C0\"/><path d=\"m391 92.3c0-3.26 2.64-5.9 5.9-5.9s5.9 2.64 5.9 5.9c0 3.26-2.64 5.9-5.9 5.9s-5.9-2.64-5.9-5.9z\" fill=\"#0070C0\"/><path d=\"m392 285c0-3.26 2.64-5.9 5.9-5.9s5.9 2.64 5.9 5.9-2.64 5.9-5.9 5.9-5.9-2.64-5.9-5.9z\" fill=\"#fff\" stroke=\"#000\" stroke-miterlimit=\"8\" stroke-width=\"1.38\"/></g><g fill=\"#0070C0\"><path d=\"m247 85.4v-15.1l-0.688 0.688h22.1l-0.687-0.688v22.1l0.687-0.688h-16.2v1.38h16.9v-23.5h-23.5v15.8h1.38zm-5.8-5.06 5.11 6.13 5.11-6.13c0.244-0.292 0.204-0.725-0.088-0.968-0.291-0.243-0.725-0.204-0.968 0.088l-4.58 5.5h1.06l-4.58-5.5c-0.243-0.292-0.677-0.331-0.968-0.088-0.292 0.243-0.332 0.677-0.088 0.968z\"/><path d=\"m199 136-105 102 0.96 0.985 105-102-0.96-0.984zm-104 95.6-0.826 7.94 7.96-0.619c0.378-0.03 0.661-0.361 0.632-0.739-0.03-0.379-0.36-0.662-0.739-0.632l-7.14 0.555 0.737 0.757 0.741-7.12c0.0392-0.378-0.235-0.716-0.613-0.755-0.378-0.04-0.716 0.235-0.755 0.612z\"/><path d=\"m603 91.6h58.4v194h-56.4v-1.37h55.8l-0.688 0.686v-193l0.688 0.688h-57.8v-1.38zm7.05 199-6.13-5.11 6.13-5.11c0.29-0.244 0.724-0.204 0.968 0.088 0.242 0.29 0.204 0.724-0.088 0.968l-5.5 4.58v-1.06l5.5 4.58c0.292 0.242 0.33 0.676 0.088 0.968-0.244 0.292-0.678 0.332-0.968 0.088z\"/><path d=\"m397 85.7v-56.4h201v56.6h-1.37v-55.9l0.686 0.688h-200l0.688-0.688v55.7h-1.38zm5.8-5.06-5.11 6.13-5.11-6.13c-0.242-0.292-0.204-0.725 0.088-0.968 0.292-0.243 0.726-0.204 0.968 0.0882l4.58 5.5h-1.06l4.58-5.5c0.242-0.292 0.676-0.331 0.968-0.0882 0.292 0.243 0.33 0.677 0.088 0.968z\"/></g><g clip-rule=\"evenodd\" fill=\"#0078D4\" fill-rule=\"evenodd\"><path d=\"m231 48.1c0.516 0 0.962 0.0422 1.34 0.126l-0.308 1.34h-0.696c-0.074-0.301-0.17-0.517-0.288-0.649-0.12-0.132-0.294-0.198-0.526-0.198-0.302 0-0.556 0.083-0.764 0.249s-0.386 0.413-0.534 0.74-0.284 0.767-0.412 1.32l-0.196 0.862h2.03l-0.174 0.799h-2.04l-1.47 6.9c-0.242 1.14-0.614 2-1.12 2.56-0.5 0.562-1.13 0.842-1.89 0.842-0.222 0-0.396-0.0132-0.522-0.0396l0.134-0.696c0.054 0.0158 0.178 0.0236 0.372 0.0236 0.238 0 0.44-0.0606 0.61-0.182 0.168-0.121 0.324-0.332 0.47-0.633 0.144-0.3 0.278-0.717 0.4-1.25l1.7-7.52h-1.34l0.118-0.546c0.354-0.0212 0.608-0.0502 0.764-0.087 0.154-0.037 0.276-0.0924 0.364-0.166 0.086-0.0738 0.16-0.17 0.22-0.289 0.062-0.119 0.138-0.336 0.234-0.653 0.28-0.949 0.71-1.66 1.29-2.14 0.582-0.477 1.32-0.716 2.23-0.716z\"/><path d=\"m250 47.3c1.54 0.406 2.72 1.28 3.55 2.63 0.826 1.35 1.24 2.97 1.24 4.88 0 1.91-0.41 3.53-1.23 4.88-0.822 1.34-2.01 2.22-3.55 2.62l-0.19-0.609c1.22-0.406 2.12-1.21 2.72-2.4 0.594-1.2 0.89-2.72 0.89-4.56 0-1.78-0.296-3.26-0.886-4.44s-1.51-1.97-2.74-2.38l0.214-0.609zm-10.1 0 0.214 0.609c-1.23 0.406-2.15 1.2-2.74 2.38-0.592 1.18-0.89 2.66-0.89 4.44 0 1.85 0.298 3.37 0.89 4.56 0.594 1.2 1.5 2 2.72 2.4l-0.19 0.609c-1.55-0.406-2.73-1.28-3.55-2.62-0.822-1.34-1.23-2.97-1.23-4.88 0-1.9 0.412-3.53 1.24-4.88s2.01-2.22 3.55-2.63z\"/><path d=\"m243 51.7c0.162 0 0.306 0.0184 0.43 0.0554 0.124 0.0368 0.234 0.0936 0.328 0.17 0.096 0.0764 0.18 0.175 0.254 0.297s0.144 0.286 0.214 0.494c0.068 0.208 0.132 0.467 0.194 0.775 0.06 0.308 0.114 0.629 0.162 0.961h0.078c0.506-0.712 0.89-1.23 1.15-1.56 0.26-0.33 0.48-0.575 0.66-0.736s0.352-0.274 0.518-0.34c0.166-0.0658 0.386-0.0988 0.66-0.0988 0.248 0 0.452 0.0316 0.61 0.0948l-0.316 1.43h-0.554c-0.032-0.221-0.124-0.332-0.278-0.332-0.046 0-0.098 0.0078-0.15 0.0238-0.052 0.0158-0.118 0.05-0.194 0.103-0.076 0.0526-0.188 0.156-0.336 0.308-0.148 0.153-0.314 0.34-0.498 0.562-0.184 0.222-0.374 0.454-0.57 0.696l-0.538 0.672c0.096 0.506 0.186 0.944 0.27 1.31s0.158 0.676 0.224 0.922 0.124 0.439 0.174 0.581c0.052 0.142 0.106 0.249 0.164 0.32 0.058 0.0712 0.116 0.121 0.178 0.15 0.06 0.029 0.13 0.0434 0.208 0.0434 0.144 0 0.282-0.0552 0.416-0.166s0.328-0.361 0.582-0.751l0.514 0.34c-0.37 0.548-0.704 0.935-1 1.16-0.298 0.224-0.652 0.336-1.06 0.336-0.226 0-0.418-0.0408-0.576-0.123-0.158-0.0816-0.296-0.212-0.412-0.391-0.116-0.179-0.218-0.459-0.308-0.839-0.164-0.675-0.264-1.19-0.3-1.55h-0.08c-0.558 0.786-0.974 1.35-1.25 1.69s-0.496 0.596-0.672 0.759-0.348 0.278-0.514 0.344c-0.166 0.066-0.386 0.099-0.66 0.099-0.248 0-0.452-0.0316-0.61-0.095l0.316-1.43h0.554c0.032 0.221 0.124 0.332 0.278 0.332 0.072 0 0.15-0.0198 0.232-0.0594s0.2-0.134 0.352-0.285c0.154-0.15 0.364-0.386 0.634-0.708 0.268-0.322 0.658-0.804 1.17-1.45-0.08-0.417-0.16-0.817-0.246-1.2-0.084-0.385-0.17-0.744-0.26-1.08s-0.164-0.55-0.222-0.653-0.12-0.174-0.186-0.214-0.148-0.0592-0.248-0.0592c-0.112 0-0.212 0.025-0.302 0.075-0.09 0.0502-0.186 0.137-0.292 0.261-0.106 0.124-0.246 0.318-0.42 0.581l-0.514-0.34c0.332-0.501 0.652-0.875 0.958-1.12 0.306-0.248 0.666-0.372 1.08-0.372z\"/><path d=\"m262 55.9h9.75v1.05h-9.75v-1.05zm0-3.28h9.75v1.05h-9.75v-1.05z\"/><path d=\"m281 49.2c-0.364 0-0.668 0.108-0.914 0.324-0.244 0.216-0.442 0.527-0.592 0.933-0.15 0.406-0.258 0.901-0.32 1.48-0.064 0.583-0.096 1.24-0.096 1.97 0 1.72 0.16 2.98 0.478 3.78 0.32 0.804 0.814 1.21 1.48 1.21 0.638 0 1.11-0.378 1.42-1.14s0.462-1.93 0.462-3.52c0-1.21-0.078-2.2-0.236-2.95-0.16-0.751-0.38-1.29-0.662-1.62s-0.622-0.49-1.02-0.49zm0.04-0.672c1.15 0 2.01 0.446 2.58 1.34s0.846 2.24 0.846 4.04c0 1.87-0.3 3.28-0.904 4.24s-1.49 1.44-2.65 1.44c-1.14 0-1.99-0.448-2.54-1.34-0.556-0.897-0.834-2.26-0.834-4.08 0-0.97 0.086-1.81 0.256-2.52 0.172-0.707 0.412-1.29 0.72-1.75 0.31-0.461 0.68-0.803 1.11-1.02s0.904-0.332 1.42-0.332z\"/><path d=\"m94.3 164c0.53 0 0.986 0.043 1.37 0.13l-0.316 1.38h-0.713c-0.0756-0.308-0.174-0.53-0.296-0.665s-0.301-0.203-0.539-0.203c-0.308 0-0.569 0.085-0.782 0.256-0.213 0.17-0.396 0.422-0.547 0.758-0.151 0.334-0.292 0.786-0.422 1.35l-0.203 0.882h2.08l-0.178 0.82h-2.09l-1.51 7.07c-0.249 1.17-0.63 2.05-1.14 2.62-0.513 0.574-1.16 0.862-1.94 0.862-0.227 0-0.405-0.012-0.535-0.04l0.138-0.714c0.054 0.016 0.181 0.026 0.381 0.026 0.243 0 0.451-0.064 0.624-0.188s0.334-0.34 0.482-0.648 0.285-0.734 0.409-1.28l1.74-7.71h-1.37l0.122-0.56c0.362-0.022 0.623-0.052 0.782-0.09s0.284-0.094 0.373-0.17c0.0892-0.076 0.165-0.174 0.227-0.296 0.0622-0.12 0.142-0.344 0.239-0.668 0.286-0.972 0.728-1.7 1.33-2.19 0.597-0.489 1.36-0.734 2.28-0.734z\"/><path d=\"m113 163c1.58 0.416 2.79 1.31 3.64 2.7 0.846 1.38 1.27 3.05 1.27 5 0 1.96-0.422 3.62-1.26 5-0.843 1.37-2.06 2.27-3.64 2.69l-0.195-0.624c1.25-0.416 2.18-1.24 2.78-2.46 0.608-1.23 0.911-2.79 0.911-4.68 0-1.83-0.302-3.34-0.907-4.55-0.606-1.21-1.54-2.02-2.81-2.44l0.219-0.624zm-10.3 0 0.219 0.624c-1.26 0.416-2.2 1.23-2.81 2.44-0.608 1.21-0.912 2.73-0.912 4.55 0 1.89 0.304 3.45 0.912 4.68 0.608 1.23 1.54 2.05 2.78 2.46l-0.194 0.624c-1.58-0.416-2.8-1.31-3.64-2.69-0.843-1.38-1.26-3.04-1.26-5 0-1.95 0.423-3.62 1.27-5 0.846-1.38 2.06-2.28 3.64-2.7z\"/><path d=\"m106 168c0.168 0 0.315 0.02 0.442 0.058s0.239 0.096 0.336 0.174c0.098 0.078 0.184 0.18 0.26 0.304 0.075 0.124 0.148 0.292 0.219 0.506 0.07 0.214 0.136 0.478 0.198 0.794s0.118 0.646 0.166 0.986h0.081c0.519-0.73 0.912-1.26 1.18-1.6 0.267-0.338 0.493-0.588 0.677-0.754 0.183-0.164 0.36-0.28 0.53-0.348 0.171-0.068 0.396-0.1 0.677-0.1 0.254 0 0.462 0.032 0.624 0.096l-0.324 1.47h-0.567c-0.033-0.228-0.127-0.342-0.284-0.342-0.049 0-0.1 0.01-0.154 0.026s-0.12 0.05-0.199 0.104c-0.078 0.054-0.193 0.16-0.344 0.316-0.151 0.158-0.322 0.35-0.511 0.576-0.189 0.228-0.383 0.464-0.583 0.714l-0.551 0.688c0.097 0.52 0.189 0.968 0.275 1.35 0.087 0.378 0.164 0.694 0.231 0.944 0.068 0.252 0.127 0.45 0.178 0.596 0.052 0.146 0.107 0.256 0.167 0.328 0.059 0.074 0.12 0.124 0.182 0.154s0.134 0.044 0.215 0.044c0.146 0 0.288-0.056 0.425-0.17 0.138-0.112 0.337-0.37 0.596-0.77l0.527 0.35c-0.378 0.562-0.72 0.956-1.02 1.19-0.306 0.23-0.669 0.346-1.09 0.346-0.232 0-0.429-0.042-0.591-0.126s-0.303-0.218-0.422-0.402-0.224-0.47-0.316-0.858c-0.167-0.692-0.27-1.22-0.308-1.59h-0.081c-0.573 0.806-0.998 1.38-1.28 1.73-0.278 0.352-0.507 0.612-0.689 0.78-0.181 0.166-0.356 0.284-0.526 0.352-0.171 0.068-0.396 0.102-0.677 0.102-0.254 0-0.462-0.034-0.624-0.098l0.324-1.47h0.567c0.033 0.228 0.127 0.342 0.284 0.342 0.076 0 0.155-0.022 0.239-0.062s0.204-0.138 0.361-0.292 0.373-0.396 0.648-0.724c0.276-0.33 0.676-0.824 1.2-1.48-0.081-0.428-0.165-0.838-0.251-1.23-0.087-0.394-0.176-0.762-0.268-1.1-0.092-0.342-0.167-0.564-0.227-0.67-0.059-0.104-0.123-0.178-0.19-0.218-0.068-0.04-0.153-0.06-0.256-0.06-0.113 0-0.216 0.024-0.308 0.076s-0.191 0.14-0.3 0.268c-0.108 0.126-0.251 0.326-0.429 0.596l-0.527-0.35c0.34-0.512 0.667-0.896 0.981-1.15 0.313-0.254 0.683-0.382 1.11-0.382z\"/><path d=\"m125 172h9.99v1.08h-9.99v-1.08zm0-3.36h9.99v1.08h-9.99v-1.08z\"/><path d=\"m146 164h0.446c-0.032 0.519-0.048 1.24-0.048 2.16v6.92c0 0.314 0.018 0.55 0.052 0.71 0.036 0.158 0.098 0.288 0.186 0.388 0.09 0.1 0.218 0.178 0.386 0.236 0.168 0.056 0.378 0.1 0.632 0.128 0.254 0.03 0.588 0.05 1 0.062v0.592h-5.99v-0.592c0.6-0.028 1.03-0.064 1.29-0.11s0.452-0.114 0.588-0.206c0.134-0.092 0.234-0.222 0.296-0.39 0.062-0.166 0.092-0.44 0.092-0.818v-6.57c0-0.216-0.038-0.374-0.114-0.474-0.074-0.1-0.186-0.15-0.332-0.15-0.172 0-0.418 0.09-0.736 0.268-0.32 0.178-0.714 0.424-1.18 0.738l-0.358-0.624 3.79-2.26z\"/><path d=\"m676 183c0.516 0 0.962 0.044 1.34 0.128l-0.308 1.34h-0.696c-0.074-0.3-0.17-0.516-0.288-0.648-0.12-0.132-0.294-0.198-0.528-0.198-0.3 0-0.554 0.082-0.762 0.248-0.208 0.168-0.386 0.414-0.534 0.74-0.148 0.328-0.286 0.768-0.412 1.32l-0.198 0.862h2.03l-0.174 0.798h-2.04l-1.47 6.9c-0.244 1.14-0.614 2-1.12 2.56-0.5 0.56-1.13 0.842-1.89 0.842-0.222 0-0.396-0.014-0.522-0.04l0.134-0.696c0.052 0.016 0.176 0.024 0.372 0.024 0.238 0 0.44-0.06 0.608-0.182 0.17-0.122 0.326-0.332 0.472-0.632 0.144-0.302 0.278-0.718 0.398-1.25l1.7-7.52h-1.34l0.12-0.546c0.352-0.02 0.608-0.05 0.762-0.086 0.156-0.038 0.278-0.092 0.364-0.166 0.088-0.074 0.162-0.17 0.222-0.288 0.06-0.12 0.138-0.338 0.234-0.654 0.278-0.948 0.71-1.66 1.29-2.14 0.584-0.476 1.33-0.716 2.23-0.716z\"/><path d=\"m694 182c1.54 0.406 2.72 1.28 3.55 2.63 0.826 1.35 1.24 2.97 1.24 4.88 0 1.91-0.412 3.53-1.23 4.88s-2.01 2.22-3.55 2.62l-0.19-0.608c1.22-0.406 2.12-1.21 2.72-2.41 0.594-1.2 0.89-2.72 0.89-4.56 0-1.78-0.296-3.26-0.886-4.44-0.59-1.18-1.51-1.97-2.74-2.38l0.212-0.608zm-10.1 0 0.212 0.608c-1.23 0.406-2.15 1.2-2.74 2.38-0.594 1.18-0.89 2.66-0.89 4.44 0 1.85 0.296 3.37 0.89 4.56 0.594 1.2 1.5 2 2.72 2.41l-0.19 0.608c-1.55-0.406-2.73-1.28-3.55-2.62-0.824-1.34-1.23-2.97-1.23-4.88 0-1.9 0.412-3.53 1.24-4.88 0.824-1.35 2.01-2.22 3.55-2.63z\"/><path d=\"m688 187c0.164 0 0.308 0.018 0.432 0.054 0.124 0.038 0.234 0.094 0.328 0.17 0.096 0.078 0.18 0.176 0.254 0.298 0.074 0.12 0.144 0.286 0.212 0.494 0.07 0.208 0.134 0.466 0.194 0.774 0.062 0.31 0.116 0.63 0.162 0.962h0.08c0.506-0.712 0.89-1.23 1.15-1.56 0.262-0.33 0.482-0.576 0.662-0.736 0.178-0.16 0.352-0.274 0.518-0.34s0.386-0.098 0.66-0.098c0.248 0 0.45 0.03 0.61 0.094l-0.318 1.43h-0.554c-0.03-0.222-0.122-0.332-0.276-0.332-0.048 0-0.098 8e-3 -0.15 0.024s-0.118 0.05-0.194 0.102-0.188 0.156-0.336 0.308c-0.148 0.154-0.314 0.34-0.498 0.562-0.186 0.222-0.374 0.454-0.57 0.696l-0.538 0.672c0.094 0.506 0.184 0.944 0.27 1.31 0.084 0.368 0.158 0.676 0.224 0.922 0.066 0.244 0.124 0.438 0.174 0.58 0.05 0.144 0.104 0.25 0.162 0.322 0.058 0.07 0.118 0.12 0.178 0.15 0.062 0.028 0.132 0.042 0.21 0.042 0.142 0 0.282-0.054 0.416-0.166 0.134-0.11 0.328-0.36 0.58-0.75l0.516 0.34c-0.37 0.548-0.704 0.934-1 1.16s-0.652 0.336-1.06 0.336c-0.226 0-0.418-0.04-0.576-0.122-0.16-0.082-0.296-0.212-0.412-0.392s-0.22-0.458-0.308-0.838c-0.164-0.676-0.264-1.19-0.302-1.55h-0.078c-0.56 0.786-0.974 1.35-1.25 1.69s-0.496 0.596-0.672 0.76c-0.178 0.164-0.348 0.278-0.514 0.344s-0.388 0.098-0.662 0.098c-0.248 0-0.45-0.032-0.608-0.094l0.316-1.43h0.554c0.032 0.222 0.124 0.332 0.276 0.332 0.074 0 0.152-0.02 0.234-0.06 0.082-0.038 0.2-0.134 0.352-0.284s0.364-0.386 0.632-0.708c0.27-0.322 0.66-0.804 1.17-1.45-0.08-0.416-0.162-0.816-0.246-1.2-0.084-0.384-0.172-0.744-0.26-1.08-0.09-0.332-0.164-0.55-0.222-0.652-0.058-0.104-0.12-0.174-0.186-0.214s-0.15-0.06-0.25-0.06c-0.11 0-0.21 0.026-0.3 0.076s-0.188 0.138-0.292 0.262c-0.106 0.122-0.246 0.316-0.42 0.58l-0.514-0.34c0.332-0.5 0.652-0.876 0.958-1.12 0.304-0.248 0.666-0.372 1.08-0.372z\"/><path d=\"m706 191h9.75v1.05h-9.75v-1.05zm0-3.28h9.75v1.05h-9.75v-1.05z\"/><path d=\"m725 187c0.162 0 0.306 0.018 0.43 0.054 0.124 0.038 0.234 0.094 0.328 0.17 0.096 0.078 0.18 0.176 0.254 0.298 0.074 0.12 0.144 0.286 0.214 0.494 0.068 0.208 0.132 0.466 0.194 0.774 0.06 0.31 0.114 0.63 0.162 0.962h0.078c0.506-0.712 0.89-1.23 1.15-1.56 0.26-0.33 0.48-0.576 0.66-0.736s0.352-0.274 0.518-0.34 0.386-0.098 0.66-0.098c0.248 0 0.452 0.03 0.61 0.094l-0.316 1.43h-0.554c-0.032-0.222-0.124-0.332-0.278-0.332-0.046 0-0.096 8e-3 -0.15 0.024-0.052 0.016-0.118 0.05-0.194 0.102s-0.188 0.156-0.336 0.308c-0.148 0.154-0.314 0.34-0.498 0.562s-0.374 0.454-0.57 0.696l-0.538 0.672c0.096 0.506 0.186 0.944 0.27 1.31 0.084 0.368 0.16 0.676 0.224 0.922 0.066 0.244 0.124 0.438 0.174 0.58 0.052 0.144 0.106 0.25 0.164 0.322 0.058 0.07 0.116 0.12 0.178 0.15 0.06 0.028 0.13 0.042 0.208 0.042 0.144 0 0.282-0.054 0.416-0.166 0.134-0.11 0.328-0.36 0.582-0.75l0.514 0.34c-0.37 0.548-0.704 0.934-1 1.16s-0.652 0.336-1.06 0.336c-0.228 0-0.42-0.04-0.578-0.122s-0.296-0.212-0.412-0.392-0.218-0.458-0.308-0.838c-0.164-0.676-0.264-1.19-0.3-1.55h-0.08c-0.558 0.786-0.974 1.35-1.25 1.69s-0.496 0.596-0.672 0.76-0.348 0.278-0.514 0.344-0.386 0.098-0.66 0.098c-0.248 0-0.452-0.032-0.61-0.094l0.316-1.43h0.554c0.032 0.222 0.124 0.332 0.278 0.332 0.072 0 0.15-0.02 0.232-0.06 0.082-0.038 0.2-0.134 0.352-0.284 0.154-0.15 0.364-0.386 0.634-0.708 0.268-0.322 0.658-0.804 1.17-1.45-0.08-0.416-0.16-0.816-0.246-1.2-0.084-0.384-0.17-0.744-0.26-1.08s-0.164-0.55-0.222-0.652c-0.058-0.104-0.12-0.174-0.186-0.214s-0.148-0.06-0.248-0.06c-0.112 0-0.212 0.026-0.302 0.076s-0.186 0.138-0.292 0.262c-0.106 0.122-0.246 0.316-0.42 0.58l-0.514-0.34c0.332-0.5 0.652-0.876 0.958-1.12 0.306-0.248 0.666-0.372 1.08-0.372z\"/><path d=\"m463 7.88c0.516 0 0.962 0.0422 1.34 0.127l-0.308 1.34h-0.696c-0.074-0.301-0.17-0.517-0.288-0.649-0.12-0.132-0.294-0.198-0.526-0.198-0.302 0-0.556 0.083-0.764 0.249-0.208 0.166-0.386 0.413-0.534 0.74-0.148 0.327-0.284 0.767-0.412 1.32l-0.198 0.862h2.03l-0.174 0.799h-2.04l-1.47 6.9c-0.244 1.14-0.614 2-1.12 2.56-0.5 0.562-1.13 0.842-1.89 0.842-0.222 0-0.396-0.0132-0.522-0.0394l0.134-0.696c0.052 0.0158 0.176 0.0238 0.372 0.0238 0.238 0 0.44-0.0606 0.608-0.182 0.17-0.121 0.326-0.332 0.472-0.633 0.144-0.301 0.278-0.717 0.4-1.25l1.7-7.52h-1.34l0.12-0.546c0.352-0.021 0.608-0.05 0.762-0.087 0.156-0.0368 0.278-0.0922 0.364-0.166 0.088-0.074 0.162-0.17 0.222-0.289s0.138-0.336 0.234-0.653c0.28-0.949 0.71-1.66 1.29-2.14 0.584-0.477 1.33-0.716 2.23-0.716z\"/><path d=\"m482 7.11c1.54 0.406 2.72 1.28 3.55 2.63 0.826 1.35 1.24 2.97 1.24 4.88 0 1.91-0.41 3.53-1.23 4.88-0.822 1.34-2.01 2.22-3.55 2.62l-0.19-0.609c1.22-0.406 2.12-1.21 2.72-2.4s0.89-2.72 0.89-4.56c0-1.78-0.296-3.26-0.886-4.44-0.59-1.18-1.51-1.97-2.74-2.38l0.212-0.609zm-10.1 0 0.212 0.609c-1.23 0.406-2.15 1.2-2.74 2.38-0.594 1.18-0.89 2.66-0.89 4.44 0 1.85 0.296 3.37 0.89 4.56s1.5 2 2.72 2.4l-0.19 0.609c-1.55-0.406-2.73-1.28-3.55-2.62-0.824-1.34-1.23-2.97-1.23-4.88 0-1.9 0.412-3.53 1.24-4.88 0.824-1.35 2.01-2.22 3.55-2.63z\"/><path d=\"m475 11.5c0.164 0 0.308 0.0184 0.432 0.0554s0.234 0.0936 0.328 0.17c0.096 0.0766 0.18 0.175 0.254 0.297 0.074 0.121 0.144 0.286 0.212 0.494 0.07 0.208 0.134 0.467 0.194 0.775 0.062 0.309 0.116 0.629 0.162 0.961h0.08c0.506-0.712 0.89-1.23 1.15-1.56 0.262-0.33 0.482-0.575 0.662-0.736 0.178-0.161 0.352-0.274 0.518-0.34 0.166-0.066 0.386-0.099 0.66-0.099 0.248 0 0.45 0.0318 0.61 0.095l-0.318 1.43h-0.552c-0.032-0.222-0.124-0.332-0.278-0.332-0.048 0-0.098 8e-3 -0.15 0.0238s-0.118 0.0502-0.194 0.103c-0.076 0.0528-0.188 0.156-0.336 0.309-0.148 0.153-0.314 0.34-0.498 0.562-0.186 0.221-0.374 0.453-0.57 0.696l-0.538 0.672c0.096 0.506 0.184 0.944 0.27 1.31 0.084 0.369 0.158 0.676 0.224 0.921s0.124 0.439 0.174 0.581 0.104 0.249 0.162 0.32 0.118 0.121 0.178 0.15c0.062 0.029 0.132 0.0434 0.21 0.0434 0.142 0 0.282-0.0554 0.416-0.166 0.134-0.111 0.328-0.361 0.58-0.751l0.516 0.34c-0.37 0.548-0.704 0.935-1 1.16s-0.652 0.336-1.06 0.336c-0.226 0-0.418-0.0408-0.576-0.123-0.16-0.0818-0.296-0.212-0.412-0.392-0.116-0.179-0.22-0.459-0.308-0.838-0.164-0.675-0.264-1.19-0.302-1.55h-0.078c-0.56 0.786-0.974 1.35-1.25 1.69s-0.496 0.596-0.672 0.759c-0.178 0.163-0.348 0.278-0.514 0.344s-0.388 0.0988-0.662 0.0988c-0.248 0-0.45-0.0316-0.608-0.0948l0.316-1.43h0.554c0.032 0.222 0.124 0.332 0.276 0.332 0.074 0 0.152-0.0198 0.234-0.0592 0.082-0.0396 0.2-0.135 0.352-0.285 0.152-0.15 0.364-0.386 0.632-0.708 0.27-0.322 0.66-0.804 1.17-1.45-0.08-0.417-0.162-0.817-0.246-1.2-0.084-0.385-0.172-0.743-0.26-1.08-0.09-0.332-0.164-0.55-0.222-0.653-0.058-0.103-0.12-0.174-0.186-0.214-0.066-0.0396-0.15-0.0594-0.25-0.0594-0.11 0-0.21 0.025-0.3 0.0752-0.09 0.05-0.188 0.137-0.292 0.261-0.106 0.124-0.246 0.318-0.42 0.581l-0.514-0.34c0.332-0.501 0.652-0.875 0.958-1.12s0.666-0.372 1.08-0.372z\"/><path d=\"m494 15.7h9.75v1.05h-9.75v-1.05zm0-3.28h9.75v1.05h-9.75v-1.05z\"/><path d=\"m510 14h9.74v5.58h-1.12v-4.54h-8.62v-1.04z\"/><path d=\"m524 11.5c0.164 0 0.308 0.0184 0.432 0.0554s0.234 0.0936 0.328 0.17c0.094 0.0766 0.18 0.175 0.254 0.297 0.072 0.121 0.144 0.286 0.212 0.494 0.07 0.208 0.134 0.467 0.194 0.775 0.062 0.309 0.116 0.629 0.162 0.961h0.08c0.506-0.712 0.89-1.23 1.15-1.56 0.262-0.33 0.482-0.575 0.662-0.736 0.178-0.161 0.352-0.274 0.518-0.34 0.166-0.066 0.386-0.099 0.66-0.099 0.248 0 0.45 0.0318 0.608 0.095l-0.316 1.43h-0.554c-0.03-0.222-0.124-0.332-0.276-0.332-0.048 0-0.098 8e-3 -0.15 0.0238-0.054 0.0158-0.118 0.0502-0.194 0.103-0.076 0.0528-0.188 0.156-0.336 0.309-0.148 0.153-0.314 0.34-0.498 0.562-0.186 0.221-0.376 0.453-0.57 0.696l-0.538 0.672c0.094 0.506 0.184 0.944 0.268 1.31 0.086 0.369 0.16 0.676 0.226 0.921s0.124 0.439 0.174 0.581 0.104 0.249 0.162 0.32 0.118 0.121 0.178 0.15c0.062 0.029 0.13 0.0434 0.21 0.0434 0.142 0 0.28-0.0554 0.416-0.166 0.134-0.111 0.328-0.361 0.58-0.751l0.514 0.34c-0.368 0.548-0.702 0.935-1 1.16s-0.652 0.336-1.06 0.336c-0.226 0-0.418-0.0408-0.578-0.123-0.158-0.0818-0.294-0.212-0.41-0.392-0.116-0.179-0.22-0.459-0.308-0.838-0.164-0.675-0.264-1.19-0.302-1.55h-0.078c-0.56 0.786-0.974 1.35-1.25 1.69s-0.496 0.596-0.672 0.759c-0.178 0.163-0.348 0.278-0.514 0.344-0.168 0.066-0.388 0.0988-0.662 0.0988-0.248 0-0.45-0.0316-0.608-0.0948l0.316-1.43h0.554c0.032 0.222 0.124 0.332 0.276 0.332 0.074 0 0.152-0.0198 0.234-0.0592 0.082-0.0396 0.198-0.135 0.352-0.285 0.152-0.15 0.364-0.386 0.632-0.708 0.27-0.322 0.66-0.804 1.17-1.45-0.08-0.417-0.162-0.817-0.246-1.2-0.084-0.385-0.172-0.743-0.26-1.08-0.09-0.332-0.164-0.55-0.222-0.653-0.058-0.103-0.12-0.174-0.186-0.214-0.066-0.0396-0.15-0.0594-0.25-0.0594-0.11 0-0.21 0.025-0.3 0.0752-0.09 0.05-0.188 0.137-0.292 0.261-0.106 0.124-0.246 0.318-0.42 0.581l-0.514-0.34c0.332-0.501 0.652-0.875 0.956-1.12 0.306-0.248 0.668-0.372 1.08-0.372z\"/></g><path d=\"m121 360c-0.941 0.455-2.17 0.683-3.68 0.683-1.98 0-3.53-0.581-4.66-1.74s-1.7-2.71-1.7-4.64c0-2.06 0.635-3.73 1.9-5.01 1.28-1.28 2.93-1.92 4.96-1.92 1.26 0 2.32 0.159 3.18 0.476v2.79c-0.863-0.515-1.84-0.773-2.95-0.773-1.21 0-2.19 0.381-2.93 1.14-0.743 0.761-1.11 1.79-1.11 3.09 0 1.25 0.35 2.24 1.05 2.98 0.701 0.737 1.64 1.1 2.83 1.1 1.13 0 2.17-0.276 3.11-0.827v2.65zm6.35 0.683c-1.53 0-2.74-0.429-3.62-1.28-0.875-0.863-1.31-2.03-1.31-3.5 0-1.52 0.455-2.71 1.37-3.57 0.91-0.862 2.14-1.29 3.69-1.29 1.53 0 2.73 0.432 3.59 1.29 0.869 0.857 1.3 1.99 1.3 3.4 0 1.53-0.449 2.73-1.35 3.62-0.892 0.886-2.12 1.33-3.67 1.33zm0.071-7.48c-0.67 0-1.19 0.23-1.56 0.691-0.371 0.462-0.557 1.11-0.557 1.96 0 1.77 0.713 2.65 2.14 2.65 1.36 0 2.04-0.907 2.04-2.72 0-1.72-0.686-2.58-2.06-2.58zm15.7 7.25h-2.83v-5.11c0-1.43-0.509-2.14-1.53-2.14-0.491 0-0.896 0.188-1.21 0.566-0.318 0.377-0.476 0.856-0.476 1.44v5.25h-2.84v-9.2h2.84v1.46h0.036c0.676-1.12 1.66-1.68 2.96-1.68 2.04 0 3.06 1.26 3.06 3.79v5.63zm1.65-0.243v-2.3c0.467 0.282 0.932 0.492 1.39 0.629 0.467 0.138 0.907 0.207 1.32 0.207 0.503 0 0.898-0.069 1.19-0.207 0.293-0.137 0.44-0.347 0.44-0.629 0-0.179-0.066-0.329-0.198-0.449s-0.302-0.224-0.512-0.314c-0.204-0.09-0.428-0.171-0.674-0.243-0.245-0.072-0.482-0.153-0.71-0.242-0.365-0.138-0.688-0.285-0.97-0.441-0.275-0.161-0.509-0.347-0.701-0.557-0.185-0.209-0.329-0.452-0.431-0.727-0.096-0.276-0.144-0.602-0.144-0.98 0-0.515 0.111-0.958 0.333-1.33 0.227-0.372 0.527-0.674 0.898-0.908 0.377-0.239 0.806-0.413 1.28-0.521 0.485-0.114 0.988-0.171 1.51-0.171 0.408 0 0.821 0.033 1.24 0.099 0.419 0.06 0.833 0.15 1.24 0.27v2.19c-0.359-0.21-0.746-0.365-1.16-0.467-0.407-0.108-0.809-0.162-1.2-0.162-0.186 0-0.362 0.018-0.53 0.054-0.162 0.03-0.305 0.078-0.431 0.144-0.126 0.06-0.225 0.14-0.297 0.242-0.072 0.096-0.108 0.207-0.108 0.333 0 0.167 0.054 0.311 0.162 0.431s0.249 0.225 0.422 0.314c0.174 0.084 0.366 0.162 0.575 0.234 0.216 0.066 0.429 0.135 0.638 0.207 0.378 0.131 0.719 0.275 1.02 0.431 0.305 0.156 0.566 0.338 0.781 0.548 0.222 0.21 0.39 0.455 0.503 0.737 0.12 0.281 0.18 0.617 0.18 1.01 0 0.545-0.12 1.01-0.359 1.4-0.234 0.384-0.548 0.698-0.944 0.944-0.389 0.239-0.841 0.413-1.36 0.521-0.509 0.114-1.04 0.171-1.59 0.171-1.01 0-1.95-0.156-2.81-0.468zm14.3 0.135c-0.419 0.222-1.05 0.333-1.9 0.333-2 0-3-1.04-3-3.12v-4.21h-1.49v-2.09h1.49v-1.99l2.83-0.808v2.79h2.07v2.09h-2.07v3.72c0 0.958 0.38 1.44 1.14 1.44 0.3 0 0.608-0.086 0.925-0.26v2.1zm9.26 0.108h-2.69v-1.32h-0.036c-0.617 1.03-1.53 1.55-2.74 1.55-0.893 0-1.6-0.252-2.11-0.755-0.51-0.509-0.764-1.19-0.764-2.03 0-1.78 1.06-2.82 3.17-3.09l2.5-0.333c0-1.01-0.545-1.51-1.64-1.51-1.1 0-2.14 0.326-3.13 0.979v-2.14c0.396-0.204 0.935-0.383 1.62-0.539 0.689-0.156 1.32-0.234 1.88-0.234 2.62 0 3.94 1.31 3.94 3.93v5.5zm-2.67-3.74v-0.62l-1.67 0.215c-0.922 0.12-1.38 0.536-1.38 1.25 0 0.323 0.111 0.59 0.333 0.8 0.227 0.203 0.533 0.305 0.916 0.305 0.533 0 0.967-0.183 1.3-0.548 0.335-0.371 0.503-0.838 0.503-1.4zm13.8 3.74h-2.83v-5.11c0-1.43-0.509-2.14-1.53-2.14-0.492 0-0.896 0.188-1.21 0.566-0.318 0.377-0.476 0.856-0.476 1.44v5.25h-2.84v-9.2h2.84v1.46h0.035c0.677-1.12 1.66-1.68 2.96-1.68 2.04 0 3.06 1.26 3.06 3.79v5.63zm7.82-0.108c-0.419 0.222-1.05 0.333-1.9 0.333-2 0-3-1.04-3-3.12v-4.21h-1.49v-2.09h1.49v-1.99l2.83-0.808v2.79h2.07v2.09h-2.07v3.72c0 0.958 0.38 1.44 1.14 1.44 0.3 0 0.608-0.086 0.925-0.26v2.1z\" fill=\"#000\"/><path d=\"m477 347-4.44 12.9h-3.29l-4.38-12.9h3.13l2.69 8.97c0.143 0.485 0.23 0.913 0.26 1.28h0.054c0.042-0.402 0.135-0.842 0.279-1.32l2.67-8.93h3.04zm7.54 12.9h-2.69v-1.32h-0.036c-0.617 1.03-1.53 1.55-2.74 1.55-0.892 0-1.6-0.252-2.11-0.755-0.509-0.509-0.764-1.19-0.764-2.03 0-1.78 1.06-2.82 3.17-3.09l2.5-0.333c0-1.01-0.545-1.51-1.64-1.51-1.1 0-2.14 0.326-3.13 0.979v-2.14c0.395-0.204 0.934-0.383 1.62-0.539 0.689-0.156 1.32-0.234 1.88-0.234 2.62 0 3.94 1.31 3.94 3.93v5.5zm-2.67-3.74v-0.62l-1.67 0.215c-0.922 0.12-1.38 0.536-1.38 1.25 0 0.323 0.11 0.59 0.332 0.8 0.228 0.203 0.533 0.305 0.916 0.305 0.534 0 0.968-0.183 1.3-0.548 0.336-0.371 0.503-0.838 0.503-1.4zm10.9-2.9c-0.341-0.186-0.739-0.279-1.2-0.279-0.617 0-1.1 0.228-1.45 0.683-0.347 0.449-0.521 1.06-0.521 1.84v4.39h-2.84v-9.2h2.84v1.71h0.036c0.449-1.25 1.26-1.87 2.43-1.87 0.299 0 0.533 0.036 0.7 0.108v2.62zm2.84-4.02c-0.479 0-0.871-0.141-1.18-0.423-0.305-0.287-0.458-0.638-0.458-1.05 0-0.425 0.153-0.773 0.458-1.04 0.306-0.27 0.698-0.404 1.18-0.404 0.486 0 0.878 0.134 1.18 0.404 0.306 0.269 0.459 0.617 0.459 1.04 0 0.431-0.153 0.785-0.459 1.06-0.299 0.276-0.691 0.414-1.18 0.414zm1.4 10.7h-2.84v-9.2h2.84v9.2zm10 0h-2.69v-1.32h-0.036c-0.617 1.03-1.53 1.55-2.74 1.55-0.892 0-1.6-0.252-2.11-0.755-0.509-0.509-0.764-1.19-0.764-2.03 0-1.78 1.06-2.82 3.17-3.09l2.5-0.333c0-1.01-0.545-1.51-1.64-1.51-1.1 0-2.14 0.326-3.13 0.979v-2.14c0.396-0.204 0.935-0.383 1.62-0.539 0.688-0.156 1.31-0.234 1.88-0.234 2.62 0 3.94 1.31 3.94 3.93v5.5zm-2.67-3.74v-0.62l-1.67 0.215c-0.922 0.12-1.38 0.536-1.38 1.25 0 0.323 0.111 0.59 0.333 0.8 0.227 0.203 0.533 0.305 0.916 0.305 0.533 0 0.968-0.183 1.3-0.548 0.335-0.371 0.503-0.838 0.503-1.4zm7.79 2.67h-0.036v1.07h-2.84v-13.6h2.84v5.8h0.036c0.7-1.07 1.7-1.61 2.99-1.61 1.19 0 2.1 0.408 2.74 1.22 0.641 0.815 0.961 1.93 0.961 3.34 0 1.53-0.374 2.76-1.12 3.69s-1.75 1.39-3 1.39c-1.13 0-1.99-0.432-2.57-1.29zm-0.081-3.88v0.943c0 0.593 0.17 1.08 0.512 1.47 0.341 0.39 0.778 0.584 1.31 0.584 0.646 0 1.15-0.248 1.5-0.745 0.359-0.503 0.539-1.21 0.539-2.13 0-0.76-0.165-1.35-0.494-1.78-0.324-0.431-0.788-0.646-1.39-0.646-0.569 0-1.04 0.212-1.42 0.638-0.372 0.425-0.557 0.979-0.557 1.66zm11.5 4.95h-2.84v-13.6h2.84v13.6zm10.7-3.79h-6c0.096 1.34 0.937 2 2.52 2 1.01 0 1.9-0.239 2.67-0.719v2.05c-0.851 0.455-1.96 0.683-3.32 0.683-1.48 0-2.64-0.411-3.46-1.23-0.82-0.827-1.23-1.98-1.23-3.45 0-1.53 0.443-2.74 1.33-3.63 0.887-0.892 1.98-1.34 3.27-1.34 1.34 0 2.38 0.399 3.11 1.2 0.737 0.797 1.1 1.88 1.1 3.24v1.2zm-2.63-1.74c0-1.32-0.533-1.98-1.6-1.98-0.456 0-0.851 0.189-1.19 0.566-0.33 0.377-0.53 0.848-0.602 1.41h3.39z\" fill=\"#000\"/><g clip-rule=\"evenodd\" fill=\"#000\" fill-rule=\"evenodd\"><path d=\"m242 183h1.25v15.1h-1.25v-15.1z\"/><path d=\"m250 184c-0.374 0-0.686 0.11-0.936 0.332-0.252 0.222-0.454 0.54-0.608 0.956s-0.264 0.924-0.328 1.52c-0.066 0.598-0.098 1.27-0.098 2.02 0 1.76 0.164 3.05 0.49 3.88 0.328 0.826 0.834 1.24 1.52 1.24 0.654 0 1.14-0.388 1.46-1.16 0.316-0.776 0.474-1.98 0.474-3.6 0-1.24-0.082-2.25-0.244-3.02s-0.388-1.32-0.676-1.66c-0.29-0.334-0.64-0.502-1.05-0.502zm0.04-0.69c1.18 0 2.06 0.458 2.64 1.37 0.578 0.914 0.868 2.29 0.868 4.14 0 1.91-0.31 3.36-0.928 4.34-0.618 0.982-1.52 1.47-2.71 1.47-1.17 0-2.04-0.46-2.61-1.38s-0.854-2.31-0.854-4.18c0-0.994 0.088-1.85 0.262-2.58 0.176-0.724 0.422-1.32 0.738-1.8 0.316-0.472 0.696-0.822 1.14-1.05 0.442-0.228 0.926-0.342 1.45-0.342z\"/><path d=\"m256 182 3.24 7.28v0.6l-3.24 7.29-0.866-0.308 2.6-7.28-2.6-7.29 0.866-0.292z\"/><path d=\"m139 72.2h1.25v15.1h-1.25v-15.1z\"/><path d=\"m148 72.6h0.444c-0.032 0.519-0.048 1.24-0.048 2.16v6.92c0 0.313 0.018 0.55 0.052 0.709 0.036 0.159 0.098 0.289 0.188 0.389 0.088 0.1 0.216 0.178 0.384 0.235 0.168 0.0566 0.378 0.0998 0.632 0.13s0.59 0.05 1.01 0.0608v0.592h-5.99v-0.592c0.6-0.027 1.03-0.0634 1.28-0.109 0.258-0.046 0.454-0.115 0.588-0.207 0.136-0.0918 0.234-0.221 0.296-0.389 0.062-0.167 0.094-0.44 0.094-0.819v-6.57c0-0.216-0.038-0.374-0.114-0.474-0.076-0.0998-0.186-0.15-0.332-0.15-0.174 0-0.42 0.089-0.738 0.267-0.32 0.178-0.714 0.424-1.18 0.738l-0.356-0.624 3.79-2.26z\"/><path d=\"m153 71.5 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m208 115h1.25v15.1h-1.25v-15.1z\"/><path d=\"m217 117h1.15v4.67h4.42v1.08h-4.42v4.67h-1.15v-4.67h-4.42v-1.08h4.42v-4.67z\"/><path d=\"m225 114 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m208 248h1.25v15.1h-1.25v-15.1z\"/><path d=\"m212 255h9.99v1.08h-9.99v-1.08z\"/><path d=\"m225 247 3.23 7.28v0.6l-3.23 7.29-0.866-0.308 2.6-7.28-2.6-7.29 0.866-0.292z\"/><path d=\"m132 292h9.99v1.08h-9.99v-1.08z\"/><path d=\"m145 285h1.25v15.1h-1.25v-15.1z\"/><path d=\"m154 286h0.444c-0.032 0.52-0.048 1.24-0.048 2.16v6.92c0 0.314 0.018 0.55 0.054 0.71 0.034 0.16 0.096 0.29 0.186 0.39 0.088 0.1 0.216 0.178 0.384 0.234 0.168 0.058 0.378 0.1 0.632 0.13s0.59 0.05 1.01 0.06v0.592h-5.99v-0.592c0.6-0.026 1.03-0.062 1.28-0.108 0.258-0.046 0.454-0.116 0.588-0.208 0.136-0.092 0.234-0.22 0.296-0.388s0.094-0.44 0.094-0.82v-6.57c0-0.216-0.038-0.374-0.114-0.474s-0.186-0.15-0.332-0.15c-0.174 0-0.42 0.088-0.738 0.266-0.318 0.18-0.714 0.424-1.18 0.738l-0.356-0.624 3.79-2.26z\"/><path d=\"m159 285 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m27.9 189h9.99v1.08h-9.99v-1.08z\"/><path d=\"m41 183h1.25v15.1h-1.25v-15.1z\"/><path d=\"m48.9 184c-0.373 0-0.685 0.11-0.936 0.332-0.251 0.222-0.454 0.54-0.608 0.956s-0.264 0.924-0.328 1.52c-0.0648 0.598-0.0972 1.27-0.0972 2.02 0 1.76 0.163 3.05 0.49 3.88 0.327 0.826 0.833 1.24 1.52 1.24 0.654 0 1.14-0.388 1.45-1.16 0.316-0.776 0.474-1.98 0.474-3.6 0-1.24-0.081-2.25-0.243-3.02-0.162-0.77-0.388-1.32-0.677-1.66-0.289-0.334-0.639-0.502-1.05-0.502zm0.0406-0.69c1.18 0 2.06 0.458 2.64 1.37 0.578 0.914 0.867 2.29 0.867 4.14 0 1.91-0.309 3.36-0.928 4.34-0.619 0.982-1.52 1.47-2.71 1.47-1.17 0-2.04-0.46-2.61-1.38-0.57-0.918-0.855-2.31-0.855-4.18 0-0.994 0.0878-1.85 0.263-2.58s0.422-1.32 0.738-1.8c0.316-0.472 0.696-0.822 1.14-1.05 0.443-0.228 0.927-0.342 1.45-0.342z\"/><path d=\"m55.2 182 3.23 7.28v0.6l-3.23 7.29-0.867-0.308 2.6-7.28-2.6-7.29 0.867-0.292z\"/><path d=\"m57.3 254h9.99v1.08h-9.99v-1.08z\"/><path d=\"m70.4 248h1.25v15.1h-1.25v-15.1z\"/><path d=\"m79.3 250h1.15v4.67h4.42v1.08h-4.42v4.67h-1.15v-4.67h-4.42v-1.08h4.42v-4.67z\"/><path d=\"m87.8 247 3.23 7.28v0.6l-3.23 7.29-0.867-0.308 2.6-7.28-2.6-7.29 0.867-0.292z\"/><path d=\"m56.6 121h9.99v1.08h-9.99v-1.08z\"/><path d=\"m69.8 115h1.25v15.1h-1.25v-15.1z\"/><path d=\"m74.3 121h9.99v1.08h-9.99v-1.08z\"/><path d=\"m87.1 114 3.23 7.28v0.599l-3.23 7.29-0.867-0.308 2.6-7.28-2.6-7.29 0.867-0.292z\"/><path d=\"m593 183h1.25v15.1h-1.25v-15.1z\"/><path d=\"m601 184c-0.372 0-0.684 0.11-0.936 0.332-0.25 0.222-0.454 0.54-0.608 0.956s-0.262 0.924-0.328 1.52c-0.064 0.598-0.096 1.27-0.096 2.02 0 1.76 0.162 3.05 0.49 3.88 0.326 0.826 0.834 1.24 1.52 1.24 0.654 0 1.14-0.388 1.45-1.16s0.474-1.98 0.474-3.6c0-1.24-0.08-2.25-0.242-3.02s-0.388-1.32-0.678-1.66c-0.288-0.334-0.638-0.502-1.05-0.502zm0.042-0.69c1.18 0 2.06 0.458 2.64 1.37 0.578 0.914 0.868 2.29 0.868 4.14 0 1.91-0.31 3.36-0.93 4.34-0.618 0.982-1.52 1.47-2.71 1.47-1.17 0-2.04-0.46-2.61-1.38s-0.856-2.31-0.856-4.18c0-0.994 0.088-1.85 0.264-2.58s0.422-1.32 0.738-1.8c0.316-0.472 0.696-0.822 1.14-1.05 0.444-0.228 0.928-0.342 1.45-0.342z\"/><path d=\"m607 182 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m490 72.2h1.25v15.1h-1.25v-15.1z\"/><path d=\"m499 72.6h0.446c-0.032 0.519-0.048 1.24-0.048 2.16v6.92c0 0.313 0.018 0.55 0.052 0.709 0.036 0.159 0.098 0.289 0.186 0.389 0.09 0.1 0.218 0.178 0.386 0.235 0.168 0.0566 0.378 0.0998 0.632 0.13s0.588 0.05 1 0.0608v0.592h-5.99v-0.592c0.6-0.027 1.03-0.0634 1.29-0.109 0.256-0.046 0.452-0.115 0.588-0.207 0.134-0.0918 0.234-0.221 0.296-0.389 0.062-0.167 0.092-0.44 0.092-0.819v-6.57c0-0.216-0.038-0.374-0.114-0.474-0.074-0.0998-0.186-0.15-0.332-0.15-0.172 0-0.418 0.089-0.736 0.267-0.32 0.178-0.714 0.424-1.18 0.738l-0.358-0.624 3.79-2.26z\"/><path d=\"m504 71.5 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m559 115h1.25v15.1h-1.25v-15.1z\"/><path d=\"m567 117h1.15v4.67h4.42v1.08h-4.42v4.67h-1.15v-4.67h-4.42v-1.08h4.42v-4.67z\"/><path d=\"m576 114 3.23 7.28v0.6l-3.23 7.29-0.866-0.308 2.6-7.28-2.6-7.29 0.866-0.292z\"/><path d=\"m559 248h1.25v15.1h-1.25v-15.1z\"/><path d=\"m563 255h9.99v1.08h-9.99v-1.08z\"/><path d=\"m576 247 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m483 292h9.99v1.08h-9.99v-1.08z\"/><path d=\"m496 285h1.25v15.1h-1.25v-15.1z\"/><path d=\"m505 286h0.446c-0.032 0.52-0.048 1.24-0.048 2.16v6.92c0 0.314 0.018 0.55 0.052 0.71 0.036 0.16 0.098 0.29 0.186 0.39 0.09 0.1 0.218 0.178 0.386 0.234 0.168 0.058 0.378 0.1 0.632 0.13s0.588 0.05 1 0.06v0.592h-5.99v-0.592c0.598-0.026 1.03-0.062 1.28-0.108s0.452-0.116 0.588-0.208c0.134-0.092 0.234-0.22 0.296-0.388s0.092-0.44 0.092-0.82v-6.57c0-0.216-0.038-0.374-0.114-0.474-0.074-0.1-0.186-0.15-0.332-0.15-0.172 0-0.418 0.088-0.736 0.266-0.32 0.18-0.714 0.424-1.18 0.738l-0.358-0.624 3.79-2.26z\"/><path d=\"m510 285 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m379 189h9.99v1.08h-9.99v-1.08z\"/><path d=\"m392 183h1.25v15.1h-1.25v-15.1z\"/><path d=\"m400 184c-0.372 0-0.684 0.11-0.936 0.332-0.25 0.222-0.454 0.54-0.608 0.956s-0.262 0.924-0.328 1.52c-0.064 0.598-0.098 1.27-0.098 2.02 0 1.76 0.164 3.05 0.492 3.88 0.326 0.826 0.832 1.24 1.52 1.24 0.652 0 1.14-0.388 1.45-1.16s0.474-1.98 0.474-3.6c0-1.24-0.08-2.25-0.242-3.02-0.164-0.77-0.388-1.32-0.678-1.66-0.288-0.334-0.638-0.502-1.05-0.502zm0.042-0.69c1.18 0 2.06 0.458 2.64 1.37 0.578 0.914 0.866 2.29 0.866 4.14 0 1.91-0.308 3.36-0.928 4.34-0.618 0.982-1.52 1.47-2.71 1.47-1.17 0-2.04-0.46-2.61-1.38s-0.856-2.31-0.856-4.18c0-0.994 0.088-1.85 0.264-2.58s0.422-1.32 0.738-1.8c0.316-0.472 0.696-0.822 1.14-1.05 0.444-0.228 0.926-0.342 1.45-0.342z\"/><path d=\"m406 182 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m408 254h9.99v1.08h-9.99v-1.08z\"/><path d=\"m421 248h1.25v15.1h-1.25v-15.1z\"/><path d=\"m430 250h1.15v4.67h4.42v1.08h-4.42v4.67h-1.15v-4.67h-4.42v-1.08h4.42v-4.67z\"/><path d=\"m439 247 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m408 121h9.99v1.08h-9.99v-1.08z\"/><path d=\"m421 115h1.25v15.1h-1.25v-15.1z\"/><path d=\"m425 121h9.99v1.08h-9.99v-1.08z\"/><path d=\"m438 114 3.23 7.28v0.599l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/></g></g><defs><clipPath id=\"clip0_5_635\"><rect transform=\"translate(.6 .2)\" width=\"737\" height=\"374\" fill=\"#fff\"/></clipPath></defs></svg>\n\n3. Apply the $H$ gate to the qubit again.\n Now, we get the $\\ket{0}$ state for both constant scenarios and the $\\ket{1}$ state for both variable scenarios!\n <br/>\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<svg width=\"679\" height=\"365\" fill=\"none\" version=\"1.1\" viewBox=\"0 0 679 365\" xmlns=\"http://www.w3.org/2000/svg\"><g clip-path=\"url(#clip0_6_812)\"><g clip-rule=\"evenodd\" fill-rule=\"evenodd\"><path d=\"m24.1 163c0-76.8 62.3-139 139-139 76.8 0 139 62.3 139 139 0 76.8-62.3 139-139 139-76.8 0-139-62.3-139-139z\" stroke=\"#747474\" stroke-miterlimit=\"8\" stroke-width=\"1.38\"/><path d=\"m296 163c0-3.26 2.64-5.9 5.9-5.9s5.9 2.64 5.9 5.9-2.64 5.9-5.9 5.9-5.9-2.64-5.9-5.9z\" fill=\"#0070C0\"/><path d=\"m157 23.8c0-3.26 2.64-5.9 5.9-5.9s5.9 2.64 5.9 5.9c0 3.26-2.64 5.9-5.9 5.9s-5.9-2.64-5.9-5.9z\" fill=\"#fff\" stroke=\"#000\" stroke-miterlimit=\"8\" stroke-width=\"1.38\"/><path d=\"m18 163c0-3.26 2.69-5.9 6-5.9 3.31 0 6 2.64 6 5.9s-2.69 5.9-6 5.9c-3.31 0-6-2.64-6-5.9z\" fill=\"#0070C0\"/><g fill=\"#fff\" stroke-miterlimit=\"8\" stroke-width=\"1.38\"><path d=\"m157 302c0-3.26 2.64-5.9 5.9-5.9s5.9 2.64 5.9 5.9-2.64 5.9-5.9 5.9-5.9-2.64-5.9-5.9z\" stroke=\"#000\"/><path d=\"m257 66.6c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9c0 3.26-2.69 5.9-6 5.9s-6-2.64-6-5.9z\" stroke=\"#0070C0\"/><path d=\"m257 260c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9-2.69 5.9-6 5.9-6-2.64-6-5.9z\" stroke=\"#000\"/><path d=\"m57.3 66.6c0-3.26 2.69-5.9 6-5.9 3.31 0 6 2.64 6 5.9 0 3.26-2.69 5.9-6 5.9-3.31 0-6-2.64-6-5.9z\" stroke=\"#000\"/><path d=\"m57.3 260c0-3.26 2.69-5.9 6-5.9 3.31 0 6 2.64 6 5.9s-2.69 5.9-6 5.9c-3.31 0-6-2.64-6-5.9z\" stroke=\"#0070C0\"/></g><path d=\"m375 163c0-76.8 62.2-139 139-139s139 62.3 139 139c0 76.8-62.2 139-139 139s-139-62.3-139-139z\" stroke=\"#747474\" stroke-miterlimit=\"8\" stroke-width=\"1.38\"/><path d=\"m647 163c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9-2.69 5.9-6 5.9-6-2.64-6-5.9z\" fill=\"#fff\" stroke=\"#000\" stroke-miterlimit=\"8\" stroke-width=\"1.38\"/><path d=\"m508 23.7c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9c0 3.26-2.69 5.9-6 5.9s-6-2.64-6-5.9z\" fill=\"#0070C0\"/><path d=\"m369 163c0-3.26 2.64-5.9 5.9-5.9s5.9 2.64 5.9 5.9-2.64 5.9-5.9 5.9-5.9-2.64-5.9-5.9z\" fill=\"#fff\" stroke=\"#000\" stroke-miterlimit=\"8\" stroke-width=\"1.38\"/><path d=\"m508 302c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9-2.69 5.9-6 5.9-6-2.64-6-5.9z\" fill=\"#0070C0\"/><g fill=\"#fff\" stroke-miterlimit=\"8\" stroke-width=\"1.38\"><path d=\"m608 66.6c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9c0 3.26-2.69 5.9-6 5.9s-6-2.64-6-5.9z\" stroke=\"#000\"/><path d=\"m608 260c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9-2.69 5.9-6 5.9-6-2.64-6-5.9z\" stroke=\"#0070C0\"/><path d=\"m408 66.6c0-3.26 2.64-5.9 5.9-5.9s5.9 2.64 5.9 5.9c0 3.26-2.64 5.9-5.9 5.9s-5.9-2.64-5.9-5.9z\" stroke=\"#0070C0\"/><path d=\"m408 260c0-3.26 2.64-5.9 5.9-5.9s5.9 2.64 5.9 5.9-2.64 5.9-5.9 5.9-5.9-2.64-5.9-5.9z\" stroke=\"#000\"/></g></g><g fill=\"#0070C0\"><path d=\"m309 162h15.1l-0.688 0.688v-96.5l0.688 0.688h-55.3v-1.38h56v97.9h-15.8v-1.38zm5.06 5.8-6.13-5.11 6.13-5.11c0.292-0.242 0.726-0.202 0.968 0.088 0.244 0.292 0.204 0.726-0.088 0.97l-5.5 4.58v-1.06l5.5 4.58c0.292 0.242 0.332 0.676 0.088 0.968-0.242 0.292-0.676 0.33-0.968 0.088z\"/><path d=\"m17 164h-15.4l0.688-0.688v96.5l-0.688-0.688h55.7v1.38h-56.3v-97.9h16.1v1.38zm-5.06-5.8 6.13 5.11-6.13 5.11c-0.292 0.242-0.725 0.204-0.968-0.088-0.243-0.292-0.204-0.726 0.088-0.968l5.5-4.58v1.06l-5.5-4.58c-0.292-0.242-0.331-0.676-0.088-0.968 0.243-0.292 0.677-0.33 0.968-0.088z\"/><path d=\"m620 259h57.4l-0.688 0.686v-258l0.688 0.687h-163l0.688-0.687v15.4h-1.38v-16.1h165v260h-58.1v-1.37zm-101-247-5.11 6.13-5.11-6.13c-0.242-0.292-0.204-0.725 0.088-0.968 0.292-0.243 0.726-0.204 0.968 0.088l4.58 5.5h-1.06l4.58-5.5c0.242-0.292 0.676-0.331 0.968-0.088 0.292 0.243 0.33 0.677 0.088 0.968z\"/><path d=\"m408 67.4h-51.1l0.686-0.688v258l-0.686-0.688h157l-0.686 0.688v-15.4h1.37v16.1h-158v-259h51.8v1.38zm101 247 5.11-6.13 5.11 6.13c0.244 0.292 0.204 0.726-0.088 0.97-0.292 0.242-0.724 0.202-0.968-0.088l-4.58-5.5h1.06l-4.58 5.5c-0.244 0.29-0.676 0.33-0.968 0.088-0.292-0.244-0.332-0.678-0.088-0.97z\"/></g><path d=\"m135 350c-0.94 0.455-2.17 0.683-3.68 0.683-1.98 0-3.53-0.581-4.66-1.74s-1.7-2.71-1.7-4.64c0-2.06 0.635-3.73 1.9-5.01 1.28-1.28 2.93-1.92 4.96-1.92 1.26 0 2.32 0.159 3.18 0.476v2.79c-0.862-0.515-1.84-0.773-2.95-0.773-1.21 0-2.19 0.381-2.93 1.14-0.743 0.761-1.11 1.79-1.11 3.09 0 1.25 0.35 2.24 1.05 2.98 0.7 0.737 1.64 1.1 2.83 1.1 1.13 0 2.17-0.276 3.11-0.827v2.65zm6.35 0.683c-1.53 0-2.74-0.429-3.62-1.28-0.875-0.863-1.31-2.03-1.31-3.5 0-1.52 0.455-2.71 1.37-3.57 0.91-0.862 2.14-1.29 3.69-1.29 1.53 0 2.72 0.432 3.59 1.29 0.868 0.857 1.3 1.99 1.3 3.4 0 1.53-0.45 2.73-1.35 3.62-0.893 0.886-2.12 1.33-3.68 1.33zm0.072-7.48c-0.671 0-1.19 0.23-1.56 0.691-0.371 0.462-0.557 1.11-0.557 1.96 0 1.77 0.713 2.65 2.14 2.65 1.36 0 2.04-0.907 2.04-2.72 0-1.72-0.686-2.58-2.06-2.58zm15.7 7.25h-2.83v-5.11c0-1.43-0.509-2.14-1.53-2.14-0.492 0-0.896 0.188-1.21 0.566-0.318 0.377-0.477 0.856-0.477 1.44v5.25h-2.84v-9.2h2.84v1.46h0.036c0.677-1.12 1.66-1.68 2.96-1.68 2.04 0 3.06 1.26 3.06 3.79v5.63zm1.65-0.243v-2.3c0.467 0.282 0.931 0.492 1.39 0.629 0.467 0.138 0.907 0.207 1.32 0.207 0.503 0 0.899-0.069 1.19-0.207 0.294-0.137 0.441-0.347 0.441-0.629 0-0.179-0.066-0.329-0.198-0.449s-0.303-0.224-0.512-0.314c-0.204-0.09-0.429-0.171-0.674-0.243-0.246-0.072-0.482-0.153-0.71-0.242-0.365-0.138-0.689-0.285-0.97-0.441-0.276-0.161-0.509-0.347-0.701-0.557-0.186-0.209-0.329-0.452-0.431-0.727-0.096-0.276-0.144-0.602-0.144-0.98 0-0.515 0.111-0.958 0.332-1.33 0.228-0.372 0.528-0.674 0.899-0.908 0.377-0.239 0.806-0.413 1.28-0.521 0.485-0.114 0.988-0.171 1.51-0.171 0.407 0 0.821 0.033 1.24 0.099 0.419 0.06 0.832 0.15 1.24 0.27v2.19c-0.36-0.21-0.746-0.365-1.16-0.467-0.408-0.108-0.809-0.162-1.2-0.162-0.186 0-0.363 0.018-0.53 0.054-0.162 0.03-0.306 0.078-0.431 0.144-0.126 0.06-0.225 0.14-0.297 0.242-0.072 0.096-0.108 0.207-0.108 0.333 0 0.167 0.054 0.311 0.162 0.431s0.249 0.225 0.422 0.314c0.174 0.084 0.366 0.162 0.575 0.234 0.216 0.066 0.428 0.135 0.638 0.207 0.377 0.131 0.719 0.275 1.02 0.431 0.306 0.156 0.566 0.338 0.782 0.548 0.222 0.21 0.389 0.455 0.503 0.737 0.12 0.281 0.18 0.617 0.18 1.01 0 0.545-0.12 1.01-0.36 1.4-0.233 0.384-0.548 0.698-0.943 0.944-0.389 0.239-0.841 0.413-1.36 0.521-0.509 0.114-1.04 0.171-1.59 0.171-1.01 0-1.95-0.156-2.81-0.468zm14.3 0.135c-0.419 0.222-1.05 0.333-1.9 0.333-2 0-3-1.04-3-3.12v-4.21h-1.49v-2.09h1.49v-1.99l2.83-0.808v2.79h2.07v2.09h-2.07v3.72c0 0.958 0.38 1.44 1.14 1.44 0.299 0 0.608-0.086 0.925-0.26v2.1zm9.26 0.108h-2.69v-1.32h-0.036c-0.617 1.03-1.53 1.55-2.74 1.55-0.893 0-1.6-0.252-2.11-0.755-0.509-0.509-0.763-1.19-0.763-2.03 0-1.78 1.06-2.82 3.17-3.09l2.5-0.333c0-1.01-0.545-1.51-1.64-1.51-1.1 0-2.14 0.326-3.13 0.979v-2.14c0.395-0.204 0.934-0.383 1.62-0.539 0.689-0.156 1.32-0.234 1.88-0.234 2.62 0 3.94 1.31 3.94 3.93v5.5zm-2.67-3.74v-0.62l-1.67 0.215c-0.923 0.12-1.38 0.536-1.38 1.25 0 0.323 0.111 0.59 0.333 0.8 0.227 0.203 0.533 0.305 0.916 0.305 0.533 0 0.967-0.183 1.3-0.548 0.335-0.371 0.503-0.838 0.503-1.4zm13.8 3.74h-2.83v-5.11c0-1.43-0.509-2.14-1.53-2.14-0.491 0-0.895 0.188-1.21 0.566-0.317 0.377-0.476 0.856-0.476 1.44v5.25h-2.84v-9.2h2.84v1.46h0.036c0.677-1.12 1.66-1.68 2.96-1.68 2.04 0 3.06 1.26 3.06 3.79v5.63zm7.82-0.108c-0.419 0.222-1.05 0.333-1.9 0.333-2 0-3-1.04-3-3.12v-4.21h-1.49v-2.09h1.49v-1.99l2.83-0.808v2.79h2.07v2.09h-2.07v3.72c0 0.958 0.38 1.44 1.14 1.44 0.299 0 0.608-0.086 0.925-0.26v2.1z\" fill=\"#000\"/><path d=\"m491 338-4.44 12.9h-3.29l-4.38-12.9h3.13l2.69 8.97c0.144 0.485 0.23 0.913 0.26 1.28h0.054c0.042-0.402 0.135-0.842 0.279-1.32l2.67-8.93h3.04zm7.54 12.9h-2.69v-1.32h-0.036c-0.616 1.03-1.53 1.55-2.74 1.55-0.892 0-1.6-0.252-2.11-0.755-0.509-0.509-0.764-1.19-0.764-2.03 0-1.78 1.06-2.82 3.17-3.09l2.5-0.333c0-1.01-0.545-1.51-1.64-1.51-1.1 0-2.14 0.326-3.13 0.979v-2.14c0.395-0.204 0.934-0.383 1.62-0.539 0.689-0.156 1.32-0.234 1.88-0.234 2.62 0 3.94 1.31 3.94 3.93v5.5zm-2.67-3.74v-0.62l-1.67 0.215c-0.922 0.12-1.38 0.536-1.38 1.25 0 0.323 0.11 0.59 0.332 0.8 0.228 0.203 0.533 0.305 0.916 0.305 0.534 0 0.968-0.183 1.3-0.548 0.336-0.371 0.503-0.838 0.503-1.4zm10.9-2.9c-0.341-0.186-0.739-0.279-1.2-0.279-0.616 0-1.1 0.228-1.45 0.683-0.347 0.449-0.521 1.06-0.521 1.84v4.39h-2.84v-9.2h2.84v1.71h0.036c0.449-1.25 1.26-1.87 2.43-1.87 0.299 0 0.533 0.036 0.7 0.108v2.62zm2.84-4.02c-0.479 0-0.871-0.141-1.18-0.423-0.305-0.287-0.458-0.638-0.458-1.05 0-0.425 0.153-0.773 0.458-1.04 0.306-0.27 0.698-0.404 1.18-0.404 0.486 0 0.878 0.134 1.18 0.404 0.306 0.269 0.459 0.617 0.459 1.04 0 0.431-0.153 0.785-0.459 1.06-0.299 0.276-0.691 0.414-1.18 0.414zm1.4 10.7h-2.84v-9.2h2.84v9.2zm10 0h-2.69v-1.32h-0.036c-0.617 1.03-1.53 1.55-2.74 1.55-0.892 0-1.6-0.252-2.11-0.755-0.509-0.509-0.764-1.19-0.764-2.03 0-1.78 1.06-2.82 3.17-3.09l2.5-0.333c0-1.01-0.545-1.51-1.64-1.51-1.1 0-2.14 0.326-3.13 0.979v-2.14c0.396-0.204 0.935-0.383 1.62-0.539 0.688-0.156 1.31-0.234 1.88-0.234 2.62 0 3.94 1.31 3.94 3.93v5.5zm-2.67-3.74v-0.62l-1.67 0.215c-0.922 0.12-1.38 0.536-1.38 1.25 0 0.323 0.111 0.59 0.333 0.8 0.227 0.203 0.533 0.305 0.916 0.305 0.533 0 0.968-0.183 1.3-0.548 0.335-0.371 0.503-0.838 0.503-1.4zm7.79 2.67h-0.036v1.07h-2.84v-13.6h2.84v5.8h0.036c0.7-1.07 1.7-1.61 2.99-1.61 1.19 0 2.1 0.408 2.74 1.22 0.641 0.815 0.961 1.93 0.961 3.34 0 1.53-0.374 2.76-1.12 3.69s-1.75 1.39-3 1.39c-1.13 0-1.99-0.432-2.57-1.29zm-0.081-3.88v0.943c0 0.593 0.17 1.08 0.512 1.47 0.341 0.39 0.779 0.584 1.31 0.584 0.646 0 1.15-0.248 1.5-0.745 0.359-0.503 0.539-1.21 0.539-2.13 0-0.76-0.165-1.35-0.494-1.78-0.324-0.431-0.788-0.646-1.39-0.646-0.569 0-1.04 0.212-1.42 0.638-0.372 0.425-0.557 0.979-0.557 1.66zm11.5 4.95h-2.84v-13.6h2.84v13.6zm10.7-3.79h-6c0.096 1.34 0.937 2 2.52 2 1.01 0 1.9-0.239 2.67-0.719v2.05c-0.851 0.455-1.96 0.683-3.32 0.683-1.48 0-2.64-0.411-3.46-1.23-0.82-0.827-1.23-1.98-1.23-3.45 0-1.53 0.443-2.74 1.33-3.63 0.887-0.892 1.98-1.34 3.27-1.34 1.34 0 2.38 0.399 3.11 1.2 0.737 0.797 1.1 1.88 1.1 3.24v1.2zm-2.63-1.74c0-1.32-0.533-1.98-1.6-1.98-0.456 0-0.851 0.189-1.19 0.566-0.33 0.377-0.53 0.848-0.602 1.41h3.39z\" fill=\"#000\"/><g clip-rule=\"evenodd\" fill=\"#000\" fill-rule=\"evenodd\"><path d=\"m259 156h1.25v15.1h-1.25v-15.1z\"/><path d=\"m266 157c-0.372 0-0.684 0.11-0.936 0.332s-0.454 0.54-0.608 0.956-0.264 0.924-0.328 1.52c-0.064 0.598-0.098 1.27-0.098 2.02 0 1.76 0.164 3.05 0.49 3.88 0.328 0.824 0.834 1.24 1.52 1.24 0.654 0 1.14-0.386 1.46-1.16s0.474-1.98 0.474-3.6c0-1.24-0.082-2.25-0.244-3.02s-0.388-1.32-0.676-1.66c-0.29-0.334-0.64-0.502-1.05-0.502zm0.04-0.69c1.18 0 2.06 0.458 2.64 1.37 0.578 0.914 0.866 2.29 0.866 4.14 0 1.91-0.308 3.36-0.928 4.34-0.618 0.982-1.52 1.47-2.71 1.47-1.17 0-2.04-0.46-2.61-1.38s-0.856-2.31-0.856-4.18c0-0.994 0.088-1.85 0.264-2.58s0.42-1.32 0.738-1.8c0.316-0.472 0.694-0.822 1.14-1.05 0.442-0.228 0.926-0.342 1.45-0.342z\"/><path d=\"m273 156 3.23 7.28v0.598l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m156 45.5h1.25v15.1h-1.25v-15.1z\"/><path d=\"m164 45.9h0.446c-0.032 0.519-0.05 1.24-0.05 2.16v6.92c0 0.313 0.018 0.55 0.054 0.709 0.034 0.159 0.096 0.289 0.186 0.389s0.218 0.178 0.384 0.235c0.168 0.0568 0.38 0.1 0.634 0.13 0.254 0.0298 0.588 0.05 1 0.0608v0.592h-5.99v-0.592c0.6-0.027 1.03-0.0634 1.29-0.109 0.256-0.0458 0.452-0.115 0.586-0.207 0.136-0.0918 0.234-0.222 0.296-0.389 0.062-0.168 0.094-0.44 0.094-0.819v-6.57c0-0.216-0.038-0.374-0.114-0.474s-0.186-0.15-0.332-0.15c-0.172 0-0.418 0.0892-0.738 0.267-0.318 0.178-0.712 0.424-1.18 0.738l-0.356-0.624 3.79-2.26z\"/><path d=\"m170 44.8 3.23 7.28v0.6l-3.23 7.29-0.866-0.308 2.6-7.28-2.6-7.29 0.866-0.292z\"/><path d=\"m224 88.4h1.25v15.1h-1.25v-15.1z\"/><path d=\"m233 90h1.15v4.67h4.42v1.08h-4.42v4.67h-1.15v-4.67h-4.42v-1.08h4.42v-4.67z\"/><path d=\"m242 87.6 3.23 7.28v0.6l-3.23 7.29-0.866-0.308 2.6-7.28-2.6-7.29 0.866-0.292z\"/><path d=\"m224 222h1.25v15.1h-1.25v-15.1z\"/><path d=\"m229 228h9.99v1.08h-9.99v-1.08z\"/><path d=\"m242 221 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m149 265h9.99v1.08h-9.99v-1.08z\"/><path d=\"m162 259h1.25v15.1h-1.25v-15.1z\"/><path d=\"m171 259h0.446c-0.032 0.52-0.05 1.24-0.05 2.16v6.92c0 0.314 0.018 0.55 0.054 0.71 0.034 0.16 0.096 0.29 0.186 0.39s0.218 0.178 0.386 0.234c0.166 0.056 0.378 0.1 0.632 0.13s0.588 0.05 1 0.06v0.592h-5.99v-0.592c0.6-0.026 1.03-0.062 1.29-0.108 0.256-0.046 0.452-0.116 0.586-0.208 0.136-0.092 0.234-0.222 0.296-0.388 0.062-0.168 0.094-0.44 0.094-0.82v-6.57c0-0.216-0.038-0.374-0.114-0.474s-0.186-0.15-0.332-0.15c-0.172 0-0.418 0.088-0.738 0.266-0.318 0.178-0.712 0.424-1.18 0.738l-0.358-0.624 3.79-2.26z\"/><path d=\"m176 258 3.23 7.28v0.6l-3.23 7.29-0.866-0.308 2.6-7.28-2.6-7.29 0.866-0.292z\"/><path d=\"m44.7 163h9.99v1.08h-9.99v-1.08z\"/><path d=\"m57.9 156h1.25v15.1h-1.25v-15.1z\"/><path d=\"m65.7 157c-0.373 0-0.685 0.11-0.936 0.332s-0.454 0.54-0.608 0.956-0.264 0.924-0.328 1.52c-0.0648 0.598-0.0972 1.27-0.0972 2.02 0 1.76 0.163 3.05 0.49 3.88 0.327 0.824 0.833 1.24 1.52 1.24 0.654 0 1.14-0.386 1.45-1.16 0.316-0.776 0.474-1.98 0.474-3.6 0-1.24-0.081-2.25-0.243-3.02-0.162-0.77-0.388-1.32-0.677-1.66-0.289-0.334-0.639-0.502-1.05-0.502zm0.0406-0.69c1.18 0 2.06 0.458 2.64 1.37 0.578 0.914 0.867 2.29 0.867 4.14 0 1.91-0.309 3.36-0.928 4.34-0.619 0.982-1.52 1.47-2.71 1.47-1.17 0-2.04-0.46-2.61-1.38-0.57-0.918-0.855-2.31-0.855-4.18 0-0.994 0.0878-1.85 0.263-2.58s0.422-1.32 0.738-1.8c0.316-0.472 0.696-0.822 1.14-1.05 0.443-0.228 0.927-0.342 1.45-0.342z\"/><path d=\"m72 156 3.23 7.28v0.598l-3.23 7.29-0.867-0.308 2.6-7.28-2.6-7.29 0.867-0.292z\"/><path d=\"m74.1 228h9.99v1.08h-9.99v-1.08z\"/><path d=\"m87.3 221h1.25v15.1h-1.25v-15.1z\"/><path d=\"m96.2 223h1.15v4.67h4.42v1.08h-4.42v4.67h-1.15v-4.67h-4.42v-1.08h4.42v-4.67z\"/><path d=\"m105 220 3.23 7.28v0.598l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m73.4 94.2h9.99v1.08h-9.99v-1.08z\"/><path d=\"m86.6 87.9h1.25v15.1h-1.25v-15.1z\"/><path d=\"m91.1 94.2h9.99v1.08h-9.99v-1.08z\"/><path d=\"m104 87.2 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m608 156h1.25v15.1h-1.25v-15.1z\"/><path d=\"m616 157c-0.374 0-0.686 0.11-0.936 0.332-0.252 0.222-0.454 0.54-0.608 0.956s-0.264 0.924-0.328 1.52c-0.066 0.598-0.098 1.27-0.098 2.02 0 1.76 0.164 3.05 0.49 3.88 0.328 0.824 0.834 1.24 1.52 1.24 0.654 0 1.14-0.386 1.46-1.16s0.474-1.98 0.474-3.6c0-1.24-0.082-2.25-0.244-3.02s-0.388-1.32-0.676-1.66c-0.29-0.334-0.64-0.502-1.05-0.502zm0.04-0.69c1.18 0 2.06 0.458 2.64 1.37 0.578 0.914 0.868 2.29 0.868 4.14 0 1.91-0.31 3.36-0.928 4.34-0.618 0.982-1.52 1.47-2.71 1.47-1.17 0-2.04-0.46-2.61-1.38s-0.854-2.31-0.854-4.18c0-0.994 0.088-1.85 0.262-2.58 0.176-0.724 0.422-1.32 0.738-1.8 0.316-0.472 0.696-0.822 1.14-1.05 0.442-0.228 0.926-0.342 1.45-0.342z\"/><path d=\"m622 156 3.23 7.28v0.598l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m505 45.5h1.25v15.1h-1.25v-15.1z\"/><path d=\"m514 45.9h0.444c-0.032 0.519-0.048 1.24-0.048 2.16v6.92c0 0.313 0.018 0.55 0.054 0.709 0.034 0.159 0.096 0.289 0.186 0.389 0.088 0.1 0.216 0.178 0.384 0.235s0.378 0.1 0.632 0.13c0.254 0.0298 0.59 0.05 1.01 0.0608v0.592h-5.99v-0.592c0.6-0.027 1.03-0.0634 1.28-0.109 0.258-0.0458 0.454-0.115 0.588-0.207 0.136-0.0918 0.234-0.222 0.296-0.389 0.062-0.168 0.094-0.44 0.094-0.819v-6.57c0-0.216-0.038-0.374-0.114-0.474s-0.186-0.15-0.332-0.15c-0.174 0-0.42 0.0892-0.738 0.267-0.318 0.178-0.714 0.424-1.18 0.738l-0.356-0.624 3.79-2.26z\"/><path d=\"m519 44.8 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m574 88.4h1.25v15.1h-1.25v-15.1z\"/><path d=\"m583 90h1.15v4.67h4.42v1.08h-4.42v4.67h-1.15v-4.67h-4.42v-1.08h4.42v-4.67z\"/><path d=\"m591 87.6 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m574 222h1.25v15.1h-1.25v-15.1z\"/><path d=\"m578 228h9.99v1.08h-9.99v-1.08z\"/><path d=\"m591 221 3.23 7.28v0.6l-3.23 7.29-0.866-0.308 2.6-7.28-2.6-7.29 0.866-0.292z\"/><path d=\"m498 265h9.99v1.08h-9.99v-1.08z\"/><path d=\"m511 259h1.25v15.1h-1.25v-15.1z\"/><path d=\"m520 259h0.446c-0.034 0.52-0.05 1.24-0.05 2.16v6.92c0 0.314 0.018 0.55 0.054 0.71 0.034 0.16 0.096 0.29 0.186 0.39 0.088 0.1 0.216 0.178 0.384 0.234s0.378 0.1 0.632 0.13 0.59 0.05 1.01 0.06v0.592h-5.99v-0.592c0.6-0.026 1.03-0.062 1.28-0.108 0.258-0.046 0.454-0.116 0.588-0.208 0.136-0.092 0.234-0.222 0.296-0.388 0.062-0.168 0.094-0.44 0.094-0.82v-6.57c0-0.216-0.038-0.374-0.114-0.474s-0.186-0.15-0.332-0.15c-0.174 0-0.42 0.088-0.738 0.266s-0.714 0.424-1.18 0.738l-0.356-0.624 3.79-2.26z\"/><path d=\"m525 258 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m394 163h9.99v1.08h-9.99v-1.08z\"/><path d=\"m407 156h1.25v15.1h-1.25v-15.1z\"/><path d=\"m415 157c-0.374 0-0.686 0.11-0.936 0.332-0.252 0.222-0.454 0.54-0.608 0.956s-0.264 0.924-0.328 1.52c-0.066 0.598-0.098 1.27-0.098 2.02 0 1.76 0.164 3.05 0.49 3.88 0.328 0.824 0.834 1.24 1.52 1.24 0.654 0 1.14-0.386 1.45-1.16 0.318-0.776 0.476-1.98 0.476-3.6 0-1.24-0.082-2.25-0.244-3.02s-0.388-1.32-0.676-1.66c-0.29-0.334-0.64-0.502-1.05-0.502zm0.04-0.69c1.18 0 2.06 0.458 2.64 1.37 0.578 0.914 0.868 2.29 0.868 4.14 0 1.91-0.31 3.36-0.928 4.34-0.62 0.982-1.52 1.47-2.71 1.47-1.17 0-2.04-0.46-2.61-1.38s-0.854-2.31-0.854-4.18c0-0.994 0.088-1.85 0.262-2.58 0.176-0.724 0.422-1.32 0.738-1.8 0.316-0.472 0.696-0.822 1.14-1.05 0.442-0.228 0.926-0.342 1.45-0.342z\"/><path d=\"m421 156 3.23 7.28v0.598l-3.23 7.29-0.866-0.308 2.6-7.28-2.6-7.29 0.866-0.292z\"/><path d=\"m423 228h9.99v1.08h-9.99v-1.08z\"/><path d=\"m436 221h1.25v15.1h-1.25v-15.1z\"/><path d=\"m445 223h1.15v4.67h4.42v1.08h-4.42v4.67h-1.15v-4.67h-4.42v-1.08h4.42v-4.67z\"/><path d=\"m454 220 3.23 7.28v0.598l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m423 94.2h9.99v1.08h-9.99v-1.08z\"/><path d=\"m436 87.9h1.25v15.1h-1.25v-15.1z\"/><path d=\"m440 94.2h9.99v1.08h-9.99v-1.08z\"/><path d=\"m453 87.2 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/></g></g><defs><clipPath id=\"clip0_6_812\"><rect transform=\"translate(.8 .6)\" width=\"677\" height=\"364\" fill=\"#fff\"/></clipPath></defs></svg>\n"
6654
+ "content": "\nYou can follow the steps of the algorithm for the constant and the balanced scenarios using a neat visualization. Since Deutsch algorithm deals only with states with real amplitudes, you can map all states on the unit circle, and follow the state evolution through the steps.\n\n1. Start with a qubit in the $\\ket{0}$ state and apply the $H$ gate to the qubit.\n <br/>\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<svg width=\"660\" height=\"334\" fill=\"none\" version=\"1.1\" viewBox=\"0 0 660 334\" xmlns=\"http://www.w3.org/2000/svg\"><g clip-path=\"url(#clip0_4_498)\"><g clip-rule=\"evenodd\" fill-rule=\"evenodd\"><path d=\"m7.1 146c0-76.8 62.3-139 139-139 76.8 0 139 62.3 139 139 0 76.8-62.3 139-139 139-76.8 0-139-62.3-139-139z\" stroke=\"#747474\" stroke-miterlimit=\"8\" stroke-width=\"1.38\"/><g fill=\"#fff\" stroke-miterlimit=\"8\" stroke-width=\"1.38\"><path d=\"m279 147c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9-2.69 5.9-6 5.9-6-2.64-6-5.9z\" stroke=\"#0070C0\"/><g stroke=\"#000\"><path d=\"m140 7.4c0-3.26 2.64-5.9 5.9-5.9s5.9 2.64 5.9 5.9-2.64 5.9-5.9 5.9-5.9-2.64-5.9-5.9z\"/><path d=\"m1.3 147c0-3.26 2.64-5.9 5.9-5.9 3.26 0 5.9 2.64 5.9 5.9s-2.64 5.9-5.9 5.9c-3.26 0-5.9-2.64-5.9-5.9z\"/><path d=\"m140 286c0-3.26 2.64-5.9 5.9-5.9s5.9 2.64 5.9 5.9-2.64 5.9-5.9 5.9-5.9-2.64-5.9-5.9z\"/></g></g><path d=\"m240 50.1c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9c0 3.26-2.69 5.9-6 5.9s-6-2.64-6-5.9z\" fill=\"#0070C0\"/><g fill=\"#fff\" stroke=\"#000\" stroke-miterlimit=\"8\" stroke-width=\"1.38\"><path d=\"m240 243c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9-2.69 5.9-6 5.9-6-2.64-6-5.9z\"/><path d=\"m40.3 50.2c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9c0 3.26-2.69 5.9-6 5.9s-6-2.64-6-5.9z\"/><path d=\"m40.3 243c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9-2.69 5.9-6 5.9-6-2.64-6-5.9z\"/></g><path d=\"m358 146c0-76.8 62.2-139 139-139s139 62.3 139 139c0 76.8-62.2 139-139 139s-139-62.3-139-139z\" stroke=\"#747474\" stroke-miterlimit=\"8\" stroke-width=\"1.38\"/><g fill=\"#fff\" stroke-miterlimit=\"8\" stroke-width=\"1.38\"><path d=\"m630 147c0-3.26 2.64-5.9 5.9-5.9s5.9 2.64 5.9 5.9-2.64 5.9-5.9 5.9-5.9-2.64-5.9-5.9z\" stroke=\"#0070C0\"/><g stroke=\"#000\"><path d=\"m491 7.4c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9-2.69 5.9-6 5.9-6-2.64-6-5.9z\"/><path d=\"m352 147c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9-2.69 5.9-6 5.9-6-2.64-6-5.9z\"/><path d=\"m491 286c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9-2.69 5.9-6 5.9-6-2.64-6-5.9z\"/></g></g><path d=\"m591 50.1c0-3.26 2.64-5.9 5.9-5.9s5.9 2.64 5.9 5.9c0 3.26-2.64 5.9-5.9 5.9s-5.9-2.64-5.9-5.9z\" fill=\"#0070C0\"/><g fill=\"#fff\" stroke=\"#000\" stroke-miterlimit=\"8\" stroke-width=\"1.38\"><path d=\"m591 243c0-3.26 2.64-5.9 5.9-5.9s5.9 2.64 5.9 5.9-2.64 5.9-5.9 5.9-5.9-2.64-5.9-5.9z\"/><path d=\"m391 50.2c0-3.26 2.64-5.9 5.9-5.9s5.9 2.64 5.9 5.9c0 3.26-2.64 5.9-5.9 5.9s-5.9-2.64-5.9-5.9z\"/><path d=\"m391 243c0-3.26 2.64-5.9 5.9-5.9s5.9 2.64 5.9 5.9-2.64 5.9-5.9 5.9-5.9-2.64-5.9-5.9z\"/></g></g><path d=\"m120 319c-0.941 0.455-2.17 0.683-3.68 0.683-1.98 0-3.53-0.581-4.66-1.74s-1.7-2.71-1.7-4.64c0-2.06 0.635-3.73 1.9-5.01 1.28-1.28 2.93-1.92 4.96-1.92 1.26 0 2.32 0.159 3.18 0.476v2.79c-0.863-0.515-1.84-0.773-2.95-0.773-1.21 0-2.19 0.381-2.93 1.14-0.743 0.761-1.11 1.79-1.11 3.09 0 1.25 0.35 2.24 1.05 2.98 0.701 0.737 1.64 1.1 2.83 1.1 1.13 0 2.17-0.276 3.11-0.827v2.65zm6.35 0.683c-1.53 0-2.74-0.429-3.62-1.28-0.875-0.863-1.31-2.03-1.31-3.5 0-1.52 0.455-2.71 1.37-3.57 0.91-0.862 2.14-1.29 3.69-1.29 1.53 0 2.73 0.432 3.59 1.29 0.869 0.857 1.3 1.99 1.3 3.4 0 1.53-0.449 2.73-1.35 3.62-0.892 0.886-2.12 1.33-3.67 1.33zm0.071-7.48c-0.67 0-1.19 0.23-1.56 0.691-0.371 0.462-0.557 1.11-0.557 1.96 0 1.77 0.713 2.65 2.14 2.65 1.36 0 2.04-0.907 2.04-2.72 0-1.72-0.686-2.58-2.06-2.58zm15.7 7.25h-2.83v-5.11c0-1.43-0.509-2.14-1.53-2.14-0.491 0-0.896 0.188-1.21 0.566-0.318 0.377-0.476 0.856-0.476 1.44v5.25h-2.84v-9.2h2.84v1.46h0.036c0.676-1.12 1.66-1.68 2.96-1.68 2.04 0 3.05 1.26 3.05 3.79v5.63zm1.65-0.243v-2.3c0.468 0.282 0.932 0.492 1.39 0.629 0.467 0.138 0.907 0.207 1.32 0.207 0.503 0 0.898-0.069 1.19-0.207 0.293-0.137 0.44-0.347 0.44-0.629 0-0.179-0.066-0.329-0.198-0.449s-0.302-0.224-0.512-0.314c-0.204-0.09-0.428-0.171-0.674-0.243-0.245-0.072-0.482-0.153-0.71-0.242-0.365-0.138-0.688-0.285-0.97-0.441-0.275-0.161-0.509-0.347-0.701-0.557-0.185-0.209-0.329-0.452-0.431-0.727-0.096-0.276-0.144-0.602-0.144-0.98 0-0.515 0.111-0.958 0.333-1.33 0.227-0.372 0.527-0.674 0.898-0.908 0.378-0.239 0.806-0.413 1.28-0.521 0.485-0.114 0.988-0.171 1.51-0.171 0.408 0 0.821 0.033 1.24 0.099 0.419 0.06 0.833 0.15 1.24 0.27v2.19c-0.359-0.21-0.746-0.365-1.16-0.467-0.407-0.108-0.809-0.162-1.2-0.162-0.186 0-0.362 0.018-0.53 0.054-0.162 0.03-0.305 0.078-0.431 0.144-0.126 0.06-0.225 0.14-0.297 0.242-0.072 0.096-0.107 0.207-0.107 0.333 0 0.167 0.053 0.311 0.161 0.431s0.249 0.225 0.422 0.314c0.174 0.084 0.366 0.162 0.575 0.234 0.216 0.066 0.429 0.135 0.638 0.207 0.378 0.131 0.719 0.275 1.02 0.431 0.305 0.156 0.566 0.338 0.781 0.548 0.222 0.21 0.39 0.455 0.503 0.737 0.12 0.281 0.18 0.617 0.18 1.01 0 0.545-0.12 1.01-0.359 1.4-0.234 0.384-0.548 0.698-0.944 0.944-0.389 0.239-0.841 0.413-1.36 0.521-0.509 0.114-1.04 0.171-1.59 0.171-1.01 0-1.95-0.156-2.81-0.468zm14.3 0.135c-0.42 0.222-1.05 0.333-1.9 0.333-2 0-3-1.04-3-3.12v-4.21h-1.49v-2.09h1.49v-1.99l2.83-0.808v2.79h2.07v2.09h-2.07v3.72c0 0.958 0.38 1.44 1.14 1.44 0.3 0 0.608-0.086 0.926-0.26v2.1zm9.26 0.108h-2.69v-1.32h-0.036c-0.617 1.03-1.53 1.55-2.74 1.55-0.893 0-1.6-0.252-2.11-0.755-0.51-0.509-0.764-1.19-0.764-2.03 0-1.78 1.06-2.82 3.17-3.09l2.5-0.333c0-1.01-0.545-1.51-1.64-1.51-1.1 0-2.14 0.326-3.13 0.979v-2.14c0.396-0.204 0.935-0.383 1.62-0.539 0.688-0.156 1.31-0.234 1.88-0.234 2.62 0 3.94 1.31 3.94 3.93v5.5zm-2.67-3.74v-0.62l-1.67 0.215c-0.922 0.12-1.38 0.536-1.38 1.25 0 0.323 0.111 0.59 0.333 0.8 0.227 0.203 0.533 0.305 0.916 0.305 0.533 0 0.968-0.183 1.3-0.548 0.335-0.371 0.503-0.838 0.503-1.4zm13.8 3.74h-2.83v-5.11c0-1.43-0.509-2.14-1.53-2.14-0.492 0-0.896 0.188-1.21 0.566-0.318 0.377-0.476 0.856-0.476 1.44v5.25h-2.84v-9.2h2.84v1.46h0.036c0.676-1.12 1.66-1.68 2.96-1.68 2.04 0 3.06 1.26 3.06 3.79v5.63zm7.82-0.108c-0.419 0.222-1.05 0.333-1.9 0.333-2 0-3-1.04-3-3.12v-4.21h-1.49v-2.09h1.49v-1.99l2.83-0.808v2.79h2.07v2.09h-2.07v3.72c0 0.958 0.38 1.44 1.14 1.44 0.3 0 0.608-0.086 0.925-0.26v2.1z\" fill=\"#000\"/><path d=\"m476 307-4.44 12.9h-3.29l-4.38-12.9h3.13l2.69 8.97c0.143 0.485 0.23 0.913 0.26 1.28h0.054c0.042-0.402 0.135-0.842 0.279-1.32l2.67-8.93h3.04zm7.54 12.9h-2.69v-1.32h-0.036c-0.617 1.03-1.53 1.55-2.74 1.55-0.892 0-1.6-0.252-2.11-0.755-0.509-0.509-0.764-1.19-0.764-2.03 0-1.78 1.06-2.82 3.17-3.09l2.5-0.333c0-1.01-0.545-1.51-1.64-1.51-1.1 0-2.14 0.326-3.13 0.979v-2.14c0.395-0.204 0.934-0.383 1.62-0.539 0.689-0.156 1.31-0.234 1.88-0.234 2.62 0 3.94 1.31 3.94 3.93v5.5zm-2.67-3.74v-0.62l-1.67 0.215c-0.922 0.12-1.38 0.536-1.38 1.25 0 0.323 0.11 0.59 0.332 0.8 0.228 0.203 0.533 0.305 0.916 0.305 0.533 0 0.968-0.183 1.3-0.548 0.336-0.371 0.503-0.838 0.503-1.4zm10.9-2.9c-0.341-0.186-0.739-0.279-1.2-0.279-0.617 0-1.1 0.228-1.45 0.683-0.348 0.449-0.521 1.06-0.521 1.84v4.39h-2.84v-9.2h2.84v1.71h0.036c0.449-1.25 1.26-1.87 2.42-1.87 0.3 0 0.534 0.036 0.701 0.108v2.62zm2.84-4.02c-0.479 0-0.871-0.141-1.18-0.423-0.305-0.287-0.458-0.638-0.458-1.05 0-0.425 0.153-0.773 0.458-1.04 0.306-0.27 0.698-0.404 1.18-0.404 0.485 0 0.878 0.134 1.18 0.404 0.306 0.269 0.458 0.617 0.458 1.04 0 0.431-0.152 0.785-0.458 1.06-0.299 0.276-0.692 0.414-1.18 0.414zm1.4 10.7h-2.84v-9.2h2.84v9.2zm10 0h-2.69v-1.32h-0.036c-0.617 1.03-1.53 1.55-2.74 1.55-0.893 0-1.6-0.252-2.11-0.755-0.51-0.509-0.764-1.19-0.764-2.03 0-1.78 1.06-2.82 3.17-3.09l2.5-0.333c0-1.01-0.545-1.51-1.64-1.51-1.1 0-2.14 0.326-3.13 0.979v-2.14c0.396-0.204 0.935-0.383 1.62-0.539 0.688-0.156 1.31-0.234 1.88-0.234 2.62 0 3.94 1.31 3.94 3.93v5.5zm-2.67-3.74v-0.62l-1.67 0.215c-0.922 0.12-1.38 0.536-1.38 1.25 0 0.323 0.111 0.59 0.333 0.8 0.227 0.203 0.533 0.305 0.916 0.305 0.533 0 0.968-0.183 1.3-0.548 0.335-0.371 0.503-0.838 0.503-1.4zm7.79 2.67h-0.036v1.07h-2.84v-13.6h2.84v5.8h0.036c0.7-1.07 1.7-1.61 2.99-1.61 1.19 0 2.1 0.408 2.74 1.22 0.64 0.815 0.961 1.93 0.961 3.34 0 1.53-0.374 2.76-1.12 3.69s-1.75 1.39-3 1.39c-1.13 0-1.99-0.432-2.57-1.29zm-0.081-3.88v0.943c0 0.593 0.17 1.08 0.512 1.47 0.341 0.39 0.778 0.584 1.31 0.584 0.647 0 1.15-0.248 1.5-0.745 0.359-0.503 0.539-1.21 0.539-2.13 0-0.76-0.165-1.35-0.494-1.78-0.324-0.431-0.788-0.646-1.39-0.646-0.569 0-1.04 0.212-1.42 0.638-0.372 0.425-0.557 0.979-0.557 1.66zm11.5 4.95h-2.84v-13.6h2.84v13.6zm10.7-3.79h-6c0.095 1.34 0.937 2 2.52 2 1.01 0 1.9-0.239 2.67-0.719v2.05c-0.851 0.455-1.96 0.683-3.32 0.683-1.48 0-2.64-0.411-3.46-1.23-0.82-0.827-1.23-1.98-1.23-3.45 0-1.53 0.443-2.74 1.33-3.63 0.887-0.892 1.98-1.34 3.27-1.34 1.34 0 2.38 0.399 3.11 1.2 0.737 0.797 1.1 1.88 1.1 3.24v1.2zm-2.63-1.74c0-1.32-0.533-1.98-1.6-1.98-0.456 0-0.851 0.189-1.19 0.566-0.33 0.377-0.53 0.848-0.602 1.41h3.39z\" fill=\"#000\"/><path d=\"m291 146h16.5l-0.688 0.688v-96.5l0.688 0.687h-54.6v-1.38h55.3v97.9h-17.2v-1.38zm-33-90.7-6.13-5.11 6.13-5.11c0.292-0.243 0.726-0.204 0.968 0.088 0.244 0.292 0.204 0.725-0.088 0.968l-5.5 4.58v-1.06l5.5 4.58c0.292 0.243 0.332 0.677 0.088 0.968-0.242 0.292-0.676 0.331-0.968 0.088z\" fill=\"#0070C0\"/><path d=\"m642 146h16.5l-0.688 0.688v-96.5l0.688 0.687h-54.6v-1.38h55.3v97.9h-17.2v-1.38zm-33-90.7-6.13-5.11 6.13-5.11c0.292-0.243 0.726-0.204 0.968 0.088 0.244 0.292 0.204 0.725-0.088 0.968l-5.5 4.58v-1.06l5.5 4.58c0.292 0.243 0.332 0.677 0.088 0.968-0.242 0.292-0.676 0.331-0.968 0.088z\" fill=\"#0070C0\"/><g clip-rule=\"evenodd\" fill=\"#000\" fill-rule=\"evenodd\"><path d=\"m242 141h1.25v15.1h-1.25v-15.1z\"/><path d=\"m250 142c-0.374 0-0.686 0.11-0.936 0.332-0.252 0.222-0.454 0.54-0.608 0.956-0.154 0.418-0.264 0.924-0.328 1.52-0.066 0.598-0.098 1.27-0.098 2.02 0 1.76 0.164 3.05 0.49 3.88 0.328 0.824 0.834 1.24 1.52 1.24 0.654 0 1.14-0.388 1.45-1.16 0.316-0.774 0.476-1.98 0.476-3.6 0-1.24-0.082-2.25-0.244-3.02s-0.388-1.32-0.676-1.66c-0.29-0.334-0.64-0.502-1.05-0.502zm0.04-0.688c1.18 0 2.06 0.456 2.64 1.37 0.578 0.912 0.868 2.29 0.868 4.14 0 1.91-0.31 3.36-0.928 4.34-0.62 0.98-1.52 1.47-2.71 1.47-1.17 0-2.04-0.458-2.61-1.38-0.57-0.918-0.854-2.31-0.854-4.18 0-0.994 0.088-1.85 0.262-2.58 0.176-0.724 0.422-1.32 0.738-1.79 0.316-0.474 0.696-0.824 1.14-1.05 0.442-0.228 0.926-0.34 1.45-0.34z\"/><path d=\"m256 140 3.23 7.28v0.6l-3.23 7.29-0.866-0.308 2.6-7.28-2.6-7.29 0.866-0.29z\"/><path d=\"m140 30.2h1.25v15.1h-1.25v-15.1z\"/><path d=\"m148 30.6h0.446c-0.033 0.519-0.049 1.24-0.049 2.16v6.92c0 0.313 0.018 0.55 0.053 0.709s0.097 0.289 0.186 0.389 0.218 0.178 0.385 0.235c0.168 0.0568 0.378 0.1 0.632 0.13 0.254 0.0296 0.589 0.05 1 0.0608v0.592h-5.99v-0.592c0.599-0.0272 1.03-0.0636 1.28-0.11 0.257-0.0458 0.453-0.115 0.588-0.207s0.234-0.222 0.296-0.389c0.062-0.168 0.093-0.44 0.093-0.819v-6.57c0-0.216-0.038-0.374-0.114-0.474-0.075-0.1-0.186-0.15-0.332-0.15-0.173 0-0.419 0.0892-0.737 0.268-0.319 0.178-0.714 0.424-1.18 0.738l-0.356-0.624 3.79-2.26z\"/><path d=\"m154 29.4 3.23 7.28v0.6l-3.23 7.29-0.867-0.308 2.6-7.28-2.6-7.29 0.867-0.292z\"/><path d=\"m208 73h1.25v15.1h-1.25v-15.1z\"/><path d=\"m217 74.6h1.15v4.67h4.42v1.08h-4.42v4.67h-1.15v-4.67h-4.42v-1.08h4.42v-4.67z\"/><path d=\"m226 72.3 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m208 206h1.25v15.1h-1.25v-15.1z\"/><path d=\"m213 212h9.99v1.08h-9.99v-1.08z\"/><path d=\"m226 205 3.23 7.28v0.598l-3.23 7.29-0.866-0.308 2.6-7.28-2.6-7.29 0.866-0.292z\"/><path d=\"m133 250h9.99v1.08h-9.99v-1.08z\"/><path d=\"m146 243h1.25v15.1h-1.25v-15.1z\"/><path d=\"m154 244h0.446c-0.033 0.518-0.049 1.24-0.049 2.16v6.92c0 0.312 0.018 0.55 0.053 0.708 0.035 0.16 0.097 0.29 0.186 0.39s0.218 0.178 0.385 0.234c0.168 0.058 0.378 0.1 0.632 0.13s0.59 0.05 1.01 0.062v0.59h-5.99v-0.59c0.599-0.028 1.03-0.064 1.28-0.11 0.257-0.046 0.453-0.114 0.588-0.206s0.234-0.222 0.296-0.39 0.093-0.44 0.093-0.818v-6.57c0-0.216-0.038-0.374-0.113-0.474-0.076-0.1-0.187-0.15-0.333-0.15-0.173 0-0.419 0.088-0.737 0.268-0.319 0.178-0.714 0.424-1.18 0.736l-0.356-0.624 3.79-2.26z\"/><path d=\"m160 243 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m28.4 147h9.99v1.08h-9.99v-1.08z\"/><path d=\"m41.6 141h1.25v15.1h-1.25v-15.1z\"/><path d=\"m49.5 142c-0.373 0-0.685 0.11-0.936 0.332s-0.454 0.54-0.608 0.956c-0.154 0.418-0.263 0.924-0.328 1.52-0.0648 0.598-0.0972 1.27-0.0972 2.02 0 1.76 0.163 3.05 0.49 3.88 0.327 0.824 0.833 1.24 1.52 1.24 0.654 0 1.14-0.388 1.45-1.16 0.316-0.774 0.474-1.98 0.474-3.6 0-1.24-0.081-2.25-0.243-3.02-0.162-0.77-0.388-1.32-0.677-1.66-0.289-0.334-0.639-0.502-1.05-0.502zm0.0406-0.688c1.18 0 2.06 0.456 2.64 1.37 0.578 0.912 0.867 2.29 0.867 4.14 0 1.91-0.309 3.36-0.928 4.34-0.619 0.98-1.52 1.47-2.71 1.47-1.17 0-2.04-0.458-2.61-1.38-0.57-0.918-0.855-2.31-0.855-4.18 0-0.994 0.0878-1.85 0.263-2.58s0.422-1.32 0.738-1.79c0.316-0.474 0.696-0.824 1.14-1.05 0.443-0.228 0.927-0.34 1.45-0.34z\"/><path d=\"m55.8 140 3.23 7.28v0.6l-3.23 7.29-0.867-0.308 2.6-7.28-2.6-7.29 0.867-0.29z\"/><path d=\"m57.9 212h9.99v1.08h-9.99v-1.08z\"/><path d=\"m71 206h1.25v15.1h-1.25v-15.1z\"/><path d=\"m79.9 207h1.15v4.67h4.42v1.08h-4.42v4.67h-1.15v-4.67h-4.42v-1.08h4.42v-4.67z\"/><path d=\"m88.4 205 3.23 7.28v0.6l-3.23 7.29-0.867-0.308 2.6-7.28-2.6-7.29 0.867-0.29z\"/><path d=\"m57.2 78.8h9.99v1.08h-9.99v-1.08z\"/><path d=\"m70.3 72.5h1.25v15.1h-1.25v-15.1z\"/><path d=\"m74.8 78.8h9.99v1.08h-9.99v-1.08z\"/><path d=\"m87.7 71.8 3.23 7.28v0.6l-3.23 7.29-0.867-0.308 2.6-7.28-2.6-7.29 0.867-0.292z\"/><path d=\"m592 141h1.25v15.1h-1.25v-15.1z\"/><path d=\"m600 142c-0.372 0-0.684 0.11-0.936 0.332-0.25 0.222-0.454 0.54-0.608 0.956-0.154 0.418-0.262 0.924-0.328 1.52-0.064 0.598-0.098 1.27-0.098 2.02 0 1.76 0.164 3.05 0.492 3.88 0.326 0.824 0.832 1.24 1.52 1.24 0.652 0 1.14-0.388 1.45-1.16 0.316-0.774 0.474-1.98 0.474-3.6 0-1.24-0.08-2.25-0.242-3.02-0.164-0.77-0.388-1.32-0.678-1.66-0.288-0.334-0.638-0.502-1.05-0.502zm0.042-0.688c1.18 0 2.06 0.456 2.64 1.37 0.578 0.912 0.866 2.29 0.866 4.14 0 1.91-0.308 3.36-0.928 4.34-0.618 0.98-1.52 1.47-2.71 1.47-1.17 0-2.04-0.458-2.61-1.38-0.57-0.918-0.856-2.31-0.856-4.18 0-0.994 0.088-1.85 0.264-2.58s0.422-1.32 0.738-1.79c0.316-0.474 0.696-0.824 1.14-1.05 0.444-0.228 0.926-0.34 1.45-0.34z\"/><path d=\"m606 140 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.29z\"/><path d=\"m489 30.2h1.25v15.1h-1.25v-15.1z\"/><path d=\"m498 30.6h0.446c-0.032 0.519-0.048 1.24-0.048 2.16v6.92c0 0.313 0.016 0.55 0.052 0.709 0.034 0.159 0.098 0.289 0.186 0.389 0.09 0.1 0.218 0.178 0.386 0.235 0.166 0.0568 0.378 0.1 0.632 0.13 0.254 0.0296 0.588 0.05 1 0.0608v0.592h-5.99v-0.592c0.6-0.0272 1.03-0.0636 1.29-0.11 0.256-0.0458 0.452-0.115 0.588-0.207 0.134-0.0918 0.232-0.222 0.294-0.389 0.064-0.168 0.094-0.44 0.094-0.819v-6.57c0-0.216-0.038-0.374-0.114-0.474s-0.186-0.15-0.332-0.15c-0.172 0-0.418 0.0892-0.738 0.268-0.318 0.178-0.712 0.424-1.18 0.738l-0.358-0.624 3.79-2.26z\"/><path d=\"m504 29.4 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m558 73h1.25v15.1h-1.25v-15.1z\"/><path d=\"m567 74.6h1.15v4.67h4.42v1.08h-4.42v4.67h-1.15v-4.67h-4.42v-1.08h4.42v-4.67z\"/><path d=\"m575 72.3 3.23 7.28v0.6l-3.23 7.29-0.866-0.308 2.6-7.28-2.6-7.29 0.866-0.292z\"/><path d=\"m558 206h1.25v15.1h-1.25v-15.1z\"/><path d=\"m563 212h9.99v1.08h-9.99v-1.08z\"/><path d=\"m575 205 3.23 7.28v0.598l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m483 250h9.99v1.08h-9.99v-1.08z\"/><path d=\"m496 243h1.25v15.1h-1.25v-15.1z\"/><path d=\"m504 244h0.446c-0.032 0.518-0.048 1.24-0.048 2.16v6.92c0 0.312 0.016 0.55 0.052 0.708 0.036 0.16 0.098 0.29 0.186 0.39 0.09 0.1 0.218 0.178 0.386 0.234 0.166 0.058 0.378 0.1 0.632 0.13s0.588 0.05 1 0.062v0.59h-5.99v-0.59c0.6-0.028 1.03-0.064 1.29-0.11 0.256-0.046 0.452-0.114 0.588-0.206 0.134-0.092 0.232-0.222 0.294-0.39 0.064-0.168 0.094-0.44 0.094-0.818v-6.57c0-0.216-0.038-0.374-0.114-0.474-0.074-0.1-0.186-0.15-0.332-0.15-0.172 0-0.418 0.088-0.738 0.268-0.318 0.178-0.712 0.424-1.18 0.736l-0.358-0.624 3.79-2.26z\"/><path d=\"m510 243 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m378 147h9.99v1.08h-9.99v-1.08z\"/><path d=\"m391 141h1.25v15.1h-1.25v-15.1z\"/><path d=\"m399 142c-0.372 0-0.684 0.11-0.936 0.332s-0.454 0.54-0.608 0.956c-0.154 0.418-0.264 0.924-0.328 1.52-0.064 0.598-0.098 1.27-0.098 2.02 0 1.76 0.164 3.05 0.492 3.88 0.326 0.824 0.832 1.24 1.52 1.24 0.654 0 1.14-0.388 1.46-1.16 0.316-0.774 0.474-1.98 0.474-3.6 0-1.24-0.082-2.25-0.244-3.02s-0.386-1.32-0.676-1.66c-0.29-0.334-0.638-0.502-1.05-0.502zm0.04-0.688c1.18 0 2.07 0.456 2.64 1.37 0.578 0.912 0.866 2.29 0.866 4.14 0 1.91-0.308 3.36-0.928 4.34-0.618 0.98-1.52 1.47-2.71 1.47-1.17 0-2.04-0.458-2.61-1.38-0.57-0.918-0.856-2.31-0.856-4.18 0-0.994 0.088-1.85 0.264-2.58s0.422-1.32 0.738-1.79c0.316-0.474 0.694-0.824 1.14-1.05 0.444-0.228 0.926-0.34 1.45-0.34z\"/><path d=\"m406 140 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.29z\"/><path d=\"m408 212h9.99v1.08h-9.99v-1.08z\"/><path d=\"m421 206h1.25v15.1h-1.25v-15.1z\"/><path d=\"m430 207h1.15v4.67h4.42v1.08h-4.42v4.67h-1.15v-4.67h-4.42v-1.08h4.42v-4.67z\"/><path d=\"m438 205 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.29z\"/><path d=\"m407 78.8h9.99v1.08h-9.99v-1.08z\"/><path d=\"m420 72.5h1.25v15.1h-1.25v-15.1z\"/><path d=\"m425 78.8h9.99v1.08h-9.99v-1.08z\"/><path d=\"m438 71.8 3.24 7.28v0.6l-3.24 7.29-0.866-0.308 2.6-7.28-2.6-7.29 0.866-0.292z\"/></g></g><defs><clipPath id=\"clip0_4_498\"><rect transform=\"translate(.6 .8)\" width=\"659\" height=\"332\" fill=\"#fff\"/></clipPath></defs></svg>\n\n2. Apply the oracle. \n Here, the difference between the two scenarios becomes noticeable. In the constant scenario, $\\ket{0}$ and $\\ket{1}$ states get the same phase (either $1$ or $-1$), so the state remains the same or acquires a global phase of $-1$, which is physically the same state. In the variable scenario, zero and one states get different phases, so the state changes!\n <br/>\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<svg width=\"738\" height=\"374\" fill=\"none\" version=\"1.1\" viewBox=\"0 0 738 374\" xmlns=\"http://www.w3.org/2000/svg\"><g clip-path=\"url(#clip0_5_635)\"><g clip-rule=\"evenodd\" fill-rule=\"evenodd\"><path d=\"m7.3 189c0-76.8 62.3-139 139-139 76.8 0 139 62.3 139 139 0 76.8-62.3 139-139 139-76.8 0-139-62.3-139-139z\" stroke=\"#747474\" stroke-miterlimit=\"8\" stroke-width=\"1.38\"/><g fill=\"#fff\" stroke=\"#000\" stroke-miterlimit=\"8\"><path d=\"m279 189c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9-2.69 5.9-6 5.9-6-2.64-6-5.9z\" stroke-width=\"1.15\"/><g stroke-width=\"1.38\"><path d=\"m140 49.4c0-3.26 2.64-5.9 5.9-5.9s5.9 2.64 5.9 5.9c0 3.26-2.64 5.9-5.9 5.9s-5.9-2.64-5.9-5.9z\"/><path d=\"m1.3 189c0-3.26 2.69-5.9 6-5.9 3.31 0 6 2.64 6 5.9s-2.69 5.9-6 5.9c-3.31 0-6-2.64-6-5.9z\"/><path d=\"m140 328c0-3.26 2.64-5.9 5.9-5.9s5.9 2.64 5.9 5.9-2.64 5.9-5.9 5.9-5.9-2.64-5.9-5.9z\"/></g></g><path d=\"m240 92.3c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9c0 3.26-2.69 5.9-6 5.9s-6-2.64-6-5.9z\" fill=\"#0070C0\"/><path d=\"m240 285c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9-2.69 5.9-6 5.9-6-2.64-6-5.9z\" fill=\"#fff\" stroke=\"#000\" stroke-miterlimit=\"8\" stroke-width=\"1.38\"/><path d=\"m40.5 92.4c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9-2.69 5.9-6 5.9-6-2.64-6-5.9z\" fill=\"#fff\" stroke=\"#000\" stroke-miterlimit=\"8\" stroke-width=\"1.38\"/><path d=\"m40.4 285c0-3.26 2.69-5.9 6-5.9 3.31 0 6 2.64 6 5.9s-2.69 5.9-6 5.9c-3.31 0-6-2.64-6-5.9z\" fill=\"#0070C0\"/><path d=\"m358 189c0-76.8 62.2-139 139-139s139 62.3 139 139c0 76.8-62.2 139-139 139s-139-62.3-139-139z\" stroke=\"#747474\" stroke-miterlimit=\"8\" stroke-width=\"1.38\"/><g fill=\"#fff\" stroke-miterlimit=\"8\" stroke-width=\"1.38\"><g stroke=\"#000\"><path d=\"m630 189c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9-2.69 5.9-6 5.9-6-2.64-6-5.9z\"/><path d=\"m491 49.4c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9c0 3.26-2.69 5.9-6 5.9s-6-2.64-6-5.9z\"/><path d=\"m352 189c0-3.26 2.64-5.9 5.9-5.9s5.9 2.64 5.9 5.9-2.64 5.9-5.9 5.9-5.9-2.64-5.9-5.9z\"/><path d=\"m491 328c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9-2.69 5.9-6 5.9-6-2.64-6-5.9z\"/></g><path d=\"m591 92.4c0-3.26 2.64-5.9 5.9-5.9s5.9 2.64 5.9 5.9-2.64 5.9-5.9 5.9-5.9-2.64-5.9-5.9z\" stroke=\"#0070C0\"/></g><path d=\"m591 285c0-3.26 2.64-5.9 5.9-5.9s5.9 2.64 5.9 5.9-2.64 5.9-5.9 5.9-5.9-2.64-5.9-5.9z\" fill=\"#0070C0\"/><path d=\"m391 92.3c0-3.26 2.64-5.9 5.9-5.9s5.9 2.64 5.9 5.9c0 3.26-2.64 5.9-5.9 5.9s-5.9-2.64-5.9-5.9z\" fill=\"#0070C0\"/><path d=\"m392 285c0-3.26 2.64-5.9 5.9-5.9s5.9 2.64 5.9 5.9-2.64 5.9-5.9 5.9-5.9-2.64-5.9-5.9z\" fill=\"#fff\" stroke=\"#000\" stroke-miterlimit=\"8\" stroke-width=\"1.38\"/></g><g fill=\"#0070C0\"><path d=\"m247 85.4v-15.1l-0.688 0.688h22.1l-0.687-0.688v22.1l0.687-0.688h-16.2v1.38h16.9v-23.5h-23.5v15.8h1.38zm-5.8-5.06 5.11 6.13 5.11-6.13c0.244-0.292 0.204-0.725-0.088-0.968-0.291-0.243-0.725-0.204-0.968 0.088l-4.58 5.5h1.06l-4.58-5.5c-0.243-0.292-0.677-0.331-0.968-0.088-0.292 0.243-0.332 0.677-0.088 0.968z\"/><path d=\"m199 136-105 102 0.96 0.985 105-102-0.96-0.984zm-104 95.6-0.826 7.94 7.96-0.619c0.378-0.03 0.661-0.361 0.632-0.739-0.03-0.379-0.36-0.662-0.739-0.632l-7.14 0.555 0.737 0.757 0.741-7.12c0.0392-0.378-0.235-0.716-0.613-0.755-0.378-0.04-0.716 0.235-0.755 0.612z\"/><path d=\"m603 91.6h58.4v194h-56.4v-1.37h55.8l-0.688 0.686v-193l0.688 0.688h-57.8v-1.38zm7.05 199-6.13-5.11 6.13-5.11c0.29-0.244 0.724-0.204 0.968 0.088 0.242 0.29 0.204 0.724-0.088 0.968l-5.5 4.58v-1.06l5.5 4.58c0.292 0.242 0.33 0.676 0.088 0.968-0.244 0.292-0.678 0.332-0.968 0.088z\"/><path d=\"m397 85.7v-56.4h201v56.6h-1.37v-55.9l0.686 0.688h-200l0.688-0.688v55.7h-1.38zm5.8-5.06-5.11 6.13-5.11-6.13c-0.242-0.292-0.204-0.725 0.088-0.968 0.292-0.243 0.726-0.204 0.968 0.0882l4.58 5.5h-1.06l4.58-5.5c0.242-0.292 0.676-0.331 0.968-0.0882 0.292 0.243 0.33 0.677 0.088 0.968z\"/></g><g clip-rule=\"evenodd\" fill=\"#0078D4\" fill-rule=\"evenodd\"><path d=\"m231 48.1c0.516 0 0.962 0.0422 1.34 0.126l-0.308 1.34h-0.696c-0.074-0.301-0.17-0.517-0.288-0.649-0.12-0.132-0.294-0.198-0.526-0.198-0.302 0-0.556 0.083-0.764 0.249s-0.386 0.413-0.534 0.74-0.284 0.767-0.412 1.32l-0.196 0.862h2.03l-0.174 0.799h-2.04l-1.47 6.9c-0.242 1.14-0.614 2-1.12 2.56-0.5 0.562-1.13 0.842-1.89 0.842-0.222 0-0.396-0.0132-0.522-0.0396l0.134-0.696c0.054 0.0158 0.178 0.0236 0.372 0.0236 0.238 0 0.44-0.0606 0.61-0.182 0.168-0.121 0.324-0.332 0.47-0.633 0.144-0.3 0.278-0.717 0.4-1.25l1.7-7.52h-1.34l0.118-0.546c0.354-0.0212 0.608-0.0502 0.764-0.087 0.154-0.037 0.276-0.0924 0.364-0.166 0.086-0.0738 0.16-0.17 0.22-0.289 0.062-0.119 0.138-0.336 0.234-0.653 0.28-0.949 0.71-1.66 1.29-2.14 0.582-0.477 1.32-0.716 2.23-0.716z\"/><path d=\"m250 47.3c1.54 0.406 2.72 1.28 3.55 2.63 0.826 1.35 1.24 2.97 1.24 4.88 0 1.91-0.41 3.53-1.23 4.88-0.822 1.34-2.01 2.22-3.55 2.62l-0.19-0.609c1.22-0.406 2.12-1.21 2.72-2.4 0.594-1.2 0.89-2.72 0.89-4.56 0-1.78-0.296-3.26-0.886-4.44s-1.51-1.97-2.74-2.38l0.214-0.609zm-10.1 0 0.214 0.609c-1.23 0.406-2.15 1.2-2.74 2.38-0.592 1.18-0.89 2.66-0.89 4.44 0 1.85 0.298 3.37 0.89 4.56 0.594 1.2 1.5 2 2.72 2.4l-0.19 0.609c-1.55-0.406-2.73-1.28-3.55-2.62-0.822-1.34-1.23-2.97-1.23-4.88 0-1.9 0.412-3.53 1.24-4.88s2.01-2.22 3.55-2.63z\"/><path d=\"m243 51.7c0.162 0 0.306 0.0184 0.43 0.0554 0.124 0.0368 0.234 0.0936 0.328 0.17 0.096 0.0764 0.18 0.175 0.254 0.297s0.144 0.286 0.214 0.494c0.068 0.208 0.132 0.467 0.194 0.775 0.06 0.308 0.114 0.629 0.162 0.961h0.078c0.506-0.712 0.89-1.23 1.15-1.56 0.26-0.33 0.48-0.575 0.66-0.736s0.352-0.274 0.518-0.34c0.166-0.0658 0.386-0.0988 0.66-0.0988 0.248 0 0.452 0.0316 0.61 0.0948l-0.316 1.43h-0.554c-0.032-0.221-0.124-0.332-0.278-0.332-0.046 0-0.098 0.0078-0.15 0.0238-0.052 0.0158-0.118 0.05-0.194 0.103-0.076 0.0526-0.188 0.156-0.336 0.308-0.148 0.153-0.314 0.34-0.498 0.562-0.184 0.222-0.374 0.454-0.57 0.696l-0.538 0.672c0.096 0.506 0.186 0.944 0.27 1.31s0.158 0.676 0.224 0.922 0.124 0.439 0.174 0.581c0.052 0.142 0.106 0.249 0.164 0.32 0.058 0.0712 0.116 0.121 0.178 0.15 0.06 0.029 0.13 0.0434 0.208 0.0434 0.144 0 0.282-0.0552 0.416-0.166s0.328-0.361 0.582-0.751l0.514 0.34c-0.37 0.548-0.704 0.935-1 1.16-0.298 0.224-0.652 0.336-1.06 0.336-0.226 0-0.418-0.0408-0.576-0.123-0.158-0.0816-0.296-0.212-0.412-0.391-0.116-0.179-0.218-0.459-0.308-0.839-0.164-0.675-0.264-1.19-0.3-1.55h-0.08c-0.558 0.786-0.974 1.35-1.25 1.69s-0.496 0.596-0.672 0.759-0.348 0.278-0.514 0.344c-0.166 0.066-0.386 0.099-0.66 0.099-0.248 0-0.452-0.0316-0.61-0.095l0.316-1.43h0.554c0.032 0.221 0.124 0.332 0.278 0.332 0.072 0 0.15-0.0198 0.232-0.0594s0.2-0.134 0.352-0.285c0.154-0.15 0.364-0.386 0.634-0.708 0.268-0.322 0.658-0.804 1.17-1.45-0.08-0.417-0.16-0.817-0.246-1.2-0.084-0.385-0.17-0.744-0.26-1.08s-0.164-0.55-0.222-0.653-0.12-0.174-0.186-0.214-0.148-0.0592-0.248-0.0592c-0.112 0-0.212 0.025-0.302 0.075-0.09 0.0502-0.186 0.137-0.292 0.261-0.106 0.124-0.246 0.318-0.42 0.581l-0.514-0.34c0.332-0.501 0.652-0.875 0.958-1.12 0.306-0.248 0.666-0.372 1.08-0.372z\"/><path d=\"m262 55.9h9.75v1.05h-9.75v-1.05zm0-3.28h9.75v1.05h-9.75v-1.05z\"/><path d=\"m281 49.2c-0.364 0-0.668 0.108-0.914 0.324-0.244 0.216-0.442 0.527-0.592 0.933-0.15 0.406-0.258 0.901-0.32 1.48-0.064 0.583-0.096 1.24-0.096 1.97 0 1.72 0.16 2.98 0.478 3.78 0.32 0.804 0.814 1.21 1.48 1.21 0.638 0 1.11-0.378 1.42-1.14s0.462-1.93 0.462-3.52c0-1.21-0.078-2.2-0.236-2.95-0.16-0.751-0.38-1.29-0.662-1.62s-0.622-0.49-1.02-0.49zm0.04-0.672c1.15 0 2.01 0.446 2.58 1.34s0.846 2.24 0.846 4.04c0 1.87-0.3 3.28-0.904 4.24s-1.49 1.44-2.65 1.44c-1.14 0-1.99-0.448-2.54-1.34-0.556-0.897-0.834-2.26-0.834-4.08 0-0.97 0.086-1.81 0.256-2.52 0.172-0.707 0.412-1.29 0.72-1.75 0.31-0.461 0.68-0.803 1.11-1.02s0.904-0.332 1.42-0.332z\"/><path d=\"m94.3 164c0.53 0 0.986 0.043 1.37 0.13l-0.316 1.38h-0.713c-0.0756-0.308-0.174-0.53-0.296-0.665s-0.301-0.203-0.539-0.203c-0.308 0-0.569 0.085-0.782 0.256-0.213 0.17-0.396 0.422-0.547 0.758-0.151 0.334-0.292 0.786-0.422 1.35l-0.203 0.882h2.08l-0.178 0.82h-2.09l-1.51 7.07c-0.249 1.17-0.63 2.05-1.14 2.62-0.513 0.574-1.16 0.862-1.94 0.862-0.227 0-0.405-0.012-0.535-0.04l0.138-0.714c0.054 0.016 0.181 0.026 0.381 0.026 0.243 0 0.451-0.064 0.624-0.188s0.334-0.34 0.482-0.648 0.285-0.734 0.409-1.28l1.74-7.71h-1.37l0.122-0.56c0.362-0.022 0.623-0.052 0.782-0.09s0.284-0.094 0.373-0.17c0.0892-0.076 0.165-0.174 0.227-0.296 0.0622-0.12 0.142-0.344 0.239-0.668 0.286-0.972 0.728-1.7 1.33-2.19 0.597-0.489 1.36-0.734 2.28-0.734z\"/><path d=\"m113 163c1.58 0.416 2.79 1.31 3.64 2.7 0.846 1.38 1.27 3.05 1.27 5 0 1.96-0.422 3.62-1.26 5-0.843 1.37-2.06 2.27-3.64 2.69l-0.195-0.624c1.25-0.416 2.18-1.24 2.78-2.46 0.608-1.23 0.911-2.79 0.911-4.68 0-1.83-0.302-3.34-0.907-4.55-0.606-1.21-1.54-2.02-2.81-2.44l0.219-0.624zm-10.3 0 0.219 0.624c-1.26 0.416-2.2 1.23-2.81 2.44-0.608 1.21-0.912 2.73-0.912 4.55 0 1.89 0.304 3.45 0.912 4.68 0.608 1.23 1.54 2.05 2.78 2.46l-0.194 0.624c-1.58-0.416-2.8-1.31-3.64-2.69-0.843-1.38-1.26-3.04-1.26-5 0-1.95 0.423-3.62 1.27-5 0.846-1.38 2.06-2.28 3.64-2.7z\"/><path d=\"m106 168c0.168 0 0.315 0.02 0.442 0.058s0.239 0.096 0.336 0.174c0.098 0.078 0.184 0.18 0.26 0.304 0.075 0.124 0.148 0.292 0.219 0.506 0.07 0.214 0.136 0.478 0.198 0.794s0.118 0.646 0.166 0.986h0.081c0.519-0.73 0.912-1.26 1.18-1.6 0.267-0.338 0.493-0.588 0.677-0.754 0.183-0.164 0.36-0.28 0.53-0.348 0.171-0.068 0.396-0.1 0.677-0.1 0.254 0 0.462 0.032 0.624 0.096l-0.324 1.47h-0.567c-0.033-0.228-0.127-0.342-0.284-0.342-0.049 0-0.1 0.01-0.154 0.026s-0.12 0.05-0.199 0.104c-0.078 0.054-0.193 0.16-0.344 0.316-0.151 0.158-0.322 0.35-0.511 0.576-0.189 0.228-0.383 0.464-0.583 0.714l-0.551 0.688c0.097 0.52 0.189 0.968 0.275 1.35 0.087 0.378 0.164 0.694 0.231 0.944 0.068 0.252 0.127 0.45 0.178 0.596 0.052 0.146 0.107 0.256 0.167 0.328 0.059 0.074 0.12 0.124 0.182 0.154s0.134 0.044 0.215 0.044c0.146 0 0.288-0.056 0.425-0.17 0.138-0.112 0.337-0.37 0.596-0.77l0.527 0.35c-0.378 0.562-0.72 0.956-1.02 1.19-0.306 0.23-0.669 0.346-1.09 0.346-0.232 0-0.429-0.042-0.591-0.126s-0.303-0.218-0.422-0.402-0.224-0.47-0.316-0.858c-0.167-0.692-0.27-1.22-0.308-1.59h-0.081c-0.573 0.806-0.998 1.38-1.28 1.73-0.278 0.352-0.507 0.612-0.689 0.78-0.181 0.166-0.356 0.284-0.526 0.352-0.171 0.068-0.396 0.102-0.677 0.102-0.254 0-0.462-0.034-0.624-0.098l0.324-1.47h0.567c0.033 0.228 0.127 0.342 0.284 0.342 0.076 0 0.155-0.022 0.239-0.062s0.204-0.138 0.361-0.292 0.373-0.396 0.648-0.724c0.276-0.33 0.676-0.824 1.2-1.48-0.081-0.428-0.165-0.838-0.251-1.23-0.087-0.394-0.176-0.762-0.268-1.1-0.092-0.342-0.167-0.564-0.227-0.67-0.059-0.104-0.123-0.178-0.19-0.218-0.068-0.04-0.153-0.06-0.256-0.06-0.113 0-0.216 0.024-0.308 0.076s-0.191 0.14-0.3 0.268c-0.108 0.126-0.251 0.326-0.429 0.596l-0.527-0.35c0.34-0.512 0.667-0.896 0.981-1.15 0.313-0.254 0.683-0.382 1.11-0.382z\"/><path d=\"m125 172h9.99v1.08h-9.99v-1.08zm0-3.36h9.99v1.08h-9.99v-1.08z\"/><path d=\"m146 164h0.446c-0.032 0.519-0.048 1.24-0.048 2.16v6.92c0 0.314 0.018 0.55 0.052 0.71 0.036 0.158 0.098 0.288 0.186 0.388 0.09 0.1 0.218 0.178 0.386 0.236 0.168 0.056 0.378 0.1 0.632 0.128 0.254 0.03 0.588 0.05 1 0.062v0.592h-5.99v-0.592c0.6-0.028 1.03-0.064 1.29-0.11s0.452-0.114 0.588-0.206c0.134-0.092 0.234-0.222 0.296-0.39 0.062-0.166 0.092-0.44 0.092-0.818v-6.57c0-0.216-0.038-0.374-0.114-0.474-0.074-0.1-0.186-0.15-0.332-0.15-0.172 0-0.418 0.09-0.736 0.268-0.32 0.178-0.714 0.424-1.18 0.738l-0.358-0.624 3.79-2.26z\"/><path d=\"m676 183c0.516 0 0.962 0.044 1.34 0.128l-0.308 1.34h-0.696c-0.074-0.3-0.17-0.516-0.288-0.648-0.12-0.132-0.294-0.198-0.528-0.198-0.3 0-0.554 0.082-0.762 0.248-0.208 0.168-0.386 0.414-0.534 0.74-0.148 0.328-0.286 0.768-0.412 1.32l-0.198 0.862h2.03l-0.174 0.798h-2.04l-1.47 6.9c-0.244 1.14-0.614 2-1.12 2.56-0.5 0.56-1.13 0.842-1.89 0.842-0.222 0-0.396-0.014-0.522-0.04l0.134-0.696c0.052 0.016 0.176 0.024 0.372 0.024 0.238 0 0.44-0.06 0.608-0.182 0.17-0.122 0.326-0.332 0.472-0.632 0.144-0.302 0.278-0.718 0.398-1.25l1.7-7.52h-1.34l0.12-0.546c0.352-0.02 0.608-0.05 0.762-0.086 0.156-0.038 0.278-0.092 0.364-0.166 0.088-0.074 0.162-0.17 0.222-0.288 0.06-0.12 0.138-0.338 0.234-0.654 0.278-0.948 0.71-1.66 1.29-2.14 0.584-0.476 1.33-0.716 2.23-0.716z\"/><path d=\"m694 182c1.54 0.406 2.72 1.28 3.55 2.63 0.826 1.35 1.24 2.97 1.24 4.88 0 1.91-0.412 3.53-1.23 4.88s-2.01 2.22-3.55 2.62l-0.19-0.608c1.22-0.406 2.12-1.21 2.72-2.41 0.594-1.2 0.89-2.72 0.89-4.56 0-1.78-0.296-3.26-0.886-4.44-0.59-1.18-1.51-1.97-2.74-2.38l0.212-0.608zm-10.1 0 0.212 0.608c-1.23 0.406-2.15 1.2-2.74 2.38-0.594 1.18-0.89 2.66-0.89 4.44 0 1.85 0.296 3.37 0.89 4.56 0.594 1.2 1.5 2 2.72 2.41l-0.19 0.608c-1.55-0.406-2.73-1.28-3.55-2.62-0.824-1.34-1.23-2.97-1.23-4.88 0-1.9 0.412-3.53 1.24-4.88 0.824-1.35 2.01-2.22 3.55-2.63z\"/><path d=\"m688 187c0.164 0 0.308 0.018 0.432 0.054 0.124 0.038 0.234 0.094 0.328 0.17 0.096 0.078 0.18 0.176 0.254 0.298 0.074 0.12 0.144 0.286 0.212 0.494 0.07 0.208 0.134 0.466 0.194 0.774 0.062 0.31 0.116 0.63 0.162 0.962h0.08c0.506-0.712 0.89-1.23 1.15-1.56 0.262-0.33 0.482-0.576 0.662-0.736 0.178-0.16 0.352-0.274 0.518-0.34s0.386-0.098 0.66-0.098c0.248 0 0.45 0.03 0.61 0.094l-0.318 1.43h-0.554c-0.03-0.222-0.122-0.332-0.276-0.332-0.048 0-0.098 8e-3 -0.15 0.024s-0.118 0.05-0.194 0.102-0.188 0.156-0.336 0.308c-0.148 0.154-0.314 0.34-0.498 0.562-0.186 0.222-0.374 0.454-0.57 0.696l-0.538 0.672c0.094 0.506 0.184 0.944 0.27 1.31 0.084 0.368 0.158 0.676 0.224 0.922 0.066 0.244 0.124 0.438 0.174 0.58 0.05 0.144 0.104 0.25 0.162 0.322 0.058 0.07 0.118 0.12 0.178 0.15 0.062 0.028 0.132 0.042 0.21 0.042 0.142 0 0.282-0.054 0.416-0.166 0.134-0.11 0.328-0.36 0.58-0.75l0.516 0.34c-0.37 0.548-0.704 0.934-1 1.16s-0.652 0.336-1.06 0.336c-0.226 0-0.418-0.04-0.576-0.122-0.16-0.082-0.296-0.212-0.412-0.392s-0.22-0.458-0.308-0.838c-0.164-0.676-0.264-1.19-0.302-1.55h-0.078c-0.56 0.786-0.974 1.35-1.25 1.69s-0.496 0.596-0.672 0.76c-0.178 0.164-0.348 0.278-0.514 0.344s-0.388 0.098-0.662 0.098c-0.248 0-0.45-0.032-0.608-0.094l0.316-1.43h0.554c0.032 0.222 0.124 0.332 0.276 0.332 0.074 0 0.152-0.02 0.234-0.06 0.082-0.038 0.2-0.134 0.352-0.284s0.364-0.386 0.632-0.708c0.27-0.322 0.66-0.804 1.17-1.45-0.08-0.416-0.162-0.816-0.246-1.2-0.084-0.384-0.172-0.744-0.26-1.08-0.09-0.332-0.164-0.55-0.222-0.652-0.058-0.104-0.12-0.174-0.186-0.214s-0.15-0.06-0.25-0.06c-0.11 0-0.21 0.026-0.3 0.076s-0.188 0.138-0.292 0.262c-0.106 0.122-0.246 0.316-0.42 0.58l-0.514-0.34c0.332-0.5 0.652-0.876 0.958-1.12 0.304-0.248 0.666-0.372 1.08-0.372z\"/><path d=\"m706 191h9.75v1.05h-9.75v-1.05zm0-3.28h9.75v1.05h-9.75v-1.05z\"/><path d=\"m725 187c0.162 0 0.306 0.018 0.43 0.054 0.124 0.038 0.234 0.094 0.328 0.17 0.096 0.078 0.18 0.176 0.254 0.298 0.074 0.12 0.144 0.286 0.214 0.494 0.068 0.208 0.132 0.466 0.194 0.774 0.06 0.31 0.114 0.63 0.162 0.962h0.078c0.506-0.712 0.89-1.23 1.15-1.56 0.26-0.33 0.48-0.576 0.66-0.736s0.352-0.274 0.518-0.34 0.386-0.098 0.66-0.098c0.248 0 0.452 0.03 0.61 0.094l-0.316 1.43h-0.554c-0.032-0.222-0.124-0.332-0.278-0.332-0.046 0-0.096 8e-3 -0.15 0.024-0.052 0.016-0.118 0.05-0.194 0.102s-0.188 0.156-0.336 0.308c-0.148 0.154-0.314 0.34-0.498 0.562s-0.374 0.454-0.57 0.696l-0.538 0.672c0.096 0.506 0.186 0.944 0.27 1.31 0.084 0.368 0.16 0.676 0.224 0.922 0.066 0.244 0.124 0.438 0.174 0.58 0.052 0.144 0.106 0.25 0.164 0.322 0.058 0.07 0.116 0.12 0.178 0.15 0.06 0.028 0.13 0.042 0.208 0.042 0.144 0 0.282-0.054 0.416-0.166 0.134-0.11 0.328-0.36 0.582-0.75l0.514 0.34c-0.37 0.548-0.704 0.934-1 1.16s-0.652 0.336-1.06 0.336c-0.228 0-0.42-0.04-0.578-0.122s-0.296-0.212-0.412-0.392-0.218-0.458-0.308-0.838c-0.164-0.676-0.264-1.19-0.3-1.55h-0.08c-0.558 0.786-0.974 1.35-1.25 1.69s-0.496 0.596-0.672 0.76-0.348 0.278-0.514 0.344-0.386 0.098-0.66 0.098c-0.248 0-0.452-0.032-0.61-0.094l0.316-1.43h0.554c0.032 0.222 0.124 0.332 0.278 0.332 0.072 0 0.15-0.02 0.232-0.06 0.082-0.038 0.2-0.134 0.352-0.284 0.154-0.15 0.364-0.386 0.634-0.708 0.268-0.322 0.658-0.804 1.17-1.45-0.08-0.416-0.16-0.816-0.246-1.2-0.084-0.384-0.17-0.744-0.26-1.08s-0.164-0.55-0.222-0.652c-0.058-0.104-0.12-0.174-0.186-0.214s-0.148-0.06-0.248-0.06c-0.112 0-0.212 0.026-0.302 0.076s-0.186 0.138-0.292 0.262c-0.106 0.122-0.246 0.316-0.42 0.58l-0.514-0.34c0.332-0.5 0.652-0.876 0.958-1.12 0.306-0.248 0.666-0.372 1.08-0.372z\"/><path d=\"m463 7.88c0.516 0 0.962 0.0422 1.34 0.127l-0.308 1.34h-0.696c-0.074-0.301-0.17-0.517-0.288-0.649-0.12-0.132-0.294-0.198-0.526-0.198-0.302 0-0.556 0.083-0.764 0.249-0.208 0.166-0.386 0.413-0.534 0.74-0.148 0.327-0.284 0.767-0.412 1.32l-0.198 0.862h2.03l-0.174 0.799h-2.04l-1.47 6.9c-0.244 1.14-0.614 2-1.12 2.56-0.5 0.562-1.13 0.842-1.89 0.842-0.222 0-0.396-0.0132-0.522-0.0394l0.134-0.696c0.052 0.0158 0.176 0.0238 0.372 0.0238 0.238 0 0.44-0.0606 0.608-0.182 0.17-0.121 0.326-0.332 0.472-0.633 0.144-0.301 0.278-0.717 0.4-1.25l1.7-7.52h-1.34l0.12-0.546c0.352-0.021 0.608-0.05 0.762-0.087 0.156-0.0368 0.278-0.0922 0.364-0.166 0.088-0.074 0.162-0.17 0.222-0.289s0.138-0.336 0.234-0.653c0.28-0.949 0.71-1.66 1.29-2.14 0.584-0.477 1.33-0.716 2.23-0.716z\"/><path d=\"m482 7.11c1.54 0.406 2.72 1.28 3.55 2.63 0.826 1.35 1.24 2.97 1.24 4.88 0 1.91-0.41 3.53-1.23 4.88-0.822 1.34-2.01 2.22-3.55 2.62l-0.19-0.609c1.22-0.406 2.12-1.21 2.72-2.4s0.89-2.72 0.89-4.56c0-1.78-0.296-3.26-0.886-4.44-0.59-1.18-1.51-1.97-2.74-2.38l0.212-0.609zm-10.1 0 0.212 0.609c-1.23 0.406-2.15 1.2-2.74 2.38-0.594 1.18-0.89 2.66-0.89 4.44 0 1.85 0.296 3.37 0.89 4.56s1.5 2 2.72 2.4l-0.19 0.609c-1.55-0.406-2.73-1.28-3.55-2.62-0.824-1.34-1.23-2.97-1.23-4.88 0-1.9 0.412-3.53 1.24-4.88 0.824-1.35 2.01-2.22 3.55-2.63z\"/><path d=\"m475 11.5c0.164 0 0.308 0.0184 0.432 0.0554s0.234 0.0936 0.328 0.17c0.096 0.0766 0.18 0.175 0.254 0.297 0.074 0.121 0.144 0.286 0.212 0.494 0.07 0.208 0.134 0.467 0.194 0.775 0.062 0.309 0.116 0.629 0.162 0.961h0.08c0.506-0.712 0.89-1.23 1.15-1.56 0.262-0.33 0.482-0.575 0.662-0.736 0.178-0.161 0.352-0.274 0.518-0.34 0.166-0.066 0.386-0.099 0.66-0.099 0.248 0 0.45 0.0318 0.61 0.095l-0.318 1.43h-0.552c-0.032-0.222-0.124-0.332-0.278-0.332-0.048 0-0.098 8e-3 -0.15 0.0238s-0.118 0.0502-0.194 0.103c-0.076 0.0528-0.188 0.156-0.336 0.309-0.148 0.153-0.314 0.34-0.498 0.562-0.186 0.221-0.374 0.453-0.57 0.696l-0.538 0.672c0.096 0.506 0.184 0.944 0.27 1.31 0.084 0.369 0.158 0.676 0.224 0.921s0.124 0.439 0.174 0.581 0.104 0.249 0.162 0.32 0.118 0.121 0.178 0.15c0.062 0.029 0.132 0.0434 0.21 0.0434 0.142 0 0.282-0.0554 0.416-0.166 0.134-0.111 0.328-0.361 0.58-0.751l0.516 0.34c-0.37 0.548-0.704 0.935-1 1.16s-0.652 0.336-1.06 0.336c-0.226 0-0.418-0.0408-0.576-0.123-0.16-0.0818-0.296-0.212-0.412-0.392-0.116-0.179-0.22-0.459-0.308-0.838-0.164-0.675-0.264-1.19-0.302-1.55h-0.078c-0.56 0.786-0.974 1.35-1.25 1.69s-0.496 0.596-0.672 0.759c-0.178 0.163-0.348 0.278-0.514 0.344s-0.388 0.0988-0.662 0.0988c-0.248 0-0.45-0.0316-0.608-0.0948l0.316-1.43h0.554c0.032 0.222 0.124 0.332 0.276 0.332 0.074 0 0.152-0.0198 0.234-0.0592 0.082-0.0396 0.2-0.135 0.352-0.285 0.152-0.15 0.364-0.386 0.632-0.708 0.27-0.322 0.66-0.804 1.17-1.45-0.08-0.417-0.162-0.817-0.246-1.2-0.084-0.385-0.172-0.743-0.26-1.08-0.09-0.332-0.164-0.55-0.222-0.653-0.058-0.103-0.12-0.174-0.186-0.214-0.066-0.0396-0.15-0.0594-0.25-0.0594-0.11 0-0.21 0.025-0.3 0.0752-0.09 0.05-0.188 0.137-0.292 0.261-0.106 0.124-0.246 0.318-0.42 0.581l-0.514-0.34c0.332-0.501 0.652-0.875 0.958-1.12s0.666-0.372 1.08-0.372z\"/><path d=\"m494 15.7h9.75v1.05h-9.75v-1.05zm0-3.28h9.75v1.05h-9.75v-1.05z\"/><path d=\"m510 14h9.74v5.58h-1.12v-4.54h-8.62v-1.04z\"/><path d=\"m524 11.5c0.164 0 0.308 0.0184 0.432 0.0554s0.234 0.0936 0.328 0.17c0.094 0.0766 0.18 0.175 0.254 0.297 0.072 0.121 0.144 0.286 0.212 0.494 0.07 0.208 0.134 0.467 0.194 0.775 0.062 0.309 0.116 0.629 0.162 0.961h0.08c0.506-0.712 0.89-1.23 1.15-1.56 0.262-0.33 0.482-0.575 0.662-0.736 0.178-0.161 0.352-0.274 0.518-0.34 0.166-0.066 0.386-0.099 0.66-0.099 0.248 0 0.45 0.0318 0.608 0.095l-0.316 1.43h-0.554c-0.03-0.222-0.124-0.332-0.276-0.332-0.048 0-0.098 8e-3 -0.15 0.0238-0.054 0.0158-0.118 0.0502-0.194 0.103-0.076 0.0528-0.188 0.156-0.336 0.309-0.148 0.153-0.314 0.34-0.498 0.562-0.186 0.221-0.376 0.453-0.57 0.696l-0.538 0.672c0.094 0.506 0.184 0.944 0.268 1.31 0.086 0.369 0.16 0.676 0.226 0.921s0.124 0.439 0.174 0.581 0.104 0.249 0.162 0.32 0.118 0.121 0.178 0.15c0.062 0.029 0.13 0.0434 0.21 0.0434 0.142 0 0.28-0.0554 0.416-0.166 0.134-0.111 0.328-0.361 0.58-0.751l0.514 0.34c-0.368 0.548-0.702 0.935-1 1.16s-0.652 0.336-1.06 0.336c-0.226 0-0.418-0.0408-0.578-0.123-0.158-0.0818-0.294-0.212-0.41-0.392-0.116-0.179-0.22-0.459-0.308-0.838-0.164-0.675-0.264-1.19-0.302-1.55h-0.078c-0.56 0.786-0.974 1.35-1.25 1.69s-0.496 0.596-0.672 0.759c-0.178 0.163-0.348 0.278-0.514 0.344-0.168 0.066-0.388 0.0988-0.662 0.0988-0.248 0-0.45-0.0316-0.608-0.0948l0.316-1.43h0.554c0.032 0.222 0.124 0.332 0.276 0.332 0.074 0 0.152-0.0198 0.234-0.0592 0.082-0.0396 0.198-0.135 0.352-0.285 0.152-0.15 0.364-0.386 0.632-0.708 0.27-0.322 0.66-0.804 1.17-1.45-0.08-0.417-0.162-0.817-0.246-1.2-0.084-0.385-0.172-0.743-0.26-1.08-0.09-0.332-0.164-0.55-0.222-0.653-0.058-0.103-0.12-0.174-0.186-0.214-0.066-0.0396-0.15-0.0594-0.25-0.0594-0.11 0-0.21 0.025-0.3 0.0752-0.09 0.05-0.188 0.137-0.292 0.261-0.106 0.124-0.246 0.318-0.42 0.581l-0.514-0.34c0.332-0.501 0.652-0.875 0.956-1.12 0.306-0.248 0.668-0.372 1.08-0.372z\"/></g><path d=\"m121 360c-0.941 0.455-2.17 0.683-3.68 0.683-1.98 0-3.53-0.581-4.66-1.74s-1.7-2.71-1.7-4.64c0-2.06 0.635-3.73 1.9-5.01 1.28-1.28 2.93-1.92 4.96-1.92 1.26 0 2.32 0.159 3.18 0.476v2.79c-0.863-0.515-1.84-0.773-2.95-0.773-1.21 0-2.19 0.381-2.93 1.14-0.743 0.761-1.11 1.79-1.11 3.09 0 1.25 0.35 2.24 1.05 2.98 0.701 0.737 1.64 1.1 2.83 1.1 1.13 0 2.17-0.276 3.11-0.827v2.65zm6.35 0.683c-1.53 0-2.74-0.429-3.62-1.28-0.875-0.863-1.31-2.03-1.31-3.5 0-1.52 0.455-2.71 1.37-3.57 0.91-0.862 2.14-1.29 3.69-1.29 1.53 0 2.73 0.432 3.59 1.29 0.869 0.857 1.3 1.99 1.3 3.4 0 1.53-0.449 2.73-1.35 3.62-0.892 0.886-2.12 1.33-3.67 1.33zm0.071-7.48c-0.67 0-1.19 0.23-1.56 0.691-0.371 0.462-0.557 1.11-0.557 1.96 0 1.77 0.713 2.65 2.14 2.65 1.36 0 2.04-0.907 2.04-2.72 0-1.72-0.686-2.58-2.06-2.58zm15.7 7.25h-2.83v-5.11c0-1.43-0.509-2.14-1.53-2.14-0.491 0-0.896 0.188-1.21 0.566-0.318 0.377-0.476 0.856-0.476 1.44v5.25h-2.84v-9.2h2.84v1.46h0.036c0.676-1.12 1.66-1.68 2.96-1.68 2.04 0 3.06 1.26 3.06 3.79v5.63zm1.65-0.243v-2.3c0.467 0.282 0.932 0.492 1.39 0.629 0.467 0.138 0.907 0.207 1.32 0.207 0.503 0 0.898-0.069 1.19-0.207 0.293-0.137 0.44-0.347 0.44-0.629 0-0.179-0.066-0.329-0.198-0.449s-0.302-0.224-0.512-0.314c-0.204-0.09-0.428-0.171-0.674-0.243-0.245-0.072-0.482-0.153-0.71-0.242-0.365-0.138-0.688-0.285-0.97-0.441-0.275-0.161-0.509-0.347-0.701-0.557-0.185-0.209-0.329-0.452-0.431-0.727-0.096-0.276-0.144-0.602-0.144-0.98 0-0.515 0.111-0.958 0.333-1.33 0.227-0.372 0.527-0.674 0.898-0.908 0.377-0.239 0.806-0.413 1.28-0.521 0.485-0.114 0.988-0.171 1.51-0.171 0.408 0 0.821 0.033 1.24 0.099 0.419 0.06 0.833 0.15 1.24 0.27v2.19c-0.359-0.21-0.746-0.365-1.16-0.467-0.407-0.108-0.809-0.162-1.2-0.162-0.186 0-0.362 0.018-0.53 0.054-0.162 0.03-0.305 0.078-0.431 0.144-0.126 0.06-0.225 0.14-0.297 0.242-0.072 0.096-0.108 0.207-0.108 0.333 0 0.167 0.054 0.311 0.162 0.431s0.249 0.225 0.422 0.314c0.174 0.084 0.366 0.162 0.575 0.234 0.216 0.066 0.429 0.135 0.638 0.207 0.378 0.131 0.719 0.275 1.02 0.431 0.305 0.156 0.566 0.338 0.781 0.548 0.222 0.21 0.39 0.455 0.503 0.737 0.12 0.281 0.18 0.617 0.18 1.01 0 0.545-0.12 1.01-0.359 1.4-0.234 0.384-0.548 0.698-0.944 0.944-0.389 0.239-0.841 0.413-1.36 0.521-0.509 0.114-1.04 0.171-1.59 0.171-1.01 0-1.95-0.156-2.81-0.468zm14.3 0.135c-0.419 0.222-1.05 0.333-1.9 0.333-2 0-3-1.04-3-3.12v-4.21h-1.49v-2.09h1.49v-1.99l2.83-0.808v2.79h2.07v2.09h-2.07v3.72c0 0.958 0.38 1.44 1.14 1.44 0.3 0 0.608-0.086 0.925-0.26v2.1zm9.26 0.108h-2.69v-1.32h-0.036c-0.617 1.03-1.53 1.55-2.74 1.55-0.893 0-1.6-0.252-2.11-0.755-0.51-0.509-0.764-1.19-0.764-2.03 0-1.78 1.06-2.82 3.17-3.09l2.5-0.333c0-1.01-0.545-1.51-1.64-1.51-1.1 0-2.14 0.326-3.13 0.979v-2.14c0.396-0.204 0.935-0.383 1.62-0.539 0.689-0.156 1.32-0.234 1.88-0.234 2.62 0 3.94 1.31 3.94 3.93v5.5zm-2.67-3.74v-0.62l-1.67 0.215c-0.922 0.12-1.38 0.536-1.38 1.25 0 0.323 0.111 0.59 0.333 0.8 0.227 0.203 0.533 0.305 0.916 0.305 0.533 0 0.967-0.183 1.3-0.548 0.335-0.371 0.503-0.838 0.503-1.4zm13.8 3.74h-2.83v-5.11c0-1.43-0.509-2.14-1.53-2.14-0.492 0-0.896 0.188-1.21 0.566-0.318 0.377-0.476 0.856-0.476 1.44v5.25h-2.84v-9.2h2.84v1.46h0.035c0.677-1.12 1.66-1.68 2.96-1.68 2.04 0 3.06 1.26 3.06 3.79v5.63zm7.82-0.108c-0.419 0.222-1.05 0.333-1.9 0.333-2 0-3-1.04-3-3.12v-4.21h-1.49v-2.09h1.49v-1.99l2.83-0.808v2.79h2.07v2.09h-2.07v3.72c0 0.958 0.38 1.44 1.14 1.44 0.3 0 0.608-0.086 0.925-0.26v2.1z\" fill=\"#000\"/><path d=\"m477 347-4.44 12.9h-3.29l-4.38-12.9h3.13l2.69 8.97c0.143 0.485 0.23 0.913 0.26 1.28h0.054c0.042-0.402 0.135-0.842 0.279-1.32l2.67-8.93h3.04zm7.54 12.9h-2.69v-1.32h-0.036c-0.617 1.03-1.53 1.55-2.74 1.55-0.892 0-1.6-0.252-2.11-0.755-0.509-0.509-0.764-1.19-0.764-2.03 0-1.78 1.06-2.82 3.17-3.09l2.5-0.333c0-1.01-0.545-1.51-1.64-1.51-1.1 0-2.14 0.326-3.13 0.979v-2.14c0.395-0.204 0.934-0.383 1.62-0.539 0.689-0.156 1.32-0.234 1.88-0.234 2.62 0 3.94 1.31 3.94 3.93v5.5zm-2.67-3.74v-0.62l-1.67 0.215c-0.922 0.12-1.38 0.536-1.38 1.25 0 0.323 0.11 0.59 0.332 0.8 0.228 0.203 0.533 0.305 0.916 0.305 0.534 0 0.968-0.183 1.3-0.548 0.336-0.371 0.503-0.838 0.503-1.4zm10.9-2.9c-0.341-0.186-0.739-0.279-1.2-0.279-0.617 0-1.1 0.228-1.45 0.683-0.347 0.449-0.521 1.06-0.521 1.84v4.39h-2.84v-9.2h2.84v1.71h0.036c0.449-1.25 1.26-1.87 2.43-1.87 0.299 0 0.533 0.036 0.7 0.108v2.62zm2.84-4.02c-0.479 0-0.871-0.141-1.18-0.423-0.305-0.287-0.458-0.638-0.458-1.05 0-0.425 0.153-0.773 0.458-1.04 0.306-0.27 0.698-0.404 1.18-0.404 0.486 0 0.878 0.134 1.18 0.404 0.306 0.269 0.459 0.617 0.459 1.04 0 0.431-0.153 0.785-0.459 1.06-0.299 0.276-0.691 0.414-1.18 0.414zm1.4 10.7h-2.84v-9.2h2.84v9.2zm10 0h-2.69v-1.32h-0.036c-0.617 1.03-1.53 1.55-2.74 1.55-0.892 0-1.6-0.252-2.11-0.755-0.509-0.509-0.764-1.19-0.764-2.03 0-1.78 1.06-2.82 3.17-3.09l2.5-0.333c0-1.01-0.545-1.51-1.64-1.51-1.1 0-2.14 0.326-3.13 0.979v-2.14c0.396-0.204 0.935-0.383 1.62-0.539 0.688-0.156 1.31-0.234 1.88-0.234 2.62 0 3.94 1.31 3.94 3.93v5.5zm-2.67-3.74v-0.62l-1.67 0.215c-0.922 0.12-1.38 0.536-1.38 1.25 0 0.323 0.111 0.59 0.333 0.8 0.227 0.203 0.533 0.305 0.916 0.305 0.533 0 0.968-0.183 1.3-0.548 0.335-0.371 0.503-0.838 0.503-1.4zm7.79 2.67h-0.036v1.07h-2.84v-13.6h2.84v5.8h0.036c0.7-1.07 1.7-1.61 2.99-1.61 1.19 0 2.1 0.408 2.74 1.22 0.641 0.815 0.961 1.93 0.961 3.34 0 1.53-0.374 2.76-1.12 3.69s-1.75 1.39-3 1.39c-1.13 0-1.99-0.432-2.57-1.29zm-0.081-3.88v0.943c0 0.593 0.17 1.08 0.512 1.47 0.341 0.39 0.778 0.584 1.31 0.584 0.646 0 1.15-0.248 1.5-0.745 0.359-0.503 0.539-1.21 0.539-2.13 0-0.76-0.165-1.35-0.494-1.78-0.324-0.431-0.788-0.646-1.39-0.646-0.569 0-1.04 0.212-1.42 0.638-0.372 0.425-0.557 0.979-0.557 1.66zm11.5 4.95h-2.84v-13.6h2.84v13.6zm10.7-3.79h-6c0.096 1.34 0.937 2 2.52 2 1.01 0 1.9-0.239 2.67-0.719v2.05c-0.851 0.455-1.96 0.683-3.32 0.683-1.48 0-2.64-0.411-3.46-1.23-0.82-0.827-1.23-1.98-1.23-3.45 0-1.53 0.443-2.74 1.33-3.63 0.887-0.892 1.98-1.34 3.27-1.34 1.34 0 2.38 0.399 3.11 1.2 0.737 0.797 1.1 1.88 1.1 3.24v1.2zm-2.63-1.74c0-1.32-0.533-1.98-1.6-1.98-0.456 0-0.851 0.189-1.19 0.566-0.33 0.377-0.53 0.848-0.602 1.41h3.39z\" fill=\"#000\"/><g clip-rule=\"evenodd\" fill=\"#000\" fill-rule=\"evenodd\"><path d=\"m242 183h1.25v15.1h-1.25v-15.1z\"/><path d=\"m250 184c-0.374 0-0.686 0.11-0.936 0.332-0.252 0.222-0.454 0.54-0.608 0.956s-0.264 0.924-0.328 1.52c-0.066 0.598-0.098 1.27-0.098 2.02 0 1.76 0.164 3.05 0.49 3.88 0.328 0.826 0.834 1.24 1.52 1.24 0.654 0 1.14-0.388 1.46-1.16 0.316-0.776 0.474-1.98 0.474-3.6 0-1.24-0.082-2.25-0.244-3.02s-0.388-1.32-0.676-1.66c-0.29-0.334-0.64-0.502-1.05-0.502zm0.04-0.69c1.18 0 2.06 0.458 2.64 1.37 0.578 0.914 0.868 2.29 0.868 4.14 0 1.91-0.31 3.36-0.928 4.34-0.618 0.982-1.52 1.47-2.71 1.47-1.17 0-2.04-0.46-2.61-1.38s-0.854-2.31-0.854-4.18c0-0.994 0.088-1.85 0.262-2.58 0.176-0.724 0.422-1.32 0.738-1.8 0.316-0.472 0.696-0.822 1.14-1.05 0.442-0.228 0.926-0.342 1.45-0.342z\"/><path d=\"m256 182 3.24 7.28v0.6l-3.24 7.29-0.866-0.308 2.6-7.28-2.6-7.29 0.866-0.292z\"/><path d=\"m139 72.2h1.25v15.1h-1.25v-15.1z\"/><path d=\"m148 72.6h0.444c-0.032 0.519-0.048 1.24-0.048 2.16v6.92c0 0.313 0.018 0.55 0.052 0.709 0.036 0.159 0.098 0.289 0.188 0.389 0.088 0.1 0.216 0.178 0.384 0.235 0.168 0.0566 0.378 0.0998 0.632 0.13s0.59 0.05 1.01 0.0608v0.592h-5.99v-0.592c0.6-0.027 1.03-0.0634 1.28-0.109 0.258-0.046 0.454-0.115 0.588-0.207 0.136-0.0918 0.234-0.221 0.296-0.389 0.062-0.167 0.094-0.44 0.094-0.819v-6.57c0-0.216-0.038-0.374-0.114-0.474-0.076-0.0998-0.186-0.15-0.332-0.15-0.174 0-0.42 0.089-0.738 0.267-0.32 0.178-0.714 0.424-1.18 0.738l-0.356-0.624 3.79-2.26z\"/><path d=\"m153 71.5 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m208 115h1.25v15.1h-1.25v-15.1z\"/><path d=\"m217 117h1.15v4.67h4.42v1.08h-4.42v4.67h-1.15v-4.67h-4.42v-1.08h4.42v-4.67z\"/><path d=\"m225 114 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m208 248h1.25v15.1h-1.25v-15.1z\"/><path d=\"m212 255h9.99v1.08h-9.99v-1.08z\"/><path d=\"m225 247 3.23 7.28v0.6l-3.23 7.29-0.866-0.308 2.6-7.28-2.6-7.29 0.866-0.292z\"/><path d=\"m132 292h9.99v1.08h-9.99v-1.08z\"/><path d=\"m145 285h1.25v15.1h-1.25v-15.1z\"/><path d=\"m154 286h0.444c-0.032 0.52-0.048 1.24-0.048 2.16v6.92c0 0.314 0.018 0.55 0.054 0.71 0.034 0.16 0.096 0.29 0.186 0.39 0.088 0.1 0.216 0.178 0.384 0.234 0.168 0.058 0.378 0.1 0.632 0.13s0.59 0.05 1.01 0.06v0.592h-5.99v-0.592c0.6-0.026 1.03-0.062 1.28-0.108 0.258-0.046 0.454-0.116 0.588-0.208 0.136-0.092 0.234-0.22 0.296-0.388s0.094-0.44 0.094-0.82v-6.57c0-0.216-0.038-0.374-0.114-0.474s-0.186-0.15-0.332-0.15c-0.174 0-0.42 0.088-0.738 0.266-0.318 0.18-0.714 0.424-1.18 0.738l-0.356-0.624 3.79-2.26z\"/><path d=\"m159 285 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m27.9 189h9.99v1.08h-9.99v-1.08z\"/><path d=\"m41 183h1.25v15.1h-1.25v-15.1z\"/><path d=\"m48.9 184c-0.373 0-0.685 0.11-0.936 0.332-0.251 0.222-0.454 0.54-0.608 0.956s-0.264 0.924-0.328 1.52c-0.0648 0.598-0.0972 1.27-0.0972 2.02 0 1.76 0.163 3.05 0.49 3.88 0.327 0.826 0.833 1.24 1.52 1.24 0.654 0 1.14-0.388 1.45-1.16 0.316-0.776 0.474-1.98 0.474-3.6 0-1.24-0.081-2.25-0.243-3.02-0.162-0.77-0.388-1.32-0.677-1.66-0.289-0.334-0.639-0.502-1.05-0.502zm0.0406-0.69c1.18 0 2.06 0.458 2.64 1.37 0.578 0.914 0.867 2.29 0.867 4.14 0 1.91-0.309 3.36-0.928 4.34-0.619 0.982-1.52 1.47-2.71 1.47-1.17 0-2.04-0.46-2.61-1.38-0.57-0.918-0.855-2.31-0.855-4.18 0-0.994 0.0878-1.85 0.263-2.58s0.422-1.32 0.738-1.8c0.316-0.472 0.696-0.822 1.14-1.05 0.443-0.228 0.927-0.342 1.45-0.342z\"/><path d=\"m55.2 182 3.23 7.28v0.6l-3.23 7.29-0.867-0.308 2.6-7.28-2.6-7.29 0.867-0.292z\"/><path d=\"m57.3 254h9.99v1.08h-9.99v-1.08z\"/><path d=\"m70.4 248h1.25v15.1h-1.25v-15.1z\"/><path d=\"m79.3 250h1.15v4.67h4.42v1.08h-4.42v4.67h-1.15v-4.67h-4.42v-1.08h4.42v-4.67z\"/><path d=\"m87.8 247 3.23 7.28v0.6l-3.23 7.29-0.867-0.308 2.6-7.28-2.6-7.29 0.867-0.292z\"/><path d=\"m56.6 121h9.99v1.08h-9.99v-1.08z\"/><path d=\"m69.8 115h1.25v15.1h-1.25v-15.1z\"/><path d=\"m74.3 121h9.99v1.08h-9.99v-1.08z\"/><path d=\"m87.1 114 3.23 7.28v0.599l-3.23 7.29-0.867-0.308 2.6-7.28-2.6-7.29 0.867-0.292z\"/><path d=\"m593 183h1.25v15.1h-1.25v-15.1z\"/><path d=\"m601 184c-0.372 0-0.684 0.11-0.936 0.332-0.25 0.222-0.454 0.54-0.608 0.956s-0.262 0.924-0.328 1.52c-0.064 0.598-0.096 1.27-0.096 2.02 0 1.76 0.162 3.05 0.49 3.88 0.326 0.826 0.834 1.24 1.52 1.24 0.654 0 1.14-0.388 1.45-1.16s0.474-1.98 0.474-3.6c0-1.24-0.08-2.25-0.242-3.02s-0.388-1.32-0.678-1.66c-0.288-0.334-0.638-0.502-1.05-0.502zm0.042-0.69c1.18 0 2.06 0.458 2.64 1.37 0.578 0.914 0.868 2.29 0.868 4.14 0 1.91-0.31 3.36-0.93 4.34-0.618 0.982-1.52 1.47-2.71 1.47-1.17 0-2.04-0.46-2.61-1.38s-0.856-2.31-0.856-4.18c0-0.994 0.088-1.85 0.264-2.58s0.422-1.32 0.738-1.8c0.316-0.472 0.696-0.822 1.14-1.05 0.444-0.228 0.928-0.342 1.45-0.342z\"/><path d=\"m607 182 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m490 72.2h1.25v15.1h-1.25v-15.1z\"/><path d=\"m499 72.6h0.446c-0.032 0.519-0.048 1.24-0.048 2.16v6.92c0 0.313 0.018 0.55 0.052 0.709 0.036 0.159 0.098 0.289 0.186 0.389 0.09 0.1 0.218 0.178 0.386 0.235 0.168 0.0566 0.378 0.0998 0.632 0.13s0.588 0.05 1 0.0608v0.592h-5.99v-0.592c0.6-0.027 1.03-0.0634 1.29-0.109 0.256-0.046 0.452-0.115 0.588-0.207 0.134-0.0918 0.234-0.221 0.296-0.389 0.062-0.167 0.092-0.44 0.092-0.819v-6.57c0-0.216-0.038-0.374-0.114-0.474-0.074-0.0998-0.186-0.15-0.332-0.15-0.172 0-0.418 0.089-0.736 0.267-0.32 0.178-0.714 0.424-1.18 0.738l-0.358-0.624 3.79-2.26z\"/><path d=\"m504 71.5 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m559 115h1.25v15.1h-1.25v-15.1z\"/><path d=\"m567 117h1.15v4.67h4.42v1.08h-4.42v4.67h-1.15v-4.67h-4.42v-1.08h4.42v-4.67z\"/><path d=\"m576 114 3.23 7.28v0.6l-3.23 7.29-0.866-0.308 2.6-7.28-2.6-7.29 0.866-0.292z\"/><path d=\"m559 248h1.25v15.1h-1.25v-15.1z\"/><path d=\"m563 255h9.99v1.08h-9.99v-1.08z\"/><path d=\"m576 247 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m483 292h9.99v1.08h-9.99v-1.08z\"/><path d=\"m496 285h1.25v15.1h-1.25v-15.1z\"/><path d=\"m505 286h0.446c-0.032 0.52-0.048 1.24-0.048 2.16v6.92c0 0.314 0.018 0.55 0.052 0.71 0.036 0.16 0.098 0.29 0.186 0.39 0.09 0.1 0.218 0.178 0.386 0.234 0.168 0.058 0.378 0.1 0.632 0.13s0.588 0.05 1 0.06v0.592h-5.99v-0.592c0.598-0.026 1.03-0.062 1.28-0.108s0.452-0.116 0.588-0.208c0.134-0.092 0.234-0.22 0.296-0.388s0.092-0.44 0.092-0.82v-6.57c0-0.216-0.038-0.374-0.114-0.474-0.074-0.1-0.186-0.15-0.332-0.15-0.172 0-0.418 0.088-0.736 0.266-0.32 0.18-0.714 0.424-1.18 0.738l-0.358-0.624 3.79-2.26z\"/><path d=\"m510 285 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m379 189h9.99v1.08h-9.99v-1.08z\"/><path d=\"m392 183h1.25v15.1h-1.25v-15.1z\"/><path d=\"m400 184c-0.372 0-0.684 0.11-0.936 0.332-0.25 0.222-0.454 0.54-0.608 0.956s-0.262 0.924-0.328 1.52c-0.064 0.598-0.098 1.27-0.098 2.02 0 1.76 0.164 3.05 0.492 3.88 0.326 0.826 0.832 1.24 1.52 1.24 0.652 0 1.14-0.388 1.45-1.16s0.474-1.98 0.474-3.6c0-1.24-0.08-2.25-0.242-3.02-0.164-0.77-0.388-1.32-0.678-1.66-0.288-0.334-0.638-0.502-1.05-0.502zm0.042-0.69c1.18 0 2.06 0.458 2.64 1.37 0.578 0.914 0.866 2.29 0.866 4.14 0 1.91-0.308 3.36-0.928 4.34-0.618 0.982-1.52 1.47-2.71 1.47-1.17 0-2.04-0.46-2.61-1.38s-0.856-2.31-0.856-4.18c0-0.994 0.088-1.85 0.264-2.58s0.422-1.32 0.738-1.8c0.316-0.472 0.696-0.822 1.14-1.05 0.444-0.228 0.926-0.342 1.45-0.342z\"/><path d=\"m406 182 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m408 254h9.99v1.08h-9.99v-1.08z\"/><path d=\"m421 248h1.25v15.1h-1.25v-15.1z\"/><path d=\"m430 250h1.15v4.67h4.42v1.08h-4.42v4.67h-1.15v-4.67h-4.42v-1.08h4.42v-4.67z\"/><path d=\"m439 247 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m408 121h9.99v1.08h-9.99v-1.08z\"/><path d=\"m421 115h1.25v15.1h-1.25v-15.1z\"/><path d=\"m425 121h9.99v1.08h-9.99v-1.08z\"/><path d=\"m438 114 3.23 7.28v0.599l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/></g></g><defs><clipPath id=\"clip0_5_635\"><rect transform=\"translate(.6 .2)\" width=\"737\" height=\"374\" fill=\"#fff\"/></clipPath></defs></svg>\n\n3. Apply the $H$ gate to the qubit again.\n Now, you get the $\\ket{0}$ state for both constant scenarios and the $\\ket{1}$ state for both variable scenarios!\n <br/>\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<svg width=\"679\" height=\"365\" fill=\"none\" version=\"1.1\" viewBox=\"0 0 679 365\" xmlns=\"http://www.w3.org/2000/svg\"><g clip-path=\"url(#clip0_6_812)\"><g clip-rule=\"evenodd\" fill-rule=\"evenodd\"><path d=\"m24.1 163c0-76.8 62.3-139 139-139 76.8 0 139 62.3 139 139 0 76.8-62.3 139-139 139-76.8 0-139-62.3-139-139z\" stroke=\"#747474\" stroke-miterlimit=\"8\" stroke-width=\"1.38\"/><path d=\"m296 163c0-3.26 2.64-5.9 5.9-5.9s5.9 2.64 5.9 5.9-2.64 5.9-5.9 5.9-5.9-2.64-5.9-5.9z\" fill=\"#0070C0\"/><path d=\"m157 23.8c0-3.26 2.64-5.9 5.9-5.9s5.9 2.64 5.9 5.9c0 3.26-2.64 5.9-5.9 5.9s-5.9-2.64-5.9-5.9z\" fill=\"#fff\" stroke=\"#000\" stroke-miterlimit=\"8\" stroke-width=\"1.38\"/><path d=\"m18 163c0-3.26 2.69-5.9 6-5.9 3.31 0 6 2.64 6 5.9s-2.69 5.9-6 5.9c-3.31 0-6-2.64-6-5.9z\" fill=\"#0070C0\"/><g fill=\"#fff\" stroke-miterlimit=\"8\" stroke-width=\"1.38\"><path d=\"m157 302c0-3.26 2.64-5.9 5.9-5.9s5.9 2.64 5.9 5.9-2.64 5.9-5.9 5.9-5.9-2.64-5.9-5.9z\" stroke=\"#000\"/><path d=\"m257 66.6c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9c0 3.26-2.69 5.9-6 5.9s-6-2.64-6-5.9z\" stroke=\"#0070C0\"/><path d=\"m257 260c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9-2.69 5.9-6 5.9-6-2.64-6-5.9z\" stroke=\"#000\"/><path d=\"m57.3 66.6c0-3.26 2.69-5.9 6-5.9 3.31 0 6 2.64 6 5.9 0 3.26-2.69 5.9-6 5.9-3.31 0-6-2.64-6-5.9z\" stroke=\"#000\"/><path d=\"m57.3 260c0-3.26 2.69-5.9 6-5.9 3.31 0 6 2.64 6 5.9s-2.69 5.9-6 5.9c-3.31 0-6-2.64-6-5.9z\" stroke=\"#0070C0\"/></g><path d=\"m375 163c0-76.8 62.2-139 139-139s139 62.3 139 139c0 76.8-62.2 139-139 139s-139-62.3-139-139z\" stroke=\"#747474\" stroke-miterlimit=\"8\" stroke-width=\"1.38\"/><path d=\"m647 163c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9-2.69 5.9-6 5.9-6-2.64-6-5.9z\" fill=\"#fff\" stroke=\"#000\" stroke-miterlimit=\"8\" stroke-width=\"1.38\"/><path d=\"m508 23.7c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9c0 3.26-2.69 5.9-6 5.9s-6-2.64-6-5.9z\" fill=\"#0070C0\"/><path d=\"m369 163c0-3.26 2.64-5.9 5.9-5.9s5.9 2.64 5.9 5.9-2.64 5.9-5.9 5.9-5.9-2.64-5.9-5.9z\" fill=\"#fff\" stroke=\"#000\" stroke-miterlimit=\"8\" stroke-width=\"1.38\"/><path d=\"m508 302c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9-2.69 5.9-6 5.9-6-2.64-6-5.9z\" fill=\"#0070C0\"/><g fill=\"#fff\" stroke-miterlimit=\"8\" stroke-width=\"1.38\"><path d=\"m608 66.6c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9c0 3.26-2.69 5.9-6 5.9s-6-2.64-6-5.9z\" stroke=\"#000\"/><path d=\"m608 260c0-3.26 2.69-5.9 6-5.9s6 2.64 6 5.9-2.69 5.9-6 5.9-6-2.64-6-5.9z\" stroke=\"#0070C0\"/><path d=\"m408 66.6c0-3.26 2.64-5.9 5.9-5.9s5.9 2.64 5.9 5.9c0 3.26-2.64 5.9-5.9 5.9s-5.9-2.64-5.9-5.9z\" stroke=\"#0070C0\"/><path d=\"m408 260c0-3.26 2.64-5.9 5.9-5.9s5.9 2.64 5.9 5.9-2.64 5.9-5.9 5.9-5.9-2.64-5.9-5.9z\" stroke=\"#000\"/></g></g><g fill=\"#0070C0\"><path d=\"m309 162h15.1l-0.688 0.688v-96.5l0.688 0.688h-55.3v-1.38h56v97.9h-15.8v-1.38zm5.06 5.8-6.13-5.11 6.13-5.11c0.292-0.242 0.726-0.202 0.968 0.088 0.244 0.292 0.204 0.726-0.088 0.97l-5.5 4.58v-1.06l5.5 4.58c0.292 0.242 0.332 0.676 0.088 0.968-0.242 0.292-0.676 0.33-0.968 0.088z\"/><path d=\"m17 164h-15.4l0.688-0.688v96.5l-0.688-0.688h55.7v1.38h-56.3v-97.9h16.1v1.38zm-5.06-5.8 6.13 5.11-6.13 5.11c-0.292 0.242-0.725 0.204-0.968-0.088-0.243-0.292-0.204-0.726 0.088-0.968l5.5-4.58v1.06l-5.5-4.58c-0.292-0.242-0.331-0.676-0.088-0.968 0.243-0.292 0.677-0.33 0.968-0.088z\"/><path d=\"m620 259h57.4l-0.688 0.686v-258l0.688 0.687h-163l0.688-0.687v15.4h-1.38v-16.1h165v260h-58.1v-1.37zm-101-247-5.11 6.13-5.11-6.13c-0.242-0.292-0.204-0.725 0.088-0.968 0.292-0.243 0.726-0.204 0.968 0.088l4.58 5.5h-1.06l4.58-5.5c0.242-0.292 0.676-0.331 0.968-0.088 0.292 0.243 0.33 0.677 0.088 0.968z\"/><path d=\"m408 67.4h-51.1l0.686-0.688v258l-0.686-0.688h157l-0.686 0.688v-15.4h1.37v16.1h-158v-259h51.8v1.38zm101 247 5.11-6.13 5.11 6.13c0.244 0.292 0.204 0.726-0.088 0.97-0.292 0.242-0.724 0.202-0.968-0.088l-4.58-5.5h1.06l-4.58 5.5c-0.244 0.29-0.676 0.33-0.968 0.088-0.292-0.244-0.332-0.678-0.088-0.97z\"/></g><path d=\"m135 350c-0.94 0.455-2.17 0.683-3.68 0.683-1.98 0-3.53-0.581-4.66-1.74s-1.7-2.71-1.7-4.64c0-2.06 0.635-3.73 1.9-5.01 1.28-1.28 2.93-1.92 4.96-1.92 1.26 0 2.32 0.159 3.18 0.476v2.79c-0.862-0.515-1.84-0.773-2.95-0.773-1.21 0-2.19 0.381-2.93 1.14-0.743 0.761-1.11 1.79-1.11 3.09 0 1.25 0.35 2.24 1.05 2.98 0.7 0.737 1.64 1.1 2.83 1.1 1.13 0 2.17-0.276 3.11-0.827v2.65zm6.35 0.683c-1.53 0-2.74-0.429-3.62-1.28-0.875-0.863-1.31-2.03-1.31-3.5 0-1.52 0.455-2.71 1.37-3.57 0.91-0.862 2.14-1.29 3.69-1.29 1.53 0 2.72 0.432 3.59 1.29 0.868 0.857 1.3 1.99 1.3 3.4 0 1.53-0.45 2.73-1.35 3.62-0.893 0.886-2.12 1.33-3.68 1.33zm0.072-7.48c-0.671 0-1.19 0.23-1.56 0.691-0.371 0.462-0.557 1.11-0.557 1.96 0 1.77 0.713 2.65 2.14 2.65 1.36 0 2.04-0.907 2.04-2.72 0-1.72-0.686-2.58-2.06-2.58zm15.7 7.25h-2.83v-5.11c0-1.43-0.509-2.14-1.53-2.14-0.492 0-0.896 0.188-1.21 0.566-0.318 0.377-0.477 0.856-0.477 1.44v5.25h-2.84v-9.2h2.84v1.46h0.036c0.677-1.12 1.66-1.68 2.96-1.68 2.04 0 3.06 1.26 3.06 3.79v5.63zm1.65-0.243v-2.3c0.467 0.282 0.931 0.492 1.39 0.629 0.467 0.138 0.907 0.207 1.32 0.207 0.503 0 0.899-0.069 1.19-0.207 0.294-0.137 0.441-0.347 0.441-0.629 0-0.179-0.066-0.329-0.198-0.449s-0.303-0.224-0.512-0.314c-0.204-0.09-0.429-0.171-0.674-0.243-0.246-0.072-0.482-0.153-0.71-0.242-0.365-0.138-0.689-0.285-0.97-0.441-0.276-0.161-0.509-0.347-0.701-0.557-0.186-0.209-0.329-0.452-0.431-0.727-0.096-0.276-0.144-0.602-0.144-0.98 0-0.515 0.111-0.958 0.332-1.33 0.228-0.372 0.528-0.674 0.899-0.908 0.377-0.239 0.806-0.413 1.28-0.521 0.485-0.114 0.988-0.171 1.51-0.171 0.407 0 0.821 0.033 1.24 0.099 0.419 0.06 0.832 0.15 1.24 0.27v2.19c-0.36-0.21-0.746-0.365-1.16-0.467-0.408-0.108-0.809-0.162-1.2-0.162-0.186 0-0.363 0.018-0.53 0.054-0.162 0.03-0.306 0.078-0.431 0.144-0.126 0.06-0.225 0.14-0.297 0.242-0.072 0.096-0.108 0.207-0.108 0.333 0 0.167 0.054 0.311 0.162 0.431s0.249 0.225 0.422 0.314c0.174 0.084 0.366 0.162 0.575 0.234 0.216 0.066 0.428 0.135 0.638 0.207 0.377 0.131 0.719 0.275 1.02 0.431 0.306 0.156 0.566 0.338 0.782 0.548 0.222 0.21 0.389 0.455 0.503 0.737 0.12 0.281 0.18 0.617 0.18 1.01 0 0.545-0.12 1.01-0.36 1.4-0.233 0.384-0.548 0.698-0.943 0.944-0.389 0.239-0.841 0.413-1.36 0.521-0.509 0.114-1.04 0.171-1.59 0.171-1.01 0-1.95-0.156-2.81-0.468zm14.3 0.135c-0.419 0.222-1.05 0.333-1.9 0.333-2 0-3-1.04-3-3.12v-4.21h-1.49v-2.09h1.49v-1.99l2.83-0.808v2.79h2.07v2.09h-2.07v3.72c0 0.958 0.38 1.44 1.14 1.44 0.299 0 0.608-0.086 0.925-0.26v2.1zm9.26 0.108h-2.69v-1.32h-0.036c-0.617 1.03-1.53 1.55-2.74 1.55-0.893 0-1.6-0.252-2.11-0.755-0.509-0.509-0.763-1.19-0.763-2.03 0-1.78 1.06-2.82 3.17-3.09l2.5-0.333c0-1.01-0.545-1.51-1.64-1.51-1.1 0-2.14 0.326-3.13 0.979v-2.14c0.395-0.204 0.934-0.383 1.62-0.539 0.689-0.156 1.32-0.234 1.88-0.234 2.62 0 3.94 1.31 3.94 3.93v5.5zm-2.67-3.74v-0.62l-1.67 0.215c-0.923 0.12-1.38 0.536-1.38 1.25 0 0.323 0.111 0.59 0.333 0.8 0.227 0.203 0.533 0.305 0.916 0.305 0.533 0 0.967-0.183 1.3-0.548 0.335-0.371 0.503-0.838 0.503-1.4zm13.8 3.74h-2.83v-5.11c0-1.43-0.509-2.14-1.53-2.14-0.491 0-0.895 0.188-1.21 0.566-0.317 0.377-0.476 0.856-0.476 1.44v5.25h-2.84v-9.2h2.84v1.46h0.036c0.677-1.12 1.66-1.68 2.96-1.68 2.04 0 3.06 1.26 3.06 3.79v5.63zm7.82-0.108c-0.419 0.222-1.05 0.333-1.9 0.333-2 0-3-1.04-3-3.12v-4.21h-1.49v-2.09h1.49v-1.99l2.83-0.808v2.79h2.07v2.09h-2.07v3.72c0 0.958 0.38 1.44 1.14 1.44 0.299 0 0.608-0.086 0.925-0.26v2.1z\" fill=\"#000\"/><path d=\"m491 338-4.44 12.9h-3.29l-4.38-12.9h3.13l2.69 8.97c0.144 0.485 0.23 0.913 0.26 1.28h0.054c0.042-0.402 0.135-0.842 0.279-1.32l2.67-8.93h3.04zm7.54 12.9h-2.69v-1.32h-0.036c-0.616 1.03-1.53 1.55-2.74 1.55-0.892 0-1.6-0.252-2.11-0.755-0.509-0.509-0.764-1.19-0.764-2.03 0-1.78 1.06-2.82 3.17-3.09l2.5-0.333c0-1.01-0.545-1.51-1.64-1.51-1.1 0-2.14 0.326-3.13 0.979v-2.14c0.395-0.204 0.934-0.383 1.62-0.539 0.689-0.156 1.32-0.234 1.88-0.234 2.62 0 3.94 1.31 3.94 3.93v5.5zm-2.67-3.74v-0.62l-1.67 0.215c-0.922 0.12-1.38 0.536-1.38 1.25 0 0.323 0.11 0.59 0.332 0.8 0.228 0.203 0.533 0.305 0.916 0.305 0.534 0 0.968-0.183 1.3-0.548 0.336-0.371 0.503-0.838 0.503-1.4zm10.9-2.9c-0.341-0.186-0.739-0.279-1.2-0.279-0.616 0-1.1 0.228-1.45 0.683-0.347 0.449-0.521 1.06-0.521 1.84v4.39h-2.84v-9.2h2.84v1.71h0.036c0.449-1.25 1.26-1.87 2.43-1.87 0.299 0 0.533 0.036 0.7 0.108v2.62zm2.84-4.02c-0.479 0-0.871-0.141-1.18-0.423-0.305-0.287-0.458-0.638-0.458-1.05 0-0.425 0.153-0.773 0.458-1.04 0.306-0.27 0.698-0.404 1.18-0.404 0.486 0 0.878 0.134 1.18 0.404 0.306 0.269 0.459 0.617 0.459 1.04 0 0.431-0.153 0.785-0.459 1.06-0.299 0.276-0.691 0.414-1.18 0.414zm1.4 10.7h-2.84v-9.2h2.84v9.2zm10 0h-2.69v-1.32h-0.036c-0.617 1.03-1.53 1.55-2.74 1.55-0.892 0-1.6-0.252-2.11-0.755-0.509-0.509-0.764-1.19-0.764-2.03 0-1.78 1.06-2.82 3.17-3.09l2.5-0.333c0-1.01-0.545-1.51-1.64-1.51-1.1 0-2.14 0.326-3.13 0.979v-2.14c0.396-0.204 0.935-0.383 1.62-0.539 0.688-0.156 1.31-0.234 1.88-0.234 2.62 0 3.94 1.31 3.94 3.93v5.5zm-2.67-3.74v-0.62l-1.67 0.215c-0.922 0.12-1.38 0.536-1.38 1.25 0 0.323 0.111 0.59 0.333 0.8 0.227 0.203 0.533 0.305 0.916 0.305 0.533 0 0.968-0.183 1.3-0.548 0.335-0.371 0.503-0.838 0.503-1.4zm7.79 2.67h-0.036v1.07h-2.84v-13.6h2.84v5.8h0.036c0.7-1.07 1.7-1.61 2.99-1.61 1.19 0 2.1 0.408 2.74 1.22 0.641 0.815 0.961 1.93 0.961 3.34 0 1.53-0.374 2.76-1.12 3.69s-1.75 1.39-3 1.39c-1.13 0-1.99-0.432-2.57-1.29zm-0.081-3.88v0.943c0 0.593 0.17 1.08 0.512 1.47 0.341 0.39 0.779 0.584 1.31 0.584 0.646 0 1.15-0.248 1.5-0.745 0.359-0.503 0.539-1.21 0.539-2.13 0-0.76-0.165-1.35-0.494-1.78-0.324-0.431-0.788-0.646-1.39-0.646-0.569 0-1.04 0.212-1.42 0.638-0.372 0.425-0.557 0.979-0.557 1.66zm11.5 4.95h-2.84v-13.6h2.84v13.6zm10.7-3.79h-6c0.096 1.34 0.937 2 2.52 2 1.01 0 1.9-0.239 2.67-0.719v2.05c-0.851 0.455-1.96 0.683-3.32 0.683-1.48 0-2.64-0.411-3.46-1.23-0.82-0.827-1.23-1.98-1.23-3.45 0-1.53 0.443-2.74 1.33-3.63 0.887-0.892 1.98-1.34 3.27-1.34 1.34 0 2.38 0.399 3.11 1.2 0.737 0.797 1.1 1.88 1.1 3.24v1.2zm-2.63-1.74c0-1.32-0.533-1.98-1.6-1.98-0.456 0-0.851 0.189-1.19 0.566-0.33 0.377-0.53 0.848-0.602 1.41h3.39z\" fill=\"#000\"/><g clip-rule=\"evenodd\" fill=\"#000\" fill-rule=\"evenodd\"><path d=\"m259 156h1.25v15.1h-1.25v-15.1z\"/><path d=\"m266 157c-0.372 0-0.684 0.11-0.936 0.332s-0.454 0.54-0.608 0.956-0.264 0.924-0.328 1.52c-0.064 0.598-0.098 1.27-0.098 2.02 0 1.76 0.164 3.05 0.49 3.88 0.328 0.824 0.834 1.24 1.52 1.24 0.654 0 1.14-0.386 1.46-1.16s0.474-1.98 0.474-3.6c0-1.24-0.082-2.25-0.244-3.02s-0.388-1.32-0.676-1.66c-0.29-0.334-0.64-0.502-1.05-0.502zm0.04-0.69c1.18 0 2.06 0.458 2.64 1.37 0.578 0.914 0.866 2.29 0.866 4.14 0 1.91-0.308 3.36-0.928 4.34-0.618 0.982-1.52 1.47-2.71 1.47-1.17 0-2.04-0.46-2.61-1.38s-0.856-2.31-0.856-4.18c0-0.994 0.088-1.85 0.264-2.58s0.42-1.32 0.738-1.8c0.316-0.472 0.694-0.822 1.14-1.05 0.442-0.228 0.926-0.342 1.45-0.342z\"/><path d=\"m273 156 3.23 7.28v0.598l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m156 45.5h1.25v15.1h-1.25v-15.1z\"/><path d=\"m164 45.9h0.446c-0.032 0.519-0.05 1.24-0.05 2.16v6.92c0 0.313 0.018 0.55 0.054 0.709 0.034 0.159 0.096 0.289 0.186 0.389s0.218 0.178 0.384 0.235c0.168 0.0568 0.38 0.1 0.634 0.13 0.254 0.0298 0.588 0.05 1 0.0608v0.592h-5.99v-0.592c0.6-0.027 1.03-0.0634 1.29-0.109 0.256-0.0458 0.452-0.115 0.586-0.207 0.136-0.0918 0.234-0.222 0.296-0.389 0.062-0.168 0.094-0.44 0.094-0.819v-6.57c0-0.216-0.038-0.374-0.114-0.474s-0.186-0.15-0.332-0.15c-0.172 0-0.418 0.0892-0.738 0.267-0.318 0.178-0.712 0.424-1.18 0.738l-0.356-0.624 3.79-2.26z\"/><path d=\"m170 44.8 3.23 7.28v0.6l-3.23 7.29-0.866-0.308 2.6-7.28-2.6-7.29 0.866-0.292z\"/><path d=\"m224 88.4h1.25v15.1h-1.25v-15.1z\"/><path d=\"m233 90h1.15v4.67h4.42v1.08h-4.42v4.67h-1.15v-4.67h-4.42v-1.08h4.42v-4.67z\"/><path d=\"m242 87.6 3.23 7.28v0.6l-3.23 7.29-0.866-0.308 2.6-7.28-2.6-7.29 0.866-0.292z\"/><path d=\"m224 222h1.25v15.1h-1.25v-15.1z\"/><path d=\"m229 228h9.99v1.08h-9.99v-1.08z\"/><path d=\"m242 221 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m149 265h9.99v1.08h-9.99v-1.08z\"/><path d=\"m162 259h1.25v15.1h-1.25v-15.1z\"/><path d=\"m171 259h0.446c-0.032 0.52-0.05 1.24-0.05 2.16v6.92c0 0.314 0.018 0.55 0.054 0.71 0.034 0.16 0.096 0.29 0.186 0.39s0.218 0.178 0.386 0.234c0.166 0.056 0.378 0.1 0.632 0.13s0.588 0.05 1 0.06v0.592h-5.99v-0.592c0.6-0.026 1.03-0.062 1.29-0.108 0.256-0.046 0.452-0.116 0.586-0.208 0.136-0.092 0.234-0.222 0.296-0.388 0.062-0.168 0.094-0.44 0.094-0.82v-6.57c0-0.216-0.038-0.374-0.114-0.474s-0.186-0.15-0.332-0.15c-0.172 0-0.418 0.088-0.738 0.266-0.318 0.178-0.712 0.424-1.18 0.738l-0.358-0.624 3.79-2.26z\"/><path d=\"m176 258 3.23 7.28v0.6l-3.23 7.29-0.866-0.308 2.6-7.28-2.6-7.29 0.866-0.292z\"/><path d=\"m44.7 163h9.99v1.08h-9.99v-1.08z\"/><path d=\"m57.9 156h1.25v15.1h-1.25v-15.1z\"/><path d=\"m65.7 157c-0.373 0-0.685 0.11-0.936 0.332s-0.454 0.54-0.608 0.956-0.264 0.924-0.328 1.52c-0.0648 0.598-0.0972 1.27-0.0972 2.02 0 1.76 0.163 3.05 0.49 3.88 0.327 0.824 0.833 1.24 1.52 1.24 0.654 0 1.14-0.386 1.45-1.16 0.316-0.776 0.474-1.98 0.474-3.6 0-1.24-0.081-2.25-0.243-3.02-0.162-0.77-0.388-1.32-0.677-1.66-0.289-0.334-0.639-0.502-1.05-0.502zm0.0406-0.69c1.18 0 2.06 0.458 2.64 1.37 0.578 0.914 0.867 2.29 0.867 4.14 0 1.91-0.309 3.36-0.928 4.34-0.619 0.982-1.52 1.47-2.71 1.47-1.17 0-2.04-0.46-2.61-1.38-0.57-0.918-0.855-2.31-0.855-4.18 0-0.994 0.0878-1.85 0.263-2.58s0.422-1.32 0.738-1.8c0.316-0.472 0.696-0.822 1.14-1.05 0.443-0.228 0.927-0.342 1.45-0.342z\"/><path d=\"m72 156 3.23 7.28v0.598l-3.23 7.29-0.867-0.308 2.6-7.28-2.6-7.29 0.867-0.292z\"/><path d=\"m74.1 228h9.99v1.08h-9.99v-1.08z\"/><path d=\"m87.3 221h1.25v15.1h-1.25v-15.1z\"/><path d=\"m96.2 223h1.15v4.67h4.42v1.08h-4.42v4.67h-1.15v-4.67h-4.42v-1.08h4.42v-4.67z\"/><path d=\"m105 220 3.23 7.28v0.598l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m73.4 94.2h9.99v1.08h-9.99v-1.08z\"/><path d=\"m86.6 87.9h1.25v15.1h-1.25v-15.1z\"/><path d=\"m91.1 94.2h9.99v1.08h-9.99v-1.08z\"/><path d=\"m104 87.2 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m608 156h1.25v15.1h-1.25v-15.1z\"/><path d=\"m616 157c-0.374 0-0.686 0.11-0.936 0.332-0.252 0.222-0.454 0.54-0.608 0.956s-0.264 0.924-0.328 1.52c-0.066 0.598-0.098 1.27-0.098 2.02 0 1.76 0.164 3.05 0.49 3.88 0.328 0.824 0.834 1.24 1.52 1.24 0.654 0 1.14-0.386 1.46-1.16s0.474-1.98 0.474-3.6c0-1.24-0.082-2.25-0.244-3.02s-0.388-1.32-0.676-1.66c-0.29-0.334-0.64-0.502-1.05-0.502zm0.04-0.69c1.18 0 2.06 0.458 2.64 1.37 0.578 0.914 0.868 2.29 0.868 4.14 0 1.91-0.31 3.36-0.928 4.34-0.618 0.982-1.52 1.47-2.71 1.47-1.17 0-2.04-0.46-2.61-1.38s-0.854-2.31-0.854-4.18c0-0.994 0.088-1.85 0.262-2.58 0.176-0.724 0.422-1.32 0.738-1.8 0.316-0.472 0.696-0.822 1.14-1.05 0.442-0.228 0.926-0.342 1.45-0.342z\"/><path d=\"m622 156 3.23 7.28v0.598l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m505 45.5h1.25v15.1h-1.25v-15.1z\"/><path d=\"m514 45.9h0.444c-0.032 0.519-0.048 1.24-0.048 2.16v6.92c0 0.313 0.018 0.55 0.054 0.709 0.034 0.159 0.096 0.289 0.186 0.389 0.088 0.1 0.216 0.178 0.384 0.235s0.378 0.1 0.632 0.13c0.254 0.0298 0.59 0.05 1.01 0.0608v0.592h-5.99v-0.592c0.6-0.027 1.03-0.0634 1.28-0.109 0.258-0.0458 0.454-0.115 0.588-0.207 0.136-0.0918 0.234-0.222 0.296-0.389 0.062-0.168 0.094-0.44 0.094-0.819v-6.57c0-0.216-0.038-0.374-0.114-0.474s-0.186-0.15-0.332-0.15c-0.174 0-0.42 0.0892-0.738 0.267-0.318 0.178-0.714 0.424-1.18 0.738l-0.356-0.624 3.79-2.26z\"/><path d=\"m519 44.8 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m574 88.4h1.25v15.1h-1.25v-15.1z\"/><path d=\"m583 90h1.15v4.67h4.42v1.08h-4.42v4.67h-1.15v-4.67h-4.42v-1.08h4.42v-4.67z\"/><path d=\"m591 87.6 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m574 222h1.25v15.1h-1.25v-15.1z\"/><path d=\"m578 228h9.99v1.08h-9.99v-1.08z\"/><path d=\"m591 221 3.23 7.28v0.6l-3.23 7.29-0.866-0.308 2.6-7.28-2.6-7.29 0.866-0.292z\"/><path d=\"m498 265h9.99v1.08h-9.99v-1.08z\"/><path d=\"m511 259h1.25v15.1h-1.25v-15.1z\"/><path d=\"m520 259h0.446c-0.034 0.52-0.05 1.24-0.05 2.16v6.92c0 0.314 0.018 0.55 0.054 0.71 0.034 0.16 0.096 0.29 0.186 0.39 0.088 0.1 0.216 0.178 0.384 0.234s0.378 0.1 0.632 0.13 0.59 0.05 1.01 0.06v0.592h-5.99v-0.592c0.6-0.026 1.03-0.062 1.28-0.108 0.258-0.046 0.454-0.116 0.588-0.208 0.136-0.092 0.234-0.222 0.296-0.388 0.062-0.168 0.094-0.44 0.094-0.82v-6.57c0-0.216-0.038-0.374-0.114-0.474s-0.186-0.15-0.332-0.15c-0.174 0-0.42 0.088-0.738 0.266s-0.714 0.424-1.18 0.738l-0.356-0.624 3.79-2.26z\"/><path d=\"m525 258 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m394 163h9.99v1.08h-9.99v-1.08z\"/><path d=\"m407 156h1.25v15.1h-1.25v-15.1z\"/><path d=\"m415 157c-0.374 0-0.686 0.11-0.936 0.332-0.252 0.222-0.454 0.54-0.608 0.956s-0.264 0.924-0.328 1.52c-0.066 0.598-0.098 1.27-0.098 2.02 0 1.76 0.164 3.05 0.49 3.88 0.328 0.824 0.834 1.24 1.52 1.24 0.654 0 1.14-0.386 1.45-1.16 0.318-0.776 0.476-1.98 0.476-3.6 0-1.24-0.082-2.25-0.244-3.02s-0.388-1.32-0.676-1.66c-0.29-0.334-0.64-0.502-1.05-0.502zm0.04-0.69c1.18 0 2.06 0.458 2.64 1.37 0.578 0.914 0.868 2.29 0.868 4.14 0 1.91-0.31 3.36-0.928 4.34-0.62 0.982-1.52 1.47-2.71 1.47-1.17 0-2.04-0.46-2.61-1.38s-0.854-2.31-0.854-4.18c0-0.994 0.088-1.85 0.262-2.58 0.176-0.724 0.422-1.32 0.738-1.8 0.316-0.472 0.696-0.822 1.14-1.05 0.442-0.228 0.926-0.342 1.45-0.342z\"/><path d=\"m421 156 3.23 7.28v0.598l-3.23 7.29-0.866-0.308 2.6-7.28-2.6-7.29 0.866-0.292z\"/><path d=\"m423 228h9.99v1.08h-9.99v-1.08z\"/><path d=\"m436 221h1.25v15.1h-1.25v-15.1z\"/><path d=\"m445 223h1.15v4.67h4.42v1.08h-4.42v4.67h-1.15v-4.67h-4.42v-1.08h4.42v-4.67z\"/><path d=\"m454 220 3.23 7.28v0.598l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/><path d=\"m423 94.2h9.99v1.08h-9.99v-1.08z\"/><path d=\"m436 87.9h1.25v15.1h-1.25v-15.1z\"/><path d=\"m440 94.2h9.99v1.08h-9.99v-1.08z\"/><path d=\"m453 87.2 3.23 7.28v0.6l-3.23 7.29-0.868-0.308 2.6-7.28-2.6-7.29 0.868-0.292z\"/></g></g><defs><clipPath id=\"clip0_6_812\"><rect transform=\"translate(.8 .6)\" width=\"677\" height=\"364\" fill=\"#fff\"/></clipPath></defs></svg>\n"
6614
6655
  }
6615
6656
  ]
6616
6657
  },
@@ -6632,7 +6673,7 @@ export default {
6632
6673
  "items": [
6633
6674
  {
6634
6675
  "type": "text-content",
6635
- "content": "\nFollow the algorithm as outlined in the previous section:\n\n1. Allocate a qubit - it starts in the $\\ket{0}$ state.\n2. Apply the $H$ gate to the qubit.\n3. Apply the oracle. The syntax for applying the oracle is the same as for applying any other gate or operation.\n4. Apply the $H$ gate to the qubit again.\n5. Measure the qubit: if the measurement result is `Zero`, the function is constant, otherwise it is variable.\nSince we need to return `true` if the function is constant, we can just return the result of comparing the measurement result with `Zero`."
6676
+ "content": "\nFollow the algorithm as outlined in the previous section:\n\n1. Allocate a qubit - it starts in the $\\ket{0}$ state.\n2. Apply the $H$ gate to the qubit.\n3. Apply the oracle. The syntax for applying the oracle is the same as for applying any other gate or operation.\n4. Apply the $H$ gate to the qubit again.\n5. Measure the qubit: if the measurement result is `Zero`, the function is constant, otherwise it's variable.\nSince you need to return `true` if the function is constant, you can just return the result of comparing the measurement result with `Zero`."
6636
6677
  },
6637
6678
  {
6638
6679
  "type": "solution",
@@ -6665,7 +6706,7 @@ export default {
6665
6706
  "items": [
6666
6707
  {
6667
6708
  "type": "text-content",
6668
- "content": "\nCongratulations! In this kata you have learned Deutsch algorithm.\n\n- Deutsch algorithm is the smallest example of a quantum algorithm that allows to answer a question about a function in fewer queries than its classical counterpart: one query to a quantum oracle versus two queries to a classical function.\n- Quantum oracles don't allow you to evaluate the function on all inputs at once! Instead, Deutsch algorithm finds a clever way to aggregate information about both function values into a single bit that indicates whether they are equal or not.\n\nNext, you will learn about the more general case of this problem and the algorithm to solve it in the Deutsch-Jozsa Algorithm kata."
6709
+ "content": "\nCongratulations! In this kata you learned Deutsch algorithm.\n\n- Deutsch algorithm is the smallest example of a quantum algorithm that allows to answer a question about a function in fewer queries than its classical counterpart: one query to a quantum oracle versus two queries to a classical function.\n- Quantum oracles don't allow you to evaluate the function on all inputs at once! Instead, Deutsch algorithm finds a clever way to aggregate information about both function values into a single bit that indicates whether they are equal or not.\n\nNext, you will learn about the more general case of this problem and the algorithm to solve it in the Deutsch-Jozsa Algorithm kata."
6669
6710
  }
6670
6711
  ]
6671
6712
  }
@@ -6889,7 +6930,7 @@ export default {
6889
6930
  "items": [
6890
6931
  {
6891
6932
  "type": "text-content",
6892
- "content": "\nThis kata introduces you to the basic concepts of quantum error correction using several simple error correction codes.\n\n**This kata covers the following topics:**\n\n- Simple models of noise in quantum systems\n- Parity measurements in Z and X bases\n- Bit flip code - the simplest code that protects qubits from the effects of bit flip noise\n- Phase flip code - the simplest code that protects qubits from the effects of phase flip noise\n- Shor code - the simplest code that can protect from an arbitrary error on a single qubit\n\n**What you should know to start working on this kata:**\n\n- Basic single-qubit and multi-qubit gates\n- Single-qubit and multi-qubit quantum measurements and their effect on quantum systems"
6933
+ "content": "\nThis kata introduces you to the basic concepts of quantum error correction using several simple error correction codes.\n\n**This kata covers the following topics:**\n\n- Simple models of noise in quantum systems\n- Parity measurements in Z and X bases\n- Bit flip code - the simplest code that protects qubits from the effects of bit flip noise\n- Phase flip code - the simplest code that protects qubits from the effects of phase flip noise\n- Shor code - the simplest code that can protect from an arbitrary error on a single qubit\n\n**What you should know to start working on this kata:**\n\n- Basic knowledge of single-qubit and multi-qubit gates\n- Basic knowledge of single-qubit and multi-qubit quantum measurements and their effect on quantum systems"
6893
6934
  }
6894
6935
  ]
6895
6936
  },
@@ -6900,7 +6941,7 @@ export default {
6900
6941
  "items": [
6901
6942
  {
6902
6943
  "type": "text-content",
6903
- "content": "\nAny quantum system we can use to carry out quantum computation is inherently noisy. \nQuantum noise can be caused by different physical processes, depending on the type of a particle or device used as a qubit.\nFrom the computation point of view, the presence of noise in the quantum system means that its state can suffer from random errors, and thus end up different from the state we're relying on to do our computations. \nThis makes computations unreliable very fast, since the effects of noise accumulate quickly to make computation results effectively random.\n\nBefore we dive into dealing with noise in quantum systems, let's take a quick look at how we do that for classical systems.\n\nThe model used for analyzing classical noise is called *binary symmetric channel*, in which classical bits sent through the channel are transmitted correctly with probability $1-p$ and flipped with probability $p$.\nIn this scenario, the information sent through the channel can be protected against the effects of the noise using the *repetition code*:\n\n- On the sender side, we replace each bit we want to send with three copies of itself:\n$$0 \\rightarrow 000, 1 \\rightarrow 111$$\n- On the receiver side, we decode the original bit by majority vote: \n$$000, 100, 010, 001 \\rightarrow 0$$\n$$111, 011, 101, 110 \\rightarrow 1$$\n\nWhat is the probability of this scheme failure, that is, the value of the message bit changing after it was sent through the channel? \nMajority vote allows for one error on any bit to happen without affecting the decoding outcome, so it would take two or three errors happening on individual bits for decoding to produce an incorrect result. The probability of this happening is $3p^2(1-p) + p^3 = 3p^2 - 2p^3$. If we compare this with the probability of an individual bit transmission failing $p$, we can see that using the repetition code yields higher success probability, as long as $p < \\frac12$. We can improve success probability further by increasing the number of repetitions we use to encode each bit: $5$ repetitions allow us to detect and correct $2$ errors, $7$ repetitions - $3$ errors, and so on.\n\n> This noise model is useful not only for describing noisy communication channels, but also for memory - any classical system that introduces errors in information when it is left on its own, as opposed to systems that introduce errors during information manipulation. Indeed, we assume that no errors are introduced as we copy the bits during encoding or read and compare their values during decoding.\n\nThe main idea of quantum error correction is the same as that for classical error correction: encode information with enough redundancy that we can recover the message even from the noisy transmission results.\nDealing with the noise in quantum systems is more challenging than in classical systems, though, due to the limitations imposed by their nature:\n\n- **No cloning**: We cannot replicate the repetition code for quantum systems in a straightforward manner, by duplicating the quantum state several times, since the no-cloning theorem prohibits that.\n- **Observing the system damages information**: Even if we could produce several copies of a quantum state we want to transmit, we would not be able to compare them afterwards without damaging their state.\n- **Errors are continuous**: We need to recover from arbitrary errors that are much more complicated than the bit flip error we have in classical systems.\n\nThe simplest model used to analyze quantum noise is *quantum depolarizing channel*. \nIn this model, we assume that we send qubits through a channel that transmits the qubit unchanged with probability $1-p$, and applies one of the Pauli gates $X$, $Y$, and $Z$ with probability $\\frac{p}{3}$ each. The effects of the noise on each qubit transmitted are independent.\n\nAt first glance, this model seems to be limited, and not representative of the full spectrum of errors that can occur in a quantum system. Fortunately, it turns out that any errors on encoded states can be corrected by correcting only a discrete subset of errors - exactly the Pauli $X$, $Y$, and $Z$ errors! This is called *discretization of quantum errors*, and we'll see how it works later in this kata.\n\n> For now, we are assuming that all errors are introduced by the channel, and the gates and measurements we use for encoding and decoding procedures of a quantum error correction code are perfect and don't introduce any errors themselves. This is a useful assumption to get started with error correction, but in real life all gates and measurements are noisy, so eventually we'll need to modify our approach. \n> *Fault-tolerant quantum computation* handles the more general scenario of performing computations on encoded states in a way that tolerates errors introduced by noisy gates and measurements."
6944
+ "content": "\nAny quantum system we can use to carry out quantum computation is inherently noisy. \nQuantum noise can be caused by different physical processes, depending on the type of particle or device used as a qubit.\nFrom the computation point of view, the presence of noise in the quantum system means that its state can suffer from random errors, and thus end up in a different state from the state you're relying on to do your computations. \nThis makes computations unreliable very fast, since the effects of noise accumulate quickly to make computation results effectively random.\n\nBefore diving into how to deal with noise in quantum systems, let's take a quick look at how to do that for classical systems.\n\nThe model used for analyzing classical noise is called a *binary symmetric channel*. In this model, the classical bits sent through the channel are transmitted correctly with probability $1-p$ and flipped with probability $p$. The error introduced if the bit is flipped is called a *bit flip error*.\nIn this scenario, the information sent through the channel can be protected against the effects of the noise, that is, bit flip errors, using the *repetition code*:\n\n- On the sender side, for each bit you want to send, you create and send three copies of it:\n$$0 \\rightarrow 000, 1 \\rightarrow 111$$\n- On the receiver side, you decode the original bit by majority vote:\n$$000, 100, 010, 001 \\rightarrow 0$$\n$$111, 011, 101, 110 \\rightarrow 1$$\n\nWhat is the probability of this scheme failure, that is, getting an incorrect value for the message bit after it was sent through the channel? \nA majority vote allows for one error on any of the three bits to happen without affecting the decoding outcome, so it would take two or three errors happening on individual bits for decoding to produce an incorrect result. The probability of this happening is $3p^2(1-p) + p^3 = 3p^2 - 2p^3$. If you compare this with the probability of an individual bit transmission failing $p$, you can see that using the repetition code yields higher success probability, as long as $p < \\frac12$. You can improve success probability further by increasing the number of repetitions you use to encode each bit: $5$ repetitions allow us to detect and correct $2$ errors, $7$ repetitions can correct $3$ errors, and so on.\n\n> This noise model is useful not only for describing noisy communication channels, but also for memory - any classical system that introduces errors in information when it is left on its own, as opposed to systems that introduce errors during information manipulation. Indeed, we assume that no errors are introduced as we copy the bits during encoding or read and compare their values during decoding.\n\nThe main idea of quantum error correction is the same as that for classical error correction: encode information with enough redundancy that we can recover the message even from the noisy transmission results.\nDealing with the noise in quantum systems is more challenging than in classical systems, though, due to the limitations imposed by their nature:\n\n- **No cloning**: It's not possible to replicate the repetition code for quantum systems in a straightforward manner, by duplicating the quantum state several times, since the no-cloning theorem prohibits that.\n- **Observing the system damages information**: Even if the no-cloning theorem didn't prohibit producing several copies of a quantum state, it wouldn't be possible to compare the states of the copies afterwards without damaging their state.\n- **Errors are continuous**: Errors in quantum computing are much more complicated than bit flip errors in classical systems.\n\nThe simplest model used to analyze quantum noise is *quantum depolarizing channel*. \nThis model assumes that the channel transmits the qubit unchanged with probability $1-p$, and applies one of the Pauli gates $X$, $Y$, and $Z$ with probability $\\frac{p}{3}$ each. The effects of the noise on each qubit transmitted are independent.\n\nAt first glance, this model seems to be limited, and not representative of the full spectrum of errors that can occur in a quantum system. Fortunately, it turns out that any errors on encoded states can be corrected by correcting only a discrete subset of errors - exactly the Pauli $X$, $Y$, and $Z$ errors! This is called *discretization of quantum errors*, and you'll see how it works later in this kata.\n\n> For now, we assume that all errors are introduced by the channel, and the gates and measurements used for encoding and decoding procedures of a quantum error correction code are perfect and don't introduce any errors themselves. This is a useful assumption to get started with error correction, but in real life all gates and measurements are noisy, so eventually we'll need to modify this approach.\n> *Fault-tolerant quantum computation* handles the more general scenario of performing computations on encoded states in a way that tolerates errors introduced by noisy gates and measurements."
6904
6945
  }
6905
6946
  ]
6906
6947
  },
@@ -6911,7 +6952,7 @@ export default {
6911
6952
  "items": [
6912
6953
  {
6913
6954
  "type": "text-content",
6914
- "content": "\nQuantum error correction is based on the use of a special kind of measurements - joint measurements in Pauli bases.\nWe introduced the single-qubit measurements in different Pauli bases in the Measurements in Single-Qubit Systems kata,\nand then the general case of joint measurements in the Measurements in Multi-Qubit Systems kata.\nLet's take a closer look at the kinds of joint measurements we'll be using in this kata.\n\nA multi-qubit Pauli measurement on $n$ qubits corresponds to an operator $M_1 \\otimes \\dotsc \\otimes M_n$, with each $M_j$ being from the set of gates $\\{X,Y,Z,I\\}$, and at least one of the $M_j$ is not the identity matrix. (If $M_j = I$, you can think of it as qubit $j$ not being involved in the measurement.) The measurement can produce one of the two outcomes: `Zero` corresponding to eigenvalue $+1$ of this operator, or `One` corresponding to the eigenvalue $-1$. The corresponding projection operators are the projections onto the corresponding eigenspaces. The operator $M_1 \\otimes \\dotsc \\otimes M_n$ is referred to as the _measurement basis_.\n\nFor example, the first two joint measurements we'll encounter later in this kata are two-qubit measurements in $ZZ$ and $XX$ bases. They can be described as follows:\n\n<table>\n <tr>\n <th>Pauli Operator</th>\n <th>Eigenvalue</th>\n <th>Eigenvectors</th>\n <th>Measurement Projector</th>\n <th>Measurement Result in Q#</th>\n </tr>\n <tr>\n <td rowspan=\"2\">$ZZ$</td>\n <td>$+1$</td>\n <td>$\\ket{00}$, $\\ket{11}$</td>\n <td>$\\ket{00}\\bra{00} + \\ket{11}\\bra{11}$</td>\n <td>Zero</td>\n </tr><tr>\n <td>$-1$</td>\n <td>$\\ket{01}$, $\\ket{10}$</td>\n <td>$\\ket{01}\\bra{01} + \\ket{10}\\bra{10}$</td>\n <td>One</td>\n </tr>\n <tr>\n <td rowspan=\"2\">$XX$</td>\n <td>$+1$</td>\n <td>$\\ket{++}$, $\\ket{--}$</td>\n <td>$\\ket{++}\\bra{++} + \\ket{--}\\bra{--}$</td>\n <td>Zero</td>\n </tr><tr>\n <td>$-1$</td>\n <td>$\\ket{+-}$, $\\ket{-+}$</td>\n <td>$\\ket{+-}\\bra{+-} + \\ket{-+}\\bra{-+}$</td>\n <td>One</td>\n </tr>\n</table>\n\nIn Q#, joint measurements in Pauli bases are implemented using the `Measure` operation.\nIt takes two parameters: the array of `Pauli` constants (`PauliI`, `PauliX`, `PauliY`, or `PauliZ`) that define the basis for measurement, and the array of qubits to be measured."
6955
+ "content": "\nQuantum error correction is based on the use of a special kind of measurements - joint measurements in Pauli bases.\nYou can learn more about the single-qubit measurements in different Pauli bases in the Measurements in Single-Qubit Systems kata,\nand the general case of joint measurements in the Measurements in Multi-Qubit Systems kata.\nLet's take a closer look at the kinds of joint measurements you'll use in this kata.\n\nA multi-qubit Pauli measurement on $n$ qubits corresponds to an operator $M_1 \\otimes \\dotsc \\otimes M_n$, with each $M_j$ being from the set of gates $\\{X,Y,Z,I\\}$, and at least one of the $M_j$ is not the identity matrix. (If $M_j = I$, you can think of it as qubit $j$ not being involved in the measurement.) The measurement can produce one of the two outcomes: `Zero` corresponding to eigenvalue $+1$ of this operator, or `One` corresponding to the eigenvalue $-1$. The corresponding projection operators are the projections onto the corresponding eigenspaces. The operator $M_1 \\otimes \\dotsc \\otimes M_n$ is referred to as the _measurement basis_.\n\nFor example, the first two joint measurements you'll encounter later in this kata are two-qubit measurements in $ZZ$ and $XX$ bases. They can be described as follows:\n\n<table>\n <tr>\n <th>Pauli Operator</th>\n <th>Eigenvalue</th>\n <th>Eigenvectors</th>\n <th>Measurement Projector</th>\n <th>Measurement Result in Q#</th>\n </tr>\n <tr>\n <td rowspan=\"2\">$ZZ$</td>\n <td>$+1$</td>\n <td>$\\ket{00}$, $\\ket{11}$</td>\n <td>$\\ket{00}\\bra{00} + \\ket{11}\\bra{11}$</td>\n <td>Zero</td>\n </tr><tr>\n <td>$-1$</td>\n <td>$\\ket{01}$, $\\ket{10}$</td>\n <td>$\\ket{01}\\bra{01} + \\ket{10}\\bra{10}$</td>\n <td>One</td>\n </tr>\n <tr>\n <td rowspan=\"2\">$XX$</td>\n <td>$+1$</td>\n <td>$\\ket{++}$, $\\ket{--}$</td>\n <td>$\\ket{++}\\bra{++} + \\ket{--}\\bra{--}$</td>\n <td>Zero</td>\n </tr><tr>\n <td>$-1$</td>\n <td>$\\ket{+-}$, $\\ket{-+}$</td>\n <td>$\\ket{+-}\\bra{+-} + \\ket{-+}\\bra{-+}$</td>\n <td>One</td>\n </tr>\n</table>\n\nIn Q#, joint measurements in Pauli bases are implemented using the `Measure` operation.\nThe `Measure` operation takes two parameters: the array of `Pauli` constants (`PauliI`, `PauliX`, `PauliY`, or `PauliZ`) that define the basis for measurement, and the array of qubits to be measured."
6915
6956
  }
6916
6957
  ]
6917
6958
  },
@@ -6925,7 +6966,8 @@ export default {
6925
6966
  },
6926
6967
  "sourceIds": [
6927
6968
  "qec_shor__zz_measurement__Verification.qs",
6928
- "KatasLibrary.qs"
6969
+ "KatasLibrary.qs",
6970
+ "qec_shor__Common.qs"
6929
6971
  ],
6930
6972
  "placeholderCode": "namespace Kata {\n operation ZZMeasurement(qs : Qubit[]) : Int {\n // Implement your solution here...\n\n return -1;\n }\n}\n",
6931
6973
  "explainedSolution": {
@@ -6933,7 +6975,7 @@ export default {
6933
6975
  "items": [
6934
6976
  {
6935
6977
  "type": "text-content",
6936
- "content": "\nWe need to measure the *parity* of the state without collapsing it all the way to the basis states. This means that we need to do the $Z \\otimes Z$ measurement on both qubits.\n\nA joint measurement using $Z \\otimes Z$ operator can be thought of as projecting the measured state to one of the two eigenspaces of $Z \\otimes Z$ with $+1$ and $-1$ as the corresponding eigenvalues. The measurement returns `Zero` if the measured state is projected to the space with an eigenvalue of $+1$, and a result of `One` if projected to the space with an eigenvalue of $-1$.\n\nWe can see that the state $\\alpha \\ket{00} + \\beta \\ket{11}$ is an eigenstate of the $Z \\otimes Z$ operator with the eigenvalue $+1$, and the state $\\alpha \\ket{01} + \\beta \\ket{10}$ is an eigenstate with the eigenvalue $-1$.\nHence, we can use this joint measurement to recognize which of the superposition states we were given while preserving the initial superposition state."
6978
+ "content": "\nYou need to measure the *parity* of the state without collapsing it all the way to the basis states. This means that you need to do the $Z \\otimes Z$ measurement on both qubits.\n\nA joint measurement using $Z \\otimes Z$ operator can be thought of as projecting the measured state to one of the two eigenspaces of $Z \\otimes Z$ with $+1$ and $-1$ as the corresponding eigenvalues. The measurement returns `Zero` if the measured state is projected to the space with an eigenvalue of $+1$, and a result of `One` if projected to the space with an eigenvalue of $-1$.\n\nYou can see that the state $\\alpha \\ket{00} + \\beta \\ket{11}$ is an eigenstate of the $Z \\otimes Z$ operator with the eigenvalue $+1$, and the state $\\alpha \\ket{01} + \\beta \\ket{10}$ is an eigenstate with the eigenvalue $-1$.\nHence, you can use this joint measurement to recognize which of the superposition states you were given while preserving the initial superposition state."
6937
6979
  },
6938
6980
  {
6939
6981
  "type": "solution",
@@ -6953,7 +6995,8 @@ export default {
6953
6995
  },
6954
6996
  "sourceIds": [
6955
6997
  "qec_shor__xx_measurement__Verification.qs",
6956
- "KatasLibrary.qs"
6998
+ "KatasLibrary.qs",
6999
+ "qec_shor__Common.qs"
6957
7000
  ],
6958
7001
  "placeholderCode": "namespace Kata {\n operation XXMeasurement(qs : Qubit[]) : Int {\n // Implement your solution here...\n\n return -1;\n }\n}\n",
6959
7002
  "explainedSolution": {
@@ -6961,7 +7004,7 @@ export default {
6961
7004
  "items": [
6962
7005
  {
6963
7006
  "type": "text-content",
6964
- "content": "\nThis time, we need to do the $X \\otimes X$ measurement on both qubits.\n\nThe state $\\alpha \\ket{++} + \\beta \\ket{--}$ is an eigenstate of the $X \\otimes X$ operator with the eigenvalue $+1$, and the state $\\alpha \\ket{+-} + \\beta \\ket{-+}$ is an eigenstate with the eigenvalue $-1$.\nHence, we can use this joint measurement to recognize which of the superposition states we were given while preserving the initial superposition state."
7007
+ "content": "\nThis time, you need to do the $X \\otimes X$ measurement on both qubits.\n\nThe state $\\alpha \\ket{++} + \\beta \\ket{--}$ is an eigenstate of the $X \\otimes X$ operator with the eigenvalue $+1$, and the state $\\alpha \\ket{+-} + \\beta \\ket{-+}$ is an eigenstate with the eigenvalue $-1$.\nHence, you can use this joint measurement to recognize which of the superposition states you were given while preserving the initial superposition state."
6965
7008
  },
6966
7009
  {
6967
7010
  "type": "solution",
@@ -6978,7 +7021,7 @@ export default {
6978
7021
  "items": [
6979
7022
  {
6980
7023
  "type": "text-content",
6981
- "content": "\nCan we reuse the ideas of a classical repetition code for a quantum error correction code? \n\nThe naive approach to it would be to try and encode a quantum state $\\ket{\\psi}$ as several copies of itself: \n$\\ket{\\psi} \\rightarrow \\ket{\\psi} \\otimes \\ket{\\psi} \\otimes \\ket{\\psi}$.\nUnfortunately, the no-cloning theorem and the inability to reconstruct a state accurately after measuring it prevent us from doing that.\n\nWe can, however, take a slightly different approach: encode the *basis states* $\\ket{0}$ and $\\ket{1}$ in repetition code using a unitary transformation, and deduce the effects of this transformation on superposition states based on its linearity:\n\n$$\\ket{0} \\rightarrow \\ket{000}, \\ket{1} \\rightarrow \\ket{111}$$\n\n$$\\alpha \\ket{0} + \\beta \\ket{1} \\rightarrow \\alpha \\ket{000} + \\beta \\ket{111}$$\n\nThis encoding is called **bit flip code**, and the states $\\ket{000}$, $\\ket{111}$, and their linear combinations are called **code words** in this code. The bit flip code allows us to detect and correct some errors that can occur on qubits in the depolarizing channel, though not all of them.\n\nLet's see what happens if an $X$ error happens on one of the qubits, and how we can detect it using two parity measurements (measurements in the $ZZ$ basis).\n\n<table>\n<tr>\n<th>Error</th>\n<th>State after the error</th>\n<th>Parity of qubits 0 and 1</th>\n<th>Parity of qubits 1 and 2</th>\n</tr>\n<tr>\n<td>No error</td>\n<td>$\\alpha \\ket{000} + \\beta \\ket{111}$</td>\n<td>$0$</td>\n<td>$0$</td>\n</tr>\n<tr>\n<td>$X_0$ (error on qubit $0$)</td>\n<td>$\\alpha \\ket{100} + \\beta \\ket{011}$</td>\n<td>$1$</td>\n<td>$0$</td>\n</tr>\n<tr>\n<td>$X_1$ (error on qubit $1$)</td>\n<td>$\\alpha \\ket{010} + \\beta \\ket{101}$</td>\n<td>$1$</td>\n<td>$1$</td>\n</tr>\n<tr>\n<td>$X_2$ (error on qubit $2$)</td>\n<td>$\\alpha \\ket{001} + \\beta \\ket{110}$</td>\n<td>$0$</td>\n<td>$1$</td>\n</tr>\n</table>\n\nYou can see that these two parity measurements give us different pairs of results depending on whether the $X$ error happened and on which qubit. This means that we can use them to detect the error, and then correct it by applying an $X$ gate to the qubit that was affected by it.\n\nHowever, if a $Z$ error happens on any one of these qubits, we won't be able to detect it: it will convert the state $\\alpha \\ket{000} + \\beta \\ket{111}$ to the state $\\alpha \\ket{000} - \\beta \\ket{111}$ which is a valid code word in this code - it's an encoding of the quantum state $\\alpha \\ket{0} - \\beta \\ket{1}$. We'll need to come up with a different way to detect $Z$ errors."
7024
+ "content": "\nCan we reuse the ideas of a classical repetition code for a quantum error correction code? \n\nThe naive approach to it would be to try and encode a quantum state $\\ket{\\psi}$ as several copies of itself: \n$\\ket{\\psi} \\rightarrow \\ket{\\psi} \\otimes \\ket{\\psi} \\otimes \\ket{\\psi}$.\nUnfortunately, the no-cloning theorem and the inability to reconstruct a state accurately after measuring it make this approach impossible.\n\nYou can, however, take a slightly different approach: encode the *basis states* $\\ket{0}$ and $\\ket{1}$ in repetition code using a unitary transformation, and deduce the effects of this transformation on superposition states based on its linearity:\n\n$$\\ket{0} \\rightarrow \\ket{000}, \\ket{1} \\rightarrow \\ket{111}$$\n\n$$\\alpha \\ket{0} + \\beta \\ket{1} \\rightarrow \\alpha \\ket{000} + \\beta \\ket{111}$$\n\nThis encoding is called **bit flip code**, and the states $\\ket{000}$, $\\ket{111}$, and their linear combinations are called **code words** in this code. The bit flip code allows us to detect and correct some errors that can occur on qubits in the depolarizing channel, though not all of them.\n\nLet's see what happens if an $X$ error happens on one of the qubits, and how you can detect it using two parity measurements (measurements in the $ZZ$ basis).\n\n<table>\n<tr>\n<th>Error</th>\n<th>State after the error</th>\n<th>Parity of qubits 0 and 1</th>\n<th>Parity of qubits 1 and 2</th>\n</tr>\n<tr>\n<td>No error</td>\n<td>$\\alpha \\ket{000} + \\beta \\ket{111}$</td>\n<td>$0$</td>\n<td>$0$</td>\n</tr>\n<tr>\n<td>$X_0$ (error on qubit $0$)</td>\n<td>$\\alpha \\ket{100} + \\beta \\ket{011}$</td>\n<td>$1$</td>\n<td>$0$</td>\n</tr>\n<tr>\n<td>$X_1$ (error on qubit $1$)</td>\n<td>$\\alpha \\ket{010} + \\beta \\ket{101}$</td>\n<td>$1$</td>\n<td>$1$</td>\n</tr>\n<tr>\n<td>$X_2$ (error on qubit $2$)</td>\n<td>$\\alpha \\ket{001} + \\beta \\ket{110}$</td>\n<td>$0$</td>\n<td>$1$</td>\n</tr>\n</table>\n\nYou can see that these two parity measurements give us different pairs of results depending on whether the $X$ error happened and on which qubit. This means that you can use them to detect the error, and then correct it by applying an $X$ gate to the qubit that was affected by it.\n\nHowever, if a $Z$ error happens on any one of these qubits, you won't be able to detect it: it will convert the state $\\alpha \\ket{000} + \\beta \\ket{111}$ to the state $\\alpha \\ket{000} - \\beta \\ket{111}$ which is a valid code word in this code - it's an encoding of the quantum state $\\alpha \\ket{0} - \\beta \\ket{1}$. You need to come up with a different way to detect $Z$ errors."
6982
7025
  }
6983
7026
  ]
6984
7027
  },
@@ -6992,7 +7035,8 @@ export default {
6992
7035
  },
6993
7036
  "sourceIds": [
6994
7037
  "qec_shor__bitflip_encode__Verification.qs",
6995
- "KatasLibrary.qs"
7038
+ "KatasLibrary.qs",
7039
+ "qec_shor__Common.qs"
6996
7040
  ],
6997
7041
  "placeholderCode": "namespace Kata {\n operation BitflipEncode (qs : Qubit[]) : Unit is Adj + Ctl {\n // Implement your solution here...\n \n }\n}",
6998
7042
  "explainedSolution": {
@@ -7000,7 +7044,7 @@ export default {
7000
7044
  "items": [
7001
7045
  {
7002
7046
  "type": "text-content",
7003
- "content": "\nWe can do this using $CNOT$ gates with the first qubit as control. This will keep the term $\\alpha \\ket{000}$ unchanged and flip $\\beta \\ket{100}$ to $\\beta \\ket{111}$."
7047
+ "content": "\nYou can do this using $CNOT$ gates with the first qubit as control. This will keep the term $\\alpha \\ket{000}$ unchanged and flip $\\beta \\ket{100}$ to $\\beta \\ket{111}$."
7004
7048
  },
7005
7049
  {
7006
7050
  "type": "solution",
@@ -7016,7 +7060,7 @@ export default {
7016
7060
  "title": "Bit Flip Code: Detect X Error",
7017
7061
  "description": {
7018
7062
  "type": "text-content",
7019
- "content": "**Input**: three qubits that are either in the state $\\ket{\\psi_L} = \\alpha \\ket{000} + \\beta \\ket{111}$\nor in one of the states $(X \\otimes I \\otimes I)\\ket{\\psi_L}$, $(I \\otimes X \\otimes I)\\ket{\\psi_L}$, or $(I \\otimes I \\otimes X)\\ket{\\psi_L}$ (that is, either in a valid code word of the bit flip code or a code word with an $X$ error occurring on one of the qubits).\n\n**Goal**: determine whether an $X$ error has occurred, and if so, on which qubit. \nThe return value should be the index of the qubit on which the error occurred, or $-1$ if no error occurred.\nThe state of the qubits after your operation is applied should not change.\n"
7063
+ "content": "**Input**: three qubits that are either in the state $\\ket{\\psi_L} = \\alpha \\ket{000} + \\beta \\ket{111}$\nor in one of the states $(X \\otimes I \\otimes I)\\ket{\\psi_L}$, $(I \\otimes X \\otimes I)\\ket{\\psi_L}$, or $(I \\otimes I \\otimes X)\\ket{\\psi_L}$ (that is, either in a valid code word of the bit flip code or a code word with an $X$ error occurring on one of the qubits).\n\n**Goal**: determine whether an $X$ error has occurred, and if so, on which qubit. \nThe return value should be the index of the qubit on which the error occurred, or $-1$ if no error occurred.\nThe state of the qubits after your operation is applied shouldn't change.\n"
7020
7064
  },
7021
7065
  "sourceIds": [
7022
7066
  "qec_shor__bitflip_detect__Verification.qs",
@@ -7029,7 +7073,7 @@ export default {
7029
7073
  "items": [
7030
7074
  {
7031
7075
  "type": "text-content",
7032
- "content": "\nTo identify the qubit on which the error happened, we need to do two parity measurements in the $ZZ$ basis on any two different pairs of qubits and analyze their outcomes: \n\n- If both parity measurements yield $0$, no error occurred.\n- If both parity measurements yield $1$, the error occurred on the qubit that is shared between the measured pairs of qubits.\n- If one of the parity measurements yields $1$ and the other $0$, the error occurred on the qubit that was part of only the pair of qubits involved in the measurement that yields $1$ but not the other pair.\n\nThe code below implements this logic using $ZZ$ parity measurements on pairs of qubits $0, 1$ and $1, 2$."
7076
+ "content": "\nTo identify the qubit on which the error happened, you need to do two parity measurements in the $ZZ$ basis on any two different pairs of qubits and analyze their outcomes: \n\n- If both parity measurements yield $0$, no error occurred.\n- If both parity measurements yield $1$, the error occurred on the qubit that is shared between the measured pairs of qubits.\n- If one of the parity measurements yields $1$ and the other $0$, the error occurred on the qubit that was part of only the pair of qubits involved in the measurement that yields $1$ but not the other pair.\n\nThe code below implements this logic using $ZZ$ parity measurements on pairs of qubits $0, 1$ and $1, 2$."
7033
7077
  },
7034
7078
  {
7035
7079
  "type": "solution",
@@ -7046,7 +7090,7 @@ export default {
7046
7090
  "items": [
7047
7091
  {
7048
7092
  "type": "text-content",
7049
- "content": "\nWhat kind of code could detect and correct a $Z$ error? We detected an $X$ error using the fact that in the $\\{\\ket{0}, \\ket{1}\\}$ basis the error changed the basis state. Similarly, we can detect a $Z$ error using the $\\{\\ket{+}, \\ket{-}\\}$ basis, in which the $Z$ gate converts $\\ket{+}$ to $\\ket{-}$ and vice versa, acting as a basis change operation.\n\nBased on this idea, we can construct the **phase flip code** that uses the following encoding:\n\n$$\\ket{0} \\rightarrow \\ket{+++}, \\ket{1} \\rightarrow \\ket{---}$$\n\n$$\\alpha \\ket{0} + \\beta \\ket{1} \\rightarrow \\alpha \\ket{+++} + \\beta \\ket{---}$$\n\nLet's see what happens if a $Z$ error happens on one of the qubits, and how we can detect it using two parity measurements. \nThis time we'll do the parity measurements in the $X$ basis to distinguish the cases of $\\ket{++}$ and $\\ket{--}$ (parity $0$) from $\\ket{+-}$ and $\\ket{-+}$ (parity $1$).\n\n<table>\n<tr>\n<th>Error</th>\n<th>State after the error</th>\n<th>$XX$ parity of qubits 0 and 1</th>\n<th>$XX$ parity of qubits 1 and 2</th>\n</tr>\n<tr>\n<td>No error</td>\n<td>$\\alpha \\ket{+++} + \\beta \\ket{---}$</td>\n<td>$0$</td>\n<td>$0$</td>\n</tr>\n<tr>\n<td>$Z_0$ (error on qubit $0$)</td>\n<td>$\\alpha \\ket{-++} + \\beta \\ket{+--}$</td>\n<td>$1$</td>\n<td>$0$</td>\n</tr>\n<tr>\n<td>$Z_1$ (error on qubit $1$)</td>\n<td>$\\alpha \\ket{+-+} + \\beta \\ket{-+-}$</td>\n<td>$1$</td>\n<td>$1$</td>\n</tr>\n<tr>\n<td>$Z_2$ (error on qubit $2$)</td>\n<td>$\\alpha \\ket{++-} + \\beta \\ket{--+}$</td>\n<td>$0$</td>\n<td>$1$</td>\n</tr>\n</table>\n\nYou can see that these two parity measurements give us different pairs of results depending on whether the $Z$ error happened and on which qubit. This means that we can use them to detect the error, and then correct it by applying a $Z$ gate to the qubit that was affected by it.\n\nHowever, if an $X$ error happens on any one of these qubits, we won't be able to detect it: it will convert the state $\\alpha \\ket{+++} + \\beta \\ket{---}$ to the state $\\alpha \\ket{+++} - \\beta \\ket{---}$ which is a valid code word in this code - it's an encoding of the quantum state $\\alpha \\ket{0} - \\beta \\ket{1}$. We'll need to come up with a different way to detect both $X$ and $Z$ errors in the same encoding."
7093
+ "content": "\nWhat kind of code could detect and correct a $Z$ error? You detected an $X$ error using the fact that in the $\\{\\ket{0}, \\ket{1}\\}$ basis the error changed the basis state. Similarly, you can detect a $Z$ error using the $\\{\\ket{+}, \\ket{-}\\}$ basis, in which the $Z$ gate converts $\\ket{+}$ to $\\ket{-}$ and vice versa, acting as a basis change operation.\n\nBased on this idea, you can construct the **phase flip code** that uses the following encoding:\n\n$$\\ket{0} \\rightarrow \\ket{+++}, \\ket{1} \\rightarrow \\ket{---}$$\n\n$$\\alpha \\ket{0} + \\beta \\ket{1} \\rightarrow \\alpha \\ket{+++} + \\beta \\ket{---}$$\n\nLet's see what happens if a $Z$ error happens on one of the qubits, and how you can detect it using two parity measurements. \nThis time you do the parity measurements in the $X$ basis to distinguish the cases of $\\ket{++}$ and $\\ket{--}$ (parity $0$) from $\\ket{+-}$ and $\\ket{-+}$ (parity $1$).\n\n<table>\n<tr>\n<th>Error</th>\n<th>State after the error</th>\n<th>$XX$ parity of qubits 0 and 1</th>\n<th>$XX$ parity of qubits 1 and 2</th>\n</tr>\n<tr>\n<td>No error</td>\n<td>$\\alpha \\ket{+++} + \\beta \\ket{---}$</td>\n<td>$0$</td>\n<td>$0$</td>\n</tr>\n<tr>\n<td>$Z_0$ (error on qubit $0$)</td>\n<td>$\\alpha \\ket{-++} + \\beta \\ket{+--}$</td>\n<td>$1$</td>\n<td>$0$</td>\n</tr>\n<tr>\n<td>$Z_1$ (error on qubit $1$)</td>\n<td>$\\alpha \\ket{+-+} + \\beta \\ket{-+-}$</td>\n<td>$1$</td>\n<td>$1$</td>\n</tr>\n<tr>\n<td>$Z_2$ (error on qubit $2$)</td>\n<td>$\\alpha \\ket{++-} + \\beta \\ket{--+}$</td>\n<td>$0$</td>\n<td>$1$</td>\n</tr>\n</table>\n\nYou can see that these two parity measurements give different pairs of results depending on whether the $Z$ error happened and on which qubit. This means that you can use them to detect the error, and then correct it by applying a $Z$ gate to the qubit that was affected by it.\n\nHowever, if an $X$ error happens on any one of these qubits, you won't be able to detect it: it will convert the state $\\alpha \\ket{+++} + \\beta \\ket{---}$ to the state $\\alpha \\ket{+++} - \\beta \\ket{---}$ which is a valid code word in this code - it's an encoding of the quantum state $\\alpha \\ket{0} - \\beta \\ket{1}$. You need to come up with a different way to detect **both** $X$ and $Z$ errors in the same encoding."
7050
7094
  }
7051
7095
  ]
7052
7096
  },
@@ -7056,11 +7100,12 @@ export default {
7056
7100
  "title": "Phase Flip Code: Encode Codewords",
7057
7101
  "description": {
7058
7102
  "type": "text-content",
7059
- "content": "**Input**: three qubits in the state $\\ket{\\psi} \\otimes \\ket{00}$, where $\\ket{\\psi} = \\alpha \\ket{0} + \\beta \\ket{1}$ is the state of the first qubit, i.e., `qs[0]`.\n\n**Goal**: prepare a state $\\alpha \\ket{+++} + \\beta \\ket{---}$ on these qubits."
7103
+ "content": "**Input**: three qubits in the state $\\ket{\\psi} \\otimes \\ket{00}$, where $\\ket{\\psi} = \\alpha \\ket{0} + \\beta \\ket{1}$ is the state of the first qubit, that is, `qs[0]`.\n\n**Goal**: prepare a state $\\alpha \\ket{+++} + \\beta \\ket{---}$ on these qubits.\n"
7060
7104
  },
7061
7105
  "sourceIds": [
7062
7106
  "qec_shor__phaseflip_encode__Verification.qs",
7063
- "KatasLibrary.qs"
7107
+ "KatasLibrary.qs",
7108
+ "qec_shor__Common.qs"
7064
7109
  ],
7065
7110
  "placeholderCode": "namespace Kata {\n operation PhaseflipEncode (qs : Qubit[]) : Unit is Adj + Ctl {\n // Implement your solution here...\n \n }\n}",
7066
7111
  "explainedSolution": {
@@ -7068,7 +7113,7 @@ export default {
7068
7113
  "items": [
7069
7114
  {
7070
7115
  "type": "text-content",
7071
- "content": "\nWe can implement this encoding in two steps:\n\n1. Use bit flip encoding to convert $\\alpha \\ket{000} + \\beta \\ket{100}$ into $\\alpha \\ket{000} + \\beta \\ket{111}$.\n2. Apply a Hadamard gate to each qubit to convert each of the $\\ket{0}$ states into $\\ket{+}$ and each of the $\\ket{1}$ states into $\\ket{-}$."
7116
+ "content": "\nYou can implement this encoding in two steps:\n\n1. Use bit flip encoding to convert $\\alpha \\ket{000} + \\beta \\ket{100}$ into $\\alpha \\ket{000} + \\beta \\ket{111}$.\n2. Apply a Hadamard gate to each qubit to convert each of the $\\ket{0}$ states into $\\ket{+}$ and each of the $\\ket{1}$ states into $\\ket{-}$."
7072
7117
  },
7073
7118
  {
7074
7119
  "type": "solution",
@@ -7084,7 +7129,7 @@ export default {
7084
7129
  "title": "Phase Flip Code: Detect Z Error",
7085
7130
  "description": {
7086
7131
  "type": "text-content",
7087
- "content": "**Input**: three qubits that are either in the state $\\ket{\\psi_L} = \\alpha \\ket{+++} + \\beta \\ket{---}$\nor in one of the states $(Z \\otimes I \\otimes I)\\ket{\\psi_L}$, $(I \\otimes Z \\otimes I)\\ket{\\psi_L}$, or $(I \\otimes I \\otimes Z)\\ket{\\psi_L}$ (that is, either in a valid code word of the phase flip code or a code word with a $Z$ error occurring on one of the qubits).\n\n**Goal**: determine whether a $Z$ error has occurred, and if so, on which qubit. \nThe return value should be the index of the qubit on which the error occurred, or $-1$ if no error occurred.\nThe state of the qubits after your operation is applied should not change.\n"
7132
+ "content": "**Input**: three qubits that are either in the state $\\ket{\\psi_L} = \\alpha \\ket{+++} + \\beta \\ket{---}$\nor in one of the states $(Z \\otimes I \\otimes I)\\ket{\\psi_L}$, $(I \\otimes Z \\otimes I)\\ket{\\psi_L}$, or $(I \\otimes I \\otimes Z)\\ket{\\psi_L}$ (that is, either in a valid code word of the phase flip code or a code word with a $Z$ error occurring on one of the qubits).\n\n**Goal**: determine whether a $Z$ error has occurred, and if so, on which qubit. \nThe return value should be the index of the qubit on which the error occurred, or $-1$ if no error occurred.\nThe state of the qubits after your operation is applied shouldn't change.\n"
7088
7133
  },
7089
7134
  "sourceIds": [
7090
7135
  "qec_shor__phaseflip_detect__Verification.qs",
@@ -7097,7 +7142,7 @@ export default {
7097
7142
  "items": [
7098
7143
  {
7099
7144
  "type": "text-content",
7100
- "content": "\nTo identify the qubit on which the error happened, we can use the same logic as we did for the error detection for the bit flip code. We need to do two parity measurements, this time in the $XX$ basis, on any two different pairs of qubits and analyze their outcomes.\nThe code below implements this logic using $XX$ parity measurements on pairs of qubits $0, 1$ and $1, 2$."
7145
+ "content": "\nTo identify the qubit on which the error happened, you can use the same logic as you did for the error detection for the bit flip code. You need to do two parity measurements, this time in the $XX$ basis, on any two different pairs of qubits and analyze their outcomes.\nThe code below implements this logic using $XX$ parity measurements on pairs of qubits $0, 1$ and $1, 2$."
7101
7146
  },
7102
7147
  {
7103
7148
  "type": "solution",
@@ -7114,7 +7159,7 @@ export default {
7114
7159
  "items": [
7115
7160
  {
7116
7161
  "type": "text-content",
7117
- "content": "\nCan we combine the lessons learned from the bit flip and phase flip error correction codes to be able to detect and correct both $X$ and $Z$ errors? In that case, we'd also be able to handle $Y$ errors as a combination of $X$ and $Z$ errors happening at the same time, and, as a result, we'll be able to detect and correct an arbitrary single-qubit error.\n\nShor code, published in 1995, is the code that combines the approaches of the bit flip and phase flip codes to do just that.\nIt uses the following 9-qubit encoding for logical states:\n\n$$\\ket{0} \\rightarrow \\ket{0_L} = \\frac1{2\\sqrt2} (\\ket{000} + \\ket{111}) \\otimes (\\ket{000} + \\ket{111}) \\otimes (\\ket{000} + \\ket{111})$$\n$$\\ket{1} \\rightarrow \\ket{1_L} = \\frac1{2\\sqrt2} (\\ket{000} - \\ket{111}) \\otimes (\\ket{000} - \\ket{111}) \\otimes (\\ket{000} - \\ket{111})$$\n$$\\alpha \\ket{0} + \\beta \\ket{1} \\rightarrow \\alpha \\ket{0_L} + \\beta \\ket{1_L}$$\n\n> Shor code was created as a *concatenation* of bit flip and phase flip codes. Encoding a qubit into its 9-qubit representation happens in two steps:\n>\n> 1. A qubit is encoded in three qubits using the phase flip code.\n> 2. After that, each of those three qubits is encoded again using the bit flip code.\n>\n> Concatenation is a commonly used method of combining several error correction codes by encoding the qubit state using the first code, followed by encoding each qubit of the resulting state using the second code, and so on.\n\nHow can we detect and correct errors using Shor code?\n\n### Detect and Correct X Errors\n\n$X$ errors happening on any qubit manifest very similarly to the way they do in the bit flip code. \nLet's consider the first triplet of qubits and an error that happens on any of the first three qubits.\nSame as in the bit flip code, measuring the parity of pairs of qubits always returns $0$ if there is no error (since all bits in each basis state of the code words are the same), so a parity measurement returning $1$ on one or two pairs indicates an error, and the measurements which returned $1$ allow us to track down the qubit on which it happened.\n\nTo correct an $X$ error, we simply apply an $X$ gate to the affected qubit.\n\n### Detect and Correct Z Errors\n\n$Z$ errors in Shor code behave similarly to the way they do in the phase flip code, but the error detection and correction procedure has to be modified.\n\nA $Z$ error happening on any qubit of a triplet flips the relative sign between the basis states $\\ket{000}$ and $\\ket{111}$ on those qubits. This means that we need a measurement that would compare relative signs of whole triplets, rather than individual qubits, allowing us to distinguish $(\\ket{000} + \\ket{111}) \\otimes (\\ket{000} + \\ket{111})$ and $(\\ket{000} - \\ket{111}) \\otimes (\\ket{000} - \\ket{111})$ (parts of valid code words) from $(\\ket{000} + \\ket{111}) \\otimes (\\ket{000} - \\ket{111})$ and $(\\ket{000} - \\ket{111}) \\otimes (\\ket{000} + \\ket{111})$ (parts of code words with a $Z$ error applied).\n\nThe measurement that allows us to do this is a 6-qubit measurement in the $X$ basis.\n\n> How can you check this? Remember that doing a measurement in the $X$ basis is the same as applying Hadamard gates to each qubit and then doing a measurement in the $Z$ basis (and then applying Hadamard gates again). \n> \n> - If we apply Hadamard gates to each qubit of the state $\\frac1{\\sqrt2}(\\ket{000} + \\ket{111})$, we get the state \n> $\\frac12(\\ket{000} + \\ket{011} + \\ket{101} + \\ket{110})$. The parity of each basis state in it is $0$.\n> - If we apply Hadamard gates to each qubit of the state $\\frac1{\\sqrt2}(\\ket{000} - \\ket{111})$, we get the state \n> $\\frac12(\\ket{001} + \\ket{010} + \\ket{100} + \\ket{111})$. The parity of each basis state in it is $1$.\n>\n> Thus, a 6-qubit measurement in the $X$ basis of two triplets, each either in the state $\\frac1{\\sqrt2}(\\ket{000} + \\ket{111})$ or $\\frac1{\\sqrt2}(\\ket{000} - \\ket{111})$, would produce parity $0$ if both triplets have the same relative sign between the basis states and $1$ if the relative sign is different.\n\nTo correct a $Z$ error, we can no longer simply apply a $Z$ gate to the affected qubit, since we can only figure out the triplet of qubits where the error happened, not the exact qubit. To work around this, we correct a $Z$ error by applying a $Z$ gate to each qubit of the affected triplet - and $Z$ gates applied to unaffected qubits just cancel each other out."
7162
+ "content": "\nCan we combine the lessons learned from the bit flip and phase flip error correction codes to be able to detect and correct both $X$ and $Z$ errors? In that case, we'd also be able to handle $Y$ errors as a combination of $X$ and $Z$ errors happening at the same time, and, as a result, we'll be able to detect and correct any arbitrary **single-qubit** error.\n\nThe Shor code, published in 1995, combines the approaches of the bit flip and phase flip codes.\nIt uses the following 9-qubit encoding for logical states:\n\n$$\\ket{0} \\rightarrow \\ket{0_L} = \\frac1{2\\sqrt2} (\\ket{000} + \\ket{111}) \\otimes (\\ket{000} + \\ket{111}) \\otimes (\\ket{000} + \\ket{111})$$\n$$\\ket{1} \\rightarrow \\ket{1_L} = \\frac1{2\\sqrt2} (\\ket{000} - \\ket{111}) \\otimes (\\ket{000} - \\ket{111}) \\otimes (\\ket{000} - \\ket{111})$$\n$$\\alpha \\ket{0} + \\beta \\ket{1} \\rightarrow \\alpha \\ket{0_L} + \\beta \\ket{1_L}$$\n\n> Shor code was created as a *concatenation* of bit flip and phase flip codes. Encoding a qubit into its 9-qubit representation happens in two steps:\n>\n> 1. A qubit is encoded in three qubits using the phase flip code.\n> 2. After that, each of those three qubits is encoded again using the bit flip code.\n>\n> Concatenation is a commonly used method of combining several error correction codes by encoding the qubit state using the first code, followed by encoding each qubit of the resulting state using the second code, and so on.\n\nHow can you detect and correct errors using Shor code?\n\n### Detect and Correct X Errors\n\n$X$ errors happening on any qubit manifest very similarly to the way they do in the bit flip code.\nLet's consider the first triplet of qubits and an error that happens on any of the first three qubits.\nSame as in the bit flip code, measuring the parity of pairs of qubits always returns $0$ if there is no error (since all bits in each basis state of the code words are the same), so a parity measurement returning $1$ on one or two pairs indicates an error, and the measurements which returned $1$ allow us to track down the qubit on which it happened.\n\nTo correct an $X$ error, you simply apply an $X$ gate to the affected qubit.\n\n### Detect and Correct Z Errors\n\n$Z$ errors in Shor code behave similarly to the way they do in the phase flip code, but the error detection and correction procedure has to be modified.\n\nA $Z$ error happening on any qubit of a triplet flips the relative sign between the basis states $\\ket{000}$ and $\\ket{111}$ on those qubits. This means that you need a measurement that would compare relative signs of whole triplets, rather than individual qubits, allowing us to distinguish $(\\ket{000} + \\ket{111}) \\otimes (\\ket{000} + \\ket{111})$ and $(\\ket{000} - \\ket{111}) \\otimes (\\ket{000} - \\ket{111})$ (parts of valid code words) from $(\\ket{000} + \\ket{111}) \\otimes (\\ket{000} - \\ket{111})$ and $(\\ket{000} - \\ket{111}) \\otimes (\\ket{000} + \\ket{111})$ (parts of code words with a $Z$ error applied).\n\nThe measurement that allows you to do this is a 6-qubit measurement in the $X$ basis.\n\n> How can you check this? Remember that doing a measurement in the $X$ basis is the same as applying Hadamard gates to each qubit and then doing a measurement in the $Z$ basis (and then applying Hadamard gates again). \n> \n> - If you apply Hadamard gates to each qubit of the state $\\frac1{\\sqrt2}(\\ket{000} + \\ket{111})$, you get the state \n> $\\frac12(\\ket{000} + \\ket{011} + \\ket{101} + \\ket{110})$. The parity of each basis state in it is $0$.\n> - If you apply Hadamard gates to each qubit of the state $\\frac1{\\sqrt2}(\\ket{000} - \\ket{111})$, you get the state \n> $\\frac12(\\ket{001} + \\ket{010} + \\ket{100} + \\ket{111})$. The parity of each basis state in it is $1$.\n>\n> Thus, a 6-qubit measurement in the $X$ basis of two triplets, each either in the state $\\frac1{\\sqrt2}(\\ket{000} + \\ket{111})$ or $\\frac1{\\sqrt2}(\\ket{000} - \\ket{111})$, would produce parity $0$ if both triplets have the same relative sign between the basis states and $1$ if the relative sign is different.\n\nTo correct a $Z$ error, you can no longer simply apply a $Z$ gate to the affected qubit, since you can only figure out the triplet of qubits where the error happened, not the exact qubit. To work around this, you correct a $Z$ error by applying a $Z$ gate to each qubit of the affected triplet - and $Z$ gates applied to unaffected qubits just cancel each other out."
7118
7163
  }
7119
7164
  ]
7120
7165
  },
@@ -7124,11 +7169,12 @@ export default {
7124
7169
  "title": "Shor Code: Encode Codewords",
7125
7170
  "description": {
7126
7171
  "type": "text-content",
7127
- "content": "**Input**: nine qubits in the state $\\ket{\\psi} \\otimes \\ket{0 \\ldots 0}$, where $\\ket{\\psi} = \\alpha \\ket{0} + \\beta \\ket{1}$ is the state of the first qubit, i.e., `qs[0]`.\n\n**Goal**: prepare a state $\\alpha \\ket{0_L} + \\beta \\ket{1_L}$ on these qubits, where\n$$\\ket{0_L} = \\frac1{2\\sqrt2} (\\ket{000} + \\ket{111}) \\otimes (\\ket{000} + \\ket{111}) \\otimes (\\ket{000} + \\ket{111})$$\nand \n$$\\ket{1_L} = \\frac1{2\\sqrt2} (\\ket{000} - \\ket{111}) \\otimes (\\ket{000} - \\ket{111}) \\otimes (\\ket{000} - \\ket{111})$$\n"
7172
+ "content": "**Input**: nine qubits in the state $\\ket{\\psi} \\otimes \\ket{0 \\ldots 0}$, where $\\ket{\\psi} = \\alpha \\ket{0} + \\beta \\ket{1}$ is the state of the first qubit, that is, `qs[0]`.\n\n**Goal**: prepare a state $\\alpha \\ket{0_L} + \\beta \\ket{1_L}$ on these qubits, where\n$$\\ket{0_L} = \\frac1{2\\sqrt2} (\\ket{000} + \\ket{111}) \\otimes (\\ket{000} + \\ket{111}) \\otimes (\\ket{000} + \\ket{111})$$\nand \n$$\\ket{1_L} = \\frac1{2\\sqrt2} (\\ket{000} - \\ket{111}) \\otimes (\\ket{000} - \\ket{111}) \\otimes (\\ket{000} - \\ket{111})$$\n"
7128
7173
  },
7129
7174
  "sourceIds": [
7130
7175
  "qec_shor__shor_encode__Verification.qs",
7131
- "KatasLibrary.qs"
7176
+ "KatasLibrary.qs",
7177
+ "qec_shor__Common.qs"
7132
7178
  ],
7133
7179
  "placeholderCode": "namespace Kata {\n operation ShorEncode (qs : Qubit[]) : Unit is Adj + Ctl {\n // Implement your solution here...\n \n }\n\n // You might find this helper operation from an earlier task useful.\n operation BitflipEncode (qs : Qubit[]) : Unit is Adj + Ctl {\n CNOT(qs[0], qs[1]);\n CNOT(qs[0], qs[2]);\n }\n}",
7134
7180
  "explainedSolution": {
@@ -7136,7 +7182,7 @@ export default {
7136
7182
  "items": [
7137
7183
  {
7138
7184
  "type": "text-content",
7139
- "content": "\nWe can implement this encoding in two steps.\n\nFirst, we use phase flip encoding on qubits with indices $0, 3, 6$ to convert $\\alpha \\ket{000} + \\beta \\ket{100}$ into $\\alpha \\ket{+++} + \\beta \\ket{---}$.\nAfter this, the state of the system will be \n\n$$\\alpha \\ket{+00} \\otimes \\ket{+00} \\otimes \\ket{+00} + \\beta \\ket{-00} \\otimes \\ket{-00} \\otimes \\ket{-00}$$\n\nThen, we use bit flip encoding on each triplet of qubits $0 \\ldots 2, 3 \\ldots 5, 6 \\ldots 8$ to convert each $\\ket{+00}$ into $\\frac1{\\sqrt2} (\\ket{000} + \\ket{111})$ and each $\\ket{-00}$ into $\\frac1{\\sqrt2} (\\ket{000} - \\ket{111})$. After this, the nine-qubit system will be exactly in the state we're looking for."
7185
+ "content": "\nYou can implement this encoding in two steps.\n\nFirst, you use phase flip encoding on qubits with indices $0, 3, 6$ to convert $\\alpha \\ket{000} + \\beta \\ket{100}$ into $\\alpha \\ket{+++} + \\beta \\ket{---}$.\nAfter this, the state of the system is \n\n$$\\alpha \\ket{+00} \\otimes \\ket{+00} \\otimes \\ket{+00} + \\beta \\ket{-00} \\otimes \\ket{-00} \\otimes \\ket{-00}$$\n\nThen, you use bit flip encoding on each triplet of qubits $0 \\ldots 2, 3 \\ldots 5, 6 \\ldots 8$ to convert each $\\ket{+00}$ into $\\frac1{\\sqrt2} (\\ket{000} + \\ket{111})$ and each $\\ket{-00}$ into $\\frac1{\\sqrt2} (\\ket{000} - \\ket{111})$. After this, the nine-qubit system will be exactly in the state you're looking for."
7140
7186
  },
7141
7187
  {
7142
7188
  "type": "solution",
@@ -7152,11 +7198,12 @@ export default {
7152
7198
  "title": "Shor Code: Detect X, Y, and Z Errors",
7153
7199
  "description": {
7154
7200
  "type": "text-content",
7155
- "content": "**Input**: nine qubits that are either in the state $\\ket{\\psi_L} = \\alpha \\ket{0_L} + \\beta \\ket{0_L}$ (a valid code word of the Shor code) or the state that is a code word with $X$, $Y$, or $Z$ error occurring on one of the qubits.\n\n**Goal**: determine whether an error has occurred, and if so, what type and on which qubit. \nThe return value is a tuple of two elements, describing the detected error as follows:\n\n- The first element of the return is an `Int` - the index of the qubit on which the error occurred, or $-1$ if no error occurred.\n- The second element of the return is a `Pauli` indicating the type of the error (`PauliX`, `PauliY`, or `PauliZ`).\nIf no error occurred, the second element of the return can be any value, it is not validated.\n- In case of a single $Z$ error, the qubit on which it occurred cannot be identified uniquely. \nIn this case, the return value should be the index of the triplet of qubits in which the error occurred ($0$ for qubits $0 \\ldots 2$, $1$ for qubits $3 \\ldots 5$, and $2$ for qubits $6 \\ldots 8$).\n\nExample return values:\n\n<table>\n<tr>\n<th>Error</th>\n<th>Return value</th>\n</tr>\n<tr>\n<td>No error</td>\n<td>(-1, PauliI)</td>\n</tr>\n<tr>\n<td>$X$ error on qubit $0$</td>\n<td>(0, PauliX)</td>\n</tr>\n<tr>\n<td>$Y$ error on qubit $4$</td>\n<td>(4, PauliY)</td>\n</tr>\n<tr>\n<td>$Z$ error on qubit $8$ (last triplet)</td>\n<td>(2, PauliZ)</td>\n</tr>\n</table>\n\nThe state of the qubits after your operation is applied should not change.\n"
7201
+ "content": "**Input**: nine qubits that are either in the state $\\ket{\\psi_L} = \\alpha \\ket{0_L} + \\beta \\ket{0_L}$ (a valid code word of the Shor code) or the state that is a code word with $X$, $Y$, or $Z$ error occurring on one of the qubits.\n\n**Goal**: determine whether an error has occurred, and if so, what type and on which qubit. \nThe return value is a tuple of two elements, describing the detected error as follows:\n\n- The first element of the return is an `Int` - the index of the qubit on which the error occurred, or $-1$ if no error occurred.\n- The second element of the return is a `Pauli` indicating the type of the error (`PauliX`, `PauliY`, or `PauliZ`).\nIf no error occurred, the second element of the return can be any value, it isn't validated.\n- In case of a single $Z$ error, the qubit on which it occurred cannot be identified uniquely. \nIn this case, the return value should be the index of the triplet of qubits in which the error occurred ($0$ for qubits $0 \\ldots 2$, $1$ for qubits $3 \\ldots 5$, and $2$ for qubits $6 \\ldots 8$).\n\nExample return values:\n\n<table>\n<tr>\n<th>Error</th>\n<th>Return value</th>\n</tr>\n<tr>\n<td>No error</td>\n<td>(-1, PauliI)</td>\n</tr>\n<tr>\n<td>$X$ error on qubit $0$</td>\n<td>(0, PauliX)</td>\n</tr>\n<tr>\n<td>$Y$ error on qubit $4$</td>\n<td>(4, PauliY)</td>\n</tr>\n<tr>\n<td>$Z$ error on qubit $8$ (last triplet)</td>\n<td>(2, PauliZ)</td>\n</tr>\n</table>\n\nThe state of the qubits after your operation is applied shouldn't change.\n"
7156
7202
  },
7157
7203
  "sourceIds": [
7158
7204
  "qec_shor__shor_detect__Verification.qs",
7159
- "KatasLibrary.qs"
7205
+ "KatasLibrary.qs",
7206
+ "qec_shor__Common.qs"
7160
7207
  ],
7161
7208
  "placeholderCode": "namespace Kata {\n operation ShorDetectError (qs : Qubit[]) : (Int, Pauli) {\n // Implement your solution here...\n\n return (-2, PauliI);\n }\n\n // You might find this helper operation from an earlier task useful.\n operation BitflipDetectError (qs : Qubit[]) : Int {\n let m1 = Measure([PauliZ, PauliZ], qs[0 .. 1]);\n let m2 = Measure([PauliZ, PauliZ], qs[1 .. 2]);\n \n if m1 == One and m2 == Zero {\n return 0;\n } elif m1 == One and m2 == One {\n return 1;\n } elif m1 == Zero and m2 == One {\n return 2;\n } else {\n return -1;\n }\n }\n}",
7162
7209
  "explainedSolution": {
@@ -7164,7 +7211,7 @@ export default {
7164
7211
  "items": [
7165
7212
  {
7166
7213
  "type": "text-content",
7167
- "content": "\nFor this code, we'll detect $X$ and $Z$ errors separately, similarly to how we did it for bit flip code and phase flip code, and then combine the results into the final answer. A $Y$ error will be signaled by both $X$ and $Z$ errors occurring, since the problem states that at most one error happened.\n\n1. To detect $X$ errors, we recall that in Shor code, each triplet of qubits $0 \\ldots 2, 3 \\ldots 5, 6 \\ldots 8$ is an encoding of a $\\ket{+}$ state in the bit flip code. This means that we can detect an $X$ error by applying the bit flip error detection logic to each triplet of qubits separately. \n\n2. To detect $Z$ errors, we recall that 6-qubit joint measurements in $X$ basis can detect the parity of the relative phase of the first three qubits and the last three qubits in the measurement, that is, distinguish\n\n $$\\frac12 \\left( (\\ket{000} + \\ket{111}) \\otimes (\\ket{000} + \\ket{111}) + (\\ket{000} - \\ket{111}) \\otimes (\\ket{000} - \\ket{111}) \\right)$$\n\n from \n\n $$\\frac12 \\left( (\\ket{000} + \\ket{111}) \\otimes (\\ket{000} - \\ket{111}) + (\\ket{000} - \\ket{111}) \\otimes (\\ket{000} + \\ket{111}) \\right)$$\n\n This means that we can detect a $Z$ error by doing two 6-qubit joint measurements on qubit triplets $0 \\ldots 2$ & $3 \\ldots 5$ and on $3 \\ldots 5$ & $6 \\ldots 8$ and interpret their results in the same way as we did for bit flip and phase flip codes.\n\n3. To combine the results, we check which of the results occurred: \n\n- if neither $X$ nor $Z$ error was detected, we return \"no error\";\n- if both were detected, we return the $Y$ error and use the index of the qubit where the $X$ error was detected (remember that we can tract the $Z$ error only to the triplet in which it occurred, not to the exact qubit);\n- if only one error was detected, we return that error."
7214
+ "content": "\nFor this code, you'll detect $X$ and $Z$ errors separately, similarly to how you did it for bit flip code and phase flip code, and then combine the results into the final answer. A $Y$ error will be signaled by both $X$ and $Z$ errors occurring, since the problem states that at most one error happened.\n\n1. To detect $X$ errors, recall that in Shor code, each triplet of qubits $0 \\ldots 2, 3 \\ldots 5, 6 \\ldots 8$ is an encoding of a $\\ket{+}$ state in the bit flip code. This means that you can detect an $X$ error by applying the bit flip error detection logic to each triplet of qubits separately. \n\n2. To detect $Z$ errors, recall that 6-qubit joint measurements in $X$ basis can detect the parity of the relative phase of the first three qubits and the last three qubits in the measurement, that is, distinguish\n\n $$\\frac12 \\left( (\\ket{000} + \\ket{111}) \\otimes (\\ket{000} + \\ket{111}) + (\\ket{000} - \\ket{111}) \\otimes (\\ket{000} - \\ket{111}) \\right)$$\n\n from \n\n $$\\frac12 \\left( (\\ket{000} + \\ket{111}) \\otimes (\\ket{000} - \\ket{111}) + (\\ket{000} - \\ket{111}) \\otimes (\\ket{000} + \\ket{111}) \\right)$$\n\n This means that you can detect a $Z$ error by doing two 6-qubit joint measurements on qubit triplets $0 \\ldots 2$ & $3 \\ldots 5$ and on $3 \\ldots 5$ & $6 \\ldots 8$ and interpret their results in the same way as you did for bit flip and phase flip codes.\n\n3. To combine the results, you check which of the results occurred: \n\n- if neither $X$ nor $Z$ error was detected, return \"no error\";\n- if both were detected, return the $Y$ error and use the index of the qubit where the $X$ error was detected (remember that you can tract the $Z$ error only to the triplet in which it occurred, not to the exact qubit);\n- if only one error was detected, return that error."
7168
7215
  },
7169
7216
  {
7170
7217
  "type": "solution",
@@ -7181,7 +7228,7 @@ export default {
7181
7228
  "items": [
7182
7229
  {
7183
7230
  "type": "text-content",
7184
- "content": "\nThe key idea that enables quantum error correction is discretization of quantum errors: being able to correct any kind of error using a code that explicitly allows us to correct only a discrete set of Pauli errors.\n\n> The high-level mathematical reasoning behind our ability to discretize quantum errors is as follows.\n>\n> Let's consider a single-qubit error acting on one of the qubits of the encoded state, converting the entire state from $\\ket{\\psi_L}$ to $E\\ket{\\psi_L}$.\n> We can represent the state with this error as some superposition of four orthogonal states: $\\ket{\\psi_L}$, $X\\ket{\\psi_L}$, $Z\\ket{\\psi_L}$, and $XZ\\ket{\\psi_L}$ (this is possible because the Pauli matrices $I, X, Y, Z$ form a basis for $2 \\times 2$ Hermitian matrices, so the operator representing the error can be decomposed as their linear combination).\n> \n> Doing the set of parity measurements we need to detect $X$ and $Z$ errors will collapse the state $E\\ket{\\psi_L}$ into other of these four states, yielding measurement results that match that state. For example, if parity measurements yield a set of results indicating that an $X$ error happened, the state $E\\ket{\\psi_L}$ will collapse to $X\\ket{\\psi_L}$. \n>\n> Then, we can use the results of parity measurements to correct the error that they indicate, bringing our state back to the error-free state $\\ket{\\psi_L}$.\n\n\nDoes Shor code indeed correct all errors, and not just the set of Pauli errors $X$, $Y$, and $Z$? \nLet's try it out!\n\nThe following demo puts together the steps of error correction using Shor code: it encodes a given logical state into multiple qubits, introduces an arbitrary error, runs the error detection code and applies error correction if necessary, and checks that the result is an accurate encoding of the starting logical state. Experiment with applying different errors to different qubits of the code - and not just the Pauli errors but any single-qubit rotations too. You can even use a measurement!"
7231
+ "content": "\nThe key idea that enables quantum error correction is discretization of quantum errors: being able to correct any kind of error using a code that explicitly allows us to correct only a discrete set of Pauli errors.\n\n> The high-level mathematical reasoning behind our ability to discretize quantum errors is as follows.\n>\n> Let's consider a single-qubit error acting on one of the qubits of the encoded state, converting the entire state from $\\ket{\\psi_L}$ to $E\\ket{\\psi_L}$.\n> You can represent the state with this error as some superposition of four orthogonal states: $\\ket{\\psi_L}$, $X\\ket{\\psi_L}$, $Z\\ket{\\psi_L}$, and $XZ\\ket{\\psi_L}$ (this is possible because the Pauli matrices $I, X, Y, Z$ form a basis for $2 \\times 2$ Hermitian matrices, so the operator representing the error can be decomposed as their linear combination).\n> \n> Doing the set of parity measurements to detect $X$ and $Z$ errors will collapse the state $E\\ket{\\psi_L}$ into other of these four states, yielding measurement results that match that state. For example, if parity measurements yield a set of results indicating that an $X$ error happened, the state $E\\ket{\\psi_L}$ will collapse to $X\\ket{\\psi_L}$. \n>\n> Then, you can use the results of parity measurements to correct the error that they indicate, bringing our state back to the error-free state $\\ket{\\psi_L}$.\n\n\nDoes Shor code indeed correct all errors, and not just the set of Pauli errors $X$, $Y$, and $Z$? \nLet's try it out!\n\nThe following demo puts together the steps of error correction using Shor code: it encodes a given logical state into multiple qubits, introduces an arbitrary error, runs the error detection code and applies error correction if necessary, and checks that the result is an accurate encoding of the starting logical state. Experiment with applying different errors to different qubits of the code - and not just the Pauli errors but any single-qubit rotations too. You can even use a measurement!"
7185
7232
  },
7186
7233
  {
7187
7234
  "type": "example",
@@ -7212,20 +7259,20 @@ export default {
7212
7259
  },
7213
7260
  {
7214
7261
  "id": "KatasLibrary.qs",
7215
- "code": "// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nnamespace Microsoft.Quantum.Katas {\n open Microsoft.Quantum.Arrays;\n open Microsoft.Quantum.Convert;\n open Microsoft.Quantum.Diagnostics;\n open Microsoft.Quantum.Math;\n open Microsoft.Quantum.Random;\n\n /// # Summary\n /// Given two operations, checks whether they act identically (including global phase) for all input states.\n /// This is done through controlled versions of the operations instead of plain ones which convert the global phase\n /// into a relative phase that can be detected.\n operation CheckOperationsAreEqualStrict(\n inputSize : Int,\n op : (Qubit[] => Unit is Adj + Ctl),\n reference : (Qubit[] => Unit is Adj + Ctl))\n : Bool {\n Fact(inputSize > 0, \"`inputSize` must be positive\");\n let controlledOp = register => Controlled op(register[...0], register[1...]);\n let controlledReference = register => Controlled reference(register[...0], register[1...]);\n let areEquivalent = CheckOperationsAreEqual(inputSize + 1, controlledOp, controlledReference);\n areEquivalent\n }\n\n /// # Summary\n /// Given two operations, checks whether they act identically on the zero state |0〉 ⊗ |0〉 ⊗ ... ⊗ |0〉 composed of\n /// `inputSize` qubits.\n operation CheckOperationsEquivalenceOnZeroState(\n op : (Qubit[] => Unit),\n reference : (Qubit[] => Unit is Adj),\n inputSize : Int)\n : Bool {\n Fact(inputSize > 0, \"`inputSize` must be positive\");\n use target = Qubit[inputSize];\n op(target);\n Adjoint reference(target);\n let isCorrect = CheckAllZero(target);\n ResetAll(target);\n isCorrect\n }\n\n\n /// # Summary\n /// Given two operations, checks whether they act identically on the given initial state composed of `inputSize` qubits.\n /// The initial state is prepared by applying the `initialState` operation to the state |0〉 ⊗ |0〉 ⊗ ... ⊗ |0〉.\n /// This operation introduces a control qubit to convert a global phase into a relative phase to be able to detect it.\n /// `initialState` operation should be deterministic.\n operation CheckOperationsEquivalenceOnInitialStateStrict(\n initialState : Qubit[] => Unit is Adj,\n op : (Qubit[] => Unit is Adj + Ctl),\n reference : (Qubit[] => Unit is Adj + Ctl),\n inputSize : Int\n ) : Bool {\n use (control, target) = (Qubit(), Qubit[inputSize]);\n within {\n H(control);\n initialState(target);\n }\n apply {\n Controlled op([control], target);\n Adjoint Controlled reference([control], target);\n }\n\n let isCorrect = CheckAllZero([control] + target);\n ResetAll([control] + target);\n isCorrect\n }\n\n\n /// # Summary\n /// Given two operations, checks whether they act identically on the zero state |0〉 ⊗ |0〉 ⊗ ... ⊗ |0〉 composed of\n /// `inputSize` qubits.\n /// This operation introduces a control qubit to convert a global phase into a relative phase to be able to detect\n /// it.\n operation CheckOperationsEquivalenceOnZeroStateStrict(\n op : (Qubit[] => Unit is Adj + Ctl),\n reference : (Qubit[] => Unit is Adj + Ctl),\n inputSize : Int)\n : Bool {\n Fact(inputSize > 0, \"`inputSize` must be positive\");\n CheckOperationsEquivalenceOnInitialStateStrict(qs => (), op, reference, inputSize)\n }\n\n\n /// # Summary\n /// Shows the comparison of the quantum states produced by a specific operation and a reference operation\n /// when applied to the state prepared using deterministic operation `initialState`.\n operation ShowQuantumStateComparison(\n registerSize : Int,\n initialState : Qubit[] => Unit,\n op : Qubit[] => Unit,\n reference : Qubit[] => Unit)\n : Unit {\n {\n use register = Qubit[registerSize];\n initialState(register);\n\n Message(\"Initial quantum state:\");\n DumpMachine();\n\n // Apply the reference operation and dump the simulator state\n reference(register);\n Message(\"Expected quantum state after applying the operation:\");\n DumpMachine();\n ResetAll(register);\n }\n\n {\n use register = Qubit[registerSize];\n initialState(register);\n // Apply the comparison operation and dump the simulator state\n op(register);\n Message(\"Actual quantum state after applying the operation:\");\n DumpMachine();\n ResetAll(register);\n }\n }\n\n /// # Summary\n /// Given two operations, checks whether they act identically on the zero state |0〉 ⊗ |0〉 ⊗ ... ⊗ |0〉 composed of\n /// `inputSize` qubits. If they don't, prints user feedback.\n operation CheckOperationsEquivalenceOnZeroStateWithFeedback(\n testImpl : (Qubit[] => Unit),\n refImpl : (Qubit[] => Unit is Adj),\n inputSize : Int\n ) : Bool {\n\n let isCorrect = CheckOperationsEquivalenceOnZeroState(testImpl, refImpl, inputSize);\n\n // Output different feedback to the user depending on whether the exercise was correct.\n if isCorrect {\n Message(\"Correct!\");\n } else {\n Message(\"Incorrect.\");\n ShowQuantumStateComparison(inputSize, (qs => ()), testImpl, refImpl);\n }\n isCorrect\n }\n\n\n internal operation EntangleRegisters(\n control : Qubit[],\n target : Qubit[]) : Unit is Adj + Ctl {\n Fact(\n Length(control) == Length(target),\n $\"The length of qubit registers must be the same.\");\n\n for index in IndexRange(control) {\n H(control[index]);\n CNOT(control[index], target[index]);\n }\n }\n\n\n /// # Summary\n /// Prepare a random uneven superposition state on the given qubit array.\n operation PrepDemoState(qs : Qubit[]) : Unit {\n Fact(Length(qs) <= 4, \"States with 5 qubits or more are not supported.\");\n let probs = [0.36, 0.25, 1. / 3., 1. / 5.][... Length(qs) - 1];\n for (q, prob) in Zipped(qs, probs) {\n Ry(ArcCos(Sqrt(prob)) * 2.0, q);\n }\n }\n\n\n // \"Framework\" operation for testing single-qubit tasks for distinguishing states of one qubit\n // with Bool return\n operation DistinguishTwoStates_SingleQubit(\n statePrep : ((Qubit, Int) => Unit is Adj),\n testImpl : (Qubit => Bool),\n stateNames : String[],\n preserveState : Bool) : Bool {\n\n let nTotal = 100;\n let nStates = 2;\n mutable misclassifications = [0, size=nStates];\n\n use q = Qubit();\n for _ in 1 .. nTotal {\n // get a random bit to define whether qubit will be in a state corresponding to true return (1) or to false one (0)\n // state = 0 false return\n // state = 1 true return\n let state = DrawRandomInt(0, 1);\n\n // do state prep: convert |0⟩ to outcome with false return or to outcome with true return depending on state\n statePrep(q, state);\n\n // get the solution's answer and verify if NOT a match, then differentiate what kind of mismatch\n let ans = testImpl(q);\n if ans != (state == 1) {\n set misclassifications w/= state <- misclassifications[state] + 1;\n }\n\n // If the final state is to be preserved, check if it was not modified\n if preserveState {\n Adjoint statePrep(q, state);\n if not CheckZero(q) {\n Message($\"Input quantum state {stateNames[state]} was not preserved during the measurement.\");\n Reset(q);\n return false;\n }\n } else {\n Reset(q);\n }\n }\n\n mutable totalMisclassifications = 0;\n for i in 0 .. nStates - 1 {\n if misclassifications[i] != 0 {\n set totalMisclassifications += misclassifications[i];\n Message($\"Misclassified {stateNames[i]} as {stateNames[1 - i]} in {misclassifications[i]} test runs.\");\n }\n }\n\n totalMisclassifications == 0\n }\n\n\n // \"Framework\" operation for testing multi-qubit tasks for distinguishing states of an array of qubits\n // with Int return\n operation DistinguishStates_MultiQubit(\n nQubits : Int,\n nStates : Int,\n statePrep : ((Qubit[], Int, Double) => Unit is Adj),\n testImpl : (Qubit[] => Int),\n preserveState : Bool,\n stateNames : String[]) : Bool {\n\n let nTotal = 100;\n // misclassifications will store the number of times state i has been classified as state j (dimension nStates^2)\n mutable misclassifications = [0, size = nStates * nStates];\n // unknownClassifications will store the number of times state i has been classified as some invalid state (index < 0 or >= nStates)\n mutable unknownClassifications = [0, size = nStates];\n\n use qs = Qubit[nQubits];\n for _ in 1 .. nTotal {\n // get a random integer to define the state of the qubits\n let state = DrawRandomInt(0, nStates - 1);\n // get a random rotation angle to define the exact state of the qubits\n // for some exercises, this value might be a dummy variable which does not matter\n let alpha = DrawRandomDouble(0.0, 1.0) * PI();\n\n // do state prep: convert |0...0⟩ to outcome with return equal to state\n statePrep(qs, state, alpha);\n\n // get the solution's answer and verify that it's a match, if not, increase the exact mismatch count\n let ans = testImpl(qs);\n if ans >= 0 and ans < nStates {\n // classification result is a valid state index - check if is it correct\n if ans != state {\n set misclassifications w/= ((state * nStates) + ans) <- (misclassifications[(state * nStates) + ans] + 1);\n }\n }\n else {\n // classification result is an invalid state index - file it separately\n set unknownClassifications w/= state <- (unknownClassifications[state] + 1);\n }\n\n if preserveState {\n // check that the state of the qubit after the operation is unchanged\n Adjoint statePrep(qs, state, alpha);\n if not CheckAllZero(qs) {\n Message($\"Input quantum state {stateNames[state]} was not preserved during the measurement.\");\n ResetAll(qs);\n return false;\n }\n } else {\n // we're not checking the state of the qubit after the operation\n ResetAll(qs);\n }\n }\n\n mutable totalMisclassifications = 0;\n for i in 0 .. nStates - 1 {\n for j in 0 .. nStates - 1 {\n if misclassifications[(i * nStates) + j] != 0 {\n set totalMisclassifications += misclassifications[i * nStates + j];\n Message($\"Misclassified {stateNames[i]} as {stateNames[j]} in {misclassifications[(i * nStates) + j]} test runs.\");\n }\n }\n if unknownClassifications[i] != 0 {\n set totalMisclassifications += unknownClassifications[i];\n Message($\"Misclassified {stateNames[i]} as Unknown State in {unknownClassifications[i]} test runs.\");\n }\n }\n totalMisclassifications == 0\n }\n\n\n /// # Summary\n /// Given a marking oracle acting on N inputs, and a classical function acting on N bits, \n /// checks whether the oracle effect matches that of the function on every classical input.\n operation CheckOracleImplementsFunction (\n N : Int, \n oracle : (Qubit[], Qubit) => Unit, \n f : Bool[] -> Bool\n ) : Bool {\n let size = 1 <<< N;\n use (input, target) = (Qubit[N], Qubit());\n for k in 0 .. size - 1 {\n // Prepare k-th bit vector\n let binaryLE = IntAsBoolArray(k, N);\n \n // \"binary\" is little-endian notation, so the second vector tried has qubit 0 in state 1 and the rest in state 0\n ApplyPauliFromBitString(PauliX, true, binaryLE, input);\n \n // Apply the operation\n oracle(input, target);\n \n // Calculate the expected classical result\n let val = f(binaryLE);\n\n // Apply operations that will revert the qubits to the 0 state if the oracle acted correctly.\n if val {\n X(target);\n }\n ApplyPauliFromBitString(PauliX, true, binaryLE, input);\n\n if not CheckAllZero(input + [target]) {\n Message($\"Unexpected result on input {binaryLE}.\");\n if not CheckAllZero(input) {\n Message(\"The state of the input qubits changed, or they ended up entangled with the target qubit.\");\n Message(\"The state of the system after oracle application:\");\n DumpMachine();\n } else {\n Message($\"Expected result `{val}`, got `{not val}`.\");\n }\n ResetAll(input + [target]);\n return false;\n }\n }\n return true;\n } \n}\n"
7262
+ "code": "// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nnamespace Microsoft.Quantum.Katas {\n open Microsoft.Quantum.Arrays;\n open Microsoft.Quantum.Convert;\n open Microsoft.Quantum.Diagnostics;\n open Microsoft.Quantum.Math;\n open Microsoft.Quantum.Random;\n\n /// # Summary\n /// Given two operations, checks whether they act identically (including global phase) for all input states.\n /// This is done through controlled versions of the operations instead of plain ones which convert the global phase\n /// into a relative phase that can be detected.\n operation CheckOperationsAreEqualStrict(\n inputSize : Int,\n op : (Qubit[] => Unit is Adj + Ctl),\n reference : (Qubit[] => Unit is Adj + Ctl))\n : Bool {\n Fact(inputSize > 0, \"`inputSize` must be positive\");\n let controlledOp = register => Controlled op(register[...0], register[1...]);\n let controlledReference = register => Controlled reference(register[...0], register[1...]);\n let areEquivalent = CheckOperationsAreEqual(inputSize + 1, controlledOp, controlledReference);\n areEquivalent\n }\n\n /// # Summary\n /// Given two operations, checks whether they act identically on the zero state |0〉 ⊗ |0〉 ⊗ ... ⊗ |0〉 composed of\n /// `inputSize` qubits.\n operation CheckOperationsEquivalenceOnZeroState(\n op : (Qubit[] => Unit),\n reference : (Qubit[] => Unit is Adj),\n inputSize : Int)\n : Bool {\n Fact(inputSize > 0, \"`inputSize` must be positive\");\n use target = Qubit[inputSize];\n op(target);\n Adjoint reference(target);\n let isCorrect = CheckAllZero(target);\n ResetAll(target);\n isCorrect\n }\n\n\n /// # Summary\n /// Given two operations, checks whether they act identically on the given initial state composed of `inputSize` qubits.\n /// The initial state is prepared by applying the `initialState` operation to the state |0〉 ⊗ |0〉 ⊗ ... ⊗ |0〉.\n /// This operation introduces a control qubit to convert a global phase into a relative phase to be able to detect it.\n /// `initialState` operation should be deterministic.\n operation CheckOperationsEquivalenceOnInitialStateStrict(\n initialState : Qubit[] => Unit is Adj,\n op : (Qubit[] => Unit is Adj + Ctl),\n reference : (Qubit[] => Unit is Adj + Ctl),\n inputSize : Int\n ) : Bool {\n use (control, target) = (Qubit(), Qubit[inputSize]);\n within {\n H(control);\n initialState(target);\n }\n apply {\n Controlled op([control], target);\n Adjoint Controlled reference([control], target);\n }\n\n let isCorrect = CheckAllZero([control] + target);\n ResetAll([control] + target);\n isCorrect\n }\n\n\n /// # Summary\n /// Given two operations, checks whether they act identically on the zero state |0〉 ⊗ |0〉 ⊗ ... ⊗ |0〉 composed of\n /// `inputSize` qubits.\n /// This operation introduces a control qubit to convert a global phase into a relative phase to be able to detect\n /// it.\n operation CheckOperationsEquivalenceOnZeroStateStrict(\n op : (Qubit[] => Unit is Adj + Ctl),\n reference : (Qubit[] => Unit is Adj + Ctl),\n inputSize : Int)\n : Bool {\n Fact(inputSize > 0, \"`inputSize` must be positive\");\n CheckOperationsEquivalenceOnInitialStateStrict(qs => (), op, reference, inputSize)\n }\n\n\n /// # Summary\n /// Shows the comparison of the quantum states produced by a specific operation and a reference operation\n /// when applied to the state prepared using deterministic operation `initialState`.\n operation ShowQuantumStateComparison(\n registerSize : Int,\n initialState : Qubit[] => Unit,\n op : Qubit[] => Unit,\n reference : Qubit[] => Unit)\n : Unit {\n {\n use register = Qubit[registerSize];\n initialState(register);\n\n Message(\"Initial quantum state:\");\n DumpMachine();\n\n // Apply the reference operation and dump the simulator state\n reference(register);\n Message(\"Expected quantum state after applying the operation:\");\n DumpMachine();\n ResetAll(register);\n }\n\n {\n use register = Qubit[registerSize];\n initialState(register);\n // Apply the comparison operation and dump the simulator state\n op(register);\n Message(\"Actual quantum state after applying the operation:\");\n DumpMachine();\n ResetAll(register);\n }\n }\n\n /// # Summary\n /// Given two operations, checks whether they act identically on the zero state |0〉 ⊗ |0〉 ⊗ ... ⊗ |0〉 composed of\n /// `inputSize` qubits. If they don't, prints user feedback.\n operation CheckOperationsEquivalenceOnZeroStateWithFeedback(\n testImpl : (Qubit[] => Unit),\n refImpl : (Qubit[] => Unit is Adj),\n inputSize : Int\n ) : Bool {\n\n let isCorrect = CheckOperationsEquivalenceOnZeroState(testImpl, refImpl, inputSize);\n\n // Output different feedback to the user depending on whether the exercise was correct.\n if isCorrect {\n Message(\"Correct!\");\n } else {\n Message(\"Incorrect.\");\n ShowQuantumStateComparison(inputSize, (qs => ()), testImpl, refImpl);\n }\n isCorrect\n }\n\n\n internal operation EntangleRegisters(\n control : Qubit[],\n target : Qubit[]) : Unit is Adj + Ctl {\n Fact(\n Length(control) == Length(target),\n $\"The length of qubit registers must be the same.\");\n\n for index in IndexRange(control) {\n H(control[index]);\n CNOT(control[index], target[index]);\n }\n }\n\n\n /// # Summary\n /// Prepare a random uneven superposition state on the given qubit array.\n operation PrepDemoState(qs : Qubit[]) : Unit {\n Fact(Length(qs) <= 4, \"States with 5 qubits or more are not supported.\");\n let probs = [0.36, 0.25, 1. / 3., 1. / 5.][... Length(qs) - 1];\n for (q, prob) in Zipped(qs, probs) {\n Ry(ArcCos(Sqrt(prob)) * 2.0, q);\n }\n }\n\n\n // \"Framework\" operation for testing single-qubit tasks for distinguishing states of one qubit\n // with Bool return\n operation DistinguishTwoStates_SingleQubit(\n statePrep : ((Qubit, Int) => Unit is Adj),\n testImpl : (Qubit => Bool),\n stateNames : String[],\n preserveState : Bool) : Bool {\n\n let nTotal = 100;\n let nStates = 2;\n mutable misclassifications = [0, size=nStates];\n\n use q = Qubit();\n for _ in 1 .. nTotal {\n // get a random bit to define whether qubit will be in a state corresponding to true return (1) or to false one (0)\n // state = 0 false return\n // state = 1 true return\n let state = DrawRandomInt(0, 1);\n\n // do state prep: convert |0⟩ to outcome with false return or to outcome with true return depending on state\n statePrep(q, state);\n\n // get the solution's answer and verify if NOT a match, then differentiate what kind of mismatch\n let ans = testImpl(q);\n if ans != (state == 1) {\n set misclassifications w/= state <- misclassifications[state] + 1;\n }\n\n // If the final state is to be preserved, check if it was not modified\n if preserveState {\n Adjoint statePrep(q, state);\n if not CheckZero(q) {\n Message($\"Input quantum state {stateNames[state]} was not preserved during the measurement.\");\n Reset(q);\n return false;\n }\n } else {\n Reset(q);\n }\n }\n\n mutable totalMisclassifications = 0;\n for i in 0 .. nStates - 1 {\n if misclassifications[i] != 0 {\n set totalMisclassifications += misclassifications[i];\n Message($\"Misclassified {stateNames[i]} as {stateNames[1 - i]} in {misclassifications[i]} test runs.\");\n }\n }\n\n totalMisclassifications == 0\n }\n\n\n // \"Framework\" operation for testing multi-qubit tasks for distinguishing states of an array of qubits\n // with Int return\n operation DistinguishStates_MultiQubit(\n nQubits : Int,\n nStates : Int,\n statePrep : ((Qubit[], Int, Double) => Unit is Adj),\n testImpl : (Qubit[] => Int),\n preserveState : Bool,\n stateNames : String[]) : Bool {\n\n let nTotal = 100;\n // misclassifications will store the number of times state i has been classified as state j (dimension nStates^2)\n mutable misclassifications = [0, size = nStates * nStates];\n // unknownClassifications will store the number of times state i has been classified as some invalid state (index < 0 or >= nStates)\n mutable unknownClassifications = [0, size = nStates];\n\n use qs = Qubit[nQubits];\n for _ in 1 .. nTotal {\n // get a random integer to define the state of the qubits\n let state = DrawRandomInt(0, nStates - 1);\n // get a random rotation angle to define the exact state of the qubits\n // for some exercises, this value might be a dummy variable which does not matter\n let alpha = DrawRandomDouble(0.0, 1.0) * PI();\n\n // do state prep: convert |0...0⟩ to outcome with return equal to state\n statePrep(qs, state, alpha);\n\n // get the solution's answer and verify that it's a match, if not, increase the exact mismatch count\n let ans = testImpl(qs);\n if ans >= 0 and ans < nStates {\n // classification result is a valid state index - check if is it correct\n if ans != state {\n set misclassifications w/= ((state * nStates) + ans) <- (misclassifications[(state * nStates) + ans] + 1);\n }\n }\n else {\n // classification result is an invalid state index - file it separately\n set unknownClassifications w/= state <- (unknownClassifications[state] + 1);\n }\n\n if preserveState {\n // check that the state of the qubit after the operation is unchanged\n Adjoint statePrep(qs, state, alpha);\n if not CheckAllZero(qs) {\n Message($\"Input quantum state {stateNames[state]} was not preserved during the measurement.\");\n ResetAll(qs);\n return false;\n }\n } else {\n // we're not checking the state of the qubit after the operation\n ResetAll(qs);\n }\n }\n\n mutable totalMisclassifications = 0;\n for i in 0 .. nStates - 1 {\n for j in 0 .. nStates - 1 {\n if misclassifications[(i * nStates) + j] != 0 {\n set totalMisclassifications += misclassifications[i * nStates + j];\n Message($\"Misclassified {stateNames[i]} as {stateNames[j]} in {misclassifications[(i * nStates) + j]} test runs.\");\n }\n }\n if unknownClassifications[i] != 0 {\n set totalMisclassifications += unknownClassifications[i];\n Message($\"Misclassified {stateNames[i]} as Unknown State in {unknownClassifications[i]} test runs.\");\n }\n }\n totalMisclassifications == 0\n }\n\n // Helper function to convert a boolean array to its ket state representation\n function BoolArrayAsKetState (bits : Bool[]) : String {\n mutable stateName = \"|\";\n for i in 0 .. Length(bits) - 1 {\n set stateName += (bits[i] ? \"1\" | \"0\");\n }\n\n return stateName + \"⟩\";\n }\n\n // Helper function to convert an array of bit strings to its ket state representation\n function IntArrayAsStateName (\n qubits : Int,\n bitStrings : Bool[][]\n ) : String {\n mutable statename = \"\";\n for i in 0 .. Length(bitStrings) - 1 {\n if i > 0 {\n set statename += \" + \";\n }\n set statename += BoolArrayAsKetState(bitStrings[i]);\n }\n\n return statename;\n }\n\n /// # Summary\n /// Given a marking oracle acting on N inputs, and a classical function acting on N bits, \n /// checks whether the oracle effect matches that of the function on every classical input.\n operation CheckOracleImplementsFunction (\n N : Int, \n oracle : (Qubit[], Qubit) => Unit, \n f : Bool[] -> Bool\n ) : Bool {\n let size = 1 <<< N;\n use (input, target) = (Qubit[N], Qubit());\n for k in 0 .. size - 1 {\n // Prepare k-th bit vector\n let binaryLE = IntAsBoolArray(k, N);\n \n // \"binary\" is little-endian notation, so the second vector tried has qubit 0 in state 1 and the rest in state 0\n ApplyPauliFromBitString(PauliX, true, binaryLE, input);\n \n // Apply the operation\n oracle(input, target);\n \n // Calculate the expected classical result\n let val = f(binaryLE);\n\n // Apply operations that will revert the qubits to the 0 state if the oracle acted correctly.\n if val {\n X(target);\n }\n ApplyPauliFromBitString(PauliX, true, binaryLE, input);\n\n if not CheckAllZero(input + [target]) {\n Message($\"Unexpected result on input {BoolArrayAsKetState(binaryLE)}.\");\n if not CheckAllZero(input) {\n Message(\"The state of the input qubits changed, or they ended up entangled with the target qubit.\");\n Message(\"The state of the system after oracle application:\");\n DumpMachine();\n } else {\n Message($\"Expected result `{val}`, got `{not val}`.\");\n }\n ResetAll(input + [target]);\n return false;\n }\n }\n return true;\n } \n}\n"
7216
7263
  },
7217
7264
  {
7218
7265
  "id": "complex_arithmetic__powers_of_i__Verification.qs",
7219
7266
  "code": "namespace Kata.Verification {\n \n operation PowersOfI_Reference(n : Int) : Int{\n // If n is divisible by 4\n if n % 4 == 0 { \n return 1;\n } else {\n return -1;\n }\n }\n\n @EntryPoint()\n operation CheckSolution() : Bool {\n for n in -20 .. 2 .. 20 { \n let expected = PowersOfI_Reference(n);\n let actual = Kata.PowersOfI(n);\n if expected != actual {\n Message(\"Incorrect.\");\n Message($\"Result of exponentiation doesn't match expected value: expected i^({n}) = {expected}, got {actual}\");\n return false; \n }\n }\n Message(\"Correct!\");\n return true; \n }\n}\n"
7220
7267
  },
7221
- {
7222
- "id": "complex_arithmetic__complex_addition__Verification.qs",
7223
- "code": "namespace Kata.Verification {\n open Microsoft.Quantum.Math;\n\n @EntryPoint()\n operation CheckSolution() : Bool {\n CheckTwoComplexOpsAreSame(Kata.ComplexAdd, PlusC)\n }\n}\n"
7224
- },
7225
7268
  {
7226
7269
  "id": "complex_arithmetic__Common.qs",
7227
7270
  "code": "namespace Kata.Verification {\n open Microsoft.Quantum.Math;\n open Microsoft.Quantum.Random; \n open Microsoft.Quantum.Convert;\n\n operation DrawRandomComplex() : Complex {\n // Generates a random complex number. \n let real = DrawRandomDouble(-10., 10.);\n let imag = DrawRandomDouble(-10., 10.);\n return Complex(real, imag);\n }\n\n function ComplexAsString(x : Complex) : String {\n if x::Imag < 0.0 {\n $\"{x::Real} - {AbsD(x::Imag)}i\"\n } else {\n $\"{x::Real} + {x::Imag}i\"\n }\n }\n\n function ComplexPolarAsString(x : ComplexPolar) : String {\n $\"{x::Magnitude} * exp({x::Argument}i)\"\n }\n\n operation CheckTwoComplexOpsAreSame(sol : (Complex, Complex) -> Complex, ref : (Complex, Complex) -> Complex) : Bool {\n for _ in 0 .. 24 {\n let x = DrawRandomComplex();\n let y = DrawRandomComplex();\n\n let expected = ref(x, y);\n let actual = sol(x, y);\n \n if not ComplexEqual(expected, actual) {\n Message(\"Incorrect\");\n Message($\"For x = {ComplexAsString(x)}, y = {ComplexAsString(y)} expected return {ComplexAsString(expected)}, actual return {ComplexAsString(actual)}.\");\n return false;\n }\n }\n\n Message(\"Correct!\");\n return true;\n }\n\n function ComplexEqual(x : Complex, y : Complex) : Bool { \n // Tests two complex numbers for equality.\n AbsD(x::Real - y::Real) <= 0.001 and AbsD(x::Imag - y::Imag) <= 0.001\n }\n\n function ComplexPolarEqual(x : ComplexPolar, y : ComplexPolar) : Bool { \n // Tests two complex polar numbers for equality.\n AbsD(x::Magnitude - y::Magnitude) <= 0.001 and AbsD(x::Argument - y::Argument) <= 0.001\n }\n}\n"
7228
7271
  },
7272
+ {
7273
+ "id": "complex_arithmetic__complex_addition__Verification.qs",
7274
+ "code": "namespace Kata.Verification {\n open Microsoft.Quantum.Math;\n\n @EntryPoint()\n operation CheckSolution() : Bool {\n CheckTwoComplexOpsAreSame(Kata.ComplexAdd, PlusC)\n }\n}\n"
7275
+ },
7229
7276
  {
7230
7277
  "id": "complex_arithmetic__complex_multiplication__Verification.qs",
7231
7278
  "code": "namespace Kata.Verification { \n open Microsoft.Quantum.Math;\n\n @EntryPoint()\n operation CheckSolution() : Bool {\n CheckTwoComplexOpsAreSame(Kata.ComplexMult, TimesC)\n }\n}"
@@ -7574,6 +7621,10 @@ export default {
7574
7621
  "id": "distinguishing_states__zero_one__Verification.qs",
7575
7622
  "code": "namespace Kata.Verification {\n open Microsoft.Quantum.Diagnostics;\n open Microsoft.Quantum.Katas;\n\n operation StatePrep_IsQubitOne (q : Qubit, state : Int) : Unit is Adj {\n if state == 1 {\n // convert |0⟩ to |1⟩\n X(q);\n }\n }\n\n @EntryPoint()\n operation CheckSolution() : Bool {\n let isCorrect = DistinguishTwoStates_SingleQubit(\n StatePrep_IsQubitOne,\n Kata.IsQubitOne,\n [\"|0⟩\", \"|1⟩\"],\n false);\n if isCorrect {\n Message(\"Correct!\");\n } else {\n Message(\"Incorrect.\");\n }\n isCorrect\n }\n\n}\n"
7576
7623
  },
7624
+ {
7625
+ "id": "distinguishing_states__Common.qs",
7626
+ "code": "namespace Kata.Verification{\n open Microsoft.Quantum.Arrays;\n open Microsoft.Quantum.Convert;\n open Microsoft.Quantum.Diagnostics;\n open Microsoft.Quantum.Intrinsic;\n open Microsoft.Quantum.Math;\n\n operation StatePrep_BasisStateMeasurement(\n qs : Qubit[],\n state : Int,\n dummyVar : Double\n ) : Unit is Adj {\n if state / 2 == 1 {\n // |10⟩ or |11⟩\n X(qs[0]);\n }\n\n if state % 2 == 1 {\n // |01⟩ or |11⟩\n X(qs[1]);\n }\n }\n\n operation WState_Arbitrary_Reference(qs : Qubit[]) : Unit is Adj + Ctl {\n let N = Length(qs);\n\n if N == 1 {\n // base case of recursion: |1⟩\n X(qs[0]);\n } else {\n // |W_N⟩ = |0⟩|W_(N-1)⟩ + |1⟩|0...0⟩\n // do a rotation on the first qubit to split it into |0⟩ and |1⟩ with proper weights\n // |0⟩ -> sqrt((N-1)/N) |0⟩ + 1/sqrt(N) |1⟩\n let theta = ArcSin(1.0 / Sqrt(IntAsDouble(N)));\n Ry(2.0 * theta, qs[0]);\n\n // do a zero-controlled W-state generation for qubits 1..N-1\n X(qs[0]);\n Controlled WState_Arbitrary_Reference(qs[0..0], qs[1..N - 1]);\n X(qs[0]);\n }\n }\n\n function StatePrep_FindFirstDiff (\n bits1 : Bool[],\n bits2 : Bool[]\n ) : Int {\n for i in 0 .. Length(bits1) - 1 {\n if bits1[i] != bits2[i] {\n return i;\n }\n }\n\n return -1;\n }\n\n operation StatePrep_SuperpositionMeasurement (\n qs : Qubit[],\n bits1 : Bool[][],\n bits2 : Bool[][],\n state : Int,\n dummyVar: Double\n ) : Unit is Adj {\n let bits = state == 0 ? bits1 | bits2;\n StatePrep_BitstringSuperposition(qs, bits);\n }\n\n // A combination of tasks 14 and 15 from the Superposition kata\n operation StatePrep_BitstringSuperposition (\n qs : Qubit[],\n bits : Bool[][]\n ) : Unit is Adj + Ctl {\n let L = Length(bits);\n Fact(L == 1 or L == 2 or L == 4, \"State preparation only supports arrays of 1, 2 or 4 bit strings.\");\n if L == 1 {\n for i in 0 .. Length(qs) - 1 {\n if bits[0][i] {\n X(qs[i]);\n }\n }\n }\n if L == 2 {\n // find the index of the first bit at which the bit strings are different\n let firstDiff = StatePrep_FindFirstDiff(bits[0], bits[1]);\n\n // Hadamard corresponding qubit to create superposition\n H(qs[firstDiff]);\n\n // iterate through the bit strings again setting the final state of qubits\n for i in 0 .. Length(qs) - 1 {\n if bits[0][i] == bits[1][i] {\n // if two bits are the same, apply X or nothing\n if bits[0][i] {\n X(qs[i]);\n }\n } else {\n // if two bits are different, set their difference using CNOT\n if i > firstDiff {\n CNOT(qs[firstDiff], qs[i]);\n if bits[0][i] != bits[0][firstDiff] {\n X(qs[i]);\n }\n }\n }\n }\n }\n if L == 4 {\n let N = Length(qs);\n\n use anc = Qubit[2];\n // Put two ancillas into equal superposition of 2-qubit basis states\n ApplyToEachCA(H, anc);\n\n // Set up the right pattern on the main qubits with control on ancillas\n for i in 0 .. 3 {\n for j in 0 .. N - 1 {\n if bits[i][j] {\n ApplyControlledOnInt(i, X, anc, qs[j]);\n }\n }\n }\n\n // Uncompute the ancillas, using patterns on main qubits as control\n for i in 0 .. 3 {\n if i % 2 == 1 {\n ApplyControlledOnBitString(bits[i], X, qs, anc[0]);\n }\n if i / 2 == 1 {\n ApplyControlledOnBitString(bits[i], X, qs, anc[1]);\n }\n }\n }\n }\n}\n"
7627
+ },
7577
7628
  {
7578
7629
  "id": "distinguishing_states__plus_minus__Verification.qs",
7579
7630
  "code": "namespace Kata.Verification {\n open Microsoft.Quantum.Katas;\n\n operation StatePrep_IsQubitPlus(q : Qubit, state : Int) : Unit is Adj {\n if state == 1 {\n // convert |0⟩ to |+⟩\n H(q);\n } else {\n // convert |0⟩ to |-⟩\n X(q);\n H(q);\n }\n }\n\n @EntryPoint()\n operation CheckSolution() : Bool {\n let isCorrect = DistinguishTwoStates_SingleQubit(\n StatePrep_IsQubitPlus,\n Kata.IsQubitPlus,\n [\"|-⟩\", \"|+⟩\"],\n false\n );\n if isCorrect {\n Message(\"Correct!\");\n } else {\n Message(\"Incorrect.\");\n }\n isCorrect\n }\n}\n"
@@ -7590,10 +7641,6 @@ export default {
7590
7641
  "id": "distinguishing_states__four_basis_states__Verification.qs",
7591
7642
  "code": "namespace Kata.Verification {\n open Microsoft.Quantum.Convert;\n open Microsoft.Quantum.Math;\n open Microsoft.Quantum.Katas;\n\n operation CheckSolution() : Bool {\n let isCorrect = DistinguishStates_MultiQubit(2, 4, StatePrep_BasisStateMeasurement, Kata.BasisStateMeasurement, false, [\"|00⟩\", \"|01⟩\", \"|10⟩\", \"|11⟩\"]);\n if (isCorrect) {\n Message(\"Correct!\");\n } else {\n Message(\"Incorrect.\");\n }\n\n isCorrect\n }\n}\n"
7592
7643
  },
7593
- {
7594
- "id": "distinguishing_states__Common.qs",
7595
- "code": "namespace Kata.Verification{\n open Microsoft.Quantum.Arrays;\n open Microsoft.Quantum.Convert;\n open Microsoft.Quantum.Diagnostics;\n open Microsoft.Quantum.Intrinsic;\n open Microsoft.Quantum.Math;\n\n operation StatePrep_BasisStateMeasurement(\n qs : Qubit[],\n state : Int,\n dummyVar : Double\n ) : Unit is Adj {\n if state / 2 == 1 {\n // |10⟩ or |11⟩\n X(qs[0]);\n }\n\n if state % 2 == 1 {\n // |01⟩ or |11⟩\n X(qs[1]);\n }\n }\n\n operation WState_Arbitrary_Reference(qs : Qubit[]) : Unit is Adj + Ctl {\n let N = Length(qs);\n\n if N == 1 {\n // base case of recursion: |1⟩\n X(qs[0]);\n } else {\n // |W_N⟩ = |0⟩|W_(N-1)⟩ + |1⟩|0...0⟩\n // do a rotation on the first qubit to split it into |0⟩ and |1⟩ with proper weights\n // |0⟩ -> sqrt((N-1)/N) |0⟩ + 1/sqrt(N) |1⟩\n let theta = ArcSin(1.0 / Sqrt(IntAsDouble(N)));\n Ry(2.0 * theta, qs[0]);\n\n // do a zero-controlled W-state generation for qubits 1..N-1\n X(qs[0]);\n Controlled WState_Arbitrary_Reference(qs[0..0], qs[1..N - 1]);\n X(qs[0]);\n }\n }\n\n // Helper function to convert a boolean array to its ket state representation\n function BoolArrayAsKetState (bits : Bool[]) : String {\n mutable stateName = \"|\";\n for i in 0 .. Length(bits) - 1 {\n set stateName += (bits[i] ? \"1\" | \"0\");\n }\n\n return stateName + \"⟩\";\n }\n\n // Helper function to convert an array of bit strings to its ket state representation\n function IntArrayAsStateName (\n qubits : Int,\n bitStrings : Bool[][]\n ) : String {\n mutable statename = \"\";\n for i in 0 .. Length(bitStrings) - 1 {\n if i > 0 {\n set statename += \" + \";\n }\n set statename += BoolArrayAsKetState(bitStrings[i]);\n }\n\n return statename;\n }\n\n function StatePrep_FindFirstDiff (\n bits1 : Bool[],\n bits2 : Bool[]\n ) : Int {\n for i in 0 .. Length(bits1) - 1 {\n if bits1[i] != bits2[i] {\n return i;\n }\n }\n\n return -1;\n }\n\n operation StatePrep_SuperpositionMeasurement (\n qs : Qubit[],\n bits1 : Bool[][],\n bits2 : Bool[][],\n state : Int,\n dummyVar: Double\n ) : Unit is Adj {\n let bits = state == 0 ? bits1 | bits2;\n StatePrep_BitstringSuperposition(qs, bits);\n }\n\n // A combination of tasks 14 and 15 from the Superposition kata\n operation StatePrep_BitstringSuperposition (\n qs : Qubit[],\n bits : Bool[][]\n ) : Unit is Adj + Ctl {\n let L = Length(bits);\n Fact(L == 1 or L == 2 or L == 4, \"State preparation only supports arrays of 1, 2 or 4 bit strings.\");\n if L == 1 {\n for i in 0 .. Length(qs) - 1 {\n if bits[0][i] {\n X(qs[i]);\n }\n }\n }\n if L == 2 {\n // find the index of the first bit at which the bit strings are different\n let firstDiff = StatePrep_FindFirstDiff(bits[0], bits[1]);\n\n // Hadamard corresponding qubit to create superposition\n H(qs[firstDiff]);\n\n // iterate through the bit strings again setting the final state of qubits\n for i in 0 .. Length(qs) - 1 {\n if bits[0][i] == bits[1][i] {\n // if two bits are the same, apply X or nothing\n if bits[0][i] {\n X(qs[i]);\n }\n } else {\n // if two bits are different, set their difference using CNOT\n if i > firstDiff {\n CNOT(qs[firstDiff], qs[i]);\n if bits[0][i] != bits[0][firstDiff] {\n X(qs[i]);\n }\n }\n }\n }\n }\n if L == 4 {\n let N = Length(qs);\n\n use anc = Qubit[2];\n // Put two ancillas into equal superposition of 2-qubit basis states\n ApplyToEachCA(H, anc);\n\n // Set up the right pattern on the main qubits with control on ancillas\n for i in 0 .. 3 {\n for j in 0 .. N - 1 {\n if bits[i][j] {\n ApplyControlledOnInt(i, X, anc, qs[j]);\n }\n }\n }\n\n // Uncompute the ancillas, using patterns on main qubits as control\n for i in 0 .. 3 {\n if i % 2 == 1 {\n ApplyControlledOnBitString(bits[i], X, qs, anc[0]);\n }\n if i / 2 == 1 {\n ApplyControlledOnBitString(bits[i], X, qs, anc[1]);\n }\n }\n }\n }\n}\n"
7596
- },
7597
7644
  {
7598
7645
  "id": "distinguishing_states__two_basis_states_bit_strings__Verification.qs",
7599
7646
  "code": "namespace Kata.Verification {\n open Microsoft.Quantum.Katas;\n\n operation StatePrep_Bitstring(\n qs : Qubit[],\n bits : Bool[]\n ) : Unit is Adj {\n for i in 0 .. Length(qs) - 1 {\n if bits[i] {\n X(qs[i]);\n }\n }\n }\n\n operation StatePrep_TwoBitstringsMeasurement(\n qs : Qubit[],\n bits1 : Bool[],\n bits2 : Bool[],\n state : Int,\n dummyVar : Double\n ) : Unit is Adj {\n let bits = state == 0 ? bits1 | bits2;\n StatePrep_Bitstring(qs, bits);\n }\n\n operation CheckTwoBitstringsMeasurement(b1 : Bool[], b2 : Bool[]) : Bool {\n let stateNames = [BoolArrayAsKetState(b1), BoolArrayAsKetState(b2)];\n let isCorrect = DistinguishStates_MultiQubit(\n Length(b1),\n 2,\n StatePrep_TwoBitstringsMeasurement(_, b1, b2, _, _),\n Kata.TwoBitstringsMeasurement(_, b1, b2),\n false,\n stateNames\n );\n\n if not isCorrect {\n Message($\"Incorrect for [{stateNames[0]}, {stateNames[1]}].\");\n }\n\n return isCorrect;\n }\n\n @EntryPoint()\n operation CheckSolution() : Bool {\n for (b1, b2) in [\n ([false, true], [true, false]),\n ([true, true, false], [false, true, true]),\n ([false, true, true, false], [false, true, true, true]),\n ([true, false, false, false], [true, false, true, true])\n ] {\n if not CheckTwoBitstringsMeasurement(b1, b2) {\n return false;\n }\n }\n\n Message(\"Correct!\");\n true\n }\n}\n"
@@ -7730,14 +7777,14 @@ export default {
7730
7777
  "id": "key_distribution__random_array__Verification.qs",
7731
7778
  "code": "namespace Kata.Verification {\n open Microsoft.Quantum.Arrays;\n open Microsoft.Quantum.Convert;\n\n @EntryPoint()\n operation CheckSolution() : Bool {\n // The test only checks that the operation returns an array of correct length\n // and that it's not always the same. It doesn't analyze the distribution of true and false elements.\n let N = 20;\n let randomArrays = ForEach(Kata.RandomArray, [N, size = 10]);\n\n for array in randomArrays {\n if Length(array) != N {\n Message($\"Returned array should have length {N}, and it had length {Length(array)}.\");\n return false;\n }\n }\n\n let randomInts = Mapped(BoolArrayAsInt, randomArrays);\n mutable allSame = true;\n for int in randomInts {\n if int != randomInts[0] {\n set allSame = false;\n }\n }\n if allSame {\n Message($\"Random generation should not return a fixed array.\");\n return false;\n }\n\n Message(\"Correct!\");\n true\n }\n}\n"
7732
7779
  },
7733
- {
7734
- "id": "key_distribution__prepare_qubits__Verification.qs",
7735
- "code": "namespace Kata.Verification {\n open Microsoft.Quantum.Diagnostics;\n\n @EntryPoint()\n operation CheckSolution() : Bool {\n for N in 2 .. 10 {\n let (bases, bits) = (RandomArray(N), RandomArray(N));\n use qs = Qubit[N];\n Kata.PrepareQubits(qs, bases, bits);\n Adjoint PrepareQubits_Reference(qs, bases, bits);\n for i in 0 .. N - 1 {\n if not CheckZero(qs[i]) {\n Message($\"Qubit qs[{i}] prepared in incorrect state.\");\n Message($\"Expected state {StateToString(bases[i], bits[i])}; actual state\");\n PrepareQubits_Reference([qs[i]], [bases[i]], [bits[i]]);\n DumpRegister([qs[i]]);\n ResetAll(qs);\n return false;\n }\n }\n }\n\n Message(\"Correct!\");\n true\n }\n}\n"
7736
- },
7737
7780
  {
7738
7781
  "id": "key_distribution__Common.qs",
7739
7782
  "code": "namespace Kata.Verification {\n open Microsoft.Quantum.Arrays;\n open Microsoft.Quantum.Random;\n\n operation RandomArray(N : Int) : Bool[] {\n ForEach(x => DrawRandomInt(0, 1) == 0, [0, size = N])\n }\n\n operation BasisToString(base : Bool) : String {\n base ? \"Hadamard\" | \"computational\"\n }\n\n operation StateToString(base : Bool, bit : Bool) : String {\n if base { // ∣+⟩ / ∣-⟩\n return bit ? \"|-⟩\" | \"|+⟩\";\n } else { // ∣0⟩ / ∣1⟩\n return bit ? \"|1⟩\" | \"|0⟩\";\n }\n }\n\n operation PrepareQubits_Reference(qs : Qubit[], bases : Bool[], bits : Bool[]) : Unit is Adj {\n for i in 0 .. Length(qs) - 1 {\n if bits[i] {\n X(qs[i]);\n }\n if bases[i] {\n H(qs[i]);\n }\n }\n }\n}\n"
7740
7783
  },
7784
+ {
7785
+ "id": "key_distribution__prepare_qubits__Verification.qs",
7786
+ "code": "namespace Kata.Verification {\n open Microsoft.Quantum.Diagnostics;\n\n @EntryPoint()\n operation CheckSolution() : Bool {\n for N in 2 .. 10 {\n let (bases, bits) = (RandomArray(N), RandomArray(N));\n use qs = Qubit[N];\n Kata.PrepareQubits(qs, bases, bits);\n Adjoint PrepareQubits_Reference(qs, bases, bits);\n for i in 0 .. N - 1 {\n if not CheckZero(qs[i]) {\n Message($\"Qubit qs[{i}] prepared in incorrect state.\");\n Message($\"Expected state {StateToString(bases[i], bits[i])}; actual state\");\n PrepareQubits_Reference([qs[i]], [bases[i]], [bits[i]]);\n DumpRegister([qs[i]]);\n ResetAll(qs);\n return false;\n }\n }\n }\n\n Message(\"Correct!\");\n true\n }\n}\n"
7787
+ },
7741
7788
  {
7742
7789
  "id": "key_distribution__measure_qubits__Verification.qs",
7743
7790
  "code": "namespace Kata.Verification {\n open Microsoft.Quantum.Diagnostics;\n\n @EntryPoint()\n operation CheckSolution() : Bool {\n for N in 2 .. 10 {\n let (bases, bits) = (RandomArray(N), RandomArray(N));\n use qs = Qubit[N];\n PrepareQubits_Reference(qs, bases, bits);\n let res = Kata.MeasureQubits(qs, bases);\n ResetAll(qs);\n\n if Length(res) != N {\n Message($\"The returned array should have length {N}, same as the inputs, and it had length {Length(res)}.\");\n return false;\n }\n\n for i in 0 .. N - 1 {\n if res[i] != bits[i] {\n Message($\"Qubit qs[{i}] measured in incorrect basis.\");\n Message($\"When measuring state {StateToString(bases[i], bits[i])} in the {BasisToString(bases[i])} basis, \" +\n $\"expected result is {bits[i]}, got {res[i]}.\");\n return false;\n }\n }\n }\n\n Message(\"Correct!\");\n true\n }\n}\n"
@@ -7954,6 +8001,10 @@ export default {
7954
8001
  "id": "qec_shor__zz_measurement__Verification.qs",
7955
8002
  "code": "namespace Kata.Verification {\n open Microsoft.Quantum.Katas;\n\n operation StatePrep_ZZMeasurement(qs : Qubit[], state : Int, alpha : Double) : Unit is Adj {\n // prep cos(alpha) * |0..0⟩ + sin(alpha) * |1..1⟩\n Ry(2.0 * alpha, qs[0]);\n CNOT(qs[0], qs[1]);\n\n if state == 1 {\n X(qs[0]);\n }\n }\n\n @EntryPoint()\n operation CheckSolution() : Bool {\n let isCorrect = DistinguishStates_MultiQubit(\n 2,\n 2,\n StatePrep_ZZMeasurement,\n Kata.ZZMeasurement,\n true,\n [\"α|00⟩ + β|11⟩\", \"α|01⟩ + β|10⟩\"]);\n\n if (isCorrect) {\n Message(\"Correct!\");\n } else {\n Message(\"Incorrect.\");\n }\n\n isCorrect\n }\n}\n"
7956
8003
  },
8004
+ {
8005
+ "id": "qec_shor__Common.qs",
8006
+ "code": "namespace Kata.Verification {\n open Microsoft.Quantum.Diagnostics;\n open Microsoft.Quantum.Math;\n open Microsoft.Quantum.Random;\n\n operation CheckErrorDetection(\n n : Int,\n encode : (Qubit[] => Unit is Adj),\n error : (Qubit => Unit is Adj),\n detect : (Qubit[] => Int)\n ) : Bool {\n for err_ind in -1 .. n - 1 {\n for _ in 1 .. 10 {\n use qs = Qubit[n];\n let theta = DrawRandomDouble(0.0, 1.0);\n within {\n // Prepare logical state on first qubit\n Ry(2.0 * theta * PI(), qs[0]);\n // Encode the state in multiple qubits\n encode(qs);\n // Introduce X error\n if err_ind > -1 {\n error(qs[err_ind]);\n }\n } apply {\n // Call solution to detect index\n let detected = detect(qs);\n // Check that it is correct\n if detected != err_ind {\n Message(\"Incorrect.\");\n let actual = err_ind == -1 ? \"No error happened\" | $\"Error happened on qubit {err_ind}\";\n Message($\"{actual}, but solution returned {detected}\");\n ResetAll(qs);\n return false;\n }\n }\n // Check that the state was not modified by the solution\n if not CheckAllZero(qs) {\n Message(\"Incorrect.\");\n Message(\"The state of the qubits changed after the solution was applied\");\n ResetAll(qs);\n return false;\n }\n }\n }\n\n Message(\"Correct!\");\n true\n }\n}\n"
8007
+ },
7957
8008
  {
7958
8009
  "id": "qec_shor__xx_measurement__Verification.qs",
7959
8010
  "code": "namespace Kata.Verification {\n open Microsoft.Quantum.Katas;\n\n operation StatePrep_XXMeasurement(qs : Qubit[], state : Int, alpha : Double) : Unit is Adj {\n // prep cos(alpha) * |0..0⟩ + sin(alpha) * |1..1⟩\n Ry(2.0 * alpha, qs[0]);\n CNOT(qs[0], qs[1]);\n\n if state == 1 {\n X(qs[0]);\n }\n\n ApplyToEachA(H, qs);\n }\n\n @EntryPoint()\n operation CheckSolution() : Bool {\n let isCorrect = DistinguishStates_MultiQubit(\n 2,\n 2,\n StatePrep_XXMeasurement,\n Kata.XXMeasurement,\n true,\n [\"α|++⟩ + β|--⟩\", \"α|+-⟩ + β|-+⟩\"]);\n\n if (isCorrect) {\n Message(\"Correct!\");\n } else {\n Message(\"Incorrect.\");\n }\n\n isCorrect\n }\n}\n"
@@ -7966,10 +8017,6 @@ export default {
7966
8017
  "id": "qec_shor__bitflip_detect__Verification.qs",
7967
8018
  "code": "namespace Kata.Verification {\n open Microsoft.Quantum.Katas;\n\n operation BitflipEncode (qs : Qubit[]) : Unit is Adj + Ctl {\n CNOT(qs[0], qs[1]);\n CNOT(qs[0], qs[2]);\n }\n\n @EntryPoint()\n operation CheckSolution() : Bool {\n CheckErrorDetection(3, BitflipEncode, X, Kata.BitflipDetectError)\n }\n}\n"
7968
8019
  },
7969
- {
7970
- "id": "qec_shor__Common.qs",
7971
- "code": "namespace Kata.Verification {\n open Microsoft.Quantum.Diagnostics;\n open Microsoft.Quantum.Math;\n open Microsoft.Quantum.Random;\n\n operation CheckErrorDetection(\n n : Int,\n encode : (Qubit[] => Unit is Adj),\n error : (Qubit => Unit is Adj),\n detect : (Qubit[] => Int)\n ) : Bool {\n for err_ind in -1 .. n - 1 {\n for _ in 1 .. 10 {\n use qs = Qubit[n];\n let theta = DrawRandomDouble(0.0, 1.0);\n within {\n // Prepare logical state on first qubit\n Ry(2.0 * theta * PI(), qs[0]);\n // Encode the state in multiple qubits\n encode(qs);\n // Introduce X error\n if err_ind > -1 {\n error(qs[err_ind]);\n }\n } apply {\n // Call solution to detect index\n let detected = detect(qs);\n // Check that it is correct\n if detected != err_ind {\n Message(\"Incorrect.\");\n let actual = err_ind == -1 ? \"No error happened\" | $\"Error happened on qubit {err_ind}\";\n Message($\"{actual}, but solution returned {detected}\");\n ResetAll(qs);\n return false;\n }\n }\n // Check that the state was not modified by the solution\n if not CheckAllZero(qs) {\n Message(\"Incorrect.\");\n Message(\"The state of the qubits changed after the solution was applied\");\n ResetAll(qs);\n return false;\n }\n }\n }\n\n Message(\"Correct!\");\n true\n }\n}\n"
7972
- },
7973
8020
  {
7974
8021
  "id": "qec_shor__phaseflip_encode__Verification.qs",
7975
8022
  "code": "namespace Kata.Verification {\n open Microsoft.Quantum.Convert;\n open Microsoft.Quantum.Diagnostics;\n open Microsoft.Quantum.Katas;\n open Microsoft.Quantum.Math;\n\n operation PhaseflipEncode_Reference (qs : Qubit[]) : Unit is Adj + Ctl {\n CNOT(qs[0], qs[1]);\n CNOT(qs[0], qs[2]);\n ApplyToEachCA(H, qs);\n }\n\n\n @EntryPoint()\n operation CheckSolution() : Bool {\n let range = 10;\n for i in 0 .. range - 1 {\n let angle = 2.0 * PI() * IntAsDouble(i) / IntAsDouble(range);\n let initialState = qs => Ry(2.0 * angle, qs[0]);\n let isCorrect = CheckOperationsEquivalenceOnInitialStateStrict(\n initialState,\n Kata.PhaseflipEncode, \n PhaseflipEncode_Reference, \n 3);\n if not isCorrect {\n Message(\"Incorrect\");\n Message($\"Test fails for alpha = {Cos(angle)}, beta = {Sin(angle)}.\");\n ShowQuantumStateComparison(3, initialState, Kata.PhaseflipEncode, PhaseflipEncode_Reference);\n return false;\n }\n }\n\n Message(\"Correct!\");\n true\n }\n}\n"