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 QuantumCircuit
from qiskit_gridsynth_plugin.decompose import clifford_t_transpile
circ = QuantumCircuit.from_qasm_file('circ.qasm')
decomposed = clifford_t_transpile(circ, approx_exp=-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(-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.1.tar.gz (4.4 MB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for qiskit_gridsynth_plugin-0.0.1.tar.gz
Algorithm Hash digest
SHA256 e3111a7e4107be1855c3df85d0a4038676cdef25fcf63865691c5e67af095c01
MD5 4bc1cf657fda27ef1e90430ee4197284
BLAKE2b-256 0c9f7a76abf1c1baf41faa37750801b878acc532e6b4e7a1edb3c2b319d0c70d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qiskit_gridsynth_plugin-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6913fa9f258189d18f22b4675b3bfe3e9faff7475a3a9cec9f5bb513ea3fc7a7
MD5 eed908a12342e5a36e43ae8d1ba21b77
BLAKE2b-256 c8e53270ba9d81de6d81e41df2f1eafbf1d9583fb2da060219ee349983a70f69

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