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

Performance of indexing PauliOperator with UnitRange #455

Open
jlapeyre opened this issue Dec 29, 2024 · 0 comments
Open

Performance of indexing PauliOperator with UnitRange #455

jlapeyre opened this issue Dec 29, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@jlapeyre
Copy link
Contributor

jlapeyre commented Dec 29, 2024

This could be faster. But I haven't looked into it much.
The storage and indexing schemes for BitArray and PauliOperator are similar. But the performance for this operation is much better for the former.

julia> using QuantumClifford;

julia> rp = random_pauli(100);

julia> import Random;

julia> bv = Random.bitrand(100);

julia> @btime $rp[25:75];
  520.979 ns (28 allocations: 1.61 KiB)

julia> @btime $bv[25:75];
  19.052 ns (3 allocations: 96 bytes)

I'm not sure how much this comes up in practice. But I think it's worth noting it.

Versions

Julia v"1.11.2"

QuantumClifford v0.9.15

@jlapeyre jlapeyre added the enhancement New feature or request label Dec 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant