Initializes the Quantum Enhanced LWE system with specified parameters.
n
: Dimension of the lattice (default: 256)q
: Modulus for the lattice (default: 4093)sigma
: Standard deviation for error sampling (default: 1.0)
Generates a public and private key pair for encryption and decryption.
- Returns: Tuple containing the public key and private key.
Encrypts a message using the public key.
pk
: Public keym
: Message to encrypt (0 or 1)- Returns: Ciphertext as a tuple of (a, c)
Decrypts a ciphertext using the private key.
sk
: Private keyct
: Ciphertext to decrypt- Returns: Decrypted message (0 or 1)
Encrypts a message using quantum-enhanced techniques.
pk
: Public keym
: Message to encrypt (0 or 1)- Returns: Ciphertext as a tuple of (a, c)
Initializes the quantum resonance circuit with specified parameters.
resonance_freq
: Resonance frequency (default: 4.40 GHz)coupling_strength
: Coupling strength between qubits (default: 0.1)
Initializes the quantum state for the circuit.
- Returns: Initial quantum state as a complex numpy array.
Calculates the Hamiltonian matrix for the circuit.
- Returns: Hamiltonian matrix as a complex numpy array.
Evolves the quantum state over time using the Hamiltonian.
state
: Initial quantum statetime
: Time duration for evolution- Returns: Evolved quantum state as a complex numpy array.