qclib

Qclib is a quantum computing library implemented using qiskit. The focus of qclib is on preparing quantum states, but it is not limited to that.

https://github.com/qclib/qclib

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.9%) to scientific vocabulary

Keywords

python quantum quantum-computing
Last synced: 6 months ago · JSON representation ·

Repository

Qclib is a quantum computing library implemented using qiskit. The focus of qclib is on preparing quantum states, but it is not limited to that.

Basic Info
  • Host: GitHub
  • Owner: qclib
  • License: apache-2.0
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 3.72 MB
Statistics
  • Stars: 40
  • Watchers: 3
  • Forks: 26
  • Open Issues: 2
  • Releases: 0
Topics
python quantum quantum-computing
Created almost 6 years ago · Last pushed 7 months ago
Metadata Files
Readme License Citation

README.md

Quantum computing library (qclib)

Qclib is a quantum computing library implemented using qiskit.

The focus of qclib is on preparing quantum states, but it is not limited to that.

Installation

The easiest way of installing qclib is by using pip:

python pip install qclib

Initializing your first quantum state with qclib

Now that qclib is installed, you can start building quantum circuits to prepare quantum states. Here is a basic example:

$ python

```python import numpy as np from qiskit import transpile from qiskitaer import AerSimulator from qclib.statepreparation import LowRankInitialize

Generate 3-qubit random input state vector

n = 3 rnd = np.random.RandomState(42) inputvector = rnd.rand(2 ** n) + rnd.rand(2 ** n) * 1j inputvector = inputvector / np.linalg.norm(inputvector)

Build a quantum circuit to initialize the input vector

circuit = LowRankInitialize(input_vector).definition

Construct an ideal simulator

backend = AerSimulator()

Tests whether the produced state vector is equal to the input vector.

tcircuit = transpile(circuit, backend) tcircuit.savestatevector() statevector = backend.run(tcircuit).result().getstatevector() print('Equal:', np.allclose(statevector, inputvector))

Equal: True

```

Comparing algorithms for quantum state preparation

The following table shows the depth, number of qubits, and CNOTs of circuits produced by different state preparation methods for the same random 15-qubit state.

| method | lib | qubits | cnots | depth | | --- | --- |:---:|:---:|:---:| | low-rank | qclib | 15 | 30998 | 53643 | | svd | qclib | 15 | 38814 | 71580 | | ucg | qclib | 15 | 32752 | 65505 | | isometry | qiskit | 15 | 32752 | 65505 | | multiplexor | qiskit | 15 | 65504 | 131025 | | bdsp | qclib | 1151 | 72320 | 1603 | | dcsp | qclib | 32767 | 262016 | 899 |

You can reproduce the results here.

Authors

The first version of qclib was developed at Centro de Informática - UFPE. Qclib is an active project, and other people have contributed.

If you are doing research using qclib, please cite our project. We use a CITATION.cff file, so you can easily copy the citation information from the repository landing page.

License

qclib is free and open source, released under the Apache License, Version 2.0.

Owner

  • Name: qclib
  • Login: qclib
  • Kind: organization

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:

- family-names: "Araujo"
  given-names:  "Israel F."
  orcid: "https://orcid.org/0000-0002-0308-8701"

- family-names: "Araújo"
  given-names: "Ismael C. S."
  orcid: "https://orcid.org/0000-0001-6240-0235"
  
- family-names: "da Silva"
  given-names: "Leon D."
  orcid: "https://orcid.org/0000-0002-2823-3418"

- family-names: "Blank"
  given-names: "Carsten"
  orcid: "https://orcid.org/0000-0003-3450-0823"

- family-names: "da Silva"
  given-names: "Adenilton J."
  orcid: "https://orcid.org/0000-0003-0019-7694"

title: "Quantum computing library"
version: 0.0.21
doi: 
date-released: 2023-02-23
url: "https://github.com/qclib/qclib"

GitHub Events

Total
  • Issues event: 3
  • Watch event: 5
  • Delete event: 15
  • Issue comment event: 11
  • Push event: 61
  • Pull request event: 49
  • Fork event: 6
  • Create event: 16
Last Year
  • Issues event: 3
  • Watch event: 5
  • Delete event: 15
  • Issue comment event: 11
  • Push event: 61
  • Pull request event: 49
  • Fork event: 6
  • Create event: 16

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 278
  • Total Committers: 10
  • Avg Commits per committer: 27.8
  • Development Distribution Score (DDS): 0.392
Top Committers
Name Email Commits
israelferrazaraujo i****o@h****m 169
Adenilton Silva 7****s@u****m 42
Carsten Blank b****k@d****m 37
Adenilton Silva a****a@u****r 9
Adenilton Silva a****a@c****r 7
IsmaelCesar l****r@g****m 7
Adenilton Silva a****s@e****m 3
Leon Silva 6****e@u****m 2
Rafaella Vale r****v@c****r 1
João Pedro Freire 6****s@u****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 8
  • Total pull requests: 153
  • Average time to close issues: 3 months
  • Average time to close pull requests: 18 days
  • Total issue authors: 8
  • Total pull request authors: 11
  • Average comments per issue: 1.38
  • Average comments per pull request: 0.49
  • Merged pull requests: 129
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 3
  • Pull requests: 20
  • Average time to close issues: 11 days
  • Average time to close pull requests: 28 days
  • Issue authors: 3
  • Pull request authors: 4
  • Average comments per issue: 2.33
  • Average comments per pull request: 0.0
  • Merged pull requests: 14
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • renatomello (1)
  • MattePalte (1)
  • anthonysmaldone (1)
  • sofiamlira (1)
  • adjs (1)
  • israelferrazaraujo (1)
  • ellendevereuxUoW (1)
  • frankharkins (1)
Pull Request Authors
  • israelferrazaraujo (83)
  • adjs (45)
  • IsmaelCesar (17)
  • JeffersonDeyvis (8)
  • carstenblank (7)
  • thiagom123 (4)
  • rafaella-vale (3)
  • josejad42 (2)
  • q-inho (1)
  • mrjohnnus (1)
  • sofiamlira (1)
Top Labels
Issue Labels
bug (1) enhancement (1)
Pull Request Labels
enhancement (8) bug (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 223 last-month
  • Total dependent packages: 1
  • Total dependent repositories: 1
  • Total versions: 29
  • Total maintainers: 2
pypi.org: qclib

A quantum computing library using qiskit

  • Versions: 29
  • Dependent Packages: 1
  • Dependent Repositories: 1
  • Downloads: 223 Last month
Rankings
Dependent packages count: 7.5%
Forks count: 9.2%
Stargazers count: 12.7%
Average: 15.5%
Dependent repos count: 22.5%
Downloads: 25.9%
Maintainers (2)
Last synced: 6 months ago

Dependencies

requirements.txt pypi
  • deprecation *
  • graphviz *
  • numpy *
  • qiskit *
  • tensorly *
setup.py pypi
  • deprecation *
  • graphviz *
  • keras *
  • qiskit >=0.34.0
  • qiskit-aqua >=0.9.5
  • qiskit-machine-learning >=0.3.1
  • scipy >=1.7.1
  • tensorly *
.github/workflows/python-app.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite