Skip to content

Commit

Permalink
Add missing module registration.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinhartman committed Nov 19, 2024
1 parent 7f260db commit 07c1226
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions crates/circuit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ pub fn circuit(m: &Bound<PyModule>) -> PyResult<()> {
m.add_class::<dag_node::DAGOutNode>()?;
m.add_class::<dag_node::DAGOpNode>()?;
m.add_class::<operations::StandardGate>()?;
m.add_class::<operations::StandardInstruction>()?;
m.add_class::<operations::DelayUnit>()?;
Ok(())
}

Expand Down
2 changes: 2 additions & 0 deletions crates/circuit/src/operations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ impl<'a> Operation for OperationRef<'a> {
#[pyclass(module = "qiskit._accelerate.circuit", eq, eq_int)]
pub enum DelayUnit {
NS,
PS,
US,
MS,
S,
Expand All @@ -304,6 +305,7 @@ impl fmt::Display for DelayUnit {
"{}",
match self {
DelayUnit::NS => "ns",
DelayUnit::PS => "ps",
DelayUnit::US => "us",
DelayUnit::MS => "ms",
DelayUnit::S => "s",
Expand Down
3 changes: 2 additions & 1 deletion qiskit/circuit/delay.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ def __init__(self, duration, unit="dt"):
# as it only will exist in `Delay` after that point.
self.__unit = unit
# TODO: how can the delay be updated in the setter?
self._standard_instruction = StandardInstruction.Delay(duration, delay_unit)
# TODO: looks like Delay is a Parameter type, so this is disabled for now
# self._standard_instruction = StandardInstruction.Delay(duration, delay_unit)
super().__init__("delay", 1, 0, params=[duration])

broadcast_arguments = Gate.broadcast_arguments
Expand Down

0 comments on commit 07c1226

Please sign in to comment.