Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new subpackage cirq-ft #6121

Merged
merged 7 commits into from Jun 6, 2023

Conversation

pavoljuhas
Copy link
Collaborator

@pavoljuhas pavoljuhas commented Jun 6, 2023

  • add empty bare bones cirq-ft package
  • address pylint recommendation about opening files in setup.py
  • include cirq-ft/requirements.txt in cirq-all-no-contrib.txt

Partially fixes #6119

@pavoljuhas pavoljuhas requested review from a team, vtomole and cduck as code owners June 6, 2023 00:27
@CirqBot CirqBot added the size: L 250< lines changed <1000 label Jun 6, 2023
circuits and running them against quantum computers and simulators.

This module is **cirq-ft**, which enhances support for fault-tolerant algorithms
and provides functions for quantum memory management.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cirq's github homepage defines it as

A python framework for creating, editing, and invoking Noisy Intermediate Scale Quantum (NISQ) circuits.

Wikipedia says that

Cirq is an open-source framework for noisy intermediate scale quantum (NISQ) computers.

Perhaps the README.md should discuss (and maybe even resolve!) this apparent contradiction.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack. This PR is to add a minimum package for transferring code from a development non-public repository.
The README file is not yet ready; I have added a TODO marker it needs to be reviewed.

cirq-ft/setup.py Outdated

name = 'cirq-ft'

description = 'A Cirq package to fault-tolerant algorithms'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/to/for/

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, fixed.

And fix typo in the package description.
Problem: pytest fails if it cannot find any test module in cirq-ft
Solution: add a temporary test-nothing test module to cirq-ft

"""Define version number here, read it from setup.py automatically"""

__version__ = "1.2.0.dev"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@verult Can we do 0.1.0dev instead?

Copy link
Collaborator

@verult verult Jun 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A big benefit of keeping the same version is that the compatibility matrix between vendor packages and cirq-core is simple: vendor package version 1.2.3 depends on cirq-core 1.2.3. I think using 0.x.x for a new packages makes sense, and we can even bump major and minor versions at a different cadence as cirq-core if our release tools allow, but we should then document compatibility with cirq-core in the README.

For example, if say cirq-ft 0.3.0 requires cirq-core 1.3 features:

  • cirq-ft 0.1 - 0.2 : >= cirq-core 1.2
  • cirq-ft 0.3: >= cirq-core 1.3

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC the plan is to distribute cirq-ft together with cirq. For example, the cirq metapackage currently includes all submodules including cirq-ft.

Cirq/setup.py

Lines 53 to 54 in 49b2cfb

# This is a pure metapackage that installs all our packages
requirements = [f'{p.name}=={p.version}' for p in modules.list_modules()]

If that is the case, I think it is better to keep cirq-ft version in sync with all other versions in cirq.
We can consider cirq-ft to be a new capability provided with the next public version Cirq-1.2.0.

Copy link
Collaborator

@tanujkhattar tanujkhattar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is exciting! Thanks Pavol!

I do have a slight discomfort in launching a new sub-package directly at version 1.2; but as discussed, this is a small price to pay for integrating well with rest of the cirq ecosystem!

@pavoljuhas pavoljuhas enabled auto-merge (squash) June 6, 2023 21:53
@pavoljuhas pavoljuhas merged commit 3393439 into quantumlib:master Jun 6, 2023
36 checks passed
@pavoljuhas pavoljuhas deleted the add-package-cirq-ft branch June 6, 2023 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: L 250< lines changed <1000
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a new sub-package for cirq-ft
5 participants