Skip to main content

· 3 min read

This is a writeup for the challenge Phasestream 2, part of the Hack the box's Cyberapocalypse CTF 2021, category Crypto.

Prompt

The aliens have learned of a new concept called "security by obscurity". Fortunately for us they think it is a great idea and not a description of a common mistake. We've intercepted some alien comms and think they are XORing flags with a single-byte key and hiding the result inside 9999 lines of random data, Can you find the flag?

· 13 min read
  1. Quantum Programming by abstracting ourselves from Quantum Mechanics: Abstraction level 0
  2. Quantum Programming - Abstraction level 1: Logic Gates
  3. Quantum Programming - Abstraction level 2: State Machine and Algorithms (this)

We have been on quite the adventure so far. Let's recap our progress.

  • We've shown that by encoding information onto n qubits in superposition, we can manipulate the whole system of 2n states by only changing the state of one qubit.
  • We represented the state of each qubit as a simple 2D vector.
  • We've established that we can change the state of a single qubit (or two) by applying different logic gates to it, similarly to a classical logic gate.
  • We can now visualise the superposed state of the qubit (indeed of the whole system) on the Bloch sphere.
  • We know how to entangle two qubits, so that their states are correlated.

Now the time has come to start putting it all together. Wouldn't it be nice to actually string some gates together, and see what happens?

Well, in order to see what happens, we might want to be able to visualise the flow of our qubits' states, so we can see how each gate manipulates each qubit at each step.

Unit circle State machine

· 14 min read
  1. Quantum Programming by abstracting ourselves from Quantum Mechanics: Abstraction level 0
  2. Quantum Programming - Abstraction level 1: Logic Gates (this)
  3. Quantum Programming - Abstraction level 2: State Machine and Algorithms

We have previously worked out that a quantum computer operates logically on qubits, which are the quantum counterparts of classical bits. We've learned that a qubit can stay in a superposition while we operate on it, and then we can collapse it into a definite state upon measurement. So, for the majority of our time spent programming on the quantum computer, we will be thinking of the qubits in their state of superposition.

What would be extremely useful for our intuition now, would be to have a way to visualise this superposition. Enter the Bloch Sphere. This tool allows us to represent the whole state-space of a single qubit in one (very simple) geometric shape - the unit sphere. Think of it as the unit circle in trigonometry.

· 10 min read
  1. Quantum Programming by abstracting ourselves from Quantum Mechanics: Abstraction level 0 (this)
  2. Quantum Programming - Abstraction level 1: Logic Gates
  3. Quantum Programming - Abstraction level 2: State Machine and Algorithms

The invention of the personal computer, and the further development of the hundreds of programming languages which utilise it has allowed us programmers to completely abstract ourselves from the world of electrons flowing through solid matter, and further from the low level programming of turning gates and transistors on and off to produce binary data.

· 11 min read

Nowadays you would be hard-pressed to amaze anyone with the knowledge that stars are these ever-moving objects in the sky, at wildly different distances from us and each-other. Not only that, but many of the objects in the night sky we recognise as stars are often whole galaxies containing billions of stars, or giant clouds of gas glowing with the intensity of stars in our eyes, or god knows what else.

· 7 min read

Rational numbers are easy. They include the integers, with which you can count up and down the number line, as well as fractions - written as the division of two integers or as a finitely-long decimal expansion.

But there aren't that many rational numbers on the real number line, as there are irrationals. These beasts of infinitely-long decimal expansions take the vast majority of the infinity of real numbers. They can't be written as a fraction, and they can't be written exactly as a decimal expansion (it would be infinitely long).

· 15 min read

In two previous posts we got to know two main things:

  1. We can analyse the behaviour of groups of animals using statistical tools like correlation functions
  2. We can simulate this behaviour using for example the Vicsek model, and by analysing it the same way as natural groups we can measure the accurateness of the model in replicating natural phenomena.

We also learned that the standard Vicsek model suffers from one weakness: it lacks an inertial term, which seems to be important in imitating the behaviour of biological systems. So the goal of this post will be to figure out a way to simulate the Vicsek model with time delay. Let's start by

Analysing the equations of motion

vi(t+1)=v0RηΘ[vi(t)+jinijvj(t)],\vec{v_i}(t+1) = v_{0}\mathscr{R}_{\eta}\Theta \left[ \vec{v_i}(t) + \sum_{ j \neq i }{ n_{ij} \vec{v_j}(t) } \right] ,
ri(t+1)=ri(t)+vi(t+1).\vec{r_i}(t+1) = \vec{r_i}(t) + \vec{v_i}(t+1) .

· 5 min read

if you haven't seen the first part of this introduction, absolutely go check it out for context.

In this post we'll unravel how does the delay in a group of animals affect the group, and what should we understand under said delay (keyword: slowpoke). To get there, let's analyse the last two paragraphs of the introduction to my thesis, where we'll see what problems can be spotted in previous research, and motivate ourselves to look for solutions.

· 7 min read

Posts on the subject so far:

  1. How do birds flock and insects swarm: the Introduction
  2. How do birds flock and insects swarm: the Problem with current models
  3. Simulating the Vicsek Model (with time delay) - How do birds flock and insects swarm

It's been my recent pleasure to work on a project (my thesis to be exact) which utilised Statistical Physics, to explore the emergent phenomena of flocking and swarming in natural systems. As past me had a stroke of creativity, I will let you enjoy his introduction to the subject - as seen in the finished thesis, interrupted by explanatory commentary:

· 6 min read

Интродукция

Наскоро се заинтересувах от един интересен закон за разпределението на думите използвани в даден език, наречен законът на Зиф. Според него честотата на употреба на думите в дадено произведение или просто смислена колекция следва експоненциален закон, т.е. броят на употреба на всяка следваща дума в списъка от използвани такива намаля експоненциално спрямо предишната. Последствие от това е, че горе долу във всяка такава колекция 80% от обема се състои от 20% от думите, принцип известен като Принципът на Парето.