Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions src/Simulation/QsharpCore/Intrinsic.qs
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,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}
Expand All @@ -170,15 +172,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}
Expand All @@ -190,7 +194,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;
}
Expand Down Expand Up @@ -225,8 +229,7 @@ namespace Microsoft.Quantum.Intrinsic {
operation CNOT (control : Qubit, target : Qubit) : Unit
is Adj + Ctl {

body (...)
{
body (...) {
Controlled X([control], target);
}

Expand All @@ -252,8 +255,7 @@ namespace Microsoft.Quantum.Intrinsic {
/// ```
operation CCNOT (control1 : Qubit, control2 : Qubit, target : Qubit) : Unit
is Adj + Ctl {
body (...)
{
body (...) {
Controlled X([control1, control2], target);
}

Expand Down