quantumlib / Cirq

A Python framework for creating, editing, and invoking Noisy Intermediate Scale Quantum (NISQ) circuits.
Apache License 2.0
4.28k stars 1.02k forks source link

Move cirq-core/contrib out of cirq-core as a separate vendor package. #5739

Open tanujkhattar opened 2 years ago

tanujkhattar commented 2 years ago

Post 1.0, cirq-contrib is expected to follow versioning policy similar to other vendor packages outside of cirq-core. We also ideally don't want cirq-core to depend on anything present in cirq-core/contrib. Therefore, moving cirq-core/contrib outside of cirq-core as a separate vendor package (cirq-contrib) looks like the right thing to do here.

This can be done post 1.0 since the versioning policy would have an exception for cirq-core/contrib and not guarantee backward compatibility.

vtomole commented 2 years ago

How will we maintain backwards compatibility with respect to the imports? For example, cirq.contrib.CircuitDag.from_circuit(cirq.Circuit()) should work after this change.

vtomole commented 2 years ago

This can be done post 1.0 since the versioning policy would have an exception for cirq-core/contrib and not guarantee backward compatibility.

Ah okay, got it.

verult commented 2 years ago

From Cirq sync - worth looking into. Tentatively accepted, and as a next step, understand the difficulty around doing this, especially around packaging and serialization. This has been done before when vendor packages are moved out of core, so something similar could be done here potentially.