GithubHelp home page GithubHelp logo

z-quantum-core's Introduction

z-quantum-core

What is it?

z-quantum-core is a core library of the scientific code for Orquestra โ€“ the platform developed by Zapata Computing for performing computations on quantum computers.

z-quantum-core provides:

  • core functionalities required to run other Orquestra modules, such as the Circuit class.
  • interfaces for implementing other Orquestra modules, such as backends and optimizers.
  • useful tools to support the development of workflows and other scientific projects; such as time evolution, sampling from probability distribution, etc.

Usage

Workflow

In order to use z-quantum-core in your workflow, you need to add it as an import in your Orquestra workflow:

imports:
- name: z-quantum-core
  type: git
  parameters:
    repository: "[email protected]:zapatacomputing/z-quantum-core.git"
    branch: "master"

and then add it in the imports argument of your step:

- name: my-step
  config:
    runtime:
      language: python3
      imports: [z-quantum-core]

Once that is done you can:

  • use any z-quantum-core function by specifying its name and path as follows:
- name: generate-parameters
  config:
    runtime:
      language: python3
      imports: [z-quantum-core]
      parameters:
        file: z-quantum-core/steps/circuit.py
        function: generate_random_ansatz_params
  • use tasks which import zquantum.core in the python code (see below)

Python

Here's an example of how to use methods from z-quantum-core in a python task:

from zquantum.core.circuit import (build_ansatz_circuit,
                                   load_circuit_template,
                                   load_circuit_template_params,
                                   save_circuit)

ansatz = load_circuit_template('ansatz.json');
params = load_circuit_template_params('params.json');
circuit = build_ansatz_circuit(ansatz, params);
save_circuit(circuit, 'circuit.json')

Even though it's intended to be used with Orquestra, z-quantum-core can be also used as a standalone Python module. To install it, you just need to run pip install -e . from the main directory.

Development and Contribution

  • If you'd like to report a bug/issue please create a new issue in this repository.
  • If you'd like to contribute, please create a pull request.

Running tests

Unit tests for this project can be run using pytest . from the main directory.

z-quantum-core's People

Contributors

1ethanhansen avatar akataba avatar dexter2206 avatar fredericsauv avatar jacobalves avatar jama22 avatar jromerofontalvo avatar martamau avatar max-radin avatar mstechly avatar pediejo avatar sabeegrewal avatar simonwa7 avatar zapatabot 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.