GithubHelp home page GithubHelp logo

bqskitrs's Introduction

Berkeley Quantum Synthesis Toolkit (BQSKit)

The Berkeley Quantum Synthesis Toolkit (BQSKit) [bis โ€ข kit] is a powerful and portable quantum compiler framework. It can be used with ease to compile quantum programs to efficient physical circuits for any QPU.

Installation

BQSKit is available for Python 3.8+ on Linux, macOS, and Windows. BQSKit and its dependencies are listed on the Python Package Index, and as such, pip can easily install it:

pip install bqskit

Basic Usage

A standard BQSKit workflow loads a program into the framework, models the target QPU, compiles the program, and exports the resulting circuit. The below example uses BQSKit to optimize an input circuit provided by a qasm file:

from bqskit import compile, Circuit

# Load a circuit from QASM
circuit = Circuit.from_file("input.qasm")

# Compile the circuit
compiled_circuit = compile(circuit)

# Save output as QASM
compiled_circuit.save("output.qasm")

To learn more about BQSKit, follow the tutorial series or refer to the documentation.

How to Cite

You can use the software disclosure to cite the BQSKit package.

Additionally, if you used or extended a specific algorithm, you should cite that individually. BQSKit passes will include a relevant reference in their documentation.

License

The software in this repository is licensed under a BSD free software license and can be used in source or binary form for any purpose as long as the simple licensing requirements are followed. See the LICENSE file for more information.

Copyright

Berkeley Quantum Synthesis Toolkit (BQSKit) Copyright (c) 2021, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy) and Massachusetts Institute of Technology (MIT). All rights reserved.

If you have questions about your rights to use or distribute this software, please contact Berkeley Lab's Intellectual Property Office at [email protected].

NOTICE. This Software was developed under funding from the U.S. Department of Energy and the U.S. Government consequently retains certain rights. As such, the U.S. Government has been granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable, worldwide license in the Software to reproduce, distribute copies to the public, prepare derivative works, and perform publicly and display publicly, and to permit others to do so.

bqskitrs's People

Contributors

edyounis avatar ethanhs avatar wolflink avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

bqskitrs's Issues

bqskitrs on macOS / python3.8 download problem

Hey, we are trying to support python 3.11 over on Mitiq, but for some reason bqskit 1.0.4 is failing to build on python 3.8 (macOS) due to pip being unable to find bqskitrs == 0.3.0. Here's the log, but the relevant lines are:

ERROR: Could not find a version that satisfies the requirement bqskitrs>=0.3.0 (from bqskit) (from versions: 0.1.0a2, 0.1.0a3, 0.1.0a4, 0.1.0b1, 0.1.0b2, 0.2.0rc2, 0.2.0, 0.2.2, 0.2.3, 0.3.0rc1)
ERROR: No matching distribution found for bqskitrs>=0.3.0

BQSKit is pinned to bqskit==1.0.4.

I can't seem to make heads or tails of this one since I can download bqskitrs==0.3.0, locally, and it shows published on pypi. Was hoping someone here would be able to provide some insight.

Potential `matrix_residuals` bug?

@WolfLink and I were looking through the matrix_residuals function code and there might be a bug with regards to residual values not being resilient to global phase.

As written right now, the function just finds $Re(B A^\dagger) - I$. The reason this does not alway work is because if $A = e^{i \theta} U$ and $B = U$, then $B A^\dagger = e^{-i\theta} UU^\dagger = e^{-i\theta} I $. So taking the real part will generally not be the identity.

Maybe there's a stage of preprocessing that happens beforehand that we missed?

Native M1 Support

Hey there,

I'm unable to install bqskitrs due to the following error

$ pip install bqskitrs
ERROR: Could not find a version that satisfies the requirement bqskitrs (from versions: none)
ERROR: No matching distribution found for bqskitrs

I first ran into this while trying to install the pre-release of bqskit via pip install --pre 'bqskit[ext]', but that failed with the following.

ERROR: Cannot install bqskit[ext]==0.1.1, bqskit[ext]==0.2.0, bqskit[ext]==0.2.2, bqskit[ext]==0.2.3, bqskit[ext]==0.3.0, bqskit[ext]==0.4.0, bqskit[ext]==0.4.1, bqskit[ext]==0.5.0, bqskit[ext]==0.5.1, bqskit[ext]==0.5.2, bqskit[ext]==1.0.0a1 and bqskit[ext]==1.0.0a2 because these package versions have conflicting dependencies.

The conflict is caused by:
    bqskit[ext] 1.0.0a2 depends on bqskitrs>=0.2.3
    bqskit[ext] 1.0.0a1 depends on bqskitrs>=0.2.3
    bqskit[ext] 0.5.2 depends on bqskitrs>=0.2.0
    bqskit[ext] 0.5.1 depends on bqskitrs>=0.2.0
    bqskit[ext] 0.5.0 depends on bqskitrs>=0.2.0
    bqskit[ext] 0.4.1 depends on bqskitrs==0.1.0_beta.2
    bqskit[ext] 0.4.0 depends on bqskitrs==0.1.0_beta.2
    bqskit[ext] 0.3.0 depends on bqskitrs==0.1.0_beta.2
    bqskit[ext] 0.2.3 depends on bqskitrs==0.1.0_beta.2
    bqskit[ext] 0.2.2 depends on bqskitrs==0.1.0_beta.2
    bqskit[ext] 0.2.0 depends on bqskitrs==0.1.0_beta.2
    bqskit[ext] 0.1.1 depends on bqskitrs==0.1.0_beta.2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.