Skip to content

Commit

Permalink
Apply remaining review suggestions:
Browse files Browse the repository at this point in the history
 * Fix details after applying inline suggestions
 * Keep TwoQubitWeilDecomposition attributes private. Add getter.
 * Initialize new_blocks using size hint
 * Remove basis_set as it's not used if there is a target.
 * Use ref_qubits ([PhysicalQubit; 2]) instead of wire_map (IndexMap<Qubit, Physicalqubit>)
 * Define static GOODBYE_SET as suggested
 * Use ImportOnceCell for XXDecomposer and XXEmbodiments to avoid importing in a loop.
 * Set preferred_direction without making it mutable.
 * Fix check_goodbye
 * Privatize assets
 * Use the add_global_phase method instead of the private function.
 * Add qs_decomposition to imports
 * Simplify flip_bits
 * Use NormalOperation to pass around decomposer gate and params info
 * First attempt at attaching synth circuits directly
 * Second attempt at attaching synth circuits directly
 * Use edge set for coupling map
 * Avoid exposing internals from NullableIndexMap
 * Use unitary_to_gate_sequence_inner instead of optimize_1q_gates_decomposition.
 * Use concat! in long error message.
  • Loading branch information
ElePT committed Sep 18, 2024
1 parent ee619de commit e560bf8
Show file tree
Hide file tree
Showing 6 changed files with 278 additions and 306 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ where
K: Eq + Hash + Clone,
V: Clone,
{
pub map: BaseMap<K, V>,
map: BaseMap<K, V>,
null_val: Option<V>,
}

Expand Down
15 changes: 12 additions & 3 deletions crates/accelerate/src/two_qubit_decompose.rs
Original file line number Diff line number Diff line change
Expand Up @@ -404,11 +404,11 @@ impl Specialization {
#[pyclass(module = "qiskit._accelerate.two_qubit_decompose", subclass)]
pub struct TwoQubitWeylDecomposition {
#[pyo3(get)]
pub a: f64,
a: f64,
#[pyo3(get)]
pub b: f64,
b: f64,
#[pyo3(get)]
pub c: f64,
c: f64,
#[pyo3(get)]
pub global_phase: f64,
K1l: Array2<Complex64>,
Expand All @@ -426,6 +426,15 @@ pub struct TwoQubitWeylDecomposition {
}

impl TwoQubitWeylDecomposition {
pub fn a(&self) -> &f64 {
&self.a
}
pub fn b(&self) -> &f64 {
&self.b
}
pub fn c(&self) -> &f64 {
&self.c
}
fn weyl_gate(
&self,
simplify: bool,
Expand Down
Loading

0 comments on commit e560bf8

Please sign in to comment.