Start from any state: `initialize(state)`

Abierto
#17 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
54/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python, rust
Área
backend

Línea de trabajo

Start by reading CONTRIBUTING.md and tracing how QuantumCircuit accepts and executes instructions, including its CPU and GPU state paths. Check how state vectors are represented and where state preparation occurs; the issue suggests initialize must be the first instruction. Done means accepting a supplied state, validating its length and normalization, renormalizing it, and covering the requested CPU and GPU behavior.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement
What you want to do

Begin a circuit from a given state vector (a known ground state, data loaded into amplitudes,
or a state saved from another run) instead of |0…0⟩.

Implementation notes
  • Simplest version: allowed only as the first instruction. It writes the amplitudes directly
    (CPU: copy; GPU: write_buffer) and skips state preparation.
  • Validate the length and normalisation (within 1e-9), and renormalise.
What it could look like
qc = qsengine.QuantumCircuit(3)
qc.initialize(np.array([...], dtype=complex))   # length 2**3, normalised
Contributing
  • I would like to open a pull request for this (see CONTRIBUTING.md).
Lenguaje dominante
Rust
Estrellas
1
Forks
0
Merge medio
12 min
PR fusionados (30 d)
4

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de kaiwave/qsengine

Todos los issues de kaiwave/qsengine

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.