Code Monkey home page Code Monkey 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

athenacaesura avatar mstechly avatar boniface316 avatar shiro-raven avatar volodyaco avatar dexter2206 avatar sebastianmorawiec avatar laurgao avatar max-radin avatar jamesclark-zapata avatar zaptim avatar

Stargazers

5l1v3r1 avatar  avatar

Watchers

Alex Meiburg avatar Mesut Celik avatar Vova Sergeyev avatar Eric Reuthe avatar Razieh  avatar  avatar Mark A. Jack avatar Grzegorz Mazur avatar Jhonathan Romero Fontalvo avatar Scott P. Jones avatar  avatar John Realpe-Gómez avatar Nicole Bellonzi avatar Chong Sun avatar Roberto avatar  avatar

orquestra-cirq's Issues

Custom gates

Is your feature request related to a problem? If so, please describe it.

It is not related to a problem.

How you envision the solution

I want to be able to define custom gates as I can, for instance, with the qulacs simulator. For an example of custom gates you can check this PR

Describe alternatives you've considered

There's no alternative.

Additional context

n/a

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.