Quantum Algorithms
1.Deutsch's Algorithm
problem statemet
- Given a function as a black box
- Determinine if the function is balanced or constant
- Balanced:
- Constant:
Classial Solution
- Requires evaluating f with both inputs 0 and 1
- Worst-case complexity: 2 function evaluations
Quantum Solution
- Uses quantum superposition to evaluate both inputs simultaneously
- Achieves result in one function evaluation
Key concepts
- Quantum parallelism
- Hadmard gate for creating superposition
- Reversible quantum gates
Algorithm Steps
- Prepare initial state
- Apply Hadamard gates to both qubits
- Apply the quantum oracle
- Apply Hadamrd gate to the first qubit
- Measure the first qubit
Outcome
- : Functon is constant
- : Function is balanced
2.Deutsch-Jozsa Algorithm
Problem Statement
- Generalization of Deutsch's algorithm
- Functon f:
- Determine if f is constant or balanced(half 0s, half 1s)
Classical Solution
- Worst-case complexity: function evaluations
Quantum Solution
- Achieves result in one function evaluation
Key Concepts
- n-qubits superposition using tensor product of Hadamrd gates
- Inner product over binary numbers
Algorithm steps
- prepare initial state
- Apply to the first n qubits and H to the last qubit
- Apply the quantum oracle
- Apply to the first n qubits
- Measure the first n qubits
Outcome
- All 0s: Function is constant
- Any other results: Function is balanced
3. Simon's Algorithm
Problem Statement
- Given a 2-to-1 functon f such that for some unknown a
- Task: Determine a
Classical Solution
- Brute force:
- Birthday problem approach:
Quantum Solution
- Achieves complexity, exponentially faster
Key Concepts
- Quantum parallelism
- Interference
- Linear algebra GF(2)
Algorithm Steps
- Prepare initial state
- Apply to the first n qubits
- Apply the quantum oracle
- Apply to the first qubits
- Measure the fist n qubits
- Repeat steps 1-5 to obtain n-1 linearly independent equations
- Solve the system of equations to find a
Outcome
- Determines the hidden period a with a high probability in quantum operations
Quantum Generative Adversarial Networks (QGAN)
Classcial Generative Adversrial Networks
Overview
- An exciting development in Deep Learning research
- Various applications: Image generation, super-resolution, image-to-image translation, 3D object generation, text generatin, synthetic data generation
Key Compnents
-
Generator (G)
- Creates new sample data from a specific domain (e.g., images, text, audio)
- Aims to produce "fake" data indistinguishable from real data
-
Discriminator (D)
- Distinguishes fake data created by the Generator from real data
Training Strategy
- Using game theory
- Analogy: Generator as a counterfeiter, Distriminator as a detective
- Both try to outsmart each other
Mathematical Framework
- Real-world data distribution:
- Generator distribution:
- Genweator parameters:
- Discriminator parameters:
- Objective: Maximize the probability of D misclassifying G's samples as real
Quantum Generative Adversarial Networks
Motvation
- Potential to solve certain hard problems that classical GANs struggle with
- Applications in quantum chemistry calculations and simulations
Key Concepts
- Quantum Generator (QG)
- Implemented as a variational quantum circuit
- Parameters:
- Output: Density matrix
- Quantum Discriminator (QD)
- Separate quantum circuit
- Parameter:
- Determines if input state is created by R (real) or G (fake)
- Data Source (R)
- Outputs a density martix ciontainning n subsystems
- Noise Source()
- Provides entropy within the distribution of generatied data
- Acts as a control for the generator
QGAN Framework
- Conditional GANs: Generate samples from condiional distribution
- Labels:
- Generator output: for each and
Optimization Objective
- Formalized as minmax adversarial game:
- Cost function is linear in the output probabilities of D
QGAN Circuit
- 6 operationally defined registers
Trainning Procedure
- Initialize and randomly
- For each training iteration :
- Sample minibatch of n noise samples and m label samples
- Generate m fake dara samples using G
- Update D by ascending its stochastic gradient
- Sample minibatch of m noise samples and m label samples
- Update G by descending its stochastic gradient
Key Takeways
- QGANs extend classical GANs to the quantum domain, potentially solving problems classical GANs strugglew with.
- The quantum framework uses density matrices and quantum circuits for both the generator and discriminator.
- The training process involves a minmax game between the quantum generator and discriminator
- QGAN have potential applications in quantum chemistry and quantum simulations.
- The noisee source play a crucial role in providing entropy and control for the quantum generator.