The Pauli gates are Hermitian and unitary, which means that they are self-adjoint and their inverse is equal to their conjugate transpose. The Pauli gates are also involutory, which means that applying the gate twice will return the original state. The Pauli gates are also traceless, which means that the sum of the diagonal elements is zero.
X basis:{∣+⟩=2∣0⟩+∣1⟩,∣−⟩=2∣0⟩−∣1⟩}Y basis:{∣i⟩=2∣0⟩+i∣1⟩,∣−i⟩=2∣0⟩−i∣1⟩}Z basis:{∣0⟩,∣1⟩}
the X, Y and Z basis states are orthogonal and normalized;
the X, Y and Z basis states are eigenstates of the Pauli X, Y and Z gates
The X, Y, and Z Pauli matrices are ways of “flipping” the Bloch sphere 180◦ about the x, y, and z axes respectively.
A generic qubit is of the form
∣ψ⟩=c0∣0⟩+c1∣1⟩
where ∣c0∣2+∣c1∣2=1.
The equation can be written as:
∣ψ⟩=cos(θ)∣0⟩+eiϕsin(θ)∣1⟩
with only two parameters θ and ϕ to describe the state.
A phase shift gate is defined as
R(θ)=[100eiθ]
Sometimes we want to rorate a particular number of degrees around the x,y or z axis, which can be represented as:
The time evoluation of the state of a closed quantum system is described by the Schrödinger equation:
iℏdtd∣ψ⟩=H∣ψ⟩
ℏ is a physical constant known as Planck's constant whose value must be experimentally determined.
where H is the Hamiltonian of the system.
Density matrix
Density matrix or density operator (ρ) is an alternative formulation for state vectors.
The trace of a density matrix tr(ρ)=1.
The evolution of a closed quantum system is described by a unitary transformation.That is, the state ρ of the system at time t1 is related to the state ρ′ of the system at time t2 by a unitary operator U which depends only on the time t1 and t2
ρ′=UρU†
A pure state satisfied Tr(ρ2)=1
For a mixed state, Tr(ρ2)<1
Simple and intuitive: It directly maps binary data into quantum states, making it suitable for data that is inherently binary.
Cons:
High resource consumption: If the input data is not binary, it needs to be converted before encoding. Each bit requires one qubit, leading to high resource consumption, especially for large datasets.
Angle Embedding
Angle embedding is suitable for floating-point data.
It encodes each input value 𝑥 as a rotation around one of the axes (𝑥,𝑦,𝑧) on the Bloch sphere
x↦Rk(x)∣0⟩=e−i2xσk∣0⟩,
Pros:
Fewer qubit requirements: Each feature can be encoded using a rotation gate, which saves qubit resources.
Ideal for continuous data: It works well for handling floating-point or other continuous data.
Cons:
Non-unique mapping: Different data may be mapped to the same quantum state since the same rotation angle can result in identical quantum states.
Initial state limitation: If the initial state is ∣0⟩, rotations around the z-axis have no effect, making them unusable for encoding in such cases.
Amplitude Embedding
Amplitude embedding encodes the values of an input array as the amplitudes of a quantum state. Specifically, the input a=(a0,a1,...,a2n−1) is encoded as:
∣a⟩=i=0∑2n−1ai∣i⟩
requiring that the amplitudes are normalized, i.e. ∥ai∥=1.
Pros:
Efficient qubit usage: It can represent a large amount of data in a single quantum state, particularly suitable for large-scale data where an exponential number of data points can be represented.
High representational capacity: It allows data to be embedded into high-dimensional quantum states, enabling quantum machine learning models to learn complex features in higher-dimensional space.
Cons:
Normalization requirement: Input data must be normalized to ensure that all the squared amplitudes sum to 1, which can add computational complexity.
Complex circuit design: Implementing amplitude embedding requires complex multi-controlled rotations, making the circuit design and implementation more challenging.