Giter Club home page Giter Club logo

orquestra-cirq's Introduction

orquestra-cirq

What is it?

orquestra-cirq is a Zapata library holding modules for integrating cirq and qsimcirq with Orquestra.

Installation

Even though it's intended to be used with Orquestra, orquestra-cirq can be also used as a Python module. To install it, make to install orquestra-quantum first. Then you just need to run pip install . from the main directory. If you want to import QSimSimulator, you have to install it with the extra dependencies by running pip install -e .[qsim].

Overview

orquestra-cirq is a Python module that exposes Cirq's and qsim's simulators as an orquestra QuantumSimulator. They can be imported with:

from orquestra.integrations.cirq.simulator import CirqSimulator
from orquestra.integrations.cirq.simulator import QSimSimulator

In addition, it interfaces with the noise models and provides converters that allow switching between cirq circuits and those of orquestra.

The module can be used directly in Python or in an Orquestra workflow. For more details, see the Orquestra Core docs.

For more information regarding Orquestra and resources, please refer to the Orquestra documentation.

Running on GPU

The parameters to configure GPU executions are supplied to QSimSimulator as QSimOptions. The details of these parameters can be found in qsimcirq python interface. Passing use_gpu=True will enable gpu. If you want to use NVIDIA's cuStateVec, please additionally pass gpu_mode=1 as can be seen in the example below:

from orquestra.integrations.cirq.simulator import QSimSimulator

from qsimcirq import QSimOptions

qsim_options = QSimOptions(use_gpu=True, gpu_mode=1)

sim = QSimSimulator(qsim_options=qsim_options)

CuStateVecSimulator is using QsimSimulator and by default is set to use_gpu=true and gpu_mode=1. Below is an example of importing CuStateVecSimulator:

from orquestra.integrations.custatevec.simulator import CuStateVecSimulator

sim = CuStateVecSimulator()

Development and contribution

You can find the development guidelines in the orquestra-quantum repository.

orquestra-cirq's People

Contributors

boniface316 avatar dexter2206 avatar laurgao avatar max-radin avatar mstechly avatar shiro-raven avatar zaptim avatar

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.