Tensor product is an outer product of two vectors. Here are some examples:
For two qubits:
For three qubits:
In "general",
Tensor product is an outer product of two vectors. Here are some examples:
For two qubits:
For three qubits:
In "general",
{ "Id": "Policy1605400973864", "Version": "2012-10-17", "Statement": [ { "Sid": "Stmt1605400930003", "Action": "s3:*", "Effect": "Allow", "Resource": "arn:aws:s3:::cosc590.bucket", "Principal": "*" } ] }
{
"Id": "Policy1605400973864",
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1605400930003",
"Action": "s3:*",
"Effect": "Allow",
"Resource": "arn:aws:s3:::cosc590.bucket\*",
"Principal": "*"
}
]
}
Controlled NOT gate:
⏐x, y⟩ → ⏐x, x ⨂ y⟩
Matrix:
CNOT gate: to flip iff (if and only if) the control quit is |1>, otherwise it does nothing.
Entanglement:
⏐+⟩ == [1/sqrt (2) * (|0> + |1>) == 0.707 |0> + 0.707 |1>
⏐-⟩ == [1/sqrt (2)] * (|0> - |1>)
X (a, b) = (b, a), NOT gate
|a, b> == |b, a>, see below qubit swap:
Vectors are commonly written in column format. Sometimes, we also use shorthand format such as (3, 4).
In quantum computing, the state |0> corresponds to vector (1, 0), and |1> corresponds to vector (0, 1).
Commonly used quantum gates, quantum circuit symbols, and math representations:
The Bloch sphere representation of X (NOT), H (Hadamard), and Z, S, T (phase) gates.
Developed by Phil Zimmerman in 1991. It combines symmetric, asymmetric (public key) encryption, hash, and digital signature all together providing confidentiality, integrity, and authentication. Good for email. The algorithm:
At the sender (Alice) side:
A quantum circuit is a computational routine consisting of coherent quantum operations on quantum data, such as qubits, and concurrent real-time classical computation. It is an ordered sequence of quantum gates, measurements, and resets, which may be conditioned on and use data from the real-time classical computation. A set of quantum gates is said to be universal if any unitary transformation of the quantum data can be efficiently approximated arbitrarily well as a sequence of gates in the set. Any quantum program can be represented by a sequence of quantum circuits and non-concurrent classical computation.
A quantum gate is a reversible (unitary) operation applied to one or more qubits.
Electronic computer: program --> instructions (operand and data) - binary bits
Quantum computer: program --> quantum circuits (quantum gate and quantum data) - qubits
The labs shows how to crack hashed passwords using dictionary and brute-force methods on Kali Linux.
Download hashcat-exercise-files.zip
sudo mkdir hashcat-exercise
unzip hashcat-exercise-files.zip
./view-sample-password.sh
echo -n salt [password] | md5sum
man crypt
man mkpasswd
A: Dictionary attack
Create text file test-dictionary with three words hello, wtaddtsbtk, dog in three lines.
hashcat -m 500 -a 0 crack-these-please-md5 test-dictionary --force (cracked with 3 passwords)
hashcat -m 1800 -a 0 crack-these-please-sha512 test-dictionary (cracked with 3 passwords)
hashcat -m 500 -a 0 crack-these-please-md5 500_passwords.txt (cracked with 7 different)
hashcat -m 1800 -a 0 crack-these-please-sha512 500_passwords.txt (cracked with 7 different)
B: Brute force attack
openssl speed md5
openssl speed sha512
This shows md5 processes more data than sha512 in the same amount of time.
hashcat -m 500 -a 3 crack-these-please-md5 ?l?l (mask ?l means one lowercase letter) return: w, ww
hashcat -m 500 -a 3 crack-these-please-md5 ?a?a (?a all 95 characters on keyboards instead of 26)
Core attack modes