Skip to content

Commit

Permalink
Initial
Browse files Browse the repository at this point in the history
  • Loading branch information
raynelfss committed Dec 10, 2024
1 parent 17648eb commit 4eb33c7
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
31 changes: 31 additions & 0 deletions crates/circuit/src/bits.rs
Original file line number Diff line number Diff line change
@@ -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);

1 change: 1 addition & 0 deletions crates/circuit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4eb33c7

Please sign in to comment.