qflip-CQPANCOAST


Nameqflip-CQPANCOAST JSON
Version 1.0.2 PyPI version JSON
download
home_pagehttps://github.com/cqpancoast/quantum-flip
SummaryDeterminism is for losers - make your decisions using quantum mechanics.
upload_time2020-09-04 14:58:06
maintainer
docs_urlNone
authorCasey Pancoast
requires_python
licenseMIT
keywords quantum coin flip rng qrng qflip flip universe
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Quantum Coin Flip

Flipping a coin is for losers; use quantum mechanics instead.

## Install

It's on pypi [here](https://pypi.org/project/qflip-CQPANCOAST/): `pip install qflip-CQPANCOAST`.
To uninstall, `pip uninstall qflip-CQPANCOAST`.

I use this repository for Python packaging practice, as the function is so simple.

## The Code

### Hey, *I'm* not a loser. What's going on?

A lab at ANU is continually making measurements on the quantum vacuum and then putting binary versions of that up on the internet. [Here it is!](https://qrng.anu.edu.au)

I originally wrote this code by adapting an html parser from [here](https://github.com/pcragone/anurandom/blob/master/anurandom.py) for my students in a Computational Methods in Physics class that I was a course assistant for, Spring 2019.
The script came later: flipping a coin was too deterministic for me, so I wrote a python script for the shell that gives me truly random quantum measurements!
Most of the code is mine now, but I figure I should still credit the guy or gal.

### How do I use it?

Just type in qflip and then the number of things you have to choose between.
The program will:
- take a huge number from the ANU quantum random number generator,
- split it into a bunch of still big ones),
- store those numbers in a json file in `~/.qflip`,
- and mod it by the number you specify.

If you don't spefcify a number, it'll choose 2.

```shell
$ qflip
0
$ qflip
1
$ qflip
1
$ qfilp 27
13
$ qflip 0      # This will throw a ValueError.
$ qflip -1     # So will this...
$ qflip beans  # ...and this.
$ qflip 1      # This is fine, though not useful.
0
```

Need to decide what I'll have for dinner?
If I have four options, I just assign each of them a number from 0 to 3, and type `qflip 4` into the prompt.

Need to decide what homework assignment I'll do first?
If I have seventeen options... well, you get the point.

## The Physics

### No, but really, what's going on here?

First of all, there's no way of testing the experimentally, but many (including me) are of the opinion that thinking about this any other way requires mangling the beautiful, beautiful math.

Here's what's up: in laymans terms, before we observe Schrodinger's cat, it is in a superposition of states: neither dead nor alive.
Then, we open the box to make our observation.
It looks *to us* like cat is now definitely alive or dead, but really, *we have split* into someone who saw the cat live and someone who saw the cat die, just like the cat had split earlier!
This isn't the place to go into how quantum mechanics works, but what you need to know is that there's a *totally real other universe* where the numbers in the picture above are different.
Isn't that cool?

When I use this program to decide what shirt to wear, I end up wearing all of them – but it looks to me like I chose one.
We are part of the universe, and we *also* follow the strange laws of quantum mechanics.

If you want further explanation, first do some reading on quantum mechanics ([The Feynman Lectures](https://www.feynmanlectures.caltech.edu/III_toc.html) are always a great place to start), then check out [Hugh Everett's Theory of the Universal Wavefunction](https://www-tc.pbs.org/wgbh/nova/manyworlds/pdf/dissertation.pdf), more popularly known as the "Many Worlds" interpretation of quantum mechanics.

Again, no way of testing this experimentally, but it sure makes the most sense to me.
Debating interpretations of quantum mechanics is exhuasting, so if you're looking for arguments one way or the other, you're free to look online.

## Dear reader, there are so many people smarter than I am.

If you're looking to use the ANU quantum random number server for actual work, don't use this repo — this is just a silly thing I made, functional though it is.
[This project](https://github.com/lmacken/quantumrandom), on the other hand, has a wide array of utility.
Check it out!

[This](https://www.youtube.com/watch?v=oHg5SJYRHA0) is also pretty cool.




            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/cqpancoast/quantum-flip",
    "name": "qflip-CQPANCOAST",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "quantum coin flip rng qrng qflip flip universe",
    "author": "Casey Pancoast",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/36/6b/34b9731988ce176ec3a487e0473e2a5067810fbaa57ac16cefec67ea1673/qflip-CQPANCOAST-1.0.2.tar.gz",
    "platform": "",
    "description": "# Quantum Coin Flip\n\nFlipping a coin is for losers; use quantum mechanics instead.\n\n## Install\n\nIt's on pypi [here](https://pypi.org/project/qflip-CQPANCOAST/): `pip install qflip-CQPANCOAST`.\nTo uninstall, `pip uninstall qflip-CQPANCOAST`.\n\nI use this repository for Python packaging practice, as the function is so simple.\n\n## The Code\n\n### Hey, *I'm* not a loser. What's going on?\n\nA lab at ANU is continually making measurements on the quantum vacuum and then putting binary versions of that up on the internet. [Here it is!](https://qrng.anu.edu.au)\n\nI originally wrote this code by adapting an html parser from [here](https://github.com/pcragone/anurandom/blob/master/anurandom.py) for my students in a Computational Methods in Physics class that I was a course assistant for, Spring 2019.\nThe script came later: flipping a coin was too deterministic for me, so I wrote a python script for the shell that gives me truly random quantum measurements!\nMost of the code is mine now, but I figure I should still credit the guy or gal.\n\n### How do I use it?\n\nJust type in qflip and then the number of things you have to choose between.\nThe program will:\n- take a huge number from the ANU quantum random number generator,\n- split it into a bunch of still big ones),\n- store those numbers in a json file in `~/.qflip`,\n- and mod it by the number you specify.\n\nIf you don't spefcify a number, it'll choose 2.\n\n```shell\n$ qflip\n0\n$ qflip\n1\n$ qflip\n1\n$ qfilp 27\n13\n$ qflip 0      # This will throw a ValueError.\n$ qflip -1     # So will this...\n$ qflip beans  # ...and this.\n$ qflip 1      # This is fine, though not useful.\n0\n```\n\nNeed to decide what I'll have for dinner?\nIf I have four options, I just assign each of them a number from 0 to 3, and type `qflip 4` into the prompt.\n\nNeed to decide what homework assignment I'll do first?\nIf I have seventeen options... well, you get the point.\n\n## The Physics\n\n### No, but really, what's going on here?\n\nFirst of all, there's no way of testing the experimentally, but many (including me) are of the opinion that thinking about this any other way requires mangling the beautiful, beautiful math.\n\nHere's what's up: in laymans terms, before we observe Schrodinger's cat, it is in a superposition of states: neither dead nor alive.\nThen, we open the box to make our observation.\nIt looks *to us* like cat is now definitely alive or dead, but really, *we have split* into someone who saw the cat live and someone who saw the cat die, just like the cat had split earlier!\nThis isn't the place to go into how quantum mechanics works, but what you need to know is that there's a *totally real other universe* where the numbers in the picture above are different.\nIsn't that cool?\n\nWhen I use this program to decide what shirt to wear, I end up wearing all of them \u2013 but it looks to me like I chose one.\nWe are part of the universe, and we *also* follow the strange laws of quantum mechanics.\n\nIf you want further explanation, first do some reading on quantum mechanics ([The Feynman Lectures](https://www.feynmanlectures.caltech.edu/III_toc.html) are always a great place to start), then check out [Hugh Everett's Theory of the Universal Wavefunction](https://www-tc.pbs.org/wgbh/nova/manyworlds/pdf/dissertation.pdf), more popularly known as the \"Many Worlds\" interpretation of quantum mechanics.\n\nAgain, no way of testing this experimentally, but it sure makes the most sense to me.\nDebating interpretations of quantum mechanics is exhuasting, so if you're looking for arguments one way or the other, you're free to look online.\n\n## Dear reader, there are so many people smarter than I am.\n\nIf you're looking to use the ANU quantum random number server for actual work, don't use this repo \u2014 this is just a silly thing I made, functional though it is.\n[This project](https://github.com/lmacken/quantumrandom), on the other hand, has a wide array of utility.\nCheck it out!\n\n[This](https://www.youtube.com/watch?v=oHg5SJYRHA0) is also pretty cool.\n\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Determinism is for losers - make your decisions using quantum mechanics.",
    "version": "1.0.2",
    "split_keywords": [
        "quantum",
        "coin",
        "flip",
        "rng",
        "qrng",
        "qflip",
        "flip",
        "universe"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "c055170fc123dd117864ac718f75056c",
                "sha256": "f7f879d4a567449144f61a8641602e44865c2e1ce9c969d92548087877c4eaa0"
            },
            "downloads": -1,
            "filename": "qflip_CQPANCOAST-1.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c055170fc123dd117864ac718f75056c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5529,
            "upload_time": "2020-09-04T14:57:56",
            "upload_time_iso_8601": "2020-09-04T14:57:56.923989Z",
            "url": "https://files.pythonhosted.org/packages/c4/fb/68a120496bb2bb3d4c55c909c1bc336f091a8dc262c4b5a898a55c59e51a/qflip_CQPANCOAST-1.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "bdc441928ad5abfde030a43025ccbf74",
                "sha256": "6889bd922d7bda185b4448b3f01acffe93f02ab27f1fdfd2cdce1fc14552ca65"
            },
            "downloads": -1,
            "filename": "qflip-CQPANCOAST-1.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "bdc441928ad5abfde030a43025ccbf74",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4277,
            "upload_time": "2020-09-04T14:58:06",
            "upload_time_iso_8601": "2020-09-04T14:58:06.550961Z",
            "url": "https://files.pythonhosted.org/packages/36/6b/34b9731988ce176ec3a487e0473e2a5067810fbaa57ac16cefec67ea1673/qflip-CQPANCOAST-1.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2020-09-04 14:58:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": null,
    "github_project": "cqpancoast",
    "error": "Could not fetch GitHub repository",
    "lcname": "qflip-cqpancoast"
}
        
Elapsed time: 0.12791s