본문으로 건너뛰기

IQC 004

· 약 10분

Superdense Coding

  • counterintuitive protocol that allows us to send 2 bits of classical information by sending only 1 qubit, using pre-shared entanglement
  • it's often contextualized as a game with Alice and Bob.
  • Alice and Bob share and entangled pair of qubits
  • Pre-shared Entanglement (Shared Bell pair)
    • Φ+=12(00+11)|\Phi^+\rangle = \frac{1}{\sqrt{2}}(|00\rangle + |11\rangle)
  • Alice wants to send 2 bits of classical information (00, 01, 10, or 11) to Bob
    • For 00: Apply Identity II (do nothing)
    • For 01: Apply Pauli-X XX (bit flip)
    • For 10: Apply Pauli-Z ZZ (phase flip)
    • For 11: Apply XZXZ (bit and phase flip)
  • Alice sends her one qubit to Bob (Bob possesses both qubits of the entangled pair)
  • Bob decodes the information
    • Inverts the entanglement operation on the two qubits (CNOT followed by Hadamard)
    • Measures each of the qubits
    • The outcome of this measurement reveals the two bits Alice encoded.
  • Φ+|\Phi^+\rangle: is the most common and convenient form (Bell State) of entanglement and is also maximally entangled state despite single-qubit unitary gates.
    • Easy to build circuits for it
    • Symmetric and has nice properties that make it ideal for protocols like superdense coding and teleportation
    • Other Bell states can be generated from Φ+|\Phi^+\rangle by applying single-qubit gates.

Superdense Coding Circuit

Superdense Coding Circuit

  • Alice's message mnmn, where each of mm and nn is a bit (0 or 1)
  • Alice's operation can be represented as ZmXnIΦ+Z^m X^n \otimes \mathbb{I} | \Phi^+\rangle
    • m=0Z0=Im=0 \Rightarrow Z^0 = I (no phase flip)
    • m=1Z1=Zm=1 \Rightarrow Z^1 = Z (phase flip)
    • n=0X0=In=0 \Rightarrow X^0 = I (no bit flip
    • n=1X1=Xn=1 \Rightarrow X^1 = X (bit flip)
    • 00I00 \rightarrow I
    • 01X01 \rightarrow X
    • 10Z10 \rightarrow Z
    • 11ZX11 \rightarrow ZX
  • Zmb=(1)mbbZ^m|b\rangle = (-1)^{mb}|b\rangle (phase flip)
  • Xna=anX^n|a\rangle = |a \oplus n\rangle (xor operation)

Xn(12(00+11))=12(n0+(1n)1)X^n \left(\frac{1}{\sqrt{2}} (|00\rangle + |11\rangle)\right) = \frac{1}{\sqrt{2}} \left( |n0\rangle + |(1\oplus n)1\rangle \right)

  • n=0n=0: 12(00+11)=Φ+\frac{1}{\sqrt{2}} (|00\rangle + |11\rangle) = |\Phi^+\rangle
  • n=1n=1: 12(10+01)\frac{1}{\sqrt{2}} (|10\rangle + |01\rangle)

ZmXn(12(00+11))=12((1)mnn0+(1)m(1n)(1n)1)Z^m X^n \left(\frac{1}{\sqrt{2}} (|00\rangle + |11\rangle)\right) = \frac{1}{\sqrt{2}} \left( (-1)^{mn}|n0\rangle + (-1)^{m(1\oplus n)}|(1\oplus n)1\rangle \right)

  • n0|n0\rangle: first qubit is nn, (1)mn(-1)^{mn} is the phase factor
  • (1n)1|(1\oplus n)1\rangle: first qubit is 1n1\oplus n, (1)m(1n)(-1)^{m(1\oplus n)} is the phase factor
  • Bob's decoding operation is the inverse of the entanglement operation
    • CNOTab=aabCNOT |a\rangle |b\rangle = |a\rangle |a \oplus b\rangle
CNOTZmXn(12(00+11))=(1)mn2(nn+(1)m(1n)n)=(1)mn2(n+(1)m1n)n\begin{aligned} CNOT\, Z^m X^n \left(\frac{1}{\sqrt{2}} (|00\rangle + |11\rangle)\right) &= \frac{(-1)^{mn}}{\sqrt{2}} \left(|nn\rangle + (-1)^m|(1 \oplus n)n\rangle\right) \\ &= \frac{(-1)^{mn}}{\sqrt{2}} \left(|n\rangle + (-1)^m|1 \oplus n\rangle\right)|n\rangle \end{aligned}
  • which is seperable state.
  • First qubit is n+(1)m1n|n\rangle + (-1)^m|1 \oplus n\rangle and second qubit is n|n\rangle.
  • n,m{0,1}n, m \in \{0, 1\}, then apply Hadamard to the first qubit:
H12(n+(1)m1n)=(1)mnmH\, \frac{1}{\sqrt{2}} \left(|n\rangle + (-1)^m|1 \oplus n\rangle\right) = (-1)^{mn}|m\rangle
  • second qubit is n|n\rangle, so the final state is:

(1)mn(1)nmmn=mn(-1)^{mn}(-1)^{nm}|m\rangle|n\rangle = |mn\rangle

Superdense QASM

OPENQASM 2.0;
qreg q[2];
creg c[2];

// Prepare Bell pair
h q[0];
cx q[0],q[1];

// Alice's encoding
// For message 11: apply X and Z
x q[0];
z q[0];

// Alice sends q[0] to Bob (in simulation, we just proceed)

// Bob's decoding
cx q[0],q[1];
h q[0];

// Measure both qubits
measure q[0] -> c[0];
measure q[1] -> c[1];

QASM Programming

Custom Gates

// params: parameters for the gate (e.g., rotation angles)
// q_args: quantum arguments (qubits the gate acts on)
gate NAME(parameters) q_args {
// Define gate operations
}

gate bell a,b {
h a;
cx a,b;
}

qreg q[2];
creg c[2];

// Use the custom bell gate
bell q[0], q[1];

// Measure the qubits
measure q[0] -> c[0];
measure q[1] -> c[1];

Toffoli Gate

// Toffoli gate (CCX)
gate ccx a, b, c {
h c;
cx b, c;
tdg c;
cx a, c;
t c;
cx b, c;
tdg c;
cx a, c;
t b;
t c;
cx a, b;
h c;
t a;
tdg b;
cx a, b;
}

Rotation Gates

// Rotation around Y-axis
gate ry_deg(theta) q {
ry(theta/180 * pi) q;
}

// Rotation around X-axis
gate rx_deg(theta) q {
rx(theta/180 * pi) q;
}

Qiskit

IBM

import qiskit

superdense = qiskit.QuantumCircuit(2, 2)
superdense.draw()

superdense.h(0)
superdense.cx(0, 1)
superdense.draw()

superdense qiskit

# Alice's encoding for message '11'
superdense.x(0)
superdense.z(0)
superdense.draw()

superdense qiskit 11

# Bob unentangles the two qubits (reverses the entangling gate)
superdense.cx(0,1)
superdense.h(0)

# The measurement pattern is `measure(qubit to measure, classical bit to store result)`
superdense.measure(0,0)
superdense.measure(1,1)
superdense.draw()

superdense qiskit measure

from qiskit.providers.basic_provider import BasicSimulator

sim = BasicSimulator()
# run the circuit on the simulator with 1 shot (execute the circuit once)
result = sim.run(superdense, shots=1).result().get_counts()

print(result)
# {'11': 1}

Custom Gates in Qiskit

bell = qiskit.QuantumCircuit(2, name='bell')
bell.h(0)
bell.cx(0, 1)
bell_gate = bell.to_gate()

c = qiskit.QuantumCircuit(2)
c.append(bell_gate, [0, 1])
c.draw()

Decompose a custom gate

ccxgate = qiskit.circuit.library.CCXGate()
ccx = qiskit.QuantumCircuit(3)
ccx.append(ccxgate, [0, 1, 2])

print(ccx)
print(ccx.decompose())

ccx

Cirq

Google

import cirq

alice = cirq.NamedQubit('Alice')
bob = cirq.NamedQubit('Bob')

superdense = cirq.Circuit()
superdense.append([
cirq.H(alice),
cirq.CNOT(alice, bob),
])

superdense.append([
cirq.X(alice),
cirq.Z(alice),
])

superdense.append([
cirq.CNOT(alice, bob),
cirq.H(alice),
])

superdense.append(cirq.measure(alice, bob, key='received'))

print(superdense)
simulator = cirq.Simulator()
result = simulator.run(superdense, repetitions=1)
print(result)
# received=1, 1

Pennylane

Xanadu

import pennylane as qml

def entangle():
qml.Hadamard(wires=0)
qml.CNOT(wires=[0, 1])

print(qml.draw(entangle)())

device = qml.device("default.qubit", wires=[0, 1])

# Wrap the quantum function as a QNode
entangle_qnode = qml.QNode(my_circuit, device)

# Set the number of shots to 10
entangle_qnode = qml.set_shots(entangle_qnode, shots=10)
import numpy as np

state = np.array([1, 1j], dtype=complex)

state = state / np.linalg.norm(state)
def teleport(state):
# Ensure "state" is loaded into the first qubit
# (otherwise qubits would start in |0>)
qml.StatePrep(state, wires=0)

# Shared entanglement between qubits 1 and 2
qml.Hadamard(wires=1)
qml.CNOT(wires=[1, 2])

# Alice's operation:
# CNOT from Alice's input qubit to her half of the Bell pair,
# then Hadamard on the input qubit
qml.CNOT(wires=[0, 1])
qml.Hadamard(wires=0)

# Measurement (store the classical outcomes)
m0 = qml.measure(0)
m1 = qml.measure(1)

# Bob's conditional correction operations
qml.cond(m1, qml.PauliX)(wires=2)
qml.cond(m0, qml.PauliZ)(wires=2)

# Return Bob's qubit as a density matrix
return qml.density_matrix(wires=2)

print(qml.draw(teleport)(state))

Quantum Teleportation

Quantum Teleportation

-Superdense CodingTeleportation
ConsumesEntanglementEntanglement
Sends1 qubit2 bits
Transmits2 bits1 qubit
  • if there is entanglement:
    • we can use it to send 2 bits of classical information by sending 1 qubit (superdense coding)
    • we can use it to send 1 qubit of quantum information by sending 2 bits of classical information (teleportation)
  • Alice wants to send a qubit ψ=α0+β1|\psi\rangle = \alpha|0\rangle + \beta|1\rangle to Bob, but only has a classical channel.

Protocol

  1. Alice and Bob share Φ+|\Phi^+\rangle (pre-shared entanglement)
  2. Alice applies CNOTCNOT (her qubit -> her Bell half), then HH, then measures both, obtaining 2 classical bits (00, 01, 10, or 11)
  3. Alice sends mnmn classically to Bob
  4. Bob applies XnZmX^n Z^m to his qubit, recovering ψ|\psi\rangle
  • For 00: Apply Identity II (do nothing)
  • For 01: Apply Pauli-X XX (bit flip)
  • For 10: Apply Pauli-Z ZZ (phase flip)
  • For 11: Apply XZXZ (bit and phase flip)
  • Bob now has a qubit in the state Alice wanted to send ψ|\psi\rangle without Alice ever sending a qubit directly to Bob.

Teleportation Circuit

Teleportation Circuit

ψΦ+=(α0+β1)12(00+11)|\psi\rangle \otimes |\Phi^+\rangle = \left(\alpha |0\rangle + \beta |1\rangle\right) \otimes \frac{1}{\sqrt{2}} \left(|00\rangle + |11\rangle\right)

ψΦ+=12(α000+α011+β100+β111)|\psi\rangle \otimes |\Phi^+\rangle = \frac{1}{\sqrt{2}} \left(\alpha |0\rangle |00\rangle + \alpha |0\rangle |11\rangle + \beta |1\rangle |00\rangle + \beta |1\rangle |11\rangle\right)

  • Alice applies a CNOTCNOT gate with her qubit ψ|\psi\rangle as control and her half of the Bell pair Φ+|\Phi^+\rangle as target.
    • β100\beta |1\rangle |00\rangle becomes β110\beta |1\rangle |10\rangle (target flips when control is 1)
    • β111\beta |1\rangle |11\rangle becomes β101\beta |1\rangle |01\rangle (target flips when control is 1)

12(α000+α011+β110+β101)\frac{1}{\sqrt{2}} \Big(\alpha |0\rangle |00\rangle + \alpha |0\rangle |11\rangle + \beta |1\rangle |10\rangle + \beta |1\rangle |01\rangle\Big)

  • Alice then applies a Hadamard gate to her qubit (ψ|\psi\rangle).
    • H0=0+12H|0\rangle = \frac{|0\rangle + |1\rangle}{\sqrt{2}}
    • H1=012H|1\rangle = \frac{|0\rangle - |1\rangle}{\sqrt{2}}
  • To prepare for measurement, Bell measurement is performed on Alice's two qubits, which can be expressed as:
12[α(0+12)00+α(0+12)11+β(012)10+β(012)01]=12[00(α0+β1)+01(α1+β0)+10(α0β1)+11(α1β0)]\begin{aligned} \frac{1}{\sqrt{2}} \Bigg[&\alpha \left(\frac{|0\rangle + |1\rangle}{\sqrt{2}}\right) \otimes |00\rangle + \alpha \left(\frac{|0\rangle + |1\rangle}{\sqrt{2}}\right) \otimes |11\rangle \\ &+ \beta \left(\frac{|0\rangle - |1\rangle}{\sqrt{2}}\right) \otimes |10\rangle + \beta \left(\frac{|0\rangle - |1\rangle}{\sqrt{2}}\right) \otimes |01\rangle \Bigg] \\ =\, &\frac{1}{2} \Big[ |00\rangle (\alpha |0\rangle + \beta |1\rangle) + |01\rangle (\alpha |1\rangle + \beta |0\rangle) \\ &+ |10\rangle (\alpha |0\rangle - \beta |1\rangle) + |11\rangle (\alpha |1\rangle - \beta |0\rangle) \Big] \end{aligned}
  • Alice measures her two qubits, resulting in one of four possible outcomes corresponding to the classical bits mn|mn\rangle where m,n{0,1}m, n \in \{0, 1\}
    • Alice's two qubits: 00,01,10,11|00\rangle, |0 1\rangle, |1 0\rangle, |1 1\rangle
    • Bob's qubit is in a state that depends on Alice's measurement outcome

XnZmψX^n Z^m |\psi\rangle

mnBob's stateBob applies
00α0+β1\alpha \lvert 0\rangle + \beta \lvert 1\rangleI\mathbb{I}
01α1+β0\alpha \lvert 1\rangle + \beta \lvert 0\rangleXX
10α0β1\alpha \lvert 0\rangle - \beta \lvert 1\rangleZZ
11α1β0\alpha \lvert 1\rangle - \beta \lvert 0\rangleXZXZ

Channels

  • Classical Channel: carries bits (fibre, radio, paper, ...)
  • Quantum Channel: carries qubits (can also carry bits)
    • Quantum channels can emulate classical ones, but not vice versa
  • Teleportation: classical channel + pre-shared entanglement -> effective quantum channel

Summary

  • In superdense coding, by sending only one qubit and using pre-shared entanglement, Alice can transmit two classical bits of information.
  • The operation Xna=a(nmod2)X^n \lvert a \rangle = \lvert a \oplus (n \bmod 2) \rangle correctly defines the effect of applying the XX gate nn times.
  • The tensor product of two identity operators is the identity operator on the composite space. In symbols, where the subscript is the dimension: I2I2=I4I_2 \otimes I_2 = I_4.
  • The state ϕ=12(0+1)\lvert \phi \rangle = \frac{1}{\sqrt{2}}(\lvert 0 \rangle + \lvert 1 \rangle) is an eigenstate of the Pauli-XX gate with eigenvalue +1+1.
  • In the teleportation protocol, the classical communication channel is used to transmit two classical bits from Alice to Bob.
  • Three qubits are required for quantum teleportation.
  • After the teleportation protocol completes, Bob has a qubit in the state ψ\lvert \psi \rangle.
  • Of QASM, Qiskit, Cirq, and PennyLane, PennyLane is the only quantum language that spells out the full name of the Hadamard gate for its built-in gates.

TIM 004

· 약 3분

Innovation Ecosystem

  • A network of organizations, people and resources that interact with each other to develop and support new ideas, technologies and businesses.
  • Innovation Ecosystem
    • Start-up companies
    • Medical Centers
    • Mature Companies
    • City, Regional and State Organizations
    • Providers of Support Services (Legal, Accounting, etc)
    • Venture Capital Funds
    • Colleges & universities

Type of Innovation Ecosystem

  • Corporate innovation ecosystem
  • Digital innovation ecosystem
  • City-based innovation ecosystem
  • High-tech SMEs centered ecosystem (Small and Medium-sized Enterprises)
  • University-based ecosystem
  • Incubators and Accelerators ecosystems
  • Regional and National innovation ecosystems
  • Social innovation ecosystems

The core -> New Innovation Initiatives -> Startup Ecosystem -> Customers

Roles and Activites across Innovation Ecosystem

  • Leadership:
    • Ecosystem leader
      • ecosystem governance: decipher roles, coordinate interactions, orchestrate resource flows
      • forging partnerships: attract & link partners, create collaboration, stimulate complementary
      • platform management: build platform, open platform, orchestrate compleentors
      • value management: decipher bases of value, create & capture value
    • Dominator: integrate actors
  • Direct Value Creation:
    • Supplier: supply components
    • Assembler: assemble components
    • Complementor: provide complementarities
    • User: define need, provide ideas, purchase & use
  • Value Support:
    • Expert: generte knowledge, provide expertise, transfer technology
    • Champion: build connections, provide access to markets
  • Entrepreneur Ecosystem:
    • Entrepreneur: co-locate, set-up network
    • Sponsor: give resources, co-develop offering, link to other actors
    • Regulator: provide favorable conditions

Systems Thinking

  • a holistic and non-linear approach to problem solving that focuses on the interactions and patterns within an entire system
  • emphasizes relationships and feedback loops instead of analysing individual parts in isolation

Fishbone Diagram

  • common categories to help think broadly about the possible causes include:
  • People: skils, training, communication, motivation
  • Process / Methods: procedures, or workflows
  • Machines / Techonology: tools, equipment, software
  • Materials: resources or inputs used
  • Environment: workplace or external conditions
  • Mangement / Policies: decisions, rules, or leadership

Innovation Networks

  • connected systems of people working together toward shared objectives, often through internal teams and external partners such as suppliers, universities, accelerators, customers, and startups.
  • is also part of innovation ecosystem

Types of Innovation Networks

  • Enterpreneur-based
  • Internal project teams
  • Internal enterpreneur networks
  • Communities of practice: can involve players inside and across different organizations
  • Spatial clusters: like Silicon Valley, Boston, etc
  • Sectoral networks: bring different players together because they share a common sector
  • New product or process develoment consortium
  • New technology development consortium
  • Emerging standards: Exploring and estabilishing standards around innovative technologies
  • Supply chain learning
  • Learning networks
  • Recombinant innovation networks: Cross-sectoral groupings that alloow for networking across boundaries and the transfer of ieads.
  • Managed open innovation networks
  • User networks
  • Innovation markets
  • Crowdfunding and new resource approaches

Stakeholder Analysis

  • High power, highly interested people (Engage Closely)
  • High power, less interested people (Keep Satisfied)
  • Low power, Highly interested people (Keep Informed)
  • Low power, less interested people (Monitor)

IQC 003

· 약 12분

Tensor Products

Kronecker product

  • a way to multiply vectors and matrices to generate bigger vectors and matrices

ψϕ=(ψ0ψ1)(ϕ0ϕ1)=(ψ0(ϕ0ϕ1)ψ1(ϕ0ϕ1))=(ψ0ϕ0ψ0ϕ1ψ1ϕ0ψ1ϕ1)|\psi\rangle \otimes |\phi\rangle = \begin{pmatrix} \psi_0 \\ \psi_1 \end{pmatrix} \otimes \begin{pmatrix} \phi_0 \\ \phi_1 \end{pmatrix} = \begin{pmatrix} \psi_0 \begin{pmatrix} \phi_0 \\ \phi_1 \end{pmatrix} \\ \\ \psi_1 \begin{pmatrix} \phi_0 \\ \phi_1 \end{pmatrix} \end{pmatrix} = \begin{pmatrix} \psi_0 \phi_0 \\ \psi_0 \phi_1 \\ \psi_1 \phi_0 \\ \psi_1 \phi_1 \end{pmatrix}

ψϕψϕψϕ|\psi\rangle \otimes |\phi\rangle \equiv |\psi\rangle |\phi\rangle \equiv|\psi\phi\rangle

Tensor product of Matrices

AB=(a00Ba01Ba10Ba11B)A \otimes B = \begin{pmatrix} a_{00}B & a_{01}B \\ a_{10}B & a_{11}B \end{pmatrix}

  • The tensor product 0110|0\rangle \langle1| \otimes |1\rangle \langle0| is:

0110=(0100)(0010) |0\rangle \langle 1| \otimes |1\rangle \langle 0| = \begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix} \otimes \begin{pmatrix} 0 & 0 \\ 1 & 0 \end{pmatrix}

0110=(0(0010)1(0010)0(0010)0(0010))=(0000001000000000)|0\rangle \langle 1| \otimes |1\rangle \langle 0| = \begin{pmatrix} 0 \cdot \begin{pmatrix} 0 & 0 \\ 1 & 0 \end{pmatrix} & 1 \cdot \begin{pmatrix} 0 & 0 \\ 1 & 0 \end{pmatrix} \\ 0 \cdot \begin{pmatrix} 0 & 0 \\ 1 & 0 \end{pmatrix} & 0 \cdot \begin{pmatrix} 0 & 0 \\ 1 & 0 \end{pmatrix} \end{pmatrix} = \begin{pmatrix} 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \end{pmatrix}

  • To short hand this, we can write:

011001100110|0\rangle \langle 1| \otimes |1\rangle \langle 0| \equiv |0\rangle|1\rangle \langle 1| \langle 0| \equiv |01\rangle \langle 10|

  • (ab)(cd)=(ac)(bd)=acbd(|a\rangle \langle b|) \otimes (|c\rangle \langle d|) = (|a\rangle |c\rangle)(\langle b| \langle d|) = |ac\rangle \langle bd|

Bases

  • The basis for a single qubit is {0,1}\{|0\rangle, |1\rangle\}
  • It is given by taking the tensor product of the basis for each qubit:
    • {00,01,10,11}\{|0\rangle \otimes |0\rangle, |0\rangle \otimes |1\rangle, |1\rangle \otimes |0\rangle, |1\rangle \otimes |1\rangle\}
    • For short hand, we write {00,01,10,11}\{|00\rangle, |01\rangle, |10\rangle, |11\rangle\}
  • The computational basis for two qubits is {00,01,10,11}\{|00\rangle, |01\rangle, |10\rangle, |11\rangle\}
  • For three qubits {000,001,010,011,100,101,110,111}\{|000\rangle, |001\rangle, |010\rangle, |011\rangle, |100\rangle, |101\rangle, |110\rangle, |111\rangle\}

Matrices

{00,  01,  10,  11}\{|0\rangle\langle0|,\; |0\rangle\langle1|,\; |1\rangle\langle0|,\; |1\rangle\langle1|\}

  • forms a basis for the space of 2×22 \times 2 matrices
  • operator basis: a set of matrices that can be used to express any matrix as a linear combination of the basis matrices

(abcd)=a00+b01+c10+d11\begin{pmatrix} a & b \\ c & d \end{pmatrix} = a |0\rangle\langle0| + b |0\rangle\langle1| + c |1\rangle\langle0| + d |1\rangle\langle1|

  • One of the basis elements is: 0000=0000|0\rangle\langle0| \otimes |0\rangle\langle0| = |00\rangle\langle00|
  • Similarly 0001=0001|0\rangle\langle0| \otimes |0\rangle\langle1| = |00\rangle\langle01|
  • In total, the tensor products yields 4×4=164 \times 4 = 16 basis elements for the space of 4×44 \times 4 matrices: {0000,  0001,  0010,  0011,  0100,  0101,  ,  1111}.\{|00\rangle\langle00|,\; |00\rangle\langle01|,\; |00\rangle\langle10|,\; |00\rangle\langle11|,\; |01\rangle\langle00|,\; |01\rangle\langle01|,\; \ldots,\; |11\rangle\langle11|\}.

The Golden Rule of Tensor Products

What starts on the left of the tensor product says on the left

(AB)(ψϕ)=(Aψ)(Bϕ)(A \otimes B)(|\psi\rangle \otimes |\phi\rangle) = (A|\psi\rangle) \otimes (B|\phi\rangle)

(0011)(00)=(0011)(00)=(000)(110)=00=0(|0\rangle\langle0| \otimes |1\rangle\langle1|)(|00\rangle) \\ = (|0\rangle\langle 0| \otimes |1\rangle\langle1|)(|0\rangle \otimes |0\rangle) \\ \\ = (|0\rangle\langle0||0\rangle) \otimes (|1\rangle\langle1||0\rangle) \\ = |0\rangle \otimes 0 \\ = 0

  • ψϕψϕψϕ |\psi\rangle \otimes |\phi\rangle \equiv |\psi\rangle|\phi\rangle \equiv |\psi\phi\rangle
  • (ψϕ)=ψϕ(|\psi\rangle \otimes |\phi\rangle)^\dagger = \langle\psi| \otimes \langle\phi|
  • (αψ+βϕ)ω=αψω+βϕω(\alpha|\psi\rangle + \beta|\phi\rangle) \otimes |\omega\rangle = \alpha|\psi\rangle \otimes |\omega\rangle + \beta|\phi\rangle \otimes |\omega\rangle
  • ((ψϕ)(ωη))=ψωϕη((\langle\psi| \otimes \langle\phi|)(|\omega\rangle \otimes |\eta\rangle)) = \langle\psi|\omega\rangle \langle\phi|\eta\rangle
  • (A+B)C=AC+BC(A + B) \otimes C = A \otimes C + B \otimes C
  • A(B+C)=AB+ACA \otimes (B + C) = A \otimes B + A \otimes C
  • (AB)(CD)=ACBD(A \otimes B)(C \otimes D) = AC \otimes BD
  • (AB)=AB(A \otimes B)^\dagger = A^\dagger \otimes B^\dagger

Entanglement

  • Single-qubit state is a two dimensional vector: ψ=α0+β1|\psi\rangle = \alpha|0\rangle + \beta|1\rangle
  • where α\alpha and β\beta are complex numbers such that ψ2=α2+β2=1\||\psi\rangle\|^2 = |\alpha|^2 + |\beta|^2 = 1
  • Two qubits ψ1\psi_1\rangle and ψ2\psi_2\rangle can be combined to form a four-dimensional vector: ψ12=ψ1ψ2ψ1ψ2ψ1ψ2 |\psi_{12}\rangle = |\psi_1\rangle \otimes |\psi_2\rangle \equiv |\psi_1\rangle|\psi_2\rangle \equiv |\psi_1\psi_2\rangle
  • Separable States: can be written as a tensor product of single-qubit states
    • Ψ=α0000+α0101+α1010+α1111=ψ1ψ2|\Psi\rangle = \alpha_{00} |00\rangle + \alpha_{01} |01\rangle + \alpha_{10} |10\rangle + \alpha_{11} |11\rangle \\ = |\psi_1\rangle| \otimes \psi_2\rangle
  • if the state is not separable, it is called entangled.
    • entangled: 12(00+11)\frac{1}{\sqrt{2}}(|00\rangle + |11\rangle)
  • if ad=0ad = 0 and bc=0bc = 0, then acac or bdbd must also vanish.
    • separable: 12(00+01)=012(0+1)\frac{1}{2}(|00\rangle + |01\rangle) = |0\rangle \otimes \frac{1}{\sqrt{2}}(|0\rangle + |1\rangle)

Two-Qubit Gates

  • Two-qubit gates are 4×44 \times 4 unitary matrices that act on two-qubit states.

CNOT Gate

Controlled NOT gate

  • flips target if control is 1|1\rangle

CNOT=(1000010000010010)=00I+11X\text{CNOT} = \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 \end{pmatrix} = |0\rangle\langle0| \otimes \mathbb I + |1\rangle\langle1| \otimes X

SWAP Gate

  • Exchanges the two qubits.

SWAP=(1000001001000001)\text{SWAP} = \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 \end{pmatrix}

CZ Gate

Controlled Z gate

  • Applies ZZ to target if control is 1|1\rangle

CZ=(1000010000100001) \text{CZ} = \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & -1 \end{pmatrix}

Building Multi-Qubit Gates

  • Two qubits ψ1|\psi_1\rangle and ψ2|\psi_2\rangle can be combined to form a four-dimensional vector:
    • if U1U_1 and U2U_2 are single-qubit gates, then U1U2U_1 \otimes U_2 is a two-qubit gate that acts on the combined state ψ1ψ2|\psi_1\rangle \otimes |\psi_2\rangle.
    • (U1U2)(ψ1ψ2)=(U1ψ1)(U2ψ2)(U_1 \otimes U_2)(|\psi_1\rangle \otimes |\psi_2\rangle) = (U_1|\psi_1\rangle) \otimes (U_2|\psi_2\rangle)
    • For shorthand, U1U2ψ1ψ2U_1 U_2|\psi_1\psi_2\rangle

Order of Operations

  • When gates act independently, it doesn't matter the order in which they are apply with the understanding that if only a single gate is applied, identity acts on the other qubits.

(U1U2)=(IU2)(U1I)=(U1I)(IU2)(U_1 \otimes U_2) = (\mathbb I \otimes U_2)(U_1 \otimes \mathbb I) = (U_1 \otimes \mathbb I)(\mathbb I \otimes U_2)

  • Example: Apply XX to qubit 1 and HH to qubit 2, starting with 00|00\rangle:
  • (XI)00=10 (X \otimes \mathbb I)|00\rangle = |10\rangle
  • (IH)10=(IH)(10)=1H0=112(0+1)=12(10+11)=12(10+11)(\mathbb I \otimes H)|10\rangle \\ = (\mathbb I \otimes H)(|1\rangle \otimes |0\rangle) \\ = |1\rangle \otimes H|0\rangle \\ = |1\rangle \otimes \frac{1}{\sqrt{2}}(|0\rangle + |1\rangle) \\ = \frac{1}{\sqrt{2}}(|1\rangle \otimes |0\rangle + |1\rangle \otimes |1\rangle) \\ = \frac{1}{\sqrt{2}}(|10\rangle + |11\rangle)

Quantum Circuits

  • A quantum program is a sequance of gates applied to qubits, which are typically assumed to be initialized in the state 0|0\rangle.
  • Two qubits start in the state 00=00|0\rangle \otimes |0\rangle = |00\rangle

Hadamard and CNOT Circuit

CNOT(HI)00=CNOT(12(00+10))=12(00+11)CNOT(H \otimes \mathbb I)|00\rangle = CNOT\left(\frac{1}{\sqrt{2}}(|00\rangle + |10\rangle)\right) = \frac{1}{\sqrt{2}}(|00\rangle + |11\rangle)

NameGatesMatrix
Pauli-XXX or \oplus(0110)\begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}
Pauli-YYY(0ii0)\begin{pmatrix} 0 & -i \\ i & 0 \end{pmatrix}
Pauli-ZZZ(1001)\begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}
Rotation-XRx(θ)R_x(\theta)(cosθ2isinθ2isinθ2cosθ2)\begin{pmatrix} \cos\frac{\theta}{2} & -i\sin\frac{\theta}{2} \\ -i\sin\frac{\theta}{2} & \cos\frac{\theta}{2} \end{pmatrix}
Rotation-YRy(θ)R_y(\theta)(cosθ2sinθ2sinθ2cosθ2)\begin{pmatrix} \cos\frac{\theta}{2} & \sin\frac{\theta}{2} \\ -\sin\frac{\theta}{2} & \cos\frac{\theta}{2} \end{pmatrix}
Rotation-ZRz(θ)R_z(\theta)(eiθ/200eiθ/2)\begin{pmatrix} e^{i\theta/2} & 0 \\ 0 & e^{-i\theta/2} \end{pmatrix}
Phase ShiftPh(δ)Ph(\delta)(100eiδ)\begin{pmatrix} 1 & 0 \\ 0 & e^{i\delta} \end{pmatrix}
HadamardHH12(1111)\frac{1}{\sqrt{2}}\begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}
PhaseSS(100i)\begin{pmatrix} 1 & 0 \\ 0 & i \end{pmatrix}
TTT(100eiπ/4)\begin{pmatrix} 1 & 0 \\ 0 & e^{i\pi/4} \end{pmatrix}
  • S=Ph(π/2)S = Ph(\pi/2)
  • T=Ph(π/4)T = Ph(\pi/4)
  • Z=Ph(π)Z = Ph(\pi)

Multi-Qubit Gates

NameGatesMatrix
CNOTCNOT(1000010000010010)\begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 \end{pmatrix}
CZCZ(1000010000100001)\begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & -1 \end{pmatrix}
SWAPSWAP(1000001001000001)\begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 \end{pmatrix}
ToffoliToffoli(1000000001000000001000000001000000001000000001000000000100000010)\begin{pmatrix} 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 \end{pmatrix}
  • CNOT gate can be 00I+11X|0\rangle\langle0| \otimes \mathbb I + |1\rangle\langle1| \otimes X
    • 0stateI|0\rangle \text{state} \rightarrow \mathbb I (do nothing)
    • 1stateX|1\rangle \text{state} \rightarrow X (flip the target)
  • Larger gates can be built from smaller ones
  • Toffoli gate (CCNOT): flips the target if both controls are 1|1\rangle.
  • Toffoli=0000I4+1111X\text{Toffoli} = |00\rangle\langle00| \otimes \mathbb I_4 + |11\rangle\langle11| \otimes X
    • two control qubits and one target qubit
    • if both control qubits are 1|1\rangle, then apply XX
    • 110111|110\rangle \rightarrow |111\rangle
    • 111110|111\rangle \rightarrow |110\rangle
  • Can be generalized to nn-qubits: Cn1NOTC^{n-1}NOT gate, which flips the target if all n1n-1 control qubits are 1|1\rangle.
    • CNOT: 1011|10\rangle \rightarrow |11\rangle and 1110|11\rangle \rightarrow |10\rangle
    • Toffoli: 110111|110\rangle \rightarrow |111\rangle and 111110|111\rangle \rightarrow |110\rangle
    • 3-control gate: 11101111|1110\rangle \rightarrow |1111\rangle and 11111110|1111\rangle \rightarrow |1110\rangle

(I111111)I+111111U(\mathbb I - |111\ldots\rangle\langle 111\ldots|)\otimes \mathbb I + |111\ldots\rangle\langle 111\ldots|\otimes U

The Rules of Quantum Computing

Initialization

  • An nn-qubit computation starts in the all-zero state:

phi=000=000|phi\rangle = |0\rangle \otimes |0\rangle \otimes \ldots \otimes |0\rangle = |00\ldots0\rangle

Algorithm

  • Apply a sequence of unitary gates to obtain the final state:

U=U1U2Um    UψU = U_1U_2\ldots U_m \implies U|\psi\rangle

Measurement

The Born Rule

  • Reading nn qubits producs nn classical bits.
  • The probability of outcome b1b2bnb_1b_2\ldots b_n:

Pr(b1b2bn)=b1b2bnψ2Pr(b_1b_2\ldots b_n) = |\langle b_1b_2\ldots b_n|\psi\rangle|^2

  • ψ|\psi\rangle: initial state of the system
  • UU: an unitary matrix summing up the gates applied to the system
  • UψU|\psi\rangle: final state of the system
  • b1b2bnUψ\langle b_1b_2\ldots b_n|U|\psi\rangle: the amplitude of the outcome b1b2bnb_1b_2\ldots b_n
  • amplitude2|\text{amplitude}|^2: The probability of the outcome b1b2bnb_1b_2\ldots b_n being observed when measuring the system
    • if 12(00+11)\frac{1}{\sqrt{2}}(|00\rangle + |11\rangle)
    • then Pr(00)=Pr(11)=12Pr(00) = Pr(11) = \frac{1}{2}

Post-measurement States

Measurement causes the state to collapse

  • Measuring all qubits: outcome b1bnb_1 \ldots b_n collapses state to b1bn|b_1 \ldots b_n\rangle
  • Measuring a subset: keep matching terms and renormalize.

ψ=c000000+c001001++c111111|\psi\rangle = c_{00\ldots0}|00\ldots0\rangle + c_{00\ldots1}|00\ldots1\rangle + \ldots + c_{11\ldots1}|11\ldots1\rangle

  • If we measure all qubits, we get outcome b1b2bnb_1b_2\ldots b_n
    • The state will collapse to ψ=b1b2bn|\psi'\rangle = |b_1b_2\ldots b_n\rangle
    • The probability of this outcome is Pr(b1b2bn)=b1b2bnψ2Pr(b_1b_2\ldots b_n) = |\langle b_1b_2\ldots b_n|\psi\rangle|^2

ψ=α00+β01+γ10+δ11|\psi\rangle = \alpha|00\rangle + \beta|01\rangle + \gamma|10\rangle + \delta|11\rangle

  • If we measure only the first qubit, and get outcome 00, the state maintains only terms with 00 in the first position:
    • 00|00\rangle and 01|01\rangle
    • The remaining state is ψ=α00+β01|\psi'\rangle = \alpha|00\rangle + \beta|01\rangle
    • 10|10\rangle and 11|11\rangle are removed from the state
  • This gives us the unnormalized state: ψunnorm=α00+β01 |\psi'\rangle_{unnorm} = \alpha|00\rangle + \beta|01\rangle
  • The probability of this outcome is Pr(0)=α2+β2Pr(0) = |\alpha|^2 + |\beta|^2
    • 00|00\rangle and 01|01\rangle are the only terms that contribute to the probability of outcome 00 for the first qubit
  • After measurement, the state must be ψ2=1\||\psi\|^2 = 1, so we need to renormalize the state:

ψ=(α00+β01)α2+β2|\psi'\rangle = \frac{(\alpha|00\rangle + \beta|01\rangle)}{\sqrt{|\alpha|^2 + |\beta|^2}}

QASM2.0

Quantum GateQASM EquivalentDescription
Rx(θ)R_x(\theta)rxRotation around X-axis: rx(pi/2) q[0];
Ry(θ)R_y(\theta)ryRotation around Y-axis: ry(0) q[0];
Rz(θ)R_z(\theta)rzRotation around Z-axis: rz(pi) q[0];
XXxPauli-gate bit flip: x q[0];
ZZzPauli-gate phase flip: z q[0];
XZXZyPauli-gate bit+phase flip: y q[0];
HHhHadamard gate: h q[0];
CNOTCNOTcxControlled NOT gate: cx q[0], q[1];
SWAPSWAPswapSwap two qubit registers: swap q[0], q[1];
CZCZczControlled ZZ gate: cz q[0], q[1];

CNN 003

· 약 3분

Image Gradient

  • It is a directional change in the intensity or color in an image.
  • can be used to extract valuable information from images.
  • commonly used in edge detection.
  • ➡️ Change is X-directions, ⬇️ Change is Y-directions.
  • Combining both X and Y diretion to estimate if changes are in both directions.

HoG, Histogram of Oriented Gradient

To find edge and shape of the object in the image

  • Computing Image Gradient
    • Use the horizontal and vertical filters to compute gradient values
  • Compute the strength/magnitude and direction of gradient
    • Strength/Magnitude(g): gx2+gy2\sqrt{g_x^2 + g_y^2}
    • Direction(θ\theta): tan1(gy/gx)\tan^{-1}(g_y / g_x)
  • Create orientation histogram
    • Divide the image into small connected regions called Cells which is a 8x8 patch
    • Create cell histogram based on gradient direction and magnitude
    • 64 (8x8) gradient vectors are put into a 9-bin histogram.
    • The bins are the gradient directions (θ\theta) quantized into 9-bins
  • Block Normalization
    • 16x16 pixels blocks or 22 cells are used for normalization, which has 4 histograms.
    • Normalization will make it scale/multiplication invariant
    • Each block will represent 36x1 element vector
  • Intensity: brightness of the pixel
  • Saturation: HSV color space, the amount of gray in the color
  • Calculate the HoG feature vector
    • Each of the 36x1 vectors in each blocks are concatenated into one big vector
    • Size of the vector will be 36xN, where N is the number of blocks in the image
  • Hog feature extractor

LBP, Local Binary Pattern

To describe the image textures

LBPP,R(xc,yc)=p=0P1s(gpgc)2pLBP_{P,R}(x_c, y_c) = \sum_{p=0}^{P-1} s(g_p - g_c) \cdot 2^p

  • An eifficient texture operator which labels each pixels of an image by thresholding their neighbours.
  • A powerful feature for texture classification
  • LBP operator is to describe the image textures using two measures namely, local spatial patterns and the gray scale constract of its strength.
  • S(x)S(x) is a thresholding function
  • (xc,yc)(x_c, y_c) is the center pixel in the 8 pixel neighbourhood
  • gcg_c is gray level of the center pixel
  • gpg_p is gray value of a smpling point in an equally spaced circular neighbourhood of P sampling points and radius R around the point (xc,yc)(x_c, y_c)
  1. Sample pixel neighbourhood
  2. Difference result
  3. Thresholding result

LBP

ANN

L(a,y)=(yloga+(1y)log(1a))L(a, y) = -(y \log a + (1-y) \log (1-a)) GD(w,b)=x=1mi=1mL(a(i),y(i))GD(w, b) = x = \frac{1}{m} \sum_{i=1}^{m} L(a^{(i)}, y^{(i)})

TIM 003

· 약 3분

Push & Pull Factors

  • Techonology - Push (Supply-side Pushing Innovation)
  • Demand - Pull (Demand-side Pulling Innovation)
Technology PushDemand Pull
Starts with Scientific BreakthroughStarts with Customer need
iPadZoom (COVID-19)
VR HeadsetSelfie Stick
Post-it NotesTesla Model 3

Disruptive Innovation

  • Creative Destruction
    • a process by which new innovations and technological advancements ("creative")
    • desmantle long-standing economic structures, practices, and organizations ("destruction")
    • while creating new markets and opportunities
  • Disruptive Innovation
    • a process where a smaller company successfully challenges estabilished businesses bgy offering simpler, more affordable, or more accessible products or services.
    • low-cast, low-performance, alternative, improve over time and displace established playwers
  • Innovator's Dilemma
    • successful, well-managed companies often fail when disuptive technologies emerge
    • even when they do everything "right" according to traditional management principles.
Sustaining InnovationDisruptive Innovation
Improves existing productsCreates new markets or value
Higher marginsInitially lower margins
High-end customersLow-end market segments
  • Sustaining Innovation: Tesla improving battery range
  • Disruptive Innovation: Netflix replacing Blockbuster

Attention Economy

  • Human attention a scarce resource
  • The attention economy is made up of anything trying to capture our limited attention.

Responsible Innovation

  • Innovation can create benefits (growth, efficiency, solutions) but also risks (inequality, pollution, privacy loss).

  • Responsible Innovation is about developing new techonologies, products, or services in a way that is ethically acceptatble, socially desirable, and environmentally sustainable, while actively considering their potential impacts on society.

  • Anticipation: Exploring possible risks, unintended consequences, and long-term effects.

  • Reflexivity: Innovators reflecting on their own values, assumptions, and biases.

  • Inclusion: Engaging stakeholders (citizens, users, regulators, communities), not just engineers or investors shaping outcomes.

  • Responsiveness: Ability to change direction if concerns arise.

Product questionsProcess questionsPurpose questions
How will the risks and benefits be distributed?How should standards be drawn up and applied?Why are researchers doing it?
What other impacts can we anticipate?How should risks and benefits be defined and measured?Are these motivations transparent and in the public interest?
How might these change in the future?Who is in control?Who will benefit?
What don't we know about?Who is taking part?What are they going to gain?
What might we never know about?Who will take responsibility if things go wrong?What are the alternatives?
-How do we know we are right?-

Sustainability

  • No poverty
  • Zero hunger
  • Good health and Well-being
  • Quality education
  • Gender equality
  • Clean water and Sanitation
  • Affordable and Clean energy
  • Decent work and Econnomic growth
  • Industry, Innovation and Infrastructure
  • Reduced Inequalities
  • Sustainable Cities and Communities
  • Responsible consumption and Production
  • Climate action
  • Life below water
  • Life on land
  • Peace, Justice, and Strong Institutions
  • Partnerships for the goals

Sustainability Dilemma

Externailities

Impacts on third parties

Sustainability Tree

  • Ecology / Environmental
    • Bio-diversity
    • Habitat loss
    • Pollution
    • Carbon footprint
  • Social - human side
    • Human trafficking
    • Working conditions
    • Child labour
    • Social cohesion
    • Addiction and psychological damages

Internal Perspectives

  • Economic - Business sustainability
    • Solvency
    • Regulations
    • Management
    • Succession planning
    • Disaster management
    • Short-term thinking / goals
    • Fiduciary obligations to Shareholders

CNN 002

· 약 3분

Type of ML Systems

  • Supervised Learning
  • Unsupervised Learning
  • Semi-supervised Learning
  • Reinforcement Learning
  • Batch and Online Learning
    • Whether system can learn on the fly
  • Instance-based and Model-based Learning
    • Comparing data points or detect patterns in training data to build a predictive model

Evaluation Metrics

Interesction over Union (IoU)

IoU

  • a metric used for the evaluation of object detection detectors
  • how good is the predicted bounding box for an object detected closely matches.

IoU=Area of OverlapArea of UnionIoU = \frac{Area\ of\ Overlap}{Area\ of\ Union}

Digital Image

  • made of picture elements (pixels)
  • an array or a matrix of Pixels arranges in columns and rows
  • Each Pixel has its own intesity value, or brightness
  • Intensity values in digital images are defined by bits.
    • 8 bits image = 256 (2^8) intensity values (0-255)
  • Black & White images have a single 8-bits intensity range.

Image Processing Basics

  • Image dimension = 5×5×35 \times 5 \times 3
  • Number of Channels = 3 (Red, Green, Blue)
  • So, 24-bit color dpeth (8 bits per channel)
    • Each pixel has 3 intensity values (R, G, B) each in the range of 0-255
    • Total number of possible colors = 2563256^3 (16,777,216)

Image Processing Types

  • Image Enhancement
  • Image Restoration
  • Image Segmentation
  • Image Recognition & Classification
  • Image Compression
  • Image Transformation
  • Image Filtering
  • Morphological Processing
  • Color Image processing
  • 3D Image Processing

Image Thresholding (Segmentation)

  • Easist method for image segmentation
  • Converts gray-scale image into a binary image
    • f(x,y)<Threshold0f(x,y) < \text{Threshold} \Rightarrow 0 (black)
    • f(x,y)Threshold255f(x,y) \geq \text{Threshold} \Rightarrow 255 (white)

Image Thresholding methods

  • Histogram shape: Peaks, valleys, and curvature of the histogram are analyzed to determine the optimal threshold value.
  • Clustering based: The Otsu method, good for bimodal distribution
  • Adaptive thresholding: Instade of a single threshold, have thresholds for different regions in the image.

Image Transformation

  • Rotation
  • Translation
  • Uniform Scaling
  • Non-Uniform Scaling
  • Reflection
  • Shearing

Edge Detection (Image Filtering)

  • Edge?
    • The points/pixels in an image where brightness/intensities changes sharply.
    • A simple and fundamental tools in image processing and computer vision, useful in feature detection/extraciton
  • Canny Edge detection
  • Sobel Edge detection
  • How to detect edges?

Prewitt Filters

  • Vertical Edge detector: [101101101]\begin{bmatrix} 1 & 0 & -1 \\ 1 & 0 & -1 \\ 1 & 0 & -1 \end{bmatrix}
  • Horizontal Edge detetor: [111000111]\begin{bmatrix} 1 & 1 & 1 \\ 0 & 0 & 0 \\ -1 & -1 & -1 \end{bmatrix}

Sobel Filters

  • Vertical Edge detector: [101202101]\begin{bmatrix} 1 & 0 & -1 \\ 2 & 0 & -2 \\ 1 & 0 & -1 \end{bmatrix}
  • Horizontal Edge detetor: [121000121]\begin{bmatrix} 1 & 2 & 1 \\ 0 & 0 & 0 \\ -1 & -2 & -1 \end{bmatrix}

Morphological Processing

  • Dilation: Shrinks the image pixels from the boundaries of objects in an image, making them thicker.
  • Erosion: Adds pixels to the boundaries of objects in an image, making them thinner.

Free up storage space on mac

· 약 1분

Issue

  • Mac storage setting didn't show the actual storage usage, and it was always showing "Other" taking up a lot of space.
  • It also didn't check cache files, which took up at least 10GiB of space.

CLI

GUI

  • OmniDiskSweeper
  • Click "Macintosh HD" and "Sweep Macintosh HD Drive..."
  • You can manually select the files to delete including cache files.

IQC 002

· 약 7분

Ket

ψ=(ψ0ψ1)|\psi\rangle = \begin{pmatrix} \psi_0 \\ \psi_1 \end{pmatrix}

0=(10)|0\rangle = \begin{pmatrix} 1 \\ 0 \end{pmatrix}

1=(01)|1\rangle = \begin{pmatrix} 0 \\ 1 \end{pmatrix}

ψ=ψ00+ψ11=ψ0(10)+ψ1(01)|\psi\rangle = \psi_0 |0\rangle + \psi_1 |1\rangle \\ \quad = \psi_0 \begin{pmatrix} 1 \\ 0 \end{pmatrix} + \psi_1 \begin{pmatrix} 0 \\ 1 \end{pmatrix}

Matrices

  • Matrices represent linear transformations (quantum gates). A general 2x2 matrix is: A=(α00α01α10α11)A = \begin{pmatrix} \alpha_{00} & \alpha_{01} \\ \alpha_{10} & \alpha_{11} \end{pmatrix}
  • Identity matrix: I=(1001)I = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}
  • Linearity: A(ψ+ϕ)=Aψ+AϕA(|\psi\rangle + |\phi\rangle) = A|\psi\rangle + A|\phi\rangle

Bra and Daggers

Dagger

  • Conjugate Transpose: swap rows/columns and complex-conjugates every entry.
  • Ket becomes Bra: ψ=(ψ0ψ1)=(ψ0ψ1)=ψ|\psi\rangle^\dagger = \begin{pmatrix} \psi_0 \\ \psi_1 \end{pmatrix}^\dagger = \begin{pmatrix} \overline{\psi_0} & \overline{\psi_1} \end{pmatrix} = \langle\psi|
  • For a matrix: A=(α00α10α01α11)A^\dagger = \begin{pmatrix} \overline{\alpha_{00}} & \overline{\alpha_{10}} \\ \overline{\alpha_{01}} & \overline{\alpha_{11}} \end{pmatrix}
  • Key Identities:
    • (αA)=αA(\alpha A)^\dagger = \overline{\alpha} A^\dagger
    • (A)=A(A^\dagger)^\dagger = A
    • (AB)=BA(AB)^\dagger = B^\dagger A^\dagger

Hermitian and Unitary Matrices

  • Hermitian: H=HH^\dagger = H
    • Self-adjoint matrices, their eigenvalues are always real.
    • Observables in quantum mechanics are Hermitian.
  • Unitary: UU=UU=IU^\dagger U = UU^\dagger = I
    • The inverse of a unitary matrix is its conjugate transpose.
    • Unitary matrices preserve norms

Inner Product

  • The angle between two vectors ψ|\psi\rangle and ϕ|\phi\rangle is defined as bra-ket: ψϕ=(ψ0ψ1)(ϕ0ϕ1)=ψ0ϕ0+ψ1ϕ1\langle\psi|\phi\rangle = (\overline{\psi_0} \overline{\psi_1}) \begin{pmatrix} \phi_0 \\ \phi_1 \end{pmatrix} = \overline{\psi_0}\phi_0 + \overline{\psi_1}\phi_1
  • Important properties:
    • Order Matters: ψϕϕψ\langle\psi|\phi\rangle \neq \langle\phi|\psi\rangle
    • But ψϕ=ϕψ\langle\psi|\phi\rangle = \overline{\langle\phi|\psi\rangle} (Complex Conjugate)
    • The modulus is symmetric: ψϕ=ϕψ|\langle\psi|\phi\rangle| = |\langle\phi|\psi\rangle|
  • The Magnitude of a vector is given by: ψ2=ψψ=ψ02+ψ12\| |\psi\rangle \|^2 = \langle\psi|\psi\rangle = |\psi_0|^2 + |\psi_1|^2

Orthonormal of the Computational Basis

  • The basis states 0|0\rangle and 1|1\rangle are orthonormal: 00=1,11=1,01=0,10=0\langle 0|0\rangle = 1, \quad \langle 1|1\rangle = 1, \quad \langle 0|1\rangle = 0, \quad \langle 1|0\rangle = 0
  • This simplifies inner products enormously when working with the computational basis: ψϕ=(ψ00+ψ11)(ϕ00+ϕ11) \langle\psi|\phi\rangle = (\overline{\psi_0}\langle0| + \overline{\psi_1}\langle1|) (\phi_0|0\rangle + \phi_1|1\rangle)
  • All corss terms vanish due to orthogonality, leaving: =ψ0ϕ000+ψ0ϕ101+ψ1ϕ010+ψ1ϕ111 = \overline{\psi_0}\phi_0 \langle0|0\rangle + \overline{\psi_0}\phi_1 \langle0|1\rangle + \overline{\psi_1}\phi_0 \langle1|0\rangle + \overline{\psi_1}\phi_1 \langle1|1\rangle =ψ0ϕ0+ψ1ϕ1= \overline{\psi_0}\phi_0 + \overline{\psi_1}\phi_1

Outer Products

  • The outer product of two vectors produces a matrix: ψϕ=(ψ0ψ1)(ϕ0ϕ1)=(ψ0ϕ0ψ0ϕ1ψ1ϕ0ψ1ϕ1)|\psi\rangle\langle\phi| = \begin{pmatrix} \psi_0 \\ \psi_1 \end{pmatrix} \begin{pmatrix} \overline{\phi_0} & \overline{\phi_1} \end{pmatrix} = \begin{pmatrix} \psi_0\overline{\phi_0} & \psi_0\overline{\phi_1} \\ \psi_1\overline{\phi_0} & \psi_1\overline{\phi_1} \end{pmatrix}
  • Basis outer products: 01=(0100),10=(0010)|0\rangle\langle1| = \begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix}, \quad |1\rangle\langle0| = \begin{pmatrix} 0 & 0 \\ 1 & 0 \end{pmatrix}
  • Any matrix can be expanded in terms of outer products of the computational basis: A=α0000+α0101+α1010+α1111A = \alpha_{00} |0\rangle\langle0| + \alpha_{01} |0\rangle\langle1| + \alpha_{10} |1\rangle\langle0| + \alpha_{11} |1\rangle\langle1|

The Qubit

A qubit is the fundamental unit of quantum information

ψ=α0+β1|\psi\rangle = \alpha |0\rangle + \beta |1\rangle

  • where α,βC\alpha, \beta \in \mathbb{C} are complex numbers such that α2+β2=1|\alpha|^2 + |\beta|^2 = 1 (normalization condition).
  • Any normalized single-qubit state can be parameterized using two angles θ\theta and ϕ\phi (real numbers): ψ=cosθ0+eiϕsinθ1|\psi\rangle = \cos\theta|0\rangle + e^{i\phi}\sin\theta|1\rangle
  • Key difference from a bit: a bit is either 0 or 1, while a qubit can be in a superposition of both states simultaneously until measured.

Measurement

  • When you measure a qubit ψ=α0+β1|\psi\rangle = \alpha |0\rangle + \beta |1\rangle in the computational basis, you get:
    • 0|0\rangle with probability α2|\alpha|^2
    • 1|1\rangle with probability β2|\beta|^2
OutcomeProbabilityPost-measurement State
0$\alpha
1$\beta
  • The result of measuring a qubit is a single classical bit.
  • For ψ=cosθ0+eiϕsinθ1|\psi\rangle = \cos\theta|0\rangle + e^{i\phi}\sin\theta|1\rangle:
    • Probability of measuring 0|0\rangle: cos2θ\cos^2\theta
    • Probability of measuring 1|1\rangle: sin2θ\sin^2\theta
    • The phase ϕ\phi does not affect measurement outcomes.

One-Qubit Gates

Pauli Matrices

Unitary matrics

I=(1001),X=(0110),Y=(0ii0),Z=(1001)\mathbb{I} = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}, \quad X = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}, \quad Y = \begin{pmatrix} 0 & -i \\ i & 0 \end{pmatrix}, \quad Z = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}

  • XX is the quantum NOT gate:
    • X0=1X|0\rangle = |1\rangle
    • X1=0X|1\rangle = |0\rangle
  • ZZ filps the phase of 1|1\rangle:
    • Z0=0Z|0\rangle = |0\rangle
    • Z1=1Z|1\rangle = -|1\rangle
  • All three (X,Y,Z)(X, Y, Z) are both Hermitian and unitary.

Hadamard Gate

H=12(1111)H = \frac{1}{\sqrt{2}} \begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}

  • HH creates superpositions:
    • H0=0+12H|0\rangle = \frac{|0\rangle + |1\rangle}{\sqrt{2}}
    • H1=012H|1\rangle = \frac{|0\rangle - |1\rangle}{\sqrt{2}}
  • HH also "un-does" superpositions:
    • H(0+12)=0H\left(\frac{|0\rangle + |1\rangle}{\sqrt{2}}\right) = |0\rangle
    • H(012)=1H\left(\frac{|0\rangle - |1\rangle}{\sqrt{2}}\right) = |1\rangle

Rotation Gate

R(θ)=(cosθsinθsinθcosθ)R(\theta) = \begin{pmatrix} \cos\theta & \sin\theta \\ -\sin\theta & \cos\theta \end{pmatrix}

  • R(θ)R(\theta) rotates the state vector by an angle θ\theta in the 0|0\rangle-1|1\rangle plane.

The Bloch Sphere

Every single-qubit state ψ=cosθ0+eiϕsinθ1|\psi\rangle = \cos\theta|0\rangle + e^{i\phi}\sin\theta|1\rangle maps to a point on the surface of a unit sphere

  • θ\theta is polar angle from north pole
  • ϕ\phi is azimuthal angle around equator
  • 0|0\rangle is at the north pole
  • 1|1\rangle is at the south pole
  • 0+12\frac{|0\rangle + |1\rangle}{\sqrt{2}} is on the equator at ϕ=0\phi=0

Exercises

  1. For any two-dimensional state vector ψ=α0+β1|\psi\rangle = \alpha |0\rangle + \beta |1\rangle, it holds that α2+β2=1|\alpha|^2 + |\beta|^2 = 1.
  2. Measuring a qubit in the {0,1}\{|0\rangle, |1\rangle\} basis yields a probabilistic outcome when both α\alpha and β\beta are non-zero.
  3. A global phase factor eiγe^{i\gamma} applied to a qubit state does not change the probabilities of measurement outcomes in the computational basis.
  4. The Bloch sphere represents all pure single-qubit states as points on the surface of the sphere.
  5. A real 2×22 \times 2 matrix is a valid quantum gate only if it is unitary, not merely invertible.
  6. The Pauli-X gate flips 0|0\rangle to 1|1\rangle and 1|1\rangle to 0|0\rangle.
  7. When a qubit is measured in a given basis, the state collapses to the basis state corresponding to the measurement outcome.
  8. Unitary matrices preserve the norm of any vector they act on.
  9. If ψ=cos(θ)0+eiϕsin(θ)1|\psi\rangle = \cos(\theta)|0\rangle + e^{i\phi}\sin(\theta)|1\rangle, then the probability of measuring 0|0\rangle is cos2(θ)\cos^2(\theta).
  10. The state 120+321\frac{1}{2}|0\rangle + \frac{\sqrt{3}}{2}|1\rangle is properly normalized.
  11. If ψ=130+23eiπ/41|\psi\rangle = \frac{1}{\sqrt{3}}|0\rangle + \sqrt{\frac{2}{3}} e^{i\pi/4}|1\rangle, then the probability of measuring 0|0\rangle is 13\frac{1}{3}.
  12. The states 12(0+1)\frac{1}{\sqrt{2}}(|0\rangle + |1\rangle) and 12(01)\frac{1}{\sqrt{2}}(|0\rangle - |1\rangle) are orthogonal.
  13. The Pauli-X matrix X=(0110)X = \begin{pmatrix}0 & 1 \\ 1 & 0\end{pmatrix} satisfies X2=IX^2 = I, where II is the 2×22 \times 2 identity matrix.
  14. Applying the Pauli-Z gate Z=(1001)Z = \begin{pmatrix}1 & 0 \\ 0 & -1\end{pmatrix} to 12(0+i1)\frac{1}{\sqrt{2}}(|0\rangle + i|1\rangle) produces 12(0i1)\frac{1}{\sqrt{2}}(|0\rangle - i|1\rangle).

TIM 002

· 약 3분

Market Structure

Perfect CompetitionMonopolistic CompetitionOligopolyMonopoly
Number of firmsAlmost InfiniteManyFewOne
Barriers to EntryNo barriersNo barriers / Low barriersSome barriersHigh barriers
Influence over PricePrice TakerLimitedSomePrice Maker
Nature of ProductHomogeneousDifferentiatedSimilar, DifferentiatedNo close substitutes
ExamplesCommon agricultural productsFast-food restaurantsAuto IndustryUtilities

Porter's 5 Competitive Forces

  1. Threat of New Entrants: Profitable industries that yield high returns will attract new firms. New entrants eventually will decrease profitability for other firms in the industry.
  2. Threat of Substitutes: A substitute product uses a different technology to try to solve the same economic need.
  3. Bargaining Power of Customers: The market outputs. The ability of customers to put the firm under pressure, which also affects the customer's sensitivity to price changes.
  4. Bargaining Power of Suppliers: The market inputs. Suppliers of raw materials, components, labor, and services (such as expertise) to the firm can be a source of power over the firm when there are few substitutes.
  5. Competitive rivalry: For most industries the intensity of competitive rivalry is the major determinant of the competitiveness of the industry.

Threat of New Entrants

Barriers to entry ⬆️, Profits ⬆️

  • How difficult it is for new business to enter an industry and compete with already established ones.
  • Many competitors lead to lower average profits
  • Threat of New Entrants:
    • Barriers to entry
    • Economies of scale
    • Brand loyalty
    • Capital requirements
    • Cumultative experience
    • Government policies
    • Access to distribution channels
    • Switching costs

Threat of Substitute Products

  • A substitute product or service is an alternative that serves the same purpose for the customers, from a different industry.
  • For example,
    • Taxi vs. Uber
    • Train vs. Plane
    • Tea vs. Coffee vs. Soft Drinks
  • Threat of Substitutes Products:
    • Number of substitute products available
    • Buyer propensity ot substitute
    • Relative price performance of substitute
    • Perceived level of product differentiation
    • Switching costs

Bargaining Power of Customers and Suppliers

  • Bargaining power of customers:
    • Number of customers
    • Size of each customer order
    • Differences between competitors
    • Price sensitivity
    • Buyer's ability to substitute
    • Buyer's information availability
    • Switching costs
  • Bargaining power of suppliers:
    • Number of suppliers
    • Size of suppliers
    • Uniqueness of each supplier's product
    • Focal company's ability to substitute

Rivalry among Existing Competitors

  • The extent of competition within an industry
  • Price wars
  • Rivalry among existing competitors:
    • Number of competitors
    • Diversity of competitors
    • Industry concentration
    • Industry growth
    • Quality differences
    • Brand loyalty
    • Barriers to exit
    • Switching costs
  • For example,
    • Woolworths vs. Coles
    • Apple vs. Samsung

KANO Model

  • Expected (Basic or Must-be) Attribute: whose presence doesn't directly increase satisfaction, but their absence causes extreme dissatisfaction.
    • car: a functioning brake is a must be quality
    • hotel: providing a clean room is a basic necessity
  • One-Dimensional (Performance) Attribute: can both satisfy and dissatisfy customers depending on their execution.
    • car: acceleration
    • hotel: waiting service at a hotel
  • Attractive (Delight) Attribute: differentiate products and services, creating a "wow factor" and delighting customers when present, but causing no dissatisfaction when absent.
    • car: advanced parking sensor
    • hotel: providing free food
  • Indifferent Attribute
    • car: the color of the car
    • hotel: highly polite speacking and very prompt responses not be necessary to satisfy customers
  • Reverse Attribute
    • web: auto-playing videos/audio
    • venue: unnecessary security checks at the entrance of a venue

Possible movement of Attributes' place

  • As customer expectations change with the level or performance from competing products, attributes can move from delighter to performance need and then to basic need.