Skip to main content

A small package for integrating gridsynth angle decomposition into qiskit.

Project description

Qiskit GridSynth plugin

This package integrates angle decomposition with gridsynth [1] into the qiskit [2] software stack, facilitating efficient transpilation to the Clifford+T gate set.

Installation

Install via pip:

pip install qiskit-gridsynth-plugin

Example Usage

Read a circuit from a qasm file circ.qasm, transpile to Clifford+T, and write the result to out.qasm

from qiskit import qasm2, QuantumCircuit
from qiskit_gridsynth_plugin.decompose import clifford_t_transpile
circ = QuantumCircuit.from_qasm_file('circ.qasm')
decomposed = clifford_t_transpile(circ, epsilon=1e-4)
qiskit.qasm2.dump(decomposed, "out.qasm")

Include gridsynth angle decomposition as part of a qiskit compilation pipeline that also cancels out back-to-back CNOT gates

from qiskit.circuit.library.standard_gates import CXGate
from qiskit.transpiler import PassManager
from qiskit.transpiler.passes import InverseCancellation
from qiskit_gridsynth_plugin.decompose import GridSynth
circ = QuantumCircuit.from_qasm_file('circ.qasm')
pm = PassManager(InverseCancellation([CXGate()]), GridSynth(1e-4))
decomposed = pm.run(circ)

References

[1] N. J. Ross and P. Selinger, "Optimal ancilla-free Clifford+T approximation of z-rotations", arXiv:1403.2975
[2] https://www.ibm.com/quantum/qiskit

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

qiskit_gridsynth_plugin-0.0.7.tar.gz (4.4 MB view details)

Uploaded Source

Built Distribution

qiskit_gridsynth_plugin-0.0.7-py3-none-any.whl (4.4 MB view details)

Uploaded Python 3

File details

Details for the file qiskit_gridsynth_plugin-0.0.7.tar.gz.

File metadata

File hashes

Hashes for qiskit_gridsynth_plugin-0.0.7.tar.gz
Algorithm Hash digest
SHA256 ea5d8b90ba36af161b9fc287924596a122ad5b6d28dc209370f61a02770fb165
MD5 5ea624b3f846c84df4b35c427ad882a4
BLAKE2b-256 792fae9da8823d8d2c12d0bf2a2fa7c86fa8eda5c616b3f6f1c82b59effca9ef

See more details on using hashes here.

File details

Details for the file qiskit_gridsynth_plugin-0.0.7-py3-none-any.whl.

File metadata

File hashes

Hashes for qiskit_gridsynth_plugin-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 56769397341372416a7f8bbf5f33d660f0eac7f7112a3441f3890b6a93f98bdc
MD5 e92c68bed65852261dbb1f1479697e1d
BLAKE2b-256 7ff98c988a1304811387243511eae0fb07a0ca9fbf0400d263933a4462145487

See more details on using hashes here.

Supported by

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