import streamlit as st
import sys
from os import path

sys.path.append(path.abspath('../'))

import function


def tag():
    tag = ["qiskit", "about"]
    date = "09/2021"
    lecture_time = "3"
    key = "advocate"
    title = "Became advocate !"
    extra = "You can find me in https://qiskit.org/advocates/ !"
    preview = """I started Quantum Computing since a year and half, today I'm now a Qiskit Advocate, here my Qiskit journey..."""
    return tag, date, lecture_time, key, title, extra, preview


def article():
    article = """
Since a month ago I became a Qiskit Advocate 🥳   
I discovered Quantum Computing in May 2020 and thanks/because of the pandemic had time to try developing and 
learn experimenting stuff. Since I past lot of my time (beside my job) reading about quantum algorithm and 
trying to create my own programs with.
        
This entire website is one of the result of how share to the entire world my way to experiments and what I did in QC !
        
For being selected as Qiskit Advocate, we need to show a certain level in QC as well as proving we are already 
active in the quantum community by sharing contributions. 
All of my personal work is always free and opensource, everything is available publicly in GitHub. 
That my philosophy of IT and science.
        
The contributions are rated by tiers (1st tier to 4th). Here the list of my contributions.
        
## My Qiskit contributions :
### Tier 1 (12-15 points)
#### Research papers using IBM Quantum systems / Qiskit
- [Informatique quantique - Qubit](https://hal.archives-ouvertes.fr/hal-03129625/document)
- [Informatique quantique - Mathématique](https://hal.archives-ouvertes.fr/hal-03129624/document)

#### Winners of IBM Quantum / Qiskit events
- IBM Quantum Challenge Fall 2020 - [Advanced badge](https://www.credly.com/badges/4cf18640-47fe-4fd0-9e5f-4edb5ade9693)
- IBM Quantum Challenge 2021 ranked 1st (score of 3 on the last exercise) - [Advanced badge](https://www.credly.com/badges/a020adc5-df85-48ae-9cbf-2e8bed405a5f)
        
### Tier 2 (8-12 points)
#### Individual Qiskit projects
- Pokemon Quantum fight - [Code](https://github.com/mickahell/quantum_pokemon-fight) -  [Article](https://fullstackquantumcomputation.tech/blog/post-quantum-pokemon-fight/)
A quantum game and algorithm to fight in Pokemon with an AI make with Grover.
- Quantum Nim game ([QChack21](https://www.quantumcoalition.io/)) - [Code](https://github.com/Quantronauts/quantum_Nim-game)
A remake of the Nim game with quantum rule mechanics and an AI make with Grover. For the QChack21.
##### Both of these games are playable in the [games section](https://games.xtraorbitals.xyz) of this website.
        
- Quantum Lab - [Code](https://github.com/mickahell/quantum_lab) - [Online platform](https://quantum-lab.xtraorbitals.xyz/) - [Article](https://fullstackquantumcomputation.tech/blog/post-quantum-lab/)
A multi docker images to simulate a full Quantum laboratory with Qiskit, Pennylane, Cirq, Q#, Simulaqron and QLM. 
All the images are available in the DockerHub also I setup a live platform allowing to test the Qiskit, 
Pennylane and Cirq environment and explaining how to Dockeurize a Quantum app.
        
### Tier 3 (4-8 points)
#### Organize a quantum event
- [Pint of Science event](https://pintofscience.fr/event/du-quantique-pour-votre-cerveau)
With the NGO Pint of Science, I organised a talk about quantum computing with as guest Olivier Hess (Leader of Quantum department at IBM France). 

#### Individual Qiskit projects that are relatively simple.
- [Experiments repository](https://github.com/mickahell/quantum_experiments)
All of my experiments even the most simple are available in a GitHub repository.

### To conclude
I enjoy so much doing all of these, some are now static and will no longer evolved but some other as 
the games AI (aka the robots) have their data analyse and will evolve to make them more performable.

### Bonus
What a surprise !! 🎁 As gift for becoming advocate, IBM and the Qiskit community sent me these goodies : 
a backpack with Qiskit logo and an IBM water bottle. Thanks a lot !
    """
    st.write(article, unsafe_allow_html=True)
    st.image('posts/ressources/swagpack.png', width=400, output_format='PNG')


def preview():
    tags, date, lecture_time, key, title, extra, preview = tag()

    function.metadata(tags, date, lecture_time, key, title, extra)

    with st.expander(preview):
        article()
        st.markdown(str("[go to up](#" + key + ")"))
