pub struct FaultTolerantSynthesizer { /* private fields */ }
Expand description
Main fault-tolerant gate synthesizer
Implementations§
Source§impl FaultTolerantSynthesizer
impl FaultTolerantSynthesizer
Sourcepub fn new(config: FaultTolerantConfig) -> Result<Self>
pub fn new(config: FaultTolerantConfig) -> Result<Self>
Create new fault-tolerant synthesizer
Sourcepub fn synthesize_logical_circuit(
&mut self,
logical_circuit: &InterfaceCircuit,
) -> Result<FaultTolerantSynthesisResult>
pub fn synthesize_logical_circuit( &mut self, logical_circuit: &InterfaceCircuit, ) -> Result<FaultTolerantSynthesisResult>
Synthesize fault-tolerant implementation of a logical circuit
Sourcepub fn synthesize_logical_gate(
&mut self,
gate_type: LogicalGateType,
logical_qubits: &[usize],
) -> Result<LogicalGate>
pub fn synthesize_logical_gate( &mut self, gate_type: LogicalGateType, logical_qubits: &[usize], ) -> Result<LogicalGate>
Synthesize a single logical gate
Sourcepub fn create_surface_code_layout(
&self,
distance: usize,
) -> Result<SurfaceCodeLayout>
pub fn create_surface_code_layout( &self, distance: usize, ) -> Result<SurfaceCodeLayout>
Create surface code layout
Sourcepub fn generate_surface_code_stabilizers(
&self,
distance: usize,
) -> Result<Vec<Array1<i8>>>
pub fn generate_surface_code_stabilizers( &self, distance: usize, ) -> Result<Vec<Array1<i8>>>
Generate stabilizer generators for surface code
Sourcepub fn synthesize_logical_pauli(
&self,
gate_type: LogicalGateType,
logical_qubits: &[usize],
) -> Result<LogicalGate>
pub fn synthesize_logical_pauli( &self, gate_type: LogicalGateType, logical_qubits: &[usize], ) -> Result<LogicalGate>
Synthesize logical Pauli gates
Sourcepub fn synthesize_logical_hadamard(
&self,
logical_qubits: &[usize],
) -> Result<LogicalGate>
pub fn synthesize_logical_hadamard( &self, logical_qubits: &[usize], ) -> Result<LogicalGate>
Synthesize logical Hadamard gate
Sourcepub fn synthesize_logical_cnot(
&self,
logical_qubits: &[usize],
) -> Result<LogicalGate>
pub fn synthesize_logical_cnot( &self, logical_qubits: &[usize], ) -> Result<LogicalGate>
Synthesize logical CNOT gate
Sourcepub fn synthesize_logical_t_with_magic_states_public(
&self,
logical_qubits: &[usize],
) -> Result<LogicalGate>
pub fn synthesize_logical_t_with_magic_states_public( &self, logical_qubits: &[usize], ) -> Result<LogicalGate>
Synthesize logical T with magic states (public version)
Sourcepub fn create_t_state_distillation_circuit_public(
&self,
) -> Result<InterfaceCircuit>
pub fn create_t_state_distillation_circuit_public( &self, ) -> Result<InterfaceCircuit>
Create T state distillation circuit (public version)
Sourcepub fn create_ccz_state_distillation_circuit_public(
&self,
) -> Result<InterfaceCircuit>
pub fn create_ccz_state_distillation_circuit_public( &self, ) -> Result<InterfaceCircuit>
Create CCZ state distillation circuit (public version)
Sourcepub fn update_resources_public(
&self,
total: &mut ResourceRequirements,
gate: &ResourceRequirements,
)
pub fn update_resources_public( &self, total: &mut ResourceRequirements, gate: &ResourceRequirements, )
Update resources (public version)
Sourcepub fn calculate_optimal_distance_public(
&self,
circuit: &InterfaceCircuit,
) -> Result<usize>
pub fn calculate_optimal_distance_public( &self, circuit: &InterfaceCircuit, ) -> Result<usize>
Calculate optimal distance (public version)
Sourcepub fn calculate_logical_gate_error_rate_public(
&self,
gate_type: LogicalGateType,
) -> Result<f64>
pub fn calculate_logical_gate_error_rate_public( &self, gate_type: LogicalGateType, ) -> Result<f64>
Calculate logical gate error rate (public version)
Auto Trait Implementations§
impl Freeze for FaultTolerantSynthesizer
impl RefUnwindSafe for FaultTolerantSynthesizer
impl Send for FaultTolerantSynthesizer
impl Sync for FaultTolerantSynthesizer
impl Unpin for FaultTolerantSynthesizer
impl UnwindSafe for FaultTolerantSynthesizer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.