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

Merge QuantumCircuit backend written in Rust #363

Merged
merged 18 commits into from
Oct 21, 2024
Merged

Merge QuantumCircuit backend written in Rust #363

merged 18 commits into from
Oct 21, 2024

Conversation

yasuo-ozu
Copy link
Contributor

In 2024, we will release a new quantum circuit backend. This will provide users with a faster experience in quantum circuit generation and transpilation. Circuit generation and transpilation are crucial use cases for QURI Parts. For example, in workflows where generating large ansatz circuits or creating numerous instances of quantum circuits while varying parameters is required, the speed of quantum circuits is of paramount importance. This update will offer significant benefits to QURI Parts users, further solidifying QURI Parts' performance advantage over other libraries.

Additionally, as the user base of QURI Parts expands, this update makes QURI Parts easier to use. We have restructured the class design, which was previously considered complex, to make it more intuitive. For example, QuantumCircuit, which was previously a completely separate class from ImmutableQuantumCircuit, is now a subclass of ImmutableQuantumCircuit. This is because QuantumCircuit supports all the operations of ImmutableQuantumCircuit, in addition to allowing updates to the circuit. We have also shortened some of the longer class names to make them easier to understand. These changes have been made carefully to ensure backward compatibility. While the old class names are now deprecated, they can still be used.

Key features

Natively implemented classes

  • quri_parts.circuit.{circuit, circuit_parametric, gate, gates, noise}
  • Support faster circuit construction, parameter mapping, transpilation, noise simulation
  • API is (almost) all preserved

Parametric transpiler support

  • ParametricTranspiler class, which allows to apply transpiler on ParametricQuantumCircuit directly
  • You can wrap any CircuitTranspiler with ParametricCircuitTranspiler
  • Additional simple transpiler for parametric circuits

Class structure update, class names modification

  • Reconstructed class structure (with backword compatibility)
  • Deprecate longer class names and provide shorter one

yasuo-ozu and others added 17 commits October 9, 2024 15:08
* QuriPartsGates -> QuriPartsGate

* Fix spell
…GenericGateProperty)

Add parameter id to MaybeUnbound
Add gates_and_params
Change ParametricQuantumGate
Use id() when comparing Parameter
* Implement get_cbits

* Helper closures for 1q gates

* Replace a closure with an inline function

Co-authored-by: yozu <taiseiozu@gmail.com>

* Helpers for 1q rotation gates

* Add non-parametric 1q gates (#222)

* Add non-parametric 1q gates

* Remove unnecessary lifetime parameters

* Update gates.pyi

---------

Co-authored-by: yozu <taiseiozu@gmail.com>
Add UnitaryMatrix
Pickle support for QuantumCircuit, ImmutableQuantimCircuit
generarize parametric transpiler
Fast gate comparation
Implement ImmutableQuantumCircuit and ImmutableParametricQuantumCircuit
Deprecate names
Remove base classes
Add id comparison
Copy link

github-actions bot commented Oct 17, 2024

@github-actions github-actions bot temporarily deployed to pull request October 17, 2024 05:53 Inactive
@yasuo-ozu yasuo-ozu changed the base branch from main to update-license-pillow October 17, 2024 06:53
@github-actions github-actions bot temporarily deployed to pull request October 17, 2024 06:58 Inactive
Base automatically changed from update-license-pillow to main October 21, 2024 06:06
Copy link
Contributor

@kwkbtr kwkbtr left a comment

Choose a reason for hiding this comment

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

Looks good, good job!

@kwkbtr kwkbtr merged commit 68871e2 into main Oct 21, 2024
7 checks passed
@kwkbtr kwkbtr deleted the vm-merge branch October 21, 2024 06:13
@github-actions github-actions bot locked and limited conversation to collaborators Oct 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants