From dfaca4bdc531be7b7bcd68c469325ec9daf0fd00 Mon Sep 17 00:00:00 2001 From: Christopher Granade Date: Thu, 25 Jun 2020 15:33:20 -0700 Subject: [PATCH] Fix #370. --- src/Simulation/QsharpCore/Intrinsic.qs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/Simulation/QsharpCore/Intrinsic.qs b/src/Simulation/QsharpCore/Intrinsic.qs index 28f0353dd86..2c1bd974cd1 100644 --- a/src/Simulation/QsharpCore/Intrinsic.qs +++ b/src/Simulation/QsharpCore/Intrinsic.qs @@ -209,8 +209,10 @@ namespace Microsoft.Quantum.Intrinsic { /// # Summary - /// Applies the π/4 phase gate to a single qubit. + /// Applies the S gate to a single qubit. /// + /// # Description + /// This operation can be simulated by the unitary matrix /// \begin{align} /// S \mathrel{:=} /// \begin{bmatrix} @@ -222,15 +224,17 @@ namespace Microsoft.Quantum.Intrinsic { /// # Input /// ## qubit /// Qubit to which the gate should be applied. - operation S (qubit : Qubit) : Unit + operation S(qubit : Qubit) : Unit is Adj + Ctl { body intrinsic; } /// # Summary - /// Applies the π/8 gate to a single qubit. + /// Applies the T gate to a single qubit. /// + /// # Description + /// This operation can be simulated by the unitary matrix /// \begin{align} /// T \mathrel{:=} /// \begin{bmatrix} @@ -242,7 +246,7 @@ namespace Microsoft.Quantum.Intrinsic { /// # Input /// ## qubit /// Qubit to which the gate should be applied. - operation T (qubit : Qubit) : Unit + operation T(qubit : Qubit) : Unit is Adj + Ctl { body intrinsic; } @@ -277,8 +281,7 @@ namespace Microsoft.Quantum.Intrinsic { operation CNOT (control : Qubit, target : Qubit) : Unit is Adj + Ctl { - body (...) - { + body (...) { Controlled X([control], target); } @@ -304,8 +307,7 @@ namespace Microsoft.Quantum.Intrinsic { /// ``` operation CCNOT (control1 : Qubit, control2 : Qubit, target : Qubit) : Unit is Adj + Ctl { - body (...) - { + body (...) { Controlled X([control1, control2], target); }