Skip to main content

A Qiskit transpilation plugin for `dyna`mic `cir`cuits.

Project description

dynacir

Description

Dynacir is a transpilation plugin for Qiskit that optimizes dynamic quantum circuits.

Features

  • Feature 1 (current): Merges sequential resets on a given qubit into a single reset.
  • Feature 2 (upcoming): Merge sequences of reset-first single-qubit gate-...-reset-final single-qubit gate into just reset-final single-qubit gate
  • Feature 3 (upcoming): Compile inefficient classical logic to minimize memory load

Installation

To install dynacir, run the following command in your terminal:

pip install git+https://github.com/derek-wang-ibm/dynacir.git

Usage

First, create a QuantumCircuit.`

from qiskit import QuantumCircuit, transpile

qc = QuantumCircuit(2)
qc.reset(0)
qc.x(0)
qc.cx(0, 1)
qc.reset(0)
qc.reset(0)
qc.h(0)
qc.draw(output='mpl', style='iqp')

Then, apply a PassManager generated using the dynacir plugin.

from qiskit.transpiler.preset_passmanagers import generate_preset_pass_manager
from qiskit_ibm_runtime import QiskitRuntimeService

pm = generate_preset_pass_manager(optimization_level=3, optimization_method="dynacir"

qc_dynacir = pm.run(qc)
qc_dynacir.draw(output='mpl', style='iqc')
)

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

dynacir-0.1.4.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dynacir-0.1.4-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

Details for the file dynacir-0.1.4.tar.gz.

File metadata

  • Download URL: dynacir-0.1.4.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.1

File hashes

Hashes for dynacir-0.1.4.tar.gz
Algorithm Hash digest
SHA256 4cbef6942213a8c3c4449491127496b1b9ae0dd1ef495859495df6eaa5e85abd
MD5 698e45812d1c8593e444cd441927fe9e
BLAKE2b-256 a50d82c3390d6bfec7e09882afe2cb4412b51f5274a6c094ca1d06a6d916f172

See more details on using hashes here.

File details

Details for the file dynacir-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: dynacir-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 11.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.1

File hashes

Hashes for dynacir-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3261b113d53850b93918dba548cc3143286214dee8d75099cc98dff9f4104123
MD5 c1cc39a7c452c94a24b6d0ba1cf19ef8
BLAKE2b-256 860d74ca4952283223d77963475fad66d176ec5502b13aa5872306a519064e77

See more details on using hashes here.

Supported by

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