# Walkthrough ‐ Hybrid.A: Superdense? - awslabs/the-qubit-factory GitHub Wiki

### Learning Objectives

• The player is challenged to encode two bits of data into a single qubit, and then to retrieve one of these bits.
• This level addresses a common beginner misconception: given that bits have two states and thar qubits have (infinitely) many states, it should be possible to store multiple bits of data in a single qubit, right?

### Solution

1. A pair of flip gates is used, oriented +45° and -45°, to encode the pair of bits into a single qubit in the following manner:
• (0, 0; ↑)
• (0, 1; →)
• (1, 1; ↓)
• (1, 0; ←)
1. The qubit is then measured at +45° to extract the first bit or at -45° to extract the second bit.

Level File (copy then paste into Qubit Factory)

``````{"name":"H.A: Superdense?","tag":"preDenseB","version":"v1.1.2","tiles":[55,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,55,21,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,21,21,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,21,21,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,21,21,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,21,23,22,22,22,40,84,-1,-1,-1,-1,-1,-1,-1,-1,24,22,22,22,91,-1,-1,74,68,68,2,2,2,2,64,2,2,2,2,60,5,-1,-1,-1,-1,24,22,42,84,-1,-1,-1,-1,-1,-1,-1,-1,24,42,84,-1,-1,-1,24,26,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,21,-1,-1,-1,-1,-1,21,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,21,-1,-1,-1,-1,-1,21,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,21,-1,-1,-1,-1,-1,21,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,21,-1,-1,-1,-1,-1,21,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,21,-1,-1,-1,-1,-1,57,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,23,22,22,22,22,56],"gates":[0,0,"cCreate","free",1,0,0,1,394],[0,13,"cCreate","free",3,1,0,1,394],[18,5,"compare","free",0,0.785398163397,0,2,-1],[18,0,"cCreate","free",1,3,0,2,394],[9,6,"qCombine","free",0,0,0,2,400],[18,13,"cCreate","free",2,2,0,1,394],[14,6,"measure","free",0,0.785398163397,0,0,-1],[14,6,"measure","free",0,5.497787143782,1,0,-1],[14,7,"switch","free",2,1,0,1,-1],[15,7,"trash","free",0,0.785398163397,0,0,-1],[4,5,"switch","free",0,1,0,1,-1],[5,5,"trash","free",0,0.785398163397,0,0,-1],[3,7,"switch","free",2,1,0,1,-1],[3,6,"qFlip","free",0,1.570796326795,0,1,-1],[3,6,"qFlip","free",0,0.785398163397,1,0,-1],[4,6,"qFlip","free",0,0.785398163397,0,1,-1],[4,6,"qFlip","free",0,5.497787143782,1,0,-1],[4,7,"trash","free",0,0.785398163397,0,0,-1],[2,6,"qCreate","free",0,0,0,0,-1](/awslabs/the-qubit-factory/wiki/0,0,"cCreate","free",1,0,0,1,394],[0,13,"cCreate","free",3,1,0,1,394],[18,5,"compare","free",0,0.785398163397,0,2,-1],[18,0,"cCreate","free",1,3,0,2,394],[9,6,"qCombine","free",0,0,0,2,400],[18,13,"cCreate","free",2,2,0,1,394],[14,6,"measure","free",0,0.785398163397,0,0,-1],[14,6,"measure","free",0,5.497787143782,1,0,-1],[14,7,"switch","free",2,1,0,1,-1],[15,7,"trash","free",0,0.785398163397,0,0,-1],[4,5,"switch","free",0,1,0,1,-1],[5,5,"trash","free",0,0.785398163397,0,0,-1],[3,7,"switch","free",2,1,0,1,-1],[3,6,"qFlip","free",0,1.570796326795,0,1,-1],[3,6,"qFlip","free",0,0.785398163397,1,0,-1],[4,6,"qFlip","free",0,0.785398163397,0,1,-1],[4,6,"qFlip","free",0,5.497787143782,1,0,-1],[4,7,"trash","free",0,0.785398163397,0,0,-1],[2,6,"qCreate","free",0,0,0,0,-1)}
``````