Skip to content

Commit 39e2fff

Browse files
authored
August challenge (#43)
* Add August challenge * Update README
1 parent de3dd32 commit 39e2fff

File tree

2 files changed

+112
-17
lines changed

2 files changed

+112
-17
lines changed

README.md

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,40 @@
11
# QOSF Monthly Challenges
22

3-
Repository containing monthly challenges in quantum computing.
3+
A repository containing monthly challenges in quantum computing.
44

55
## Current Challenge
66

7-
**Link to Problem Notebook**: [July 2021 Challenge](challenge-2021.07-jul/challenge-2021.07-jul.ipynb) - Quantum State Tomography
7+
**Link to Challenge Notebook**: [August 2021 Challenge](challenge-2021.07-aug/challenge-2021.07-aug.ipynb) - W states
88

9-
**Release date**: July 21st, 2021
9+
**Release date**: August 19th, 2021
10+
**Submission deadline (optional):** September 16, 2021
1011

11-
**Submission deadline (optional):** August 18th, 2021
12+
You can see previous challenges [here](#previous-challenges).
1213

1314
## How it Works
1415

15-
These challenges will help you hone your general quantum computing skills by tackling some problems.
16+
These challenges will help you hone your quantum computing skills by being exposed to a variety of problems in different areas.
1617

17-
We release a new question every month. These are open to everybody and you're welcome to try your hand at solving them either individually or as a team.
18-
- You are free to use any framework that you like, and submit your solutions in any format. Just make sure they're easy to evaluate.
18+
We release a new challenge every month that are open to anyone and everyone. You're welcome to try your hand at solving them individually or as a team.
1919

20-
**You're also welcome to *contribute* challenge questions! Open an issue on this repo and describe the question, we'll take a look at it!**
20+
You are free to use any framework that you like and submit your solutions in any format. Just make sure that they're easy to evaluate.
21+
22+
**You're also welcome to *contribute* challenges! Open an issue on this repo and describe your idea and we'll be happy to take a look at it!**
2123

2224
## Tentative Timeline
2325

24-
- We will try and release each challenge on the same date every month.
25-
- You get a month's time to solve each question, but if you wish to have your solution reviewed please aim to submit your solution within the first 2 or 3 weeks (to allow for sufficient time for reviews).
26+
- We try and release each challenge on the same date every month, but some times this varies (hey, we're all volunteers).
27+
- You get a month's time to solve each challenge, but if you wish to have your solution reviewed please aim to submit your solution within the first 2 or 3 weeks (to allow for sufficient time for reviews).
2628

2729
## Submission
2830

2931
- Please fork this repository and use that to work on your solutions to the challenges.
30-
- Follow the folder structure that you see here. For each challenge, create a directory in your repo called `challenge-xx`, where xx is the challenge number.
31-
- Under this directory, create a folder with your github username (all lowercase, separated-by-hyphens). Your solution goes into this directory.
32+
- Under the challenge directory you wish to attempt to solve, create a folder with your github username (all lowercase, separated-by-hyphens). Your solution goes into this directory. Look at prior submissions for examples if you are not clear on this.
33+
- Do not delete or modify any of the original challenge files since this will show up when you submit your solution.
3234
- If you complete a challenge and want to "submit" your solution, raise a Pull Request (PR) from your repo to ours.
33-
- If your solutions works, we'll merge it to our repo.
34-
- The best ones will be given a shout-out! 😃
35-
- Note that if you're working as a team, it is sufficient to submit just one PR.
35+
- **After you submit your PR, you must find at least one other reviewer to review your work**. Your reviewer could be a fellow challenge submitter (trade off reviews!), reach out individually to another community member on Slack, or post in the [#monthly-challenges](https://qosf.slack.com/archives/C01D2GB1DMM) channel asking for a review.
36+
- We will give shout-outs to the best submissions! 😃
37+
- Note that if you're working as a team, it is sufficient to submit just one PR. Please make sure to have all of your teammates properly credited in your solution.
3638

3739
## Evaluation
3840

@@ -42,7 +44,7 @@ We release a new question every month. These are open to everybody and you're we
4244

4345
## Communication
4446

45-
- Please join the Slack channel for the challenge, where you can ask any questions you might have: [#monthly-challenges](https://qosf.slack.com/archives/C01D2GB1DMM)
47+
- Please join the [#monthly-challenges](https://qosf.slack.com/archives/C01D2GB1DMM) Slack channel for the challenge where you can share ideas with others and ask any questions you might have.
4648

4749
## Git FAQ
4850

@@ -119,4 +121,10 @@ Submission deadline (optional): May 30th, 2021
119121

120122
[June 2021 Challenge](challenge-2021.06-jun/challenge-2021.06-jun.ipynb): k-Nearest Neighbors
121123
Release date: June 19th, 2021
122-
Submission deadline (optional): July 17th, 2021
124+
Submission deadline (optional): July 17th, 2021
125+
126+
---
127+
128+
[July 2021 Challenge](challenge-2021.07-jul/challenge-2021.07-jul.ipynb): Quantum State Tomography
129+
Release date: July 21st, 2021
130+
Submission deadline (optional): August 18th, 2021
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"# August 2021 Challenge: W states\n",
8+
"\n",
9+
"A [**W state**](https://en.wikipedia.org/wiki/W_state) is an entangled state of the form:\n",
10+
"\n",
11+
"$$ | \\text{W} \\rangle = \\sqrt{\\frac{1}{3}} \\left( | 001 \\rangle + | 010 \\rangle + | 100 \\rangle \\right ) $$\n",
12+
"\n",
13+
"If you're coming from a machine learning background, you might think it looks like a superposition of [one-hots](https://en.wikipedia.org/wiki/One-hot) where each one-hot is equally probable.\n",
14+
"\n",
15+
"If you're new to quantum computing, then it might look similar to the [**GHZ state**](https://en.wikipedia.org/wiki/Greenberger%E2%80%93Horne%E2%80%93Zeilinger_state), which you've probably been acquainted with:\n",
16+
"\n",
17+
"$$ | \\text{GHZ} \\rangle = \\frac{| 000 \\rangle + | 111 \\rangle}{\\sqrt{2}} $$\n",
18+
"\n",
19+
"which itself is a natural extension of the $|\\Phi^+\\rangle$ [**Bell state**](https://en.wikipedia.org/wiki/Bell_state):\n",
20+
"\n",
21+
"$$ | \\Phi^+ \\rangle = \\frac{| 00 \\rangle + | 11 \\rangle}{\\sqrt{2}} $$\n",
22+
"\n",
23+
"The original state was 3 qubits and has since been generalized to $n$ qubits:\n",
24+
"\n",
25+
"$$\n",
26+
"| W_n \\rangle = \\frac{1}{\\sqrt{n}} \\left ( | 0\\dots 01 \\rangle + | 0\\dots 10 \\rangle + \\dots + | 1\\dots 00 \\rangle \\right ) \n",
27+
"$$\n",
28+
"\n",
29+
"Where it differs from the $\\text{GHZ}$ state is in its robustness. After a single qubit is measured there is still remaining entanglement among the other qubits. This is not the case in a $\\text{GHZ}$ state. As such, it can be a valuable resource in the implementation of teleportation or quantum memories.\n",
30+
"\n",
31+
"If you're interested in a more detailed explanation, then please see Resource [A].\n",
32+
"\n",
33+
"For this challenge, we're going to put a slight spin on what's normally asked of you. If you Google \"W state preparation\" you're going to find many examples, such as those in Resource [B]. Instead of a straight-forward analytical approach to solving this challenge, we ask you to implement a solution using a [variational quantum algorithm (VQA)](https://www.mustythoughts.com/vqas-how-do-they-work). Which one? That is up to you.\n",
34+
"\n",
35+
"**Warm up:** If you're new to state preparation, then as a warm up start by creating the $|\\Phi^+\\rangle$ and $|\\text{GHZ}\\rangle$ states above without the use of a VQA.\n",
36+
"\n",
37+
"**Level 1:** Use a VQA to create a 4-qubit $\\text{W}$ state.\n",
38+
"\n",
39+
"**Level 2:** Generalize the program to create an $n$-qubit $\\text{W}$ state.\n",
40+
"\n",
41+
"**Level 3:** Adjust your VQA to have it not introduce any global phase (NOTE: this implies that we're using a simulator since you wouldn't be able to determine global phase on actual hardware).\n",
42+
"\n",
43+
"**Bonus:** If you're enjoying this challenge, then you may also like to try implementing the approach in Reference [1].\n",
44+
"\n",
45+
"**Resources**\n",
46+
"\n",
47+
"[A] IBM Quantum Composer Docs: Field Guide on Entaglement. https://quantum-computing.ibm.com/composer/docs/iqx/guide/entanglement#w-states-vs-ghz-states \n",
48+
"[B] Stack Exchange: General construction of $\\text{W}_n$-state. https://quantumcomputing.stackexchange.com/questions/4350/general-construction-of-w-n-state \n",
49+
"\n",
50+
"**References**\n",
51+
"\n",
52+
"[1] Efficient quantum algorithms for GHZ and W states, and implementation on the IBM quantum computer. Diogo Cruz, et. al. https://arxiv.org/pdf/1807.05572.pdf \n",
53+
"\n",
54+
"\n",
55+
"_Special thanks to Diego Emilio Serrano for the idea, who also credits Soham Pal_"
56+
]
57+
},
58+
{
59+
"cell_type": "code",
60+
"execution_count": null,
61+
"metadata": {},
62+
"outputs": [],
63+
"source": []
64+
}
65+
],
66+
"metadata": {
67+
"kernelspec": {
68+
"display_name": "Python 3",
69+
"language": "python",
70+
"name": "python3"
71+
},
72+
"language_info": {
73+
"codemirror_mode": {
74+
"name": "ipython",
75+
"version": 3
76+
},
77+
"file_extension": ".py",
78+
"mimetype": "text/x-python",
79+
"name": "python",
80+
"nbconvert_exporter": "python",
81+
"pygments_lexer": "ipython3",
82+
"version": "3.9.2"
83+
}
84+
},
85+
"nbformat": 4,
86+
"nbformat_minor": 4
87+
}

0 commit comments

Comments
 (0)