Avoid statevector copy in `qsim.simulate(qc, initial_state=sv)`
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 34/100
- Tipo de issue
- Refactorización
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Área
- api, performance
Línea de trabajo
The copy happens in init_state() in pybind_interface/pybind_main.cpp, near the line the issue links (around line 695-701), when simulate is given an initial_state. Read how that state is passed into the simulator and whether the simulator can reference the caller's buffer without taking ownership. Done means the initial state is no longer copied on this path, and the existing Python tests for initial_state still pass. The thread has been unanswered for about three years, so confirm the approach with maintainers first.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
I have a use case where I am simulating my circuit piece by piece so using the ability to pass an initial state to qsim is very handy.
However I have noticed this makes a copy of the initial_state here:
Is there a way to avoid the expensive copy?
If there is a little patch that can be applied (I assume couple of lines in void init_state() should do it) I would be happy to apply it locally and re-build qsim.
Thanks!
- Lenguaje dominante
- C++
- Estrellas
- 702
- Forks
- 219
- Merge medio
- 1 d 2 h
- PR fusionados (30 d)
- 8
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de quantumlib/qsim
-
`MPSStateSpace::Sample` accesses results out of bounds when the output vector is emptyPosiblemente ocupada @aadityarshah la tomó hace 42 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
quantumlib/qsim#1126 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 3/5 1-2 días Aptitud para principiantes 57/100
quantumlib/qsim#1146 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 4/5 3-5 días Aptitud para principiantes 56/100
quantumlib/qsim#1145 ·
Los mantenedores suelen responder en 2 días
-
`MPSStateSpace::SampleOnce` crashes for two-qubit statesPosiblemente ocupada @aadityarshah la tomó hace 40 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 58/100
quantumlib/qsim#1129 ·
Los mantenedores suelen responder en 2 días
-
Implement expectation values for the MPS SimulatorPosiblemente ocupada @rupasri118 la tomó hace 36 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
quantumlib/qsim#1122 · 1 comentario ·
Los mantenedores suelen responder en 2 días
Todos los issues de quantumlib/qsim
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
ai_p1 comp-sql-syntax
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
ClickHouse/ClickHouse#133888 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
documentation good first issue
Dificultad 2/5 Medio día Aptitud para principiantes 66/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
jbcoe/cc-protocol#507 ·
Los mantenedores suelen responder en 1 día