Skip to content

Commit

Permalink
Use FnOnce for X type in circuit_psx_gen
Browse files Browse the repository at this point in the history
  • Loading branch information
mtreinish committed Mar 2, 2023
1 parent b8992a7 commit 5745c83
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/euler_one_qubit_decomposer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ fn circuit_psx_gen<F, P, X>(
where
F: FnMut(&mut OneQubitGateSequence),
P: FnMut(&mut OneQubitGateSequence, f64),
X: FnMut(&mut OneQubitGateSequence),
X: FnOnce(&mut OneQubitGateSequence),
{
let mut phi = phi;
let mut lam = lam;
Expand Down Expand Up @@ -338,7 +338,7 @@ where
// emit circuit
pfun(&mut circuit, lam);
match xpifun {
Some(mut xpifun) if mod_2pi(theta).abs() < atol => xpifun(&mut circuit),
Some(xpifun) if mod_2pi(theta).abs() < atol => xpifun(&mut circuit),
_ => {
xfun(&mut circuit);
pfun(&mut circuit, theta);
Expand Down Expand Up @@ -426,7 +426,7 @@ pub fn generate_circuit(
atol,
fnz,
fnx,
None::<Box<dyn FnMut(&mut OneQubitGateSequence)>>,
None::<Box<dyn FnOnce(&mut OneQubitGateSequence)>>,
)
}
"ZSX" => {
Expand Down Expand Up @@ -456,7 +456,7 @@ pub fn generate_circuit(
atol,
fnz,
fnx,
None::<Box<dyn FnMut(&mut OneQubitGateSequence)>>,
None::<Box<dyn FnOnce(&mut OneQubitGateSequence)>>,
)
}
"U1X" => {
Expand Down Expand Up @@ -486,7 +486,7 @@ pub fn generate_circuit(
atol,
fnz,
fnx,
None::<Box<dyn FnMut(&mut OneQubitGateSequence)>>,
None::<Box<dyn FnOnce(&mut OneQubitGateSequence)>>,
)
}
"ZSXX" => {
Expand Down

0 comments on commit 5745c83

Please sign in to comment.