/// <summary> /// Adds the given swap to the physical circuit, according to /// the architecture. And adjusts the mapping accordingly. /// </summary> /// <param name="q1"> The first qubit in the swap. </param> /// <param name="q2"> The second qubit in the swap. </param> protected void AddSwapToCircuit(int q1, int q2) { Swap swap = new Swap(q1, q2); Architecture.AddSwapGates(PhysicalCircuit, swap); Mapping.Swap(q1, q2); }