Giter VIP home page Giter VIP logo

cirq-on-iqm's People

Contributors

dc914337 avatar freetonik avatar hay-k avatar jkotilahti avatar jmuff22 avatar kukushechkin avatar leonwubben avatar manevala avatar nikosavola avatar olliahonen avatar ollityrkko avatar q-mat-beu avatar rbrazinskas avatar smite avatar spellstaker avatar thaapasa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cirq-on-iqm's Issues

Remove the hack of iterating a fixed number of times in simplify_circuit

Fix the current hack of using a fixed number of iterations in simplify_circuit by directly comparing old and new circuit to check whether any optimisation was applied.

The change would look something like this:

while True:
    old_circuit = circuit.copy()
    MergeOneParameterGroupGates().optimize_circuit(circuit)
    optimizers.merge_single_qubit_gates_into_phased_x_z(circuit)
    # all z rotations are pushed past the first two-qubit gate following them
    IQMEjectZ(eject_parameterized=True).optimize_circuit(circuit)
    optimizers.DropEmptyMoments().optimize_circuit(circuit)
    # Circuit has reached a fixed point. 
    if circuit == old_circuit:
        break

Automated daily tests against latest Cirq version

Since (potentially breaking) changes to Cirq would not automatically test against the code in cirq-on-iqm, we should setup automated tests (using github actions?) in cirq-on-iqm running against the latest version of Cirq to raise an alert whenever there's a breaking change so that it can be detected early on and necessary migrations can be done.

cc @balopat

[Discuss] IsingGate design and implementation

The comment in IsingGate class says that it's needed because cirq.ops.ZZPowGate contains decomposition logic which iqm wants to avoid.

Since the decomposition logic of a gate is mainly called when the code dealing with the gate (eg: Simulator) doesn't understand what the gate is, it's not clear to me how is the default decomposition logic of ZZPowGate in Cirq causing an issue for IQM?

If the problem is that because the hardware natively supports IsingGate and therefore we want to use it as a primitive in cirq circuits, I think it would be better if we implement it by inheriting from cirq.ops.ZZPowGate and passing the global phase as an init parameter. A similar approach is used in Cirq to implement Mølmer–Sørensen Gate by extending cirq.XXPowGate.

Another approach could be to use ZZPowGate in the cirq circuits (for optimisation and simulation) and convert to an appropriate representation (of IsingGate) -- which the hardware understands -- during the serialisation step when the circuit has to be sent to the hardware. For Eg: See Serialiser of IonQ that does something similar.

cc @balopat

pip install cirq-iqm fails with python3.9

Steps to reproduce:

$> conda create -n iqm_test python==3.9 
$> conda activate iqm_test
$> pip install cirq-iqm
ERROR: Could not find a version that satisfies the requirement cirq-iqm
ERROR: No matching distribution found for cirq-iqm
Click to expand and view terminal output.

(base) $> conda create -n iqm_test python==3.9 
Collecting package metadata (repodata.json): done
Solving environment: done
## Package Plan ##

  environment location: /Users/tanujkhattar/opt/anaconda3/envs/iqm_test

  added / updated specs:
    - python==3.9


The following NEW packages will be INSTALLED:

  ca-certificates    pkgs/main/osx-64::ca-certificates-2021.4.13-hecd8cb5_1
  certifi            pkgs/main/osx-64::certifi-2020.12.5-py39hecd8cb5_0
  libcxx             pkgs/main/osx-64::libcxx-10.0.0-1
  libffi             pkgs/main/osx-64::libffi-3.3-hb1e8313_2
  ncurses            pkgs/main/osx-64::ncurses-6.2-h0a44026_1
  openssl            pkgs/main/osx-64::openssl-1.1.1k-h9ed2024_0
  pip                pkgs/main/osx-64::pip-21.0.1-py39hecd8cb5_0
  python             pkgs/main/osx-64::python-3.9.0-h88f2d9e_2
  readline           pkgs/main/osx-64::readline-8.1-h9ed2024_0
  setuptools         pkgs/main/osx-64::setuptools-52.0.0-py39hecd8cb5_0
  sqlite             pkgs/main/osx-64::sqlite-3.35.4-hce871da_0
  tk                 pkgs/main/osx-64::tk-8.6.10-hb0a8c7a_0
  tzdata             pkgs/main/noarch::tzdata-2020f-h52ac0ba_0
  wheel              pkgs/main/noarch::wheel-0.36.2-pyhd3eb1b0_0
  xz                 pkgs/main/osx-64::xz-5.2.5-h1de35cc_0
  zlib               pkgs/main/osx-64::zlib-1.2.11-h1de35cc_3


Proceed ([y]/n)? y

Preparing transaction: done
Verifying transaction: done
Executing transaction: done

(base) $> conda activate iqm_test
(iqm_test) $> pip install cirq-iqm
ERROR: Could not find a version that satisfies the requirement cirq-iqm
ERROR: No matching distribution found for cirq-iqm

Streamline contributor experience / processes

Cirq has a growing community of contributors and it would be nice if the contributor experience and processes of cirq-on-iqm are similar to that of cirq. Some concrete suggestions for changes would be

  • Have a DEVELOPMENT.md highlighting the contribution process.
  • Run tests/coverage checks on PRs via github actions
  • Follow pattern of placing _test.py files next to .py

cc @balopat

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.