qiskit-alice-bob-provider


Nameqiskit-alice-bob-provider JSON
Version 0.6.0 PyPI version JSON
download
home_pageNone
SummaryProvider for running Qiskit circuits on Alice & Bob QPUs and simulators
upload_time2024-04-24 08:39:37
maintainerNone
docs_urlNone
authorAlice & Bob Software Team
requires_python>=3.7
licenseApache 2.0
keywords qiskit alice & bob quantum sdk
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Alice & Bob Qiskit provider

This project contains a provider that allows access to
[Alice & Bob](https://alice-bob.com/) QPUs and emulators using
the Qiskit framework.

Full documentation
[is available here](https://alice-bob.notion.site/Alice-Bob-Felis-documentation-52e554ccbea54e34831761f083883e49)
and sample notebooks using the provider
[are available here](https://github.com/Alice-Bob-SW/emulation-examples).

## Installation

You can install the provider using `pip`:

```bash
pip install qiskit-alice-bob-provider
```

`pip` will handle installing all the python dependencies automatically and you
will always install the  latest (and well-tested) version.

## Remote execution on Alice & Bob QPUs: use your API key

To obtain an API key, please [contact Alice & Bob](https://alice-bob.com/contact/).

You can initialize the Alice & Bob remote provider using your API key
locally with:

```python
from qiskit_alice_bob_provider import AliceBobRemoteProvider
ab = AliceBobRemoteProvider('MY_API_KEY')
```

Where `MY_API_KEY` is your API key to the Alice & Bob API.

```python
print(ab.backends())
backend = ab.get_backend('EMU:1Q:LESCANNE_2020')
```

The backend can then be used like a regular Qiskit backend:

```python
from qiskit import QuantumCircuit, execute

c = QuantumCircuit(1, 2)
c.initialize('+', 0)
c.measure_x(0, 0)
c.measure(0, 1)
job = execute(c, backend)
res = job.result()
print(res.get_counts())
```

## Local emulation of cat quit processors

This project contains multiple emulators of multi cat qubit processors.

```python
from qiskit_alice_bob_provider import AliceBobLocalProvider
from qiskit import QuantumCircuit, execute, transpile

provider = AliceBobLocalProvider()
print(provider.backends())
# EMU:6Q:PHYSICAL_CATS, EMU:40Q:PHYSICAL_CATS, EMU:1Q:LESCANNE_2020
```

The `EMU:nQ:PHYSICAL_CATS` backends are theoretical models of quantum processors made
up of physical cat qubits.
They can be used to study the properties of error correction codes implemented
with physical cat qubits, for different hardware performance levels
(see the parameters of class `PhysicalCatProcessor`).

The `EMU:1Q:LESCANNE_2020` backend is an interpolated model simulating the processor
used in the [seminal paper](https://arxiv.org/pdf/1907.11729.pdf) by Raphaƫl
Lescanne in 2020.
This interpolated model is configured to act as a digital twin of the cat qubit
used in this paper.
It does not represent the current performance of Alice & Bob's cat qubits.

The example below schedules and simulates a Bell state preparation circuit on
a `EMU:6Q:PHYSICAL_CATS` processor, for different values of parameters
`average_nb_photons` and `kappa_2`.

```python
from qiskit_alice_bob_provider import AliceBobLocalProvider
from qiskit import QuantumCircuit, execute, transpile

provider = AliceBobLocalProvider()

circ = QuantumCircuit(2, 2)
circ.initialize('0+')
circ.cx(0, 1)
circ.measure(0, 0)
circ.measure(1, 1)

# Default 6-qubit QPU with the ratio of memory dissipation rates set to
# k1/k2=1e-5 and cat size, average_nb_photons, set to 16.
backend = provider.get_backend('EMU:6Q:PHYSICAL_CATS')

print(transpile(circ, backend).draw())
# *Displays a timed and scheduled circuit*

print(execute(circ, backend, shots=100000).result().get_counts())
# {'11': 49823, '00': 50177}

# Changing the cat size from 16 (default) to 4 and k1/k2 to 1e-2.
backend = provider.get_backend(
    'EMU:6Q:PHYSICAL_CATS', average_nb_photons=4, kappa_2=1e4
)
print(execute(circ, backend, shots=100000).result().get_counts())
# {'01': 557, '11': 49422, '10': 596, '00': 49425}
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "qiskit-alice-bob-provider",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "Qiskit, Alice & Bob, Quantum, SDK",
    "author": "Alice & Bob Software Team",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/f1/c4/17e6e853bf1c5715df410b4bf558d2864b8a268ec8445824bcc486d62bd8/qiskit_alice_bob_provider-0.6.0.tar.gz",
    "platform": null,
    "description": "# Alice & Bob Qiskit provider\n\nThis project contains a provider that allows access to\n[Alice & Bob](https://alice-bob.com/) QPUs and emulators using\nthe Qiskit framework.\n\nFull documentation\n[is available here](https://alice-bob.notion.site/Alice-Bob-Felis-documentation-52e554ccbea54e34831761f083883e49)\nand sample notebooks using the provider\n[are available here](https://github.com/Alice-Bob-SW/emulation-examples).\n\n## Installation\n\nYou can install the provider using `pip`:\n\n```bash\npip install qiskit-alice-bob-provider\n```\n\n`pip` will handle installing all the python dependencies automatically and you\nwill always install the  latest (and well-tested) version.\n\n## Remote execution on Alice & Bob QPUs: use your API key\n\nTo obtain an API key, please [contact Alice & Bob](https://alice-bob.com/contact/).\n\nYou can initialize the Alice & Bob remote provider using your API key\nlocally with:\n\n```python\nfrom qiskit_alice_bob_provider import AliceBobRemoteProvider\nab = AliceBobRemoteProvider('MY_API_KEY')\n```\n\nWhere `MY_API_KEY` is your API key to the Alice & Bob API.\n\n```python\nprint(ab.backends())\nbackend = ab.get_backend('EMU:1Q:LESCANNE_2020')\n```\n\nThe backend can then be used like a regular Qiskit backend:\n\n```python\nfrom qiskit import QuantumCircuit, execute\n\nc = QuantumCircuit(1, 2)\nc.initialize('+', 0)\nc.measure_x(0, 0)\nc.measure(0, 1)\njob = execute(c, backend)\nres = job.result()\nprint(res.get_counts())\n```\n\n## Local emulation of cat quit processors\n\nThis project contains multiple emulators of multi cat qubit processors.\n\n```python\nfrom qiskit_alice_bob_provider import AliceBobLocalProvider\nfrom qiskit import QuantumCircuit, execute, transpile\n\nprovider = AliceBobLocalProvider()\nprint(provider.backends())\n# EMU:6Q:PHYSICAL_CATS, EMU:40Q:PHYSICAL_CATS, EMU:1Q:LESCANNE_2020\n```\n\nThe `EMU:nQ:PHYSICAL_CATS` backends are theoretical models of quantum processors made\nup of physical cat qubits.\nThey can be used to study the properties of error correction codes implemented\nwith physical cat qubits, for different hardware performance levels\n(see the parameters of class `PhysicalCatProcessor`).\n\nThe `EMU:1Q:LESCANNE_2020` backend is an interpolated model simulating the processor\nused in the [seminal paper](https://arxiv.org/pdf/1907.11729.pdf) by Rapha\u00ebl\nLescanne in 2020.\nThis interpolated model is configured to act as a digital twin of the cat qubit\nused in this paper.\nIt does not represent the current performance of Alice & Bob's cat qubits.\n\nThe example below schedules and simulates a Bell state preparation circuit on\na `EMU:6Q:PHYSICAL_CATS` processor, for different values of parameters\n`average_nb_photons` and `kappa_2`.\n\n```python\nfrom qiskit_alice_bob_provider import AliceBobLocalProvider\nfrom qiskit import QuantumCircuit, execute, transpile\n\nprovider = AliceBobLocalProvider()\n\ncirc = QuantumCircuit(2, 2)\ncirc.initialize('0+')\ncirc.cx(0, 1)\ncirc.measure(0, 0)\ncirc.measure(1, 1)\n\n# Default 6-qubit QPU with the ratio of memory dissipation rates set to\n# k1/k2=1e-5 and cat size, average_nb_photons, set to 16.\nbackend = provider.get_backend('EMU:6Q:PHYSICAL_CATS')\n\nprint(transpile(circ, backend).draw())\n# *Displays a timed and scheduled circuit*\n\nprint(execute(circ, backend, shots=100000).result().get_counts())\n# {'11': 49823, '00': 50177}\n\n# Changing the cat size from 16 (default) to 4 and k1/k2 to 1e-2.\nbackend = provider.get_backend(\n    'EMU:6Q:PHYSICAL_CATS', average_nb_photons=4, kappa_2=1e4\n)\nprint(execute(circ, backend, shots=100000).result().get_counts())\n# {'01': 557, '11': 49422, '10': 596, '00': 49425}\n```\n",
    "bugtrack_url": null,
    "license": "Apache 2.0",
    "summary": "Provider for running Qiskit circuits on Alice & Bob QPUs and simulators",
    "version": "0.6.0",
    "project_urls": {
        "Alice & Bob": "https://alice-bob.com/",
        "Homepage": "https://github.com/Alice-Bob-SW/qiskit-alice-bob-provider"
    },
    "split_keywords": [
        "qiskit",
        " alice & bob",
        " quantum",
        " sdk"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2aedc3e617c3dddabbe08f53a5c5430d17763944a94c490c45d92203b332b146",
                "md5": "e5654ecb594de4bd38598fef9ef76576",
                "sha256": "198848c5d06f1f94b49f4b55ce8311b94e2ee409007cbfde7fc90b3ffb496d03"
            },
            "downloads": -1,
            "filename": "qiskit_alice_bob_provider-0.6.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e5654ecb594de4bd38598fef9ef76576",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 102510,
            "upload_time": "2024-04-24T08:39:35",
            "upload_time_iso_8601": "2024-04-24T08:39:35.620538Z",
            "url": "https://files.pythonhosted.org/packages/2a/ed/c3e617c3dddabbe08f53a5c5430d17763944a94c490c45d92203b332b146/qiskit_alice_bob_provider-0.6.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f1c417e6e853bf1c5715df410b4bf558d2864b8a268ec8445824bcc486d62bd8",
                "md5": "a523253cd012483f807c23b50f659e19",
                "sha256": "849b2b073522af5af8abbce50364811df24fe90cada5ebcc4bb96bf19235a0e7"
            },
            "downloads": -1,
            "filename": "qiskit_alice_bob_provider-0.6.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a523253cd012483f807c23b50f659e19",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 78885,
            "upload_time": "2024-04-24T08:39:37",
            "upload_time_iso_8601": "2024-04-24T08:39:37.143845Z",
            "url": "https://files.pythonhosted.org/packages/f1/c4/17e6e853bf1c5715df410b4bf558d2864b8a268ec8445824bcc486d62bd8/qiskit_alice_bob_provider-0.6.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-24 08:39:37",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Alice-Bob-SW",
    "github_project": "qiskit-alice-bob-provider",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "qiskit-alice-bob-provider"
}
        
Elapsed time: 0.24700s