Computer Science HL

All projects and code for this class can be found on my GitHub page here. The work log is shown below:

6-Weeks #1

  • The objective this six weeks was to explore the concept of neural networks and machine learning in practical application.
    • Another objective was to become familiar with TensorFlow as a mathmatics and machine learning library
  • The objective this siz weeks was to create a program that could identify the digits in a reCAPTCHA.
TensorFlow as a math library:

TensorFlow is of great use as a math library. It includes functions for computations on matrices and vectors, and for anyhting that it does not include, NumPy can be substituted, and in most cases is explicitly compatible with TensorFlow. The example code on TensorFlow’s website can do cool things in an amazingly small amount of code. The image at the top of this page was computed using partial derivatives using tensorflow to simulate a pond with raindrops. The code for this can be found on TensorFlow’s website.

TensorFlow for machine learning:

Tensorflow was made to make machine learning easy, and it definitely does. The basic MNIST problem can be set up and completed to within 92% accuracy with only a few lines of code (see here). Some more tweaks and refinements are obviously necessary to achieve a much better result, but this ease of setting up a machine learning model is really awesome. This was a really great tool to use to get set up quickly with a working neural network.


I was not able to meet my goal of breaking reCAPTCHA with a solution to the MNIST problem. The code that I attempted to use can be found here. Lots of this code comes from TensorFlow’s tutorials, but was modified so that I could try to use it for my project. Although the neural network was very accurate for the MNIST problem, changing the code to be able to interact with an image consisting of multiple digits proved to be the main challenge. Much of my time was spent thinking over this problem, so the code is not very impressive right now. My goal is to continue to pursue this challenge, however, since I believe it will continue to help my understanding of TensorFlow as a framework, even if the concepts of machine learning that it employs are relatively basic.

6-Weeks #2

  • The objective for this six-weeks period was twofold:
    • Spend some time on the case-study for the IB HL test this year
    • Work on learning about quantum computers with the eventual goal being the simulation of one
IB Case Study:

Some time was spent on this, but most was spent on the other objective. The vocab sheet that was compiled for this part can be found here. The case study this year focuses around autonomous vehicles, both in the operational sense, which directly relates to computer science, and in the ethical/societal sense.

Quantum Computers:

For most of this six weeks, I have spent time researching quantum computers with a classmate. Much of the work so far has been theoretical: getting the basic mathematical notation and scientific understanding. Thus, not much code has been written as of yet, but the code that has can be found on GitHub.

The end goal for this project will be the simulation of a basic quantum system that acts in a probabilistic fashion. This simulation should eventually encompass representations of qubits, entangled systems, and transform operations that act in a way akin to a real quantum computer. We recognize that the operation time on a digital computer will be slower while simulating a quantum system, but by counting the steps instead of the time, we can reasonably compare algorithm efficiency between the classical computer and the quantum simulation running on top of it.

6-Weeks #3

  • The objective for this six weeks was to end with a functional simulation of a quantum system
    • This was not actually practical
    • Progress was made on designing a system of classes that can be used as abstractions
  • Increased understanding of quantum mechanics and algorithms like Shor’s was gained
Quantum Computing:

Most of the time this six weeks period has been spent on designing and implementing a simulation of a quantum computer. Although the final product has not turned out to be practical within this short amount of time, I have gained knowledge of quantum systems and advanced algorithms that will help continue efforts.

The code that has been written can be found on GitHub. This includes a qubit class, with experimental and debugging measurement capabilities, a skeleton quantum class, which may be used in the future to implement entanglement into the simulation, and a few other files, such as the qgate class, which are not designed well enough to be implemented at the current stage.


The other part of this marking period has been spent on training for the competitive programming competition call USACO that is starting in mid-December. Training for this has likewise involved a refresher of algorithms, C++, and data structures. This training will hopefully pay off as USACO begins.