Skip to content

Commit

Permalink
Initial release setup
Browse files Browse the repository at this point in the history
  • Loading branch information
events555 committed Sep 19, 2024
1 parent 91384e5 commit 1c3fc9f
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 31 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ src/circuits/failed_circuit_*.chp
output.prof
profiling_results.txt
/docs/
main.py
main.py
/dist/
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Common Changelog](https://common-changelog.org/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.0] - 2024-09-19

### Added

- Initial release of sdim

### Changed

- Move `sdim` module to parent level
- Update `README.md` to include PyPI information.

### Removed

- Remove `/src/` folder


[1.0.0]: https://github.com/events555/sdim/releases/tag/v1.0.0
24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,32 @@ Despite the growing research interest in qudits as an alternative way to scale c
The following are relevant details for the project:
- Supports **only Clifford** operations.
- **Prime** dimensions are strongly tested while the "fast" solver for composite dimensions is known to have possible errors
- The issue lies in math implementation details that can be found inside the markdown located in `sdim/tableau`
- The issue lies in math implementation details that can be found inside the [markdown](sdim/tableau/COMPOSITE.md) located in `sdim/tableau`
- Does not currently `.stim` circuit notation, only a variant based on Scott Aaronson's original `.chp`

## Project Installation
Simply `git clone` the project and run `pip install -e .` to install the `sdim` python module.
You can install the `sdim` Python module directly from PyPI using `pip install sdim`

## How to use sdim?
Take a look at the Python notebooks inside examples.
Take a look at the Python notebooks for an in-depth examples.
```python
from sdim import Circuit, Program

# Create a new quantum circuit
circuit = Circuit(4, 2) # Create a circuit with 4 qubits and dimension 2

# Add gates to the circuit
circuit.add_gate('H', 0) # Hadamard gate on qubit 0
circuit.add_gate('CNOT', 0, 1) # CNOT gate with control on qubit 0 and target on qubit 1
circuit.add_gate('CNOT', 0, [2, 3]) # Short-hand for multiple target qubits, applies CNOT between 0 -> 2 and 0 -> 3
circuit.add_gate('MEASURE', [0, 1, 2, 3]) # Short-hand for multiple single-qubit gates

# Create a program and add the circuit
program = Program(circuit) # Must be given an initial circuit as a constructor argument

# Execute the program
result = program.simulate(show_measurement=True) # Runs the program and prints the measurement results. Also returns the results as a list of MeasurementResult objects.
```

## Primary References
<a id="1">[1]
Expand Down
50 changes: 23 additions & 27 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,35 +1,31 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
[tool.poetry]
name = "sdim"
version = "0.2.0"
version = "1.0.0"
description = "A tableau Clifford simulator for qudits"
authors = [
{ name = "Steven Nguyen", email = "steven.n.nguyen@rutgers.edu" },
]
urls = {
"Homepage" = "https://events555.github.io/sdim/sdim.html",
"Repository" = "https://github.com/events555/sdim",
"Documentation" = "https://events555.github.io/sdim/sdim.html"
}
license = { file = "LICENSE" }
authors = ["Steven Nguyen <steven.n.nguyen@rutgers.edu>"]
license = "GPL-3.0-or-later"
readme = "README.md"
keywords = ["quantum computing", "Clifford simulator", "qudits"]
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: OS Independent",
]
dependencies = [
"numpy",
"sympy",
"cirq",
"pdoc",
"Diophantine",
"Programming Language :: Python :: 3",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: OS Independent",
]

[tool.poetry.urls]
Homepage = "https://events555.github.io/sdim/sdim.html"
Repository = "https://github.com/events555/sdim"
Documentation = "https://events555.github.io/sdim/sdim.html"

[project.optional-dependencies]
test = ["cirq"]
[tool.poetry.dependencies]
python = "^3.7"
numpy = "*"
sympy = "*"
cirq = "*"
pdoc = "*"
Diophantine = "*"


[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

0 comments on commit 1c3fc9f

Please sign in to comment.