SUBCORE

Quantum Entanglement and Superdense Coding in Quantum Computing

Quantum computing, a realm where classical logic often takes a backseat, is often seen as a challenge to comprehend. Yet, by using the B.S. (Before Singularity) and A.S.S. (After Singularity/Superposition) framework, we can scaffold our understanding from classical concepts to quantum ones. Today, we will discuss a fascinating phenomenon – Quantum Entanglement and an application of it – Superdense Coding.

**B.S. (Before Singularity)**

In classical computing or B.S., information is stored in bits which can take a value of either 0 or 1. The state of each bit is independent of the others, meaning changing the state of one bit does not affect the others.

**A.S.S. (After Singularity/Superposition)**

The A.S.S. realm, however, is quite a departure from B.S. In quantum computing, we deal with quantum bits or qubits. A qubit can exist in a superposition of states – being both 0 and 1 at the same time with certain probabilities. Furthermore, qubits can be entangled – a phenomenon where the state of one qubit becomes instantly connected to the state of another, regardless of the distance between them.

**Quantum Entanglement**

In quantum entanglement, two qubits are in a superposition state together. When measured, they will always be found in opposite states. If qubit A is measured and found to be in state 0, then qubit B will automatically be in state 1, and vice versa.

Here is a simple code implementation in Qiskit (a Python library for quantum computing):

python
from qiskit import QuantumCircuit, assemble, Aer, execute
from qiskit.visualization import plot_bloch_multivector, plot_histogram

# Create a quantum circuit with 2 qubits
qc = QuantumCircuit(2)

# Apply a Hadamard gate to the first qubit to put it in superposition
qc.h(0)

# Apply a controlled-not gate
qc.cx(0, 1)

# Visualize the circuit
print(qc)

**Superdense Coding**

Superdense coding is a protocol that allows the transmission of two classical bits of information, by sending only one qubit from an entangled pair. This concept is a direct consequence of quantum entanglement.

Let’s consider an example where Alice wants to send a two-bit message to Bob. They share an entangled pair of qubits. Alice applies a specific quantum gate to her qubit based on her message, then sends her qubit to Bob. Bob applies a controlled-not gate followed by a Hadamard gate and measures both qubits to read the message.

Here’s a code snippet implementing superdense coding:

python
def superdense_coding(message):
    qc = QuantumCircuit(2)

    # Prepare the Bell pair
    qc.h(0)
    qc.cx(0, 1)

    # Alice prepares her qubit based on the message
    if message == '00':
        pass  
    elif message == '10':
        qc.z(0)
    elif message == '01':
        qc.x(0)
    elif message == '11':
        qc.z(0)
        qc.x(0)

    # Alice sends her qubit to Bob, who applies a cnot gate and a Hadamard gate
    qc.cx(0,1)
    qc.h(0)

    # Bob measures the qubits
    qc.measure_all()

    return qc

In conclusion, quantum computing widens the horizons of classical computing by introducing phenomena such as superposition and entanglement. The B.S./A.S.S. framework allows us to build connections between classical and quantum concepts, making the journey into quantum computing a bit less daunting.