diff --git a/crates/circuit/src/bits.rs b/crates/circuit/src/bits.rs new file mode 100644 index 000000000000..65d897236b23 --- /dev/null +++ b/crates/circuit/src/bits.rs @@ -0,0 +1,31 @@ +// This code is part of Qiskit. +// +// (C) Copyright IBM 2023, 2024 +// +// This code is licensed under the Apache License, Version 2.0. You may +// obtain a copy of this license in the LICENSE.txt file in the root directory +// of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. +// +// Any modifications or derivative works of this code must retain this +// copyright notice, and modified files need to carry a notice indicating +// that they have been altered from the originals. + +use pyo3::prelude::*; + +/// Opaque struct representing a bit instance which can be stored in any circuit or register. +#[pyclass] +#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq, PartialOrd, Ord)] +pub struct Bit { + // This is an opaque type, so it doesn't store anything but an alias. +} + +#[pymethods] +impl Bit { + +} + +/// Opaque struct representing a Qubit instance +#[pyclass] +#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq, PartialOrd, Ord)] +pub struct Qubit(Bit); + diff --git a/crates/circuit/src/lib.rs b/crates/circuit/src/lib.rs index a4064d44b917..a65cd24612d2 100644 --- a/crates/circuit/src/lib.rs +++ b/crates/circuit/src/lib.rs @@ -10,6 +10,7 @@ // copyright notice, and modified files need to carry a notice indicating // that they have been altered from the originals. +pub mod bits; pub mod bit_data; pub mod circuit_data; pub mod circuit_instruction;