In the previous post, the Quantum Bellagio Haadamard gates created a mega qubit of 16 multipart qubits. As a result, it setup all possible combinations of k, k‾ ,m and m‾ . Following this, the rest of part 1 of the circuit programs the problem constraints and then tags the solutions.
Changes to Mega Qubit
C/F | |^^^^^^^>+|^^^v^^^>+|^^v^^^^>+|^^vv^^^>+|^v^^^^^>+|^v^v^^^>+|^vv^^^^>+|^vvv^^^>+ |v^^^^^^>+|v^^v^^^>+|v^v^^^^>+|v^vv^^^>+|vv^^^^^> +|vv^v^^^>+|vvv^^^>+|vvvv^^^> |
cnot 0,1 | |^^^^^^^>+|^^^v^^^>+|^^v^^^^>+|^^vv^^^>+|^v^^^^^>+|^v^v^^^>+|^vv^^^^>+|^vvv^^^>+ |vv^^^^^>+|vv^v^^^^>+|vvv^^^^>+|vvvv^^^>+|v^^^^^^>+|v^^v^^^>+|v^v^^^^>+|v^vv^^^> |
X 1 | |^v^^^^^>+|^v^v^^^>+|^vv^^^^>+|^vvv^^^>+|^^^^^^^>+|^^^v^^^>+|^^v^^^^>+|^^vv^^^>+ |v^^^^^^>+|v^^v^^^^>+|v^v^^^^>+|v^vv^^^>+|vv^^^^^>+|vv^v^^^>+|vvv^^^^>+|vvvv^^^> |
The cnot and X gates cause the entanglement of q0 and q1. If q0 is true in a mega qubit part as it is a v, then q1 in the same part will remain the same after the cnot and x gate. If q0 is false as it is ^, then q1 will switch. i.e. v^ and vv stay the same after the two gates but ^^ becomes ^v and ^v becomes ^^. The overall state of Q0 and Q1 remains the same as there are 4 of each of the states |^^>, |^v>, |v^> and |vv> before and after the entanglement. | |
cnot 2,3 | |^v^^^^^>+|^v^v^^^>+|^vvv^^^>+|^vv^^^^>+|^^^^^^^>+|^^^v^^^>+|^^vv^^^>+|^^v^^^^>+ |v^^^^^^>+|v^^v^^^^>+|v^vv^^^>+|v^v^^^^>+|vv^^^^^>+|vv^v^^^>+|vvvv^^^>+|vvv^^^^> |
X 3 | |^v^v^^^>+|^v^^^^^>+|^vv^^^^^>+|^vvv^^^>+|^^^v^^^>+|^^^^^^^>+|^^v^^^^>+|^^vv^^^>+ |v^^v^^^>+|v^^^^^^^>+|v^v^^^^>+|v^vv^^^>+|vv^v^^^>+|vv^^^^^>+|vvv^^^^>+|vvvv^^^> |
The cnot and X gates cause the entanglement of q2 and q3. If q2 is true in a mega qubit part as it is a v, then q3 will remain the same after the cnot and x gate. If q2 is false as it is ^, then q1 will switch. i.e. v^ and vv stay the same after the two gates but ^^ becomes ^v and ^v becomes ^^. The overall state of Q2 and Q3 remains the same as there are 4 of each of the states |^^>, |^v>, |v^> and |vv> before and after the entanglement. | |
X 1,3,4 | |^^^^v^^>+|^^^vv^^>+|^^vvv^^>+|^^v^v^^>+|^v^^v^^>+|^v^vv^^>+|^vvvv^^>+|^vv^v^^>+ |vv^^v^^>+|vv^vv^^>+|vvvvv^^>+|vvv^v^^>+ |v^^^v^^>+|v^^vv^^>+|v^vvv^^>+|v^v^v^^> |
ccnot 1,3,4 | |^^^^v^^>+|^^^vv^^>+|^^vvv^^>+|^^v^v^^>+|^v^^v^^>+|^v^v^^^>+|^vvv^^^>+|^vv^v^^>+ |vv^^v^^>+|vv^v^^^>+|vvvv^^^>+|vvv^v^^>+ +|v^^^v^^>+|v^^vv^^>+|v^vvv^^>+|v^v^v^^> |
X 1,3 | |^v^vv^^>+|^v^^v^^>+|^vv^v^^>+|^vvvv^^>+|^^^vv^^>+|^^^^^^^>+|^^v^^^^>+|^^vvv^^>+ |v^^vv^^>+|v^^^^^^>+|v^v^^^^>+|v^vvv^^>+ +|vv^vv^^>+|vv^^v^^>+|vvv^v^^>+|vvvvv^^> |
The first X gate above sets q4 to jv true in all mega qubit parts and bit-flips the states of q1 and q3 in all mega qubit parts. If q1 and q2 are true, then q4 changes to false due to the ccnot. This means that q4 will change to false only if both q1 and q2 were false after before the X 1, 3, 4 gate. In other words, if either was true, then q4 gets set to true. This is an implementation of the Or gate. q4 = jv represents Kimmel at the Aladdin on Day 1 or Maher at Caesars on Day 1. Therefore the check for the k‾ v m‾ constraint is programmed in q4. The second X gate above reverses the bit-flips on q1 and q3. q4 in parts 1-5, 8, 9, 12-16 are now set to jv. Therefore at this stage of the circuit, these parts are still possible solutions. | |
X 0,2,5 | |vvvvvv^>+|vvv^vv^>+|vv^^vv^>+|vv^vvv^>+|v^vvvv^>+|v^v^^v^>+|v^^^^v^>+|v^^vvv^>+ |^^vvvvv^>+|^^v^^v^>+|^^^^^^v^>+|^^^vvv^>+ |^vvvvv^> +|^vv^vv^>+|^v^^vv^>+|^v^vvv^> |
ccnot 0,2,5 | |vvvvv^^>+|vvv^v^^>+|vv^^vv^>+|vv^vvv^>+|v^vvv^^>+|v^v^^^^>+|v^^^^v^>+|v^^vvv^>+ |^^vvvvv^>+|^^v^^v^>+|^^^^^^v^>+|^^^vvv^>+ |^vvvvv^> +|^vv^vv^>+|^v^^vv^>+|^v^vvv^> |
X 0,2 | |^v^vv^^>+|^v^^v^^>+|^vv^vv^>+|^vvvvv^>+|^^^vv^^>+|^^^^^^^>+|^^v^^v^>+|^^vvvv^>+ |v^^vvvv^>+|v^^^^v^>+|v^v^^^v^>+|v^vvvv^>+ |vv^vvv^> +|vv^^vv^>+|vvv^vv^>+|vvvvvv^> |
The first X gate above sets q5 to jv true in all mega qubit parts and bit-flips the states of q0 and q2 in all mega qubit parts . If q0 and q2 are true, then q5 changes to false due to the ccnot. This means that q5 will change to false only if both were false after before the X 0, 2, 5 gate. In other words, if either was true, then q5 gets set to true – the Or gate. q5 represents Kimmel at the Aladdin on Day 2 or Maher at Caesars on Day 2. Therefore the check for the second constraint, k v m. is programmed in q5. The second X gate above reverses the bit-flips on q0 and q2. q5 in parts 3, 4, 7-16 are now set to jv. Therefore at this stage of the circuit, these parts are still possible solutions. | |
ccnot 4,5,6 | |^v^vv^^>+|^v^^v^^>+|^vv^vvv>+|^vvvvvv>+|^^^vv^^>+|^^^^^^^>+|^^v^^v^>+|^^vvvvv>+ |v^^vvvvv>+|v^^^^v^>+|v^v^^^v^>+|v^vvvvv>+ |vv^vvvv> +|vv^^vvv>+|vvv^vvv>+|vvvvvvv> |
It is necessary to look at both q4 and q5 together to get the solution. q4 = jv represents k‾ v m‾ where Kimmel is at the Aladdin on Day 1 or Maher is at Caesars on Day 1. q5 represents k v m where Kimmel is at the Aladdin on Day 2 or Maher is at Caesars on Day 2. After the ccnot 4, 5, 6 gate, q6 now represents (k‾ v m‾) ∧ (k v m). This is the combined constraints of the problem. q6 is set to jv, true, in parts 3, 4, 8, 9, 12-16 which means that these seven parts are the possible solutions. Measuring the qubits of the quantum circuit at this stage would show the 16 possible combinations with the 7 possible solutions having jv in q6 . | |
Z 6 | |^v^vv^^>+|^v^^v^^>+|^vv^vv-v>+|^vvvvv-v>+|^^^vv^^>+|^^^^^^^>+|^^v^^v^>+|^^vvvv-v>+ |v^^vvvv-v>+|v^^^^v^>+|v^v^^^v^>+|v^vvvv-v>+ |vv^vvv-^>+ |vv^^vv-v>+|vvv^vv-v>+|vvvvvv-v> |
Finally, the Z gate applies to q6. This phase flips bit 6 in parts 3, 4, 8, 9, 12-16. Accordingly, this reflects the fact that the constraints have been met. |
Examples of the Quantum Bellagio Circuit Logic
The Haadamard gates set up the first 4 bits of part 1 of the mega qubit as ^^^^. This represents k, k‾, m and m‾ as false. Subsequently, the logic checks the constraints (k‾ ∨ m‾) ∧ (k ∨ m) and sets q4 to true and q5 to false. The last CCNOT gate checks to see if both q4 and q5 are true. q5 is false as this part of the mega qubit does not contain either k or m true. So, it is not a solution.
The Haadamard gates set up the first 4 bits of part 3 of the mega qubit qubit as ^^v^. This represents k, k‾ and m‾ as false and m as true. Subsequently, the logic checks the constraints (k‾ ∨ m‾) ∧ (k ∨ m) and sets q4 to true and q5 to true. The last CCNOT gate checks to see if both q4 and q5 are true. This part of the mega qubit meets the constraints (k‾ ∨ m‾) ∧ (k ∨ m). This is because k‾ and m are true.
The Haadamard gates set up the first 4 bits of part 11 of the mega qubit qubit as as v^v^. This represents k and m as true and k‾ and m‾ as false. Subsequently, the logic checks the constraints (k‾ ∨ m‾) ∧ (k ∨ m) and sets q4 to false and q5 to true. The last CCNOT gate checks to see if both q4 and q5 are true. q4 is false as this part of the mega qubit does not contain either k‾ or m‾ true. So, it is not a solution.
The Haadamard gates set up the first 4 bits of part 12 of the mega qubit qubit as v^vv. This represents k , m and m‾ as true and k‾ as false. Subsequently, the logic checks the constraints (k‾ ∨ m‾) ∧ (k ∨ m) and sets q4 to true and q5 to true. The last CCNOT gate checks to see if both q4 and q5 are true. This part of the mega qubit meets the constraints (k‾ ∨ m‾) ∧ (k ∨ m). This is because k and m‾ are true.
The Quantum Bellagio circuit identifies and flags the parts 3, 4, 8, 9, 12-16 as possible solutions. Consequently, the rest of the parts are not solutions.
Next: Bellagio Circuit Part 2
Previous: Bellagio Circuit Part 1