-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 Rust quantum volume function #13238
Commits on Sep 28, 2024
-
Add Rust quantum volume function
This commit adds a new function quantum_volume used for generating a quantum volume model circuit. This new function is defined in Rust and multithreaded to improve the throughput of the circuit generation. This new function will eventually replace the existing QuantumVolume class as part of Qiskit#13046. Since quantum volume is a circuit defined by it's structure using a generator function is inline with the goals of Qiskit#13046. Right now the performance is bottlenecked by the creation of the UnitaryGate objects as these are still defined solely in Python. We'll likely need to port the class to have a rust native representation to further speed up the construction of the circuit.
Configuration menu - View commit details
-
Copy full SHA for c114618 - Browse repository at this point
Copy the full SHA c114618View commit details
Commits on Sep 30, 2024
-
Adjust type hints on python function
Co-authored-by: Julien Gacon <gaconju@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for ced62a7 - Browse repository at this point
Copy the full SHA ced62a7View commit details -
The previous commit was relying on the behavior of the annotations future import but neglected to add it. This commit corrects the oversight.
Configuration menu - View commit details
-
Copy full SHA for 50ca924 - Browse repository at this point
Copy the full SHA 50ca924View commit details -
Configuration menu - View commit details
-
Copy full SHA for 69d4cfa - Browse repository at this point
Copy the full SHA 69d4cfaView commit details -
Reduce allocations random_unitaries
The previous implementation had 4 heap allocations for each random unitary constructed, this commit uses some fixed sized stack allocated arrays and reduces that to two allocations one for q and r from the factorization. We'll always need at least one for the `Array2` that gets stored in each `UnitaryGate` as a numpy array. But to reduce to just this we'll need a method of computing the QR factorization without an allocation for the result space, nalgebtra might be a path for doing that. While this currently isn't a bottleneck as the `UnitaryGate` python object creation is the largest source of runtime, but assuming that's fixed in the future this might have a larger impact.
Configuration menu - View commit details
-
Copy full SHA for 32b4c1f - Browse repository at this point
Copy the full SHA 32b4c1fView commit details -
Configuration menu - View commit details
-
Copy full SHA for bcb67a1 - Browse repository at this point
Copy the full SHA bcb67a1View commit details
Commits on Oct 1, 2024
-
Preallocate unitaries for serial path
When executing in the serial path we previously were working directly with an iterator where the 2q unitaries we're created on the iterator that we passed directly to circuit constructor. However testing shows that precomputing all the unitaries into a Vec and passing the iterator off of that to the circuit constructor is marginally but consistently faster. So this commit pivots to using that instead.
Configuration menu - View commit details
-
Copy full SHA for d0daf81 - Browse repository at this point
Copy the full SHA d0daf81View commit details
Commits on Oct 2, 2024
-
Fix determinism and error handling of of qv function
This commit fixes two issues in the reproducibility of the quantum volume circuit. The first was the output unitary matrices for a fixed seed would differ between the parallel and serial execution path. This was because how the RNGs were used was different in the different code paths. This change results in the serial path being marginally less efficient, but it shouldn't be a big deal when compared to getting different results in different contexts. The second was the seed usage in parallel mode was dependent on the number of threads on the local system. This was problematic because the exact circuit generated between two systems would be different even with a fixed seed. This was fixed to avoid depending on the number of threads to determine how the seeds were used across multiple threads. The last fix here was a change to the error handling so that the CircuitData constructor used to create the circuit object can handle a fallible iterator. Previously we were throwing away the python error and panicking if the Python call to generate the UnitaryGate object raised an error for any reason.
Configuration menu - View commit details
-
Copy full SHA for 9d8e4fe - Browse repository at this point
Copy the full SHA 9d8e4feView commit details -
Configuration menu - View commit details
-
Copy full SHA for 06b0b0f - Browse repository at this point
Copy the full SHA 06b0b0fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 42d539d - Browse repository at this point
Copy the full SHA 42d539dView commit details -
Update qiskit/circuit/library/quantum_volume.py
Co-authored-by: Julien Gacon <gaconju@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 43510e1 - Browse repository at this point
Copy the full SHA 43510e1View commit details
Commits on Oct 3, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 37da7b2 - Browse repository at this point
Copy the full SHA 37da7b2View commit details