tqsim

TQSim is an open-source anyon-based Topological Quantum Computing simulator

https://github.com/constantine-quantum-tech/tqsim

Science Score: 31.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
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.0%) to scientific vocabulary

Scientific Fields

Biology Life Sciences - 40% confidence
Last synced: 4 months ago · JSON representation ·

Repository

TQSim is an open-source anyon-based Topological Quantum Computing simulator

Basic Info
  • Host: GitHub
  • Owner: Constantine-Quantum-Tech
  • License: apache-2.0
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 4.93 MB
Statistics
  • Stars: 11
  • Watchers: 1
  • Forks: 2
  • Open Issues: 13
  • Releases: 0
Created about 3 years ago · Last pushed about 1 year ago
Metadata Files
Readme License Citation

README.md

CQTech's Logo

TQSim

CircleCI Version Documentation License License

TQSim stands for Topological Quantum Simulator. It is an open-source library developed by CQTech for simulating topological quantum computers based on Fibonacci anyons.

Documentation for the latest stable version of TQSim is available here.

Installation

You can install TQSim from pip using

bash pip install --upgrade tqsim

Usage

1. Basic Example

In this example, we create a circuit with 2 qudits, made of 3 anyons each. We then braid the anyons manually. ```python from tqsim import AnyonicCircuit

circuit = AnyonicCircuit(2, 3) # Create a circuit having 2 qudits and 3 anyons per qudits circuit.braid(1, 2) # Braids the first with the second anyon circuit.braid(3, 4) # Braids the first with the second anyon circuit.braid(2, 1) circuit.measure() # Measure the system by fusing the anyons circuit.draw() # Draw the circuit `` Here is the output of thedraw()` method:

Circuit Output

Simulating the circuit:

```python circuit.run(shots = 50)

```

Output: bash {'counts': {'0': 16, '2': 20, '4': 14}, 'memory': array([4, 2, 2, 2, 2, 2, 2, 4, 2, 4, 2, 0, 0, 0, 4, 0, 4, 0, 0, 0, 0, 4, 2, 4, 0, 2, 0, 0, 0, 0, 4, 4, 2, 2, 2, 4, 2, 2, 0, 0, 2, 4, 2, 2, 4, 2, 4, 4, 0, 2])}

2. Simulating a Hadamard gate

Here we simulate the application of a Hadamard gate on a single qudit with 3 anyons. Unlike the previous example, we will use a braiding sequence of braiding operators and their corresponding powers. ```python from tqsim import AnyonicCircuit

circuit = AnyonicCircuit(nbqudits=1, nbanyonsperqudit=3) # Create a circuit with 1 qudit composed of 3 anyons circuit.initialize([0,0,1]) # We initialize the circuit in the last state (state 2). # For this circuit, we have 3 basis states: [0, 1, 2].

The Hadamard gate braiding sequence in terms of braiding operators

had_sequence = [[1, 2], [2, 2], [1, -2], [2, -2], [1, 2], [2, 4], [1, -2], [2, 2], [1, 2], [2, -2], [1, 2], [2, -2], [1, 4]]

circuit.braidsequence(hadsequence) # We apply the braiding sequence. # This should put our qudit in a superposition of the states 2 and 1. circuit.measure() # Measure the system by fusing the anyons circuit.draw() # Draw the circuit ``` The Hadamard braid looks like this

Circuit Output

Simulating the circuit:

```python result = circuit.run(shots = 1000) # Run the circuit 1000 times. print(result['counts']) # Show the counts only.

```

Output: bash {'1': 493, '2': 507}

Authors and Citation

Abdellah Tounsi, Mohamed Messaoud Louamri, Nacer eddine Belaloui, and Mohamed Taha Rouabah – Constantine Quantum Technologies.

If you have used TQSim in your work, please use the BibTeX file to cite the authors.

License

Copyright © 2022, Constantine Quantum Technologies. Released under the Apache License 2.0.

Owner

  • Name: CQTech
  • Login: Constantine-Quantum-Tech
  • Kind: organization
  • Location: Algeria

Citation (citation.bib)

@misc{ TQSim,
       author = {Abdellah Tounsi and Mohamed Messaoud Louamri and Nacer eddine Belaloui and Mohamed Taha Rouabah},
       title = {TQSim, a Topological Quantum Computing Simulator based on anyon models},
       year = {2022},
       affiliation= {Constantine Quantum Technologies},
       url = {https://github.com/Constantine-Quantum-Tech/tqsim}
}

GitHub Events

Total
  • Issues event: 2
  • Delete event: 1
  • Issue comment event: 2
  • Push event: 8
  • Pull request event: 2
  • Create event: 1
Last Year
  • Issues event: 2
  • Delete event: 1
  • Issue comment event: 2
  • Push event: 8
  • Pull request event: 2
  • Create event: 1

Committers

Last synced: over 1 year ago

All Time
  • Total Commits: 69
  • Total Committers: 6
  • Avg Commits per committer: 11.5
  • Development Distribution Score (DDS): 0.71
Past Year
  • Commits: 2
  • Committers: 2
  • Avg Commits per committer: 1.0
  • Development Distribution Score (DDS): 0.5
Top Committers
Name Email Commits
Belaloui i****n@g****m 20
MohamedML m****i@g****m 18
Mohamed Messaoud Louamri 1****i 13
Nacer eddine BELALOUI 6****i 12
Abduhu 4****u 4
Taha-Rouabah m****h@g****m 2

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 25
  • Total pull requests: 25
  • Average time to close issues: 3 days
  • Average time to close pull requests: about 21 hours
  • Total issue authors: 4
  • Total pull request authors: 2
  • Average comments per issue: 0.36
  • Average comments per pull request: 0.44
  • Merged pull requests: 22
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 2
  • Average time to close issues: N/A
  • Average time to close pull requests: 9 days
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.5
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • Belaloui (14)
  • Abduhu (5)
  • mmlouamri (5)
  • jagandecapri (1)
Pull Request Authors
  • mmlouamri (25)
  • Belaloui (2)
Top Labels
Issue Labels
enhancement (12) bug (5) refactor (1) documentation (1)
Pull Request Labels
bug (2) enhancement (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 31 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 2
  • Total maintainers: 1
pypi.org: tqsim

TQSim is a Topological Quantum Computing simulator based on Anyon models

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 31 Last month
Rankings
Dependent packages count: 6.6%
Average: 25.1%
Stargazers count: 25.5%
Forks count: 30.5%
Dependent repos count: 30.6%
Downloads: 32.5%
Maintainers (1)
Last synced: 4 months ago

Dependencies

poetry.lock pypi
  • attrs 22.1.0 develop
  • cfgv 3.3.1 develop
  • colorama 0.4.6 develop
  • distlib 0.3.6 develop
  • exceptiongroup 1.0.0 develop
  • filelock 3.8.0 develop
  • identify 2.5.8 develop
  • iniconfig 1.1.1 develop
  • nodeenv 1.7.0 develop
  • platformdirs 2.5.2 develop
  • pluggy 1.0.0 develop
  • pre-commit 2.20.0 develop
  • pytest 7.2.0 develop
  • pyyaml 6.0 develop
  • toml 0.10.2 develop
  • virtualenv 20.16.6 develop
  • contourpy 1.0.6
  • cycler 0.11.0
  • fonttools 4.38.0
  • kiwisolver 1.4.4
  • matplotlib 3.6.1
  • numpy 1.23.4
  • packaging 21.3
  • pillow 9.3.0
  • pyparsing 3.0.9
  • python-dateutil 2.8.2
  • setuptools 65.5.0
  • setuptools-scm 7.0.5
  • six 1.16.0
  • tomli 2.0.1
  • typing-extensions 4.4.0
pyproject.toml pypi
  • matplotlib ^3.6.1
  • numpy ^1.23.4
  • python ^3.8