/// <summary>
        /// Transforme une porte du module SerializableClass en une porte de la librairie QCS afin de pouvoir l'utiliser
        /// </summary>
        public static QCS.Gate ToUsableGate(Gate gate)
        {
            Matrix <System.Numerics.Complex> usuableMatrix = ToUsableMatrix(gate.matrix);

            QCS.Gate gateUsable = new QCS.Gate(gate.name, gate.nbEntries, usuableMatrix);

            return(gateUsable);
        }
        /**
         * ######################################################################################################
         * ############################################## GATE ##################################################
         * ######################################################################################################
         */


        /// <summary>
        /// Transforme une porte de la libraire QCS en une porte du module SerializableClass, permettant ça serialisation
        /// </summary>
        public static Gate ToGateSerialisable(QCS.Gate gate)
        {
            Gate gateSerialisable = new Gate();

            gateSerialisable.name      = gate.Name;
            gateSerialisable.nbEntries = gate.NbEntries;
            gateSerialisable.matrix    = ToMatrixSerialisable(gate.Matrix);

            return(gateSerialisable);
        }
Example #3
0
 public PutGate(Editor context, QCS.Gate gate) : base(context)
 {
     _gate = gate;
 }