Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 20 additions & 19 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ members = [
"source/compiler/qsc_frontend",
"source/compiler/qsc_hir",
"source/compiler/qsc_openqasm_compiler",
"source/compiler/qsc_openqasm_parser",
"source/compiler/stim_compiler",
"source/compiler/qsc_linter",
"source/compiler/qsc_lowerer",
Expand All @@ -29,6 +28,7 @@ members = [
"source/index_map",
"source/language_service",
"source/simulators",
"source/qdk_openqasm_parser",
"source/qdk_package",
"source/qre",
"source/resource_estimator",
Expand Down
4 changes: 4 additions & 0 deletions clippy.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@ disallowed-types = [
{ path = "std::collections::HashMap", reason = "use FxHashMap instead" },
{ path = "std::collections::HashSet", reason = "use FxHashSet instead" },
]

# Proper nouns that should not be flagged by `clippy::doc_markdown` for missing
# backticks. `..` preserves clippy's built-in default identifier list.
doc-valid-idents = ["OpenQASM", "QASM", ".."]
2 changes: 1 addition & 1 deletion source/compiler/qsc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ qsc_parse = { path = "../qsc_parse" }
qsc_partial_eval = { path = "../qsc_partial_eval" }
qsc_project = { path = "../qsc_project", features = ["fs"] }
qsc_openqasm_compiler = { path = "../qsc_openqasm_compiler" }
qsc_openqasm_parser = { path = "../qsc_openqasm_parser" }
qdk_openqasm_parser = { path = "../../qdk_openqasm_parser", features = ["internal"] }
qsc_rca = { path = "../qsc_rca" }
qsc_circuit = { path = "../qsc_circuit" }
rustc-hash = { workspace = true }
Expand Down
12 changes: 6 additions & 6 deletions source/compiler/qsc/src/openqasm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
use std::sync::Arc;
use std::vec;

use qdk_openqasm_parser::io::SourceResolver;
use qsc_data_structures::error::WithSource;
use qsc_data_structures::target::Profile;
use qsc_frontend::compile::PackageStore;
Expand All @@ -13,19 +14,18 @@ pub use qsc_openqasm_compiler::{
CompilerConfig, OperationSignature, OutputSemantics, ProgramType, QasmCompileUnit,
QubitSemantics,
};
use qsc_openqasm_parser::io::SourceResolver;
use qsc_passes::PackageType;

pub mod io {
pub use qsc_openqasm_parser::io::*;
pub use qdk_openqasm_parser::io::*;
}

pub mod parser {
pub use qsc_openqasm_parser::parser::*;
pub use qdk_openqasm_parser::parser::*;
}

pub mod semantic {
pub use qsc_openqasm_parser::semantic::*;
pub use qdk_openqasm_parser::semantic::*;
}

pub mod error {
Expand All @@ -34,15 +34,15 @@ pub mod error {
}

pub mod completion {
pub use qsc_openqasm_parser::parser::completion::*;
pub use qdk_openqasm_parser::parser::completion::*;
}

pub mod compiler {
pub use qsc_openqasm_compiler::compiler::*;
}

pub mod stdlib {
pub use qsc_openqasm_parser::stdlib::*;
pub use qdk_openqasm_parser::stdlib::*;
}

use crate::compile::package_store_with_stdlib;
Expand Down
2 changes: 1 addition & 1 deletion source/compiler/qsc_openqasm_compiler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ miette = { workspace = true }
qsc_ast = { path = "../qsc_ast" }
qsc_data_structures = { path = "../qsc_data_structures" }
qsc_frontend = { path = "../qsc_frontend" }
qsc_openqasm_parser = { path = "../qsc_openqasm_parser" }
qdk_openqasm_parser = { path = "../../qdk_openqasm_parser", features = ["internal"] }
qsc_hir = { path = "../qsc_hir" }
rustc-hash = { workspace = true }
thiserror = { workspace = true }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ use std::hint::black_box;
use std::sync::Arc;

use criterion::{Criterion, criterion_group, criterion_main};
use qdk_openqasm_parser::io::InMemorySourceResolver;
use qsc_openqasm_compiler::{
CompilerConfig, OutputSemantics, ProgramType, QasmCompileUnit, QubitSemantics,
compiler::parse_and_compile_to_qsharp_ast_with_config,
};
use qsc_openqasm_parser::io::InMemorySourceResolver;

fn rgqft_multiplier<S: Into<Arc<str>>>(source: S) -> QasmCompileUnit {
let config = CompilerConfig::new(
Expand Down
12 changes: 6 additions & 6 deletions source/compiler/qsc_openqasm_compiler/src/ast_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ use qsc_ast::ast::{
};
use qsc_data_structures::span::Span;

use qsc_openqasm_parser::{
parser::ast::{List, list_from_iter},
semantic::types::Type,
stdlib::angle::Angle,
};
use qdk_openqasm_parser::{semantic::types::Type, stdlib::angle::Angle};

use crate::types::{ArrayDimensions, Complex};

fn list_from_iter<T>(iter: impl IntoIterator<Item = T>) -> Box<[Box<T>]> {
iter.into_iter().map(Box::new).collect()
}

pub(crate) fn build_managed_qubit_alloc<S>(
name: S,
stmt_span: Span,
Expand Down Expand Up @@ -1464,7 +1464,7 @@ pub(crate) fn build_function_or_operation(
return_type: Ty,
kind: CallableKind,
functors: Option<FunctorExpr>,
attrs: List<Attr>,
attrs: Box<[Box<Attr>]>,
) -> Stmt {
let args = cargs
.into_iter()
Expand Down
Loading
Loading