Sunday, October 29, 2023

transformer, encoder and decoder

 


A transformer architecture has two main segments: an encoder that primarily operates on the input sequence and a decoder that operates on the target sequence during training and predicts the next item

Reference: 

How to build a GPT model (leewayhertz.com)

Saturday, October 28, 2023

quantum phase estimation








 






Shor's algorithm


 

Explain why the period is related to factoring.

The connection between finding the period of a function and factoring large numbers is a clever insight that forms the basis of Shor's Algorithm. Here's how they are related.


More details on the example of factoring 15:


How do we choose a?

Shor's algorithm in details: 





Quantum Fourier transform



TODO Oct ?? draft quantum computing, teleporting


Quantum teleporting?  

https://www.youtube.com/watch?v=6fixVgtt2wg

Thursday, October 26, 2023

Grover's algorithm



 

search a number

https://youtu.be/pYD6bvKLI_c?feature=shared


https://lab.quantum-computing.ibm.com/user/5f848abaff5562001ae12c12/lab/tree/1.%20motivation-why-quantum-computing.ipynb


https://lab.quantum-computing.ibm.com/user/5f848abaff5562001ae12c12/lab/tree/2.%20elements-of-quantum-programming.ipynb












Apply Grover's algorithm to break RSA key. 


Because we do not know the factors of the RSA key, how do we define the Oracle when applying Gover's algorithm?



























Tuesday, October 24, 2023

Oct 24 , Part 2, assignment, H,H,Cx, not entangled

 Explain the following code mathematically. Is the final state entangled or not?

OPENQASM 2.0; include "qelib1.inc"; qreg q[2]; creg c[1]; h q[0]; h q[1]; cx q[0], q[1];





Thursday, October 19, 2023

AWS training materials

 


https://catalog.workshops.aws/research-computing/en-US/40-lab-1-container-basic


Wednesday, October 18, 2023

Oct 19, deutsch-jozsa-algorithm

charge iPad and ipen

Show that Deutsch-Jozsa extend the deutsch problem

 https://learning.quantum-computing.ibm.com/course/fundamentals-of-quantum-algorithms/quantum-query-algorithms#the-deutsch-jozsa-algorithm

The Deutsch-Josza algorithm is a quantum computing algorithm that solves a specific problem much faster than classical computers. Imagine you have a black box (also called an "oracle") with a function inside it. This function takes a binary input (like 0 or 1) and gives a binary output (again, 0 or 1). You're told that the function is either "constant" (always gives the same output, either all 0s or all 1s) or "balanced" (gives an equal number of 0s and 1s).

In a classical computer, you might have to check multiple inputs to figure out whether the function is constant or balanced. But the Deutsch-Josza algorithm can tell you this in just one step! It uses the principles of quantum mechanics, like superposition and interference, to do this quickly.









contrast learning

 

https://builtin.com/machine-learning/contrastive-learning

self-supervised learning. 



Wednesday, October 11, 2023

high school student summer reserch camp at Stonybrook University

 

这个是当年Stony Brook 在STS张榜后发的一个news. 在这个文章的尾部有他们的program的链接。Simons and Garcia是非常有名的,我们没能去这两个program, 去的是independent. https://news.stonybrook.edu/facultystaff/19-hs-students-mentored-at-sbu-make-regeneron-science-competition-top-300-scholars/


这个链接有更多的信息:https://www.stonybrook.edu/undergraduate-admissions/info-for/high-school-programs.php

Fusheng Wang | Department of Computer Science (stonybrook.edu)


High School Students (stonybrook.edu)


Thursday, October 5, 2023

Oct 5, lect, part 2, H, H is not entangled.

 

OPENQASM 2.0;
include "qelib1.inc";
qreg q[2];
creg c[1];
h q[0];
h q[1];












Oct 5, lecture, part 1, CNOT + H gate

 

Explain step by step of the following, with mathematical formula. Is the final state entangled or not? OPENQASM 2.0; include "qelib1.inc"; qreg q[2]; creg c[1]; cx q[0], q[1]; h q[0];






















Oct 5, lecture, part 3, H-H inteference

 

when apply Hadamard gate twice to a quibit, what will happen? WHy?