public void MResetY()
        {
            var measureQubit = new FreeQubit(0);
            var op           = new QrackSimulator().Get <Measurement.MResetY>();
            var args         = op.__DataIn__(measureQubit);
            var expected     = new RuntimeMetadata()
            {
                Label = "MResetY",
                FormattedNonQubitArgs = "",
                IsAdjoint             = false,
                IsControlled          = false,
                IsMeasurement         = true,
                IsComposite           = false,
                Children = null,
                Controls = new List <Qubit>()
                {
                },
                Targets = new List <Qubit>()
                {
                    measureQubit
                },
            };

            Assert.Equal(op.GetRuntimeMetadata(args), expected);
        }
        public void Reset()
        {
            var target   = new FreeQubit(0);
            var op       = new QrackSimulator().Get <Intrinsic.Reset>();
            var args     = op.__DataIn__(target);
            var expected = new RuntimeMetadata()
            {
                Label = "Reset",
                FormattedNonQubitArgs = "",
                IsAdjoint             = false,
                IsControlled          = false,
                IsMeasurement         = false,
                IsComposite           = false,
                Children = null,
                Controls = new List <Qubit>()
                {
                },
                Targets = new List <Qubit>()
                {
                    target
                },
            };

            Assert.Equal(op.GetRuntimeMetadata(args), expected);
        }
        public void NestedOperation()
        {
            var op       = new QrackSimulator().Get <Circuits.NestedOp>();
            var args     = op.__DataIn__(QVoid.Instance);
            var expected = new RuntimeMetadata()
            {
                Label = "NestedOp",
                FormattedNonQubitArgs = "",
                IsAdjoint             = false,
                IsControlled          = false,
                IsMeasurement         = false,
                IsComposite           = false,
                Children = null,
                Controls = new List <Qubit>()
                {
                },
                Targets = new List <Qubit>()
                {
                },
            };

            Assert.Equal(op.GetRuntimeMetadata(args), expected);
        }
        public void QArrayArgs()
        {
            var op = new QrackSimulator().Get <Circuits.BoolArrayOp>();
            IQArray <Boolean> bits = new QArray <Boolean>(new bool[] { false, true });
            var args     = op.__DataIn__(bits);
            var expected = new RuntimeMetadata()
            {
                Label = "BoolArrayOp",
                FormattedNonQubitArgs = "[False, True]",
                IsAdjoint             = false,
                IsControlled          = false,
                IsMeasurement         = false,
                IsComposite           = false,
                Children = null,
                Controls = new List <Qubit>()
                {
                },
                Targets = new List <Qubit>()
                {
                },
            };

            Assert.Equal(op.GetRuntimeMetadata(args), expected);
        }