Ran
|
Files
349
|
Run time
42s
|
Badge
Embed ▾
README BADGES
|
push
travis-ci-com
Refactor Shor's algorithm (#975) * Use AlgorithmResult for return from run() * Store phi_add as a gate, create _init_circuit method * Use inverse and control logic inside controlled_controlled_phi_add_mod_N * Use a separate circuit to be inverted during _controlled_multiple_mod_N * Typing on _get_factors * Import Gate from qiskit.circuit * Use name in init_circuit * Use inverse of controlled_multiple_mod_N * Use gates for multiplication functions * Reduce gate name and keep register order consistent * Revert back to circuit functions * Update documentation and extract modinv * Update documentation in accordance with contribution guidelines * Add tests * Update for spell check * Apply suggestions from code review Co-authored-by: Julien Gacon <gaconju@gmail.com> * Rename to double_controlled_phi_add * Initialise QuantumCircuit without private method * Make modinv error message more meaningful * Remove phi_add_gate test * Add int type hint * Omit quantum register in _phi_add_gate * replace compose calls with append * Use angles ParameterVector and rewrite double_controlled_phi_add_mod_N * Mak phi_add_gate static * Update indexing in _double_controlled_phi_add_mod_N * Move inverted controlled addition into _controlled_multiple_mod_N * Update documentation * Apply angles correctly * Revert "Remove phi_add_gate test" This reverts commit 907e86136. * Optimize imports * Update phi_add_gate test logic * Remove phi_add_gate test * Remove redundant qubit index call * rename multiple_mod_N to gate, update formatting * Add extra test case for modinv test * Use circuit.qubits explicitly when reconstructing registers * replace append calls in controlled addition circuit * Make qft an instruction during __init__ * replace compose calls in _controlled_multiple_mod_N_gate * Update docstrings * Apply IQFT at the... (continued)
18432 of 22111 relevant lines covered (83.36%)
0.83 hits per line
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|