Program.qs

```
namespace Quantum.Kata.SingleQubitGates {
    open Microsoft.Quantum.Intrinsic;
    open Microsoft.Quantum.Math;

     operation GlobalPhaseI (q : Qubit) : Unit is Adj+Ctl {
        X(q);
        Z(q);
        Y(q);

    }
}

```

Reference.qs

```
namespace Quantum.Kata.SingleQubitGates {
    open Microsoft.Quantum.Intrinsic;
    open Microsoft.Quantum.Math;

    operation GlobalPhaseI_Reference (q : Qubit) : Unit is Adj+Ctl {
        X(q);
        Z(q);
        Y(q);
    }
}

```

Test.qs

```
    open Microsoft.Quantum.Intrinsic;
    open Microsoft.Quantum.Canon;
    open Microsoft.Quantum.Diagnostics;
    open Microsoft.Quantum.Math;
    open Microsoft.Quantum.Convert;

    operation ControlledArrayWrapperOperation (op : (Qubit => Unit is Adj+Ctl), qs : Qubit[]) : Unit is Adj+Ctl {
        Controlled op([qs[0]], qs[1]);
    }

    operation AssertEqualOnZeroState (testImpl : (Qubit => Unit is Ctl), refImpl : (Qubit => Unit is Adj+Ctl)) : Unit {
        using (qs = Qubit[2]) {
            within {
                H(qs[0]);
            }
            apply {

                Controlled testImpl([qs[0]], qs[1]);

                Adjoint Controlled refImpl([qs[0]], qs[1]);
            }

            AssertAllZero(qs);
        }
    }

    operation T2_GlobalPhaseI_Test () : Unit {
        AssertOperationsEqualReferenced(2, ControlledArrayWrapperOperation(GlobalPhaseI, _), ControlledArrayWrapperOperation(GlobalPhaseI_Reference, _));
    }

```

Driver.cs

```

using Microsoft.Quantum.Simulation.XUnit;
using Microsoft.Quantum.Simulation.Simulators;

using Xunit.Abstractions;

namespace Quantum.Kata.SingleQubitGates
{
    public class TestSuiteRunner
    {
        private readonly ITestOutputHelper output;

        public TestSuiteRunner(ITestOutputHelper output)
        {
            this.output = output;
        }

        /// <summary>

        /// </summary>
        [OperationDriver(TestNamespace = "Quantum.Kata.SingleQubitGates")]
        public void TestTarget(TestOperation op)
        {
            using (var sim = new QuantumSimulator())
            {

                sim.OnLog += (msg) => { output.WriteLine(msg); };
                sim.OnLog += (msg) => { Debug.WriteLine(msg); };
                op.TestOperationRunner(sim);
            }
        }
    }
}

```