Bgls

Latest version: v0.2.0

Safety actively analyzes 681844 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.2.0

Summary

Initial release of BGLS. (Note: v0.1.0 solely to secure PyPI name.)

Canonical example:

python
import cirq
import bgls

Example circuit to run.
qubits = cirq.LineQubit.range(2)
circuit = cirq.Circuit(
cirq.H.on(qubits[0]),
cirq.CNOT.on(*qubits),
cirq.measure(*qubits, key="z")
)

Run the circuit with BGLS.
simulator = bgls.Simulator(
initial_state=cirq.StateVectorSimulationState(qubits=qubits, initial_state=0),
apply_op=cirq.protocols.act_on,
compute_probability=bgls.born.compute_probability_state_vector,
)
results = simulator.run(circuit, repetitions=10)
print(results.histogram(key="z"))


Sample output:


Counter({0: 6, 3: 4})


Changelog

* Lint by rmlarose in https://github.com/asciineuron/bgls/pull/1
* Mypy fix by asciineuron in https://github.com/asciineuron/bgls/pull/2
* Development by asciineuron in https://github.com/asciineuron/bgls/pull/6
* Inherit from `cirq.SimulatesSamples` by rmlarose in https://github.com/asciineuron/bgls/pull/10
* Refactoring, imports, requirements, docstrings, other cleaning by rmlarose in https://github.com/asciineuron/bgls/pull/11
* Stabilizer state handling by asciineuron in https://github.com/asciineuron/bgls/pull/12
* Add sphinx docs infrastructure by rmlarose in https://github.com/asciineuron/bgls/pull/13
* Sphinx git pages by asciineuron in https://github.com/asciineuron/bgls/pull/15
* Efficient repetitions by asciineuron in https://github.com/asciineuron/bgls/pull/16
* Added logic handling near-clifford and noisy circuits. Removed errone… by asciineuron in https://github.com/asciineuron/bgls/pull/18
* Matrix product state handling by asciineuron in https://github.com/asciineuron/bgls/pull/17
* [Docs] Add getting started guide by rmlarose in https://github.com/asciineuron/bgls/pull/20
* Add doctest CI workflow using nbmake; clean up requirements; use `furo` sphinx theme by rmlarose in https://github.com/asciineuron/bgls/pull/22
* [Docs] Add how it works page by rmlarose in https://github.com/asciineuron/bgls/pull/23
* Skip updating bitstrings for diagonal gates by rmlarose in https://github.com/asciineuron/bgls/pull/24
* Memoize computing probabilities in parallel sampling by rmlarose in https://github.com/asciineuron/bgls/pull/25
* Qaoa example by asciineuron in https://github.com/asciineuron/bgls/pull/21
* Update bitstrings in parallel by rmlarose in https://github.com/asciineuron/bgls/pull/26
* Clifford decomposition doc by asciineuron in https://github.com/asciineuron/bgls/pull/14
* Fix bug in noisy simulation and add tests by rmlarose in https://github.com/asciineuron/bgls/pull/29
* added new notebook showcasing using non-cirq sim states by asciineuron in https://github.com/asciineuron/bgls/pull/28
* Add circuit optimization and docs by rmlarose in https://github.com/asciineuron/bgls/pull/30
* [Docs] Update `start.ipynb`. by rmlarose in https://github.com/asciineuron/bgls/pull/31
* Add features doc. by rmlarose in https://github.com/asciineuron/bgls/pull/34
* Polish custom states doc. by rmlarose in https://github.com/asciineuron/bgls/pull/32
* Update supported Python versions and CI behavior by rmlarose in https://github.com/asciineuron/bgls/pull/35
* Refactor `apply_gate` to `apply_op` by rmlarose in https://github.com/asciineuron/bgls/pull/37
* Split utils.py into apply.py and born.py and refactor to testing.py by rmlarose in https://github.com/asciineuron/bgls/pull/38
* Update README by rmlarose in https://github.com/asciineuron/bgls/pull/39
* Install BGLS in Sphinx build workflow to fix import errors in docs by rmlarose in https://github.com/asciineuron/bgls/pull/40
* Add latex extension to sphinx. by rmlarose in https://github.com/asciineuron/bgls/pull/41
* Fix latex not rendering in docs. by rmlarose in https://github.com/asciineuron/bgls/pull/42
* Add when to use doc by rmlarose in https://github.com/asciineuron/bgls/pull/44
* Add when to use doc to index. by rmlarose in https://github.com/asciineuron/bgls/pull/45
* Fix simulation with mid circuit measurements, add `Simulator.final_states`, small refactoring by rmlarose in https://github.com/asciineuron/bgls/pull/46
* Prepare for v0.2.0 release. by rmlarose in https://github.com/asciineuron/bgls/pull/47

**Full Changelog**: https://github.com/asciineuron/bgls/commits/v0.2.0

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.