---
# System prepended metadata

title: Untitled

---

1. Qubit (10 points)
   - Basic unit of quantum information, can exist in superposition of |0> and |1>
   - Represented by: α|0> + β|1>, where α and β are complex coefficients and |α|^2 + |β|^2 = 1
       - α and β determine the probability amplitudes of the qubit being in |0> or |1> state when measured
       - The probabilities of measuring |0> and |1> are given by |α|^2 and |β|^2, respectively
   - Bloch sphere: geometric representation of a qubit
       - Qubit states are represented as points on the surface of the sphere
       - Pure states are on the surface, while mixed states are inside the sphere
   - Single qubit gates:
       - Pauli-X: bit-flip gate, switches |0> to |1> and vice versa
       - Pauli-Y: combination of bit and phase flips
       - Pauli-Z: phase-flip gate, changes the phase of |1> state
       - Hadamard (H): creates superposition, maps |0> to (|0> + |1>)/√2 and |1> to (|0> - |1>)/√2
       - S: phase gate, adds a π/2 phase to |1> state
       - T: adds a π/4 phase to |1> state
   - No-cloning theorem: qubits cannot be perfectly copied without disturbing the original state

2. Superposition (10 points)
   - Quantum states existing in a linear combination of basis states, allowing qubits to represent multiple possibilities simultaneously
   - Creation: apply Hadamard (H) gate to a qubit, transforming it into a superposition of |0> and |1>
       - H|0> = (|0> + |1>)/√2
       - H|1> = (|0> - |1>)/√2
   - Quantum register: representation of multi-qubit states
       - For 1 qubit: |ψ> = α|0> + β|1>
       - For 2 qubits: |ψ> = α|00> + β|01> + γ|10> + δ|11>
       - For 3 qubits: |ψ> = α|000> + β|001> + γ|010> + δ|011> + ε|100> + ζ|101> + η|110> + θ|111>
       - Generalizes for more qubits
   - Measurement: upon measuring a qubit in superposition, it collapses to either |0> or |1> based on their probabilities, and all other information is lost
   - Beam splitter (BS): an optical device that splits light into two beams, used to create superposition in photon-based qubits
       - BS can be described by a unitary matrix that transforms input states into output states
       - BS output: If |0> (vertically polarized) or |1> (horizontally polarized) is applied, the output is a superposition of both states
3. Entanglement (10 points)
   - Strong correlation between two or more quantum particles, such that the state of one is dependent on the state of the other
   - Entangled states: cannot be factored into separate states for each particle
       - Example: Bell states are maximally entangled two-qubit states
           - |Φ+> = (|00> + |11>)/√2
           - |Φ−> = (|00> - |11>)/√2
           - |Ψ+> = (|01> + |10>)/√2
           - |Ψ−> = (|01> - |10>)/√2
   - Circuit: entanglement can be created using a combination of the Hadamard (H) gate and the CNOT (Controlled-NOT) gate
       - Apply H gate to the first qubit
       - Apply CNOT gate with the first qubit as control and the second qubit as target
       - Resulting state: (|00> + |11>)/√2 (Bell state |Φ+>)
   - Measuring one entangled qubit instantly determines the state of the other, regardless of the distance between them (non-locality)
       - This phenomenon is known as "quantum correlation" or "spooky action at a distance"

4. Quantum Security (20 points)
   - Involves securing information using quantum properties, leveraging inherent unpredictability and no-cloning theorem
   - Quantum Key Distribution (QKD): secure key exchange using quantum mechanics, ensuring eavesdropping detection
       - QKD relies on the fact that any attempt to measure a quantum state disturbs it, revealing an eavesdropper's presence
   - BB84 protocol: QKD using rectilinear (0° or 90°) and diagonal (45° or 135°) filters
        1. Alice generates a random sequence of bits and a random sequence of bases (rectilinear or diagonal)
        2. Alice encodes each bit using the chosen base (e.g., 0 in rectilinear is |0>, 0 in diagonal is |+>)
        3. Alice sends the encoded qubits to Bob over a quantum channel
        4. Bob measures each qubit using a random base (rectilinear or diagonal)
        5. Alice and Bob communicate over a classical channel to compare bases without revealing the actual bit values
        6. They discard any measurements made with mismatched bases and keep the remaining matching measurements to generate a secret key
   - Other QKD protocols: B92, E91, SARG04, etc.
   - Post-processing steps in QKD:
       - Sifting: Alice and Bob keep only the bits where they used matching bases
       - Error estimation: estimate the error rate in the sifted key to detect eavesdropping
       - Error correction: apply classical error correction techniques to correct errors in the sifted key
       - Privacy amplification: reduce the amount of information an eavesdropper may have gained by applying a hash function to the corrected key
5. Teleportation/Super Dense Coding (30 points)
   - Quantum Teleportation: transferring quantum information from one qubit to another without physically moving the qubit
        1. Alice and Bob share an entangled pair of qubits (Bell state)
        2. Alice performs a Bell measurement on her qubit and the qubit to be teleported
        3. Alice sends the classical result of her Bell measurement to Bob over a classical channel
        4. Based on Alice's measurement result, Bob applies appropriate gates (X, Z, or both) to his qubit
        5. The state of the teleported qubit is now in Bob's qubit, with the original qubit collapsing due to the measurement
   - Super Dense Coding Protocol:

        1. **Preparation**: Alice and Bob share a pair of entangled qubits, typically in one of the Bell states (e.g., |Φ+> = (|00> + |11>)/√2)
        2. **Encoding**: Alice wants to send Bob a 2-bit message (00, 01, 10, or 11). Depending on the message, Alice applies the appropriate gate to her qubit:
           - For 00: Do nothing (apply the identity gate)
           - For 01: Apply the Pauli-X gate
           - For 10: Apply the Pauli-Z gate
           - For 11: Apply both Pauli-X and Pauli-Z gates (or the Pauli-Y gate)
        3. **Transmission**: Alice sends her qubit to Bob over a quantum channel
        4. **Decoding**: Bob performs a Bell measurement on both qubits, obtaining one of the four Bell states:
           - |Φ+>: Message is 00
           - |Φ−>: Message is 10
           - |Ψ+>: Message is 01
           - |Ψ−>: Message is 11

        Note that after the encoding and transmission steps, the entangled state of the qubits depends on the message sent. By measuring the state, Bob can determine the original 2-bit message from Alice.

6. Quantum Internet Protocol Stack (10 points)
   - A stack of layers that manage different aspects of quantum communication, similar to classical networking
        - Application: End-user applications and services that use quantum communication, e.g., secure key exchange, distributed computing
        - Network: Handles routing, addressing, and error correction for quantum communication, responsible for establishing and managing entanglement connections
        - Link: Manages the transmission of qubits between nodes, including error correction and entanglement swapping
        - Physical: Deals with the hardware and infrastructure required for quantum communication, such as quantum memory, quantum processors, and detectors

7. Repeater Swapping (10 points)
   - Quantum repeaters: devices that extend the range of quantum communication by storing and retransmitting qubits, overcoming losses and decoherence
   - Repeater swapping: a technique to create long-range entanglement by combining the entanglement of multiple shorter-range pairs
        1. Two entangled pairs are created, each with one qubit at the repeater station
        2. A Bell measurement is performed on the two qubits at the repeater station
        3. The measurement result is used to apply specific gates to the remaining qubits, creating long-range entanglement
   - Network layer: handles routing and addressing of quantum communication, managing entanglement swapping to establish long-distance connections



### Gates
1. Pauli-X Gate (X)
   - Bit-flip gate, similar to classical NOT gate
   - Maps |0> to |1> and |1> to |0>
   - Matrix representation: 
     [[0, 1],
      [1, 0]]

2. Pauli-Y Gate (Y)
   - Combination of bit-flip and phase-flip gates
   - Maps |0> to i|1> and |1> to -i|0>
   - Matrix representation:
     [[0, -i],
      [i,  0]]

3. Pauli-Z Gate (Z)
   - Phase-flip gate
   - Maps |0> to |0> and |1> to -|1>
   - Matrix representation:
     [[1,  0],
      [0, -1]]

4. Hadamard Gate (H)
   - Creates superposition, and is its own inverse
   - Maps |0> to (|0> + |1>)/√2 and |1> to (|0> - |1>)/√2
   - Matrix representation:
     [[1/√2,  1/√2],
      [1/√2, -1/√2]]
5. CNOT Gate (Controlled-NOT)
   - Two-qubit gate that applies an X gate to the target qubit if the control qubit is |1>
   - Matrix representation (control in first qubit, target in second qubit):
     [[1, 0, 0, 0],
      [0, 1, 0, 0],
      [0, 0, 0, 1],
      [0, 0, 1, 0]]
      
