Skip to main content

General algorithms with qiskit as basis

Project description

Travis Codecov coverage Codacy grade Read the Docs PyPI PyPI - Python Version

qiskit is an open-source compilation framework capable of targeting various types of hardware and a high-performance quantum computer simulator with emulation capabilities, and various compiler plug-ins.

This library sports some useful algorithms for quantum computers using qiskit as a basis.

Features

  • Multi Qubit Quantum Fourier Transform

  • Draper adder

  • Uniform Rotations

  • State Preparation

Installation

This library requires Python version 3.5 and above, as well as qiskit. Installation of this plugin, as well as all dependencies, can be done using pip:

$ python -m pip install dc_qiskit_algorithms

To test that the algorithms are working correctly you can run

$ make test

Getting started

You can use the state preparation as follows

from dc_qiskit_algorithms.MöttönenStatePrep import state_prep_möttönen

vector = [-0.1, 0.2, -0.3, 0.4, -0.5, 0.6, -0.7, 0.8]
vector = numpy.asarray(vector)
vector = (1 / numpy.linalg.norm(vector)) * vector

qubits = int(numpy.log2(len(vector)))
reg = QuantumRegister(qubits, "reg")
c = ClassicalRegister(qubits, "c")
qc = QuantumCircuit(reg, c, name='state prep')
state_prep_möttönen(qc, vector, reg)

After this, the quantum circuit is prepared in the given state. All complex vectors are possible!

Please refer to the documentation of the dc qiskit algorithm Plugin .

Contributing

We welcome contributions - simply fork the repository of this plugin, and then make a pull request containing your contribution. All contributers to this plugin will be listed as authors on the releases.

We also encourage bug reports, suggestions for new features and enhancements, and even links to cool projects or applications built on PennyLane.

Authors

Carsten Blank

Support

If you are having issues, please let us know by posting the issue on our Github issue tracker.

License

The data cybernetics qiskit algorithms plugin is free and open source, released under the Apache License, Version 2.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dc_qiskit_algorithms-0.0.13.tar.gz (14.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dc_qiskit_algorithms-0.0.13-py3-none-any.whl (22.3 kB view details)

Uploaded Python 3

File details

Details for the file dc_qiskit_algorithms-0.0.13.tar.gz.

File metadata

  • Download URL: dc_qiskit_algorithms-0.0.13.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5

File hashes

Hashes for dc_qiskit_algorithms-0.0.13.tar.gz
Algorithm Hash digest
SHA256 92bf246ff4205ca6896f97eba447bd2968f6f7518f2f4645897d2ab41e4eec95
MD5 4766fb04a79771249b9ba56512272811
BLAKE2b-256 ea7bde8924c69679d9438585ab42b75902c1a8ce12efda4585080b51e98df373

See more details on using hashes here.

File details

Details for the file dc_qiskit_algorithms-0.0.13-py3-none-any.whl.

File metadata

  • Download URL: dc_qiskit_algorithms-0.0.13-py3-none-any.whl
  • Upload date:
  • Size: 22.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5

File hashes

Hashes for dc_qiskit_algorithms-0.0.13-py3-none-any.whl
Algorithm Hash digest
SHA256 94553d6117342c893593ab35659f21793ccf0a7d8489159b1d91729ef8adcd85
MD5 a1c8b16feb573dc6e61d0eb97d4688e1
BLAKE2b-256 13d458c523174e5b7cf0fb94822954a68fbec21ba4a72f8cd7c00346e550cd5b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page