Repository: microsoft/qsharp
Pull request #1393 (2024-04-15 23:37:39)

Update profile configuration
This updates the conditional compilation logic and target profile names. We need to take a good look at the conditional compilation attributes used to ensure that they are correct. This also updates the config attribute logic to deal with capabilities rather than profiles.

github-actions[bot]: _Change in memory usage detected by benchmark._
## Memory Report for eead052aa714c4e775ef9d2ebd8f3b452810d15f

| Test                        | This Branch | On Main  | Difference |
|-----------------------------|-------------|----------| ---------- |
| compile core + standard lib | 15970025 bytes | 15975609 bytes | -5584 bytes
github-actions[bot]: ## Benchmark for eead052
  <details>
    <summary>Click to view benchmark</summary>

| Test | Base         | PR               | % |
|------|--------------|------------------|---|
| Array append evaluation | 343.7±2.25µs | **336.1±4.25µs** | **-2.21%** |
| Array literal evaluation | 189.8±0.91µs | **171.3±2.26µs** | **-9.75%** |
| Array update evaluation | 425.3±3.32µs | **412.3±3.60µs** | **-3.06%** |
| Core + Standard library compilation | 17.7±0.97ms | **17.0±0.23ms** | **-3.95%** |
| Deutsch-Jozsa evaluation | 5.1±0.05ms | **5.0±0.05ms** | **-1.96%** |
| Large file parity evaluation | 33.6±0.13ms | 33.5±0.35ms | -0.30% |
| Large input file compilation | 11.7±0.52ms | **11.3±0.09ms** | **-3.42%** |
| Large input file compilation (interpreter) | 45.0±1.65ms | **43.3±0.92ms** | **-3.78%** |
| Large nested iteration | 33.8±0.36ms | **32.5±0.92ms** | **-3.85%** |
| Perform Runtime Capabilities Analysis (RCA) on Deutsch-Jozsa sample | 1479.8±30.76µs | 1489.3±34.73µs | +0.64% |
| Perform Runtime Capabilities Analysis (RCA) on large file sample | 7.7±0.09ms | **7.6±0.08ms** | **-1.30%** |
| Perform Runtime Capabilities Analysis (RCA) on teleport sample | 1403.6±43.74µs | 1398.6±31.90µs | -0.36% |
| Perform Runtime Capabilities Analysis (RCA) on the core and std libraries | 21.2±0.19ms | 21.3±0.49ms | +0.47% |
| Teleport evaluation | 80.7±4.77µs | 80.9±3.36µs | +0.25% |

  </details>
  
github-actions[bot]: _Change in memory usage detected by benchmark._
## Memory Report for 72659ca50b50e864b04f1922334b513d26ff9e1a

| Test                        | This Branch | On Main  | Difference |
|-----------------------------|-------------|----------| ---------- |
| compile core + standard lib | 15970369 bytes | 15975609 bytes | -5240 bytes
github-actions[bot]: _Change in memory usage detected by benchmark._
## Memory Report for 10c22b1fd65be683c920399844229a9f93e843b2

| Test                        | This Branch | On Main  | Difference |
|-----------------------------|-------------|----------| ---------- |
| compile core + standard lib | 15970329 bytes | 15975609 bytes | -5280 bytes
github-actions[bot]: ## Benchmark for 10c22b1
  <details>
    <summary>Click to view benchmark</summary>

| Test | Base         | PR               | % |
|------|--------------|------------------|---|
| Array append evaluation | **334.6±3.03µs** | 352.1±16.02µs | **+5.23%** |
| Array literal evaluation | **170.9±0.98µs** | 189.4±1.11µs | **+10.83%** |
| Array update evaluation | **412.9±1.86µs** | 429.8±10.22µs | **+4.09%** |
| Core + Standard library compilation | 17.0±0.33ms | 17.0±0.35ms | 0.00% |
| Deutsch-Jozsa evaluation | 5.1±0.04ms | 5.1±0.04ms | 0.00% |
| Large file parity evaluation | 33.7±0.12ms | 33.6±0.40ms | -0.30% |
| Large input file compilation | 11.6±0.25ms | 11.4±0.20ms | -1.72% |
| Large input file compilation (interpreter) | 44.7±1.10ms | 44.5±1.21ms | -0.45% |
| Large nested iteration | **32.7±0.29ms** | 34.0±1.96ms | **+3.98%** |
| Perform Runtime Capabilities Analysis (RCA) on Deutsch-Jozsa sample | 1500.9±59.31µs | 1494.4±56.01µs | -0.43% |
| Perform Runtime Capabilities Analysis (RCA) on large file sample | 7.8±0.09ms | **7.7±0.09ms** | **-1.28%** |
| Perform Runtime Capabilities Analysis (RCA) on teleport sample | 1407.3±25.75µs | 1401.7±28.77µs | -0.40% |
| Perform Runtime Capabilities Analysis (RCA) on the core and std libraries | 21.3±0.22ms | 21.4±0.47ms | +0.47% |
| Teleport evaluation | 82.5±3.39µs | 82.1±3.43µs | -0.48% |

  </details>
  
github-actions[bot]: _Change in memory usage detected by benchmark._
## Memory Report for 054c00242c42fad9ba56d633bf8952b314e0fce2

| Test                        | This Branch | On Main  | Difference |
|-----------------------------|-------------|----------| ---------- |
| compile core + standard lib | 15970329 bytes | 15975609 bytes | -5280 bytes
github-actions[bot]: ## Benchmark for 054c002
  <details>
    <summary>Click to view benchmark</summary>

| Test | Base         | PR               | % |
|------|--------------|------------------|---|
| Array append evaluation | 344.5±3.97µs | **332.9±2.26µs** | **-3.37%** |
| Array literal evaluation | 190.7±8.10µs | **171.5±2.98µs** | **-10.07%** |
| Array update evaluation | 423.5±4.98µs | **411.7±3.31µs** | **-2.79%** |
| Core + Standard library compilation | **18.7±0.88ms** | 20.9±1.56ms | **+11.76%** |
| Deutsch-Jozsa evaluation | 5.1±0.07ms | **5.0±0.11ms** | **-1.96%** |
| Large file parity evaluation | 33.8±0.10ms | 33.9±0.83ms | +0.30% |
| Large input file compilation | **12.1±0.43ms** | 16.1±1.29ms | **+33.06%** |
| Large input file compilation (interpreter) | **49.6±2.54ms** | 53.1±2.87ms | **+7.06%** |
| Large nested iteration | 33.8±0.56ms | **32.9±0.39ms** | **-2.66%** |
| Perform Runtime Capabilities Analysis (RCA) on Deutsch-Jozsa sample | 1540.5±125.94µs | 1506.6±37.38µs | -2.20% |
| Perform Runtime Capabilities Analysis (RCA) on large file sample | 8.2±0.15ms | **7.9±0.16ms** | **-3.66%** |
| Perform Runtime Capabilities Analysis (RCA) on teleport sample | 1445.2±86.67µs | 1451.6±78.91µs | +0.44% |
| Perform Runtime Capabilities Analysis (RCA) on the core and std libraries | 21.8±0.30ms | 21.9±0.68ms | +0.46% |
| Teleport evaluation | 83.2±5.27µs | 81.5±4.10µs | -2.04% |

  </details>
  
github-actions[bot]: _Change in memory usage detected by benchmark._
## Memory Report for c62bb6130fad5dfec8a7d027700ca9930363fb4c

| Test                        | This Branch | On Main  | Difference |
|-----------------------------|-------------|----------| ---------- |
| compile core + standard lib | 15970329 bytes | 15975609 bytes | -5280 bytes

Patch:
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index b45876b8..b355249e 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -18,7 +18,7 @@
 /pip @billti @idavis @minestarks
 /playground @billti @cesarzc @minestarks
 /resource_estimator @billti @ivanbasov @swernli
-/samples @cesarzc @DmitryVasilevsky @sezna @swernli
+/samples @cesarzc @DmitryVasilevsky @sezna @swernli @tcNickolas
 /vscode @billti @idavis @minestarks @sezna
 /wasm @billti @cesarzc @sezna @swernli
 
diff --git a/compiler/qsc/benches/eval.rs b/compiler/qsc/benches/eval.rs
index 3dbee454..df4b5492 100644
--- a/compiler/qsc/benches/eval.rs
+++ b/compiler/qsc/benches/eval.rs
@@ -8,7 +8,7 @@ use indoc::indoc;
 use qsc::{interpret::Interpreter, PackageType};
 use qsc_data_structures::language_features::LanguageFeatures;
 use qsc_eval::output::GenericReceiver;
-use qsc_frontend::compile::{RuntimeCapabilityFlags, SourceMap};
+use qsc_frontend::compile::{SourceMap, TargetCapabilityFlags};
 
 const TELEPORT: &str = include_str!("../../../samples/algorithms/Teleportation.qs");
 const DEUTSCHJOZSA: &str = include_str!("../../../samples/algorithms/DeutschJozsa.qs");
@@ -22,7 +22,7 @@ pub fn teleport(c: &mut Criterion) {
             true,
             sources,
             PackageType::Exe,
-            RuntimeCapabilityFlags::all(),
+            TargetCapabilityFlags::all(),
             LanguageFeatures::default(),
         )
         .expect("code should compile");
@@ -41,7 +41,7 @@ pub fn deutsch_jozsa(c: &mut Criterion) {
             true,
             sources,
             PackageType::Exe,
-            RuntimeCapabilityFlags::all(),
+            TargetCapabilityFlags::all(),
             LanguageFeatures::default(),
         )
         .expect("code should compile");
@@ -60,7 +60,7 @@ pub fn large_file(c: &mut Criterion) {
             true,
             sources,
             PackageType::Exe,
-            RuntimeCapabilityFlags::all(),
+            TargetCapabilityFlags::all(),
             LanguageFeatures::default(),
         )
         .expect("code should compile");
@@ -91,7 +91,7 @@ pub fn array_append(c: &mut Criterion) {
             true,
             sources,
             PackageType::Exe,
-            RuntimeCapabilityFlags::all(),
+            TargetCapabilityFlags::all(),
             LanguageFeatures::default(),
         )
         .expect("code should compile");
@@ -122,7 +122,7 @@ pub fn array_update(c: &mut Criterion) {
             true,
             sources,
             PackageType::Exe,
-            RuntimeCapabilityFlags::all(),
+            TargetCapabilityFlags::all(),
             LanguageFeatures::default(),
         )
         .expect("code should compile");
@@ -141,7 +141,7 @@ pub fn array_literal(c: &mut Criterion) {
             true,
             sources,
             PackageType::Exe,
-            RuntimeCapabilityFlags::all(),
+            TargetCapabilityFlags::all(),
             LanguageFeatures::default(),
         )
         .expect("code should compile");
@@ -177,7 +177,7 @@ pub fn large_nested_iteration(c: &mut Criterion) {
             true,
             sources,
             PackageType::Exe,
-            RuntimeCapabilityFlags::all(),
+            TargetCapabilityFlags::all(),
             LanguageFeatures::default(),
         )
         .expect("code should compile");
diff --git a/compiler/qsc/benches/large.rs b/compiler/qsc/benches/large.rs
index 6955df5a..5025108d 100644
--- a/compiler/qsc/benches/large.rs
+++ b/compiler/qsc/benches/large.rs
@@ -6,7 +6,7 @@ allocator::assign_global!();
 use criterion::{criterion_group, criterion_main, Criterion};
 use qsc::compile::{self, compile};
 use qsc_data_structures::language_features::LanguageFeatures;
-use qsc_frontend::compile::{PackageStore, RuntimeCapabilityFlags, SourceMap};
+use qsc_frontend::compile::{PackageStore, SourceMap, TargetCapabilityFlags};
 use qsc_passes::PackageType;
 
 const INPUT: &str = include_str!("./large.qs");
@@ -14,7 +14,7 @@ const INPUT: &str = include_str!("./large.qs");
 pub fn large_file(c: &mut Criterion) {
     c.bench_function("Large input file compilation", |b| {
         let mut store = PackageStore::new(compile::core());
-        let std = store.insert(compile::std(&store, RuntimeCapabilityFlags::all()));
+        let std = store.insert(compile::std(&store, TargetCapabilityFlags::all()));
         b.iter(|| {
             let sources = SourceMap::new([("large.qs".into(), INPUT.into())], None);
             let (_, reports) = compile(
@@ -22,7 +22,7 @@ pub fn large_file(c: &mut Criterion) {
                 &[std],
                 sources,
                 PackageType::Exe,
-                RuntimeCapabilityFlags::all(),
+                TargetCapabilityFlags::all(),
                 LanguageFeatures::default(),
             );
             assert!(reports.is_empty());
@@ -38,7 +38,7 @@ pub fn large_file_interpreter(c: &mut Criterion) {
                 true,
                 sources,
                 PackageType::Exe,
-                RuntimeCapabilityFlags::all(),
+                TargetCapabilityFlags::all(),
                 LanguageFeatures::default(),
             )
             .expect("code should compile");
diff --git a/compiler/qsc/benches/library.rs b/compiler/qsc/benches/library.rs
index 07cf0569..3decd16b 100644
--- a/compiler/qsc/benches/library.rs
+++ b/compiler/qsc/benches/library.rs
@@ -5,13 +5,13 @@ allocator::assign_global!();
 
 use criterion::{criterion_group, criterion_main, Criterion};
 use qsc::compile;
-use qsc_frontend::compile::{PackageStore, RuntimeCapabilityFlags};
+use qsc_frontend::compile::{PackageStore, TargetCapabilityFlags};
 
 pub fn library(c: &mut Criterion) {
     c.bench_function("Core + Standard library compilation", |b| {
         b.iter(|| {
             let store = PackageStore::new(compile::core());
-            compile::std(&store, RuntimeCapabilityFlags::all())
+            compile::std(&store, TargetCapabilityFlags::all())
         });
     });
 }
diff --git a/compiler/qsc/benches/rca.rs b/compiler/qsc/benches/rca.rs
index 4a63359c..c9005f9a 100644
--- a/compiler/qsc/benches/rca.rs
+++ b/compiler/qsc/benches/rca.rs
@@ -5,7 +5,7 @@ use criterion::{criterion_group, criterion_main, Criterion};
 use qsc::incremental::Compiler;
 use qsc_data_structures::language_features::LanguageFeatures;
 use qsc_fir::fir::PackageStore;
-use qsc_frontend::compile::{PackageStore as HirPackageStore, RuntimeCapabilityFlags, SourceMap};
+use qsc_frontend::compile::{PackageStore as HirPackageStore, SourceMap, TargetCapabilityFlags};
 use qsc_lowerer::{map_hir_package_to_fir, Lowerer};
 use qsc_passes::PackageType;
 use qsc_rca::{Analyzer, PackageStoreComputeProperties};
@@ -130,7 +130,7 @@ impl Default for CompilationContext {
             true,
             SourceMap::default(),
             PackageType::Lib,
-            RuntimeCapabilityFlags::all(),
+            TargetCapabilityFlags::all(),
             LanguageFeatures::default(),
         )
         .expect("should be able to create a new compiler");
diff --git a/compiler/qsc/src/bin/qsc.rs b/compiler/qsc/src/bin/qsc.rs
index ee7a6c50..91f3f8b1 100644
--- a/compiler/qsc/src/bin/qsc.rs
+++ b/compiler/qsc/src/bin/qsc.rs
@@ -10,7 +10,7 @@ use qsc::compile::compile;
 use qsc_codegen::qir_base;
 use qsc_data_structures::language_features::LanguageFeatures;
 use qsc_frontend::{
-    compile::{PackageStore, RuntimeCapabilityFlags, SourceContents, SourceMap, SourceName},
+    compile::{PackageStore, SourceContents, SourceMap, SourceName, TargetCapabilityFlags},
     error::WithSource,
 };
 use qsc_hir::hir::{Package, PackageId};
@@ -74,9 +74,9 @@ fn main() -> miette::Result<ExitCode> {
     let mut dependencies = Vec::new();
 
     let (package_type, capabilities) = if cli.emit.contains(&Emit::Qir) {
-        (PackageType::Exe, RuntimeCapabilityFlags::empty())
+        (PackageType::Exe, TargetCapabilityFlags::empty())
     } else {
-        (PackageType::Lib, RuntimeCapabilityFlags::all())
+        (PackageType::Lib, TargetCapabilityFlags::all())
     };
 
     if !cli.nostdlib {
diff --git a/compiler/qsc/src/bin/qsi.rs b/compiler/qsc/src/bin/qsi.rs
index 6f3c8649..c987012e 100644
--- a/compiler/qsc/src/bin/qsi.rs
+++ b/compiler/qsc/src/bin/qsi.rs
@@ -14,7 +14,7 @@ use qsc_eval::{
     state::format_state_id,
     val::Value,
 };
-use qsc_frontend::compile::{RuntimeCapabilityFlags, SourceContents, SourceMap, SourceName};
+use qsc_frontend::compile::{SourceContents, SourceMap, SourceName, TargetCapabilityFlags};
 use qsc_passes::PackageType;
 use qsc_project::{FileSystem, Manifest, StdFs};
 use std::{
@@ -106,7 +106,7 @@ fn main() -> miette::Result<ExitCode> {
             !cli.nostdlib,
             SourceMap::new(sources, cli.entry.map(std::convert::Into::into)),
             PackageType::Exe,
-            RuntimeCapabilityFlags::all(),
+            TargetCapabilityFlags::all(),
             features,
         ) {
             Ok(interpreter) => interpreter,
@@ -126,7 +126,7 @@ fn main() -> miette::Result<ExitCode> {
         !cli.nostdlib,
         SourceMap::new(sources, None),
         PackageType::Lib,
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         features,
     ) {
         Ok(interpreter) => interpreter,
diff --git a/compiler/qsc/src/codegen.rs b/compiler/qsc/src/codegen.rs
index 8270593f..d0d8b692 100644
--- a/compiler/qsc/src/codegen.rs
+++ b/compiler/qsc/src/codegen.rs
@@ -3,7 +3,7 @@
 
 use qsc_codegen::qir::fir_to_qir;
 use qsc_data_structures::language_features::LanguageFeatures;
-use qsc_frontend::compile::{PackageStore, RuntimeCapabilityFlags, SourceMap};
+use qsc_frontend::compile::{PackageStore, SourceMap, TargetCapabilityFlags};
 use qsc_partial_eval::ProgramEntry;
 use qsc_passes::{PackageType, PassContext};
 
@@ -12,7 +12,7 @@ use crate::compile;
 pub fn get_qir(
     sources: SourceMap,
     language_features: LanguageFeatures,
-    capabilities: RuntimeCapabilityFlags,
+    capabilities: TargetCapabilityFlags,
 ) -> Result<String, String> {
     let core = compile::core();
     let mut package_store = PackageStore::new(core);
diff --git a/compiler/qsc/src/compile.rs b/compiler/qsc/src/compile.rs
index 2ebbccd6..d423bd55 100644
--- a/compiler/qsc/src/compile.rs
+++ b/compiler/qsc/src/compile.rs
@@ -4,7 +4,7 @@
 use miette::{Diagnostic, Report};
 use qsc_data_structures::language_features::LanguageFeatures;
 use qsc_frontend::{
-    compile::{CompileUnit, PackageStore, RuntimeCapabilityFlags, SourceMap},
+    compile::{CompileUnit, PackageStore, SourceMap, TargetCapabilityFlags},
     error::WithSource,
 };
 use qsc_hir::hir::PackageId;
@@ -39,7 +39,7 @@ pub fn compile(
     dependencies: &[PackageId],
     sources: SourceMap,
     package_type: PackageType,
-    capabilities: RuntimeCapabilityFlags,
+    capabilities: TargetCapabilityFlags,
     language_features: LanguageFeatures,
 ) -> (CompileUnit, Vec<Error>) {
     let mut unit = qsc_frontend::compile::compile(
@@ -90,7 +90,7 @@ pub fn core() -> CompileUnit {
 ///
 /// Panics if the standard library does not compile without errors.
 #[must_use]
-pub fn std(store: &PackageStore, capabilities: RuntimeCapabilityFlags) -> CompileUnit {
+pub fn std(store: &PackageStore, capabilities: TargetCapabilityFlags) -> CompileUnit {
     let mut unit = qsc_frontend::compile::std(store, capabilities);
     let pass_errors = run_default_passes(store.core(), &mut unit, PackageType::Lib, capabilities);
     if pass_errors.is_empty() {
diff --git a/compiler/qsc/src/incremental.rs b/compiler/qsc/src/incremental.rs
index 53b1c8f4..d2120809 100644
--- a/compiler/qsc/src/incremental.rs
+++ b/compiler/qsc/src/incremental.rs
@@ -5,7 +5,7 @@ use crate::compile::{self, compile, core, std};
 use miette::Diagnostic;
 use qsc_data_structures::language_features::LanguageFeatures;
 use qsc_frontend::{
-    compile::{OpenPackageStore, PackageStore, RuntimeCapabilityFlags, SourceMap},
+    compile::{OpenPackageStore, PackageStore, SourceMap, TargetCapabilityFlags},
     error::WithSource,
     incremental::Increment,
 };
@@ -37,7 +37,7 @@ impl Compiler {
         include_std: bool,
         sources: SourceMap,
         package_type: PackageType,
-        capabilities: RuntimeCapabilityFlags,
+        capabilities: TargetCapabilityFlags,
         language_features: LanguageFeatures,
     ) -> Result<Self, Errors> {
         let core = core();
diff --git a/compiler/qsc/src/interpret.rs b/compiler/qsc/src/interpret.rs
index 5225b2fe..c80584cc 100644
--- a/compiler/qsc/src/interpret.rs
+++ b/compiler/qsc/src/interpret.rs
@@ -58,7 +58,7 @@ use qsc_fir::{
     visit::{self, Visitor},
 };
 use qsc_frontend::{
-    compile::{CompileUnit, PackageStore, RuntimeCapabilityFlags, Source, SourceMap},
+    compile::{CompileUnit, PackageStore, Source, SourceMap, TargetCapabilityFlags},
     error::WithSource,
 };
 use qsc_passes::{PackageType, PassContext};
@@ -108,8 +108,8 @@ pub enum Error {
 pub struct Interpreter {
     /// The incremental Q# compiler.
     compiler: Compiler,
-    /// The runtime capabilities used for compilation.
-    capabilities: RuntimeCapabilityFlags,
+    /// The target capabilities used for compilation.
+    capabilities: TargetCapabilityFlags,
     /// The number of lines that have so far been compiled.
     /// This field is used to generate a unique label
     /// for each line evaluated with `eval_fragments`.
@@ -147,7 +147,7 @@ impl Interpreter {
         std: bool,
         sources: SourceMap,
         package_type: PackageType,
-        capabilities: RuntimeCapabilityFlags,
+        capabilities: TargetCapabilityFlags,
         language_features: LanguageFeatures,
     ) -> std::result::Result<Self, Vec<Error>> {
         Self::new_internal(
@@ -167,7 +167,7 @@ impl Interpreter {
         std: bool,
         sources: SourceMap,
         package_type: PackageType,
-        capabilities: RuntimeCapabilityFlags,
+        capabilities: TargetCapabilityFlags,
         language_features: LanguageFeatures,
     ) -> std::result::Result<Self, Vec<Error>> {
         Self::new_internal(
@@ -185,7 +185,7 @@ impl Interpreter {
         std: bool,
         sources: SourceMap,
         package_type: PackageType,
-        capabilities: RuntimeCapabilityFlags,
+        capabilities: TargetCapabilityFlags,
         language_features: LanguageFeatures,
     ) -> std::result::Result<Self, Vec<Error>> {
         let compiler = Compiler::new(std, sources, package_type, capabilities, language_features)
@@ -350,10 +350,10 @@ impl Interpreter {
     /// Performs QIR codegen using the given entry expression on a new instance of the environment
     /// and simulator but using the current compilation.
     pub fn qirgen(&mut self, expr: &str) -> std::result::Result<String, Vec<Error>> {
-        if self.capabilities == RuntimeCapabilityFlags::all() {
+        if self.capabilities == TargetCapabilityFlags::all() {
             return Err(vec![Error::UnsupportedRuntimeCapabilities]);
         }
-        if self.capabilities == RuntimeCapabilityFlags::empty() {
+        if self.capabilities == TargetCapabilityFlags::empty() {
             let mut sim = BaseProfSim::new();
             let mut stdout = std::io::sink();
             let mut out = GenericReceiver::new(&mut stdout);
@@ -504,7 +504,7 @@ impl Interpreter {
         unit_addition: &qsc_frontend::incremental::Increment,
     ) -> core::result::Result<(Vec<ExecGraphNode>, Option<PackageStoreComputeProperties>), Vec<Error>>
     {
-        if self.capabilities != RuntimeCapabilityFlags::all() {
+        if self.capabilities != TargetCapabilityFlags::all() {
             return self.run_fir_passes(unit_addition);
         }
         let fir_package = self.fir_store.get_mut(self.package);
@@ -607,7 +607,7 @@ pub struct Debugger {
 impl Debugger {
     pub fn new(
         sources: SourceMap,
-        capabilities: RuntimeCapabilityFlags,
+        capabilities: TargetCapabilityFlags,
         position_encoding: Encoding,
         language_features: LanguageFeatures,
     ) -> std::result::Result<Self, Vec<Error>> {
diff --git a/compiler/qsc/src/lib.rs b/compiler/qsc/src/lib.rs
index 487883ee..7d48b480 100644
--- a/compiler/qsc/src/lib.rs
+++ b/compiler/qsc/src/lib.rs
@@ -12,7 +12,7 @@ pub mod target;
 pub use qsc_formatter::formatter;
 
 pub use qsc_frontend::compile::{
-    CompileUnit, PackageStore, RuntimeCapabilityFlags, SourceContents, SourceMap, SourceName,
+    CompileUnit, PackageStore, SourceContents, SourceMap, SourceName, TargetCapabilityFlags,
 };
 
 pub mod resolve {
diff --git a/compiler/qsc/src/location.rs b/compiler/qsc/src/location.rs
index 11bb0e0c..851c679f 100644
--- a/compiler/qsc/src/location.rs
+++ b/compiler/qsc/src/location.rs
@@ -63,7 +63,7 @@ mod tests {
     use qsc_data_structures::{
         language_features::LanguageFeatures, line_column::Encoding, span::Span,
     };
-    use qsc_frontend::compile::{PackageStore, RuntimeCapabilityFlags, SourceMap};
+    use qsc_frontend::compile::{PackageStore, SourceMap, TargetCapabilityFlags};
     use qsc_hir::hir::PackageId;
     use qsc_passes::PackageType;
 
@@ -236,7 +236,7 @@ mod tests {
         let mut store = PackageStore::new(compile::core());
         let mut dependencies = Vec::new();
 
-        let (package_type, capabilities) = (PackageType::Lib, RuntimeCapabilityFlags::all());
+        let (package_type, capabilities) = (PackageType::Lib, TargetCapabilityFlags::all());
 
         let std = compile::std(&store, capabilities);
         let std_package_id = store.insert(std);
diff --git a/compiler/qsc/src/target.rs b/compiler/qsc/src/target.rs
index 04b9bf9b..f34de255 100644
--- a/compiler/qsc/src/target.rs
+++ b/compiler/qsc/src/target.rs
@@ -3,13 +3,13 @@
 
 use std::str::FromStr;
 
-use qsc_frontend::compile::RuntimeCapabilityFlags;
+use qsc_frontend::compile::TargetCapabilityFlags;
 
 #[derive(Clone, Copy, Debug, PartialEq)]
 pub enum Profile {
     Unrestricted,
     Base,
-    Adaptive,
+    Quantinuum,
 }
 
 impl Profile {
@@ -18,17 +18,17 @@ impl Profile {
         match self {
             Self::Unrestricted => "Unrestricted",
             Self::Base => "Base",
-            Self::Adaptive => "Adaptive",
+            Self::Quantinuum => "Quantinuum",
         }
     }
 }
 
-impl From<Profile> for RuntimeCapabilityFlags {
+impl From<Profile> for TargetCapabilityFlags {
     fn from(value: Profile) -> Self {
         match value {
             Profile::Unrestricted => Self::all(),
             Profile::Base => Self::empty(),
-            Profile::Adaptive => Self::ForwardBranching,
+            Profile::Quantinuum => Self::Adaptive | Self::IntegerComputations | Self::QubitReset,
         }
     }
 }
@@ -38,7 +38,7 @@ impl FromStr for Profile {
 
     fn from_str(s: &str) -> Result<Self, Self::Err> {
         match s {
-            "Adaptive" | "adaptive" => Ok(Self::Adaptive),
+            "Quantinuum" | "quantinuum" => Ok(Self::Quantinuum),
             "Base" | "base" => Ok(Self::Base),
             "Unrestricted" | "unrestricted" => Ok(Self::Unrestricted),
             _ => Err(()),
diff --git a/compiler/qsc_codegen/src/qir.rs b/compiler/qsc_codegen/src/qir.rs
index 0794f5e6..03085b0b 100644
--- a/compiler/qsc_codegen/src/qir.rs
+++ b/compiler/qsc_codegen/src/qir.rs
@@ -7,7 +7,7 @@ mod instruction_tests;
 #[cfg(test)]
 mod tests;
 
-use qsc_frontend::compile::RuntimeCapabilityFlags;
+use qsc_frontend::compile::TargetCapabilityFlags;
 use qsc_lowerer::map_hir_package_to_fir;
 use qsc_partial_eval::{partially_evaluate, ProgramEntry};
 use qsc_rca::PackageStoreComputeProperties;
@@ -29,7 +29,7 @@ fn lower_store(package_store: &qsc_frontend::compile::PackageStore) -> qsc_fir::
 /// converts the given sources to QIR using the given language features.
 pub fn hir_to_qir(
     package_store: &qsc_frontend::compile::PackageStore,
-    capabilities: RuntimeCapabilityFlags,
+    capabilities: TargetCapabilityFlags,
     compute_properties: Option<PackageStoreComputeProperties>,
     entry: &ProgramEntry,
 ) -> Result<String, qsc_partial_eval::Error> {
@@ -39,7 +39,7 @@ pub fn hir_to_qir(
 
 pub fn fir_to_qir(
     fir_store: &qsc_fir::fir::PackageStore,
-    capabilities: RuntimeCapabilityFlags,
+    capabilities: TargetCapabilityFlags,
     compute_properties: Option<PackageStoreComputeProperties>,
     entry: &ProgramEntry,
 ) -> Result<String, qsc_partial_eval::Error> {
diff --git a/compiler/qsc_codegen/src/qsharp/spec_decls.rs b/compiler/qsc_codegen/src/qsharp/spec_decls.rs
index 63147d22..26079647 100644
--- a/compiler/qsc_codegen/src/qsharp/spec_decls.rs
+++ b/compiler/qsc_codegen/src/qsharp/spec_decls.rs
@@ -36,14 +36,14 @@ fn attributes() {
         indoc! {r#"
             namespace Sample {
                 @EntryPoint()
-                @Config(Base)
+                @Config(Unrestricted)
                 operation Entry() : Unit {}
             }"#},
         None,
         &expect![[r#"
             namespace Sample {
                 @EntryPoint()
-                @Config(Base)
+                @Config(Unrestricted)
                 operation Entry() : Unit {}
             }"#]],
     );
diff --git a/compiler/qsc_doc_gen/src/generate_docs.rs b/compiler/qsc_doc_gen/src/generate_docs.rs
index 2a19ce79..e03b76b4 100644
--- a/compiler/qsc_doc_gen/src/generate_docs.rs
+++ b/compiler/qsc_doc_gen/src/generate_docs.rs
@@ -7,7 +7,7 @@ mod tests;
 use crate::display::{increase_header_level, parse_doc_for_summary};
 use crate::display::{CodeDisplay, Lookup};
 use qsc_ast::ast;
-use qsc_frontend::compile::{self, PackageStore, RuntimeCapabilityFlags};
+use qsc_frontend::compile::{self, PackageStore, TargetCapabilityFlags};
 use qsc_frontend::resolve;
 use qsc_hir::hir::{CallableKind, Item, ItemKind, Package, PackageId, Visibility};
 use qsc_hir::{hir, ty};
@@ -29,7 +29,7 @@ impl Compilation {
     /// Creates a new `Compilation` by compiling sources.
     pub(crate) fn new() -> Self {
         let mut package_store = PackageStore::new(compile::core());
-        package_store.insert(compile::std(&package_store, RuntimeCapabilityFlags::all()));
+        package_store.insert(compile::std(&package_store, TargetCapabilityFlags::all()));
 
         Self { package_store }
     }
diff --git a/compiler/qsc_frontend/src/compile.rs b/compiler/qsc_frontend/src/compile.rs
index 36e50978..6aca4b3a 100644
--- a/compiler/qsc_frontend/src/compile.rs
+++ b/compiler/qsc_frontend/src/compile.rs
@@ -39,61 +39,34 @@ use thiserror::Error;
 
 bitflags! {
     #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
-    pub struct RuntimeCapabilityFlags: u32 {
-        const ForwardBranching = 0b0000_0001;
+    pub struct TargetCapabilityFlags: u32 {
+        const Adaptive = 0b0000_0001;
         const IntegerComputations = 0b0000_0010;
         const FloatingPointComputations = 0b0000_0100;
         const BackwardsBranching = 0b0000_1000;
         const HigherLevelConstructs = 0b0001_0000;
+        const QubitReset = 0b0010_0000;
     }
 }
 
-#[derive(Clone, Copy, Debug, PartialEq)]
-pub enum ConfigAttr {
-    Adaptive,
-    Base,
-    Unrestricted,
-}
-
-impl ConfigAttr {
-    #[must_use]
-    pub fn to_str(&self) -> &'static str {
-        match self {
-            Self::Adaptive => "Adaptive",
-            Self::Base => "Base",
-            Self::Unrestricted => "Unrestricted",
-        }
-    }
-
-    #[must_use]
-    pub fn is_target_str(s: &str) -> bool {
-        Self::from_str(s).is_ok()
-    }
-}
-
-impl FromStr for ConfigAttr {
+impl FromStr for TargetCapabilityFlags {
     type Err = ();
 
     fn from_str(s: &str) -> Result<Self, Self::Err> {
         match s {
-            "Adaptive" => Ok(ConfigAttr::Adaptive),
-            "Base" => Ok(ConfigAttr::Base),
-            "Unrestricted" => Ok(ConfigAttr::Unrestricted),
+            "Base" => Ok(TargetCapabilityFlags::empty()),
+            "Adaptive" => Ok(TargetCapabilityFlags::Adaptive),
+            "IntegerComputations" => Ok(TargetCapabilityFlags::IntegerComputations),
+            "FloatingPointComputations" => Ok(TargetCapabilityFlags::FloatingPointComputations),
+            "BackwardsBranching" => Ok(TargetCapabilityFlags::BackwardsBranching),
+            "HigherLevelConstructs" => Ok(TargetCapabilityFlags::HigherLevelConstructs),
+            "QubitReset" => Ok(TargetCapabilityFlags::QubitReset),
+            "Unrestricted" => Ok(TargetCapabilityFlags::all()),
             _ => Err(()),
         }
     }
 }
 
-impl From<ConfigAttr> for RuntimeCapabilityFlags {
-    fn from(value: ConfigAttr) -> Self {
-        match value {
-            ConfigAttr::Unrestricted => Self::all(),
-            ConfigAttr::Base => Self::empty(),
-            ConfigAttr::Adaptive => Self::ForwardBranching,
-        }
-    }
-}
-
 #[derive(Debug, Default)]
 pub struct CompileUnit {
     pub package: hir::Package,
@@ -345,7 +318,7 @@ pub fn compile(
     store: &PackageStore,
     dependencies: &[PackageId],
     sources: SourceMap,
-    capabilities: RuntimeCapabilityFlags,
+    capabilities: TargetCapabilityFlags,
     language_features: LanguageFeatures,
 ) -> CompileUnit {
     let (mut ast_package, parse_errors) = parse_all(&sources, language_features);
@@ -420,7 +393,7 @@ pub fn core() -> CompileUnit {
         &store,
         &[],
         sources,
-        RuntimeCapabilityFlags::empty(),
+        TargetCapabilityFlags::empty(),
         LanguageFeatures::default(),
     );
     assert_no_errors(&unit.sources, &mut unit.errors);
@@ -433,7 +406,7 @@ pub fn core() -> CompileUnit {
 ///
 /// Panics if the standard library does not compile without errors.
 #[must_use]
-pub fn std(store: &PackageStore, capabilities: RuntimeCapabilityFlags) -> CompileUnit {
+pub fn std(store: &PackageStore, capabilities: TargetCapabilityFlags) -> CompileUnit {
     let std: Vec<(SourceName, SourceContents)> = library::STD_LIB
         .iter()
         .map(|(name, contents)| ((*name).into(), (*contents).into()))
diff --git a/compiler/qsc_frontend/src/compile/preprocess.rs b/compiler/qsc_frontend/src/compile/preprocess.rs
index 8d8228bb..081dadf8 100644
--- a/compiler/qsc_frontend/src/compile/preprocess.rs
+++ b/compiler/qsc_frontend/src/compile/preprocess.rs
@@ -9,7 +9,10 @@ use qsc_ast::{
 use qsc_hir::hir;
 use std::rc::Rc;
 
-use super::{ConfigAttr, RuntimeCapabilityFlags};
+use super::TargetCapabilityFlags;
+
+#[cfg(test)]
+mod tests;
 
 #[derive(PartialEq, Hash, Clone, Debug)]
 pub struct TrackedName {
@@ -18,13 +21,13 @@ pub struct TrackedName {
 }
 
 pub(crate) struct Conditional {
-    capabilities: RuntimeCapabilityFlags,
+    capabilities: TargetCapabilityFlags,
     dropped_names: Vec<TrackedName>,
     included_names: Vec<TrackedName>,
 }
 
 impl Conditional {
-    pub(crate) fn new(capabilities: RuntimeCapabilityFlags) -> Self {
+    pub(crate) fn new(capabilities: TargetCapabilityFlags) -> Self {
         Self {
             capabilities,
             dropped_names: Vec::new(),
@@ -118,34 +121,39 @@ impl MutVisitor for Conditional {
     }
 }
 
-fn matches_config(attrs: &[Box<Attr>], capabilities: RuntimeCapabilityFlags) -> bool {
+fn matches_config(attrs: &[Box<Attr>], capabilities: TargetCapabilityFlags) -> bool {
+    let attrs: Vec<_> = attrs
+        .iter()
+        .filter(|attr| hir::Attr::from_str(attr.name.name.as_ref()) == Ok(hir::Attr::Config))
+        .collect();
+
     if attrs.is_empty() {
         return true;
     }
-    attrs.iter().any(|attr| {
-        if hir::Attr::from_str(attr.name.name.as_ref()) == Ok(hir::Attr::Config) {
-            if let ExprKind::Paren(inner) = attr.arg.kind.as_ref() {
-                match inner.kind.as_ref() {
-                    // If there is no config attribute, then we assume that the item matches
-                    // the target. We can't do membership tests on the capabilities because
-                    // Base is not a subset of any capabilities, it is a lack of capabilities.
-                    ExprKind::Path(path) => match ConfigAttr::from_str(path.name.name.as_ref()) {
-                        Ok(ConfigAttr::Unrestricted) => capabilities.is_all(),
-                        Ok(ConfigAttr::Base) => capabilities.is_empty(),
-                        Ok(ConfigAttr::Adaptive) => {
-                            capabilities == RuntimeCapabilityFlags::ForwardBranching
-                        }
-                        _ => true,
-                    },
-                    _ => true, // Unknown config attribute, so we assume it matches
+    let mut found_capabilities = TargetCapabilityFlags::empty();
+
+    for attr in attrs {
+        if let ExprKind::Paren(inner) = attr.arg.kind.as_ref() {
+            match inner.kind.as_ref() {
+                ExprKind::Path(path) => {
+                    if let Ok(capability) = TargetCapabilityFlags::from_str(path.name.name.as_ref())
+                    {
+                        found_capabilities |= capability;
+                    } else {
+                        return true; // Unknown capability, so we assume it matches
+                    }
                 }
-            } else {
-                // Something other than a parenthesized expression, so we assume it matches
-                true
+                _ => return true, // Unknown config attribute, so we assume it matches
             }
         } else {
-            // Unknown attribute, so we assume it matches
-            true
+            // Something other than a parenthesized expression, so we assume it matches
+            return true;
         }
-    })
+    }
+    if found_capabilities == TargetCapabilityFlags::empty() {
+        // There was at least one config attribute, but it was None
+        // Therefore, we only match if there are no capabilities
+        return capabilities == TargetCapabilityFlags::empty();
+    }
+    capabilities.contains(found_capabilities)
 }
diff --git a/compiler/qsc_frontend/src/incremental.rs b/compiler/qsc_frontend/src/incremental.rs
index 3d435dc7..22cfd099 100644
--- a/compiler/qsc_frontend/src/incremental.rs
+++ b/compiler/qsc_frontend/src/incremental.rs
@@ -6,8 +6,8 @@ mod tests;
 
 use crate::{
     compile::{
-        self, preprocess, AstPackage, CompileUnit, Offsetter, PackageStore, RuntimeCapabilityFlags,
-        SourceMap,
+        self, preprocess, AstPackage, CompileUnit, Offsetter, PackageStore, SourceMap,
+        TargetCapabilityFlags,
     },
     error::WithSource,
     lower::Lowerer,
@@ -38,7 +38,7 @@ pub struct Compiler {
     resolver: Resolver,
     checker: Checker,
     lowerer: Lowerer,
-    capabilities: RuntimeCapabilityFlags,
+    capabilities: TargetCapabilityFlags,
     language_features: LanguageFeatures,
 }
 
@@ -58,7 +58,7 @@ impl Compiler {
     pub fn new(
         store: &PackageStore,
         dependencies: impl IntoIterator<Item = PackageId>,
-        capabilities: RuntimeCapabilityFlags,
+        capabilities: TargetCapabilityFlags,
         language_features: LanguageFeatures,
     ) -> Self {
         let mut resolve_globals = resolve::GlobalTable::new();
diff --git a/compiler/qsc_frontend/src/lower.rs b/compiler/qsc_frontend/src/lower.rs
index 8ba1b6f6..9d58f804 100644
--- a/compiler/qsc_frontend/src/lower.rs
+++ b/compiler/qsc_frontend/src/lower.rs
@@ -6,7 +6,7 @@ mod tests;
 
 use crate::{
     closure::{self, Lambda, PartialApp},
-    compile::ConfigAttr,
+    compile::TargetCapabilityFlags,
     resolve::{self, Names},
     typeck::{self, convert},
 };
@@ -30,7 +30,7 @@ pub(super) enum Error {
     UnknownAttr(String, #[label] Span),
     #[error("invalid attribute arguments: expected {0}")]
     #[diagnostic(code("Qsc.LowerAst.InvalidAttrArgs"))]
-    InvalidAttrArgs(&'static str, #[label] Span),
+    InvalidAttrArgs(String, #[label] Span),
     #[error("missing callable body")]
     #[diagnostic(code("Qsc.LowerAst.MissingBody"))]
     MissingBody(#[label] Span),
@@ -213,7 +213,7 @@ impl With<'_> {
                 _ => {
                     self.lowerer
                         .errors
-                        .push(Error::InvalidAttrArgs("()", attr.arg.span));
+                        .push(Error::InvalidAttrArgs("()".to_string(), attr.arg.span));
                     None
                 }
             },
@@ -222,17 +222,17 @@ impl With<'_> {
                 _ => {
                     self.lowerer
                         .errors
-                        .push(Error::InvalidAttrArgs("()", attr.arg.span));
+                        .push(Error::InvalidAttrArgs("()".to_string(), attr.arg.span));
                     None
                 }
             },
             Ok(hir::Attr::Config) => {
                 if !matches!(attr.arg.kind.as_ref(), ast::ExprKind::Paren(inner)
                     if matches!(inner.kind.as_ref(), ast::ExprKind::Path(path)
-                        if ConfigAttr::from_str(path.name.name.as_ref()).is_ok()))
+                        if TargetCapabilityFlags::from_str(path.name.name.as_ref()).is_ok()))
                 {
                     self.lowerer.errors.push(Error::InvalidAttrArgs(
-                        "Unrestricted or Base",
+                        "runtime capability".to_string(),
                         attr.arg.span,
                     ));
                 }
diff --git a/compiler/qsc_partial_eval/src/lib.rs b/compiler/qsc_partial_eval/src/lib.rs
index f31f7f93..20021dd8 100644
--- a/compiler/qsc_partial_eval/src/lib.rs
+++ b/compiler/qsc_partial_eval/src/lib.rs
@@ -228,9 +228,22 @@ impl<'a> PartialEvaluator<'a> {
             return Err(error);
         }
 
-        // Insert the return expression and return the generated program.
+        // Insert the return expression.
         let current_block = self.get_current_block_mut();
         current_block.0.push(Instruction::Return);
+
+        // Set the number of qubits and results used by the program.
+        self.program.num_qubits = self
+            .resource_manager
+            .qubit_count()
+            .try_into()
+            .expect("qubits count should fit into a u32");
+        self.program.num_results = self
+            .resource_manager
+            .results_count()
+            .try_into()
+            .expect("results count should fit into a u32");
+
         Ok(self.program)
     }
 
diff --git a/compiler/qsc_partial_eval/src/management.rs b/compiler/qsc_partial_eval/src/management.rs
index 20fff948..09b8525f 100644
--- a/compiler/qsc_partial_eval/src/management.rs
+++ b/compiler/qsc_partial_eval/src/management.rs
@@ -17,6 +17,14 @@ pub struct ResourceManager {
 }
 
 impl ResourceManager {
+    pub fn qubit_count(&self) -> usize {
+        self.qubits_in_use.len()
+    }
+
+    pub fn results_count(&self) -> usize {
+        self.next_result
+    }
+
     pub fn allocate_qubit(&mut self) -> Qubit {
         if let Some(qubit_id) = self.qubits_in_use.iter().position(|in_use| !in_use) {
             self.qubits_in_use[qubit_id] = true;
diff --git a/compiler/qsc_passes/src/capabilitiesck.rs b/compiler/qsc_passes/src/capabilitiesck.rs
index e0478f48..a7e5d648 100644
--- a/compiler/qsc_passes/src/capabilitiesck.rs
+++ b/compiler/qsc_passes/src/capabilitiesck.rs
@@ -25,7 +25,7 @@ use qsc_fir::{
     ty::FunctorSetValue,
     visit::Visitor,
 };
-use qsc_frontend::compile::RuntimeCapabilityFlags;
+use qsc_frontend::compile::TargetCapabilityFlags;
 use qsc_lowerer::map_hir_package_to_fir;
 use qsc_rca::{
     Analyzer, ComputeKind, ItemComputeProperties, PackageComputeProperties,
@@ -188,7 +188,7 @@ pub fn lower_store(
 pub fn run_rca_pass(
     fir_store: &qsc_fir::fir::PackageStore,
     package_id: qsc_fir::fir::PackageId,
-    capabilities: RuntimeCapabilityFlags,
+    capabilities: TargetCapabilityFlags,
 ) -> Result<PackageStoreComputeProperties, Vec<crate::Error>> {
     let analyzer = Analyzer::init(fir_store);
     let compute_properties = analyzer.analyze_all();
@@ -213,7 +213,7 @@ pub fn run_rca_pass(
 pub fn check_supported_capabilities(
     package: &Package,
     compute_properties: &PackageComputeProperties,
-    capabilities: RuntimeCapabilityFlags,
+    capabilities: TargetCapabilityFlags,
 ) -> Vec<Error> {
     let checker = Checker {
         package,
@@ -229,7 +229,7 @@ pub fn check_supported_capabilities(
 struct Checker<'a> {
     package: &'a Package,
     compute_properties: &'a PackageComputeProperties,
-    target_capabilities: RuntimeCapabilityFlags,
+    target_capabilities: TargetCapabilityFlags,
     current_callable: Option<LocalItemId>,
     missing_features_map: FxHashMap<Span, RuntimeFeatureFlags>,
 }
@@ -583,9 +583,9 @@ fn generate_errors_from_runtime_features(
 
 fn get_missing_runtime_features(
     runtime_features: RuntimeFeatureFlags,
-    target_capabilities: RuntimeCapabilityFlags,
+    target_capabilities: TargetCapabilityFlags,
 ) -> RuntimeFeatureFlags {
-    let missing_capabilities = !target_capabilities & runtime_features.runtime_capabilities();
+    let missing_capabilities = !target_capabilities & runtime_features.target_capabilities();
     runtime_features.contributing_features(missing_capabilities)
 }
 
diff --git a/compiler/qsc_passes/src/lib.rs b/compiler/qsc_passes/src/lib.rs
index f66e91ab..9116ee60 100644
--- a/compiler/qsc_passes/src/lib.rs
+++ b/compiler/qsc_passes/src/lib.rs
@@ -21,7 +21,7 @@ use entry_point::generate_entry_expr;
 use loop_unification::LoopUni;
 use miette::Diagnostic;
 use qsc_fir::fir;
-use qsc_frontend::compile::{CompileUnit, RuntimeCapabilityFlags};
+use qsc_frontend::compile::{CompileUnit, TargetCapabilityFlags};
 use qsc_hir::{
     assigner::Assigner,
     global::{self, Table},
@@ -65,13 +65,13 @@ pub fn lower_hir_to_fir(
 }
 
 pub struct PassContext {
-    capabilities: RuntimeCapabilityFlags,
+    capabilities: TargetCapabilityFlags,
     borrow_check: borrowck::Checker,
 }
 
 impl PassContext {
     #[must_use]
-    pub fn new(capabilities: RuntimeCapabilityFlags) -> Self {
+    pub fn new(capabilities: TargetCapabilityFlags) -> Self {
         Self {
             capabilities,
             borrow_check: borrowck::Checker::default(),
@@ -113,7 +113,7 @@ impl PassContext {
         ReplaceQubitAllocation::new(core, assigner).visit_package(package);
         Validator::default().visit_package(package);
 
-        let base_prof_errors = if self.capabilities == RuntimeCapabilityFlags::empty() {
+        let base_prof_errors = if self.capabilities == TargetCapabilityFlags::empty() {
             baseprofck::check_base_profile_compliance(package)
         } else {
             Vec::new()
@@ -133,7 +133,7 @@ impl PassContext {
     pub fn run_fir_passes_on_fir(
         fir_store: &qsc_fir::fir::PackageStore,
         package_id: qsc_fir::fir::PackageId,
-        capabilities: RuntimeCapabilityFlags,
+        capabilities: TargetCapabilityFlags,
     ) -> Result<PackageStoreComputeProperties, Vec<Error>> {
         run_rca_pass(fir_store, package_id, capabilities)
     }
@@ -144,7 +144,7 @@ pub fn run_default_passes(
     core: &Table,
     unit: &mut CompileUnit,
     package_type: PackageType,
-    capabilities: RuntimeCapabilityFlags,
+    capabilities: TargetCapabilityFlags,
 ) -> Vec<Error> {
     PassContext::new(capabilities).run_default_passes(
         &mut unit.package,
@@ -182,7 +182,7 @@ pub fn run_core_passes(core: &mut CompileUnit) -> Vec<Error> {
 pub fn run_fir_passes(
     package: &fir::Package,
     compute_properties: &PackageComputeProperties,
-    capabilities: RuntimeCapabilityFlags,
+    capabilities: TargetCapabilityFlags,
 ) -> Vec<Error> {
     let capabilities_errors =
         check_supported_capabilities(package, compute_properties, capabilities);
diff --git a/compiler/qsc_rca/src/lib.rs b/compiler/qsc_rca/src/lib.rs
index c323f4cb..4d17f10f 100644
--- a/compiler/qsc_rca/src/lib.rs
+++ b/compiler/qsc_rca/src/lib.rs
@@ -26,7 +26,7 @@ use qsc_fir::{
     },
     ty::Ty,
 };
-use qsc_frontend::compile::RuntimeCapabilityFlags;
+use qsc_frontend::compile::TargetCapabilityFlags;
 use std::{
     cmp::Ord,
     fmt::{self, Debug, Display, Formatter, Write},
@@ -752,15 +752,12 @@ bitflags! {
 }
 
 impl RuntimeFeatureFlags {
-    /// Determines the runtime features that contribute to the provided runtime capabilities.
+    /// Determines the runtime features that contribute to the provided target capabilities.
     #[must_use]
-    pub fn contributing_features(&self, runtime_capabilities: RuntimeCapabilityFlags) -> Self {
+    pub fn contributing_features(&self, capabilities: TargetCapabilityFlags) -> Self {
         let mut contributing_features = Self::empty();
         for feature in self.iter() {
-            if feature
-                .runtime_capabilities()
-                .intersects(runtime_capabilities)
-            {
+            if feature.target_capabilities().intersects(capabilities) {
                 contributing_features |= feature;
             }
         }
@@ -768,76 +765,76 @@ impl RuntimeFeatureFlags {
         contributing_features
     }
 
-    /// Maps program contructs to runtime capabilities.
+    /// Maps program constructs to target capabilities.
     #[must_use]
-    pub fn runtime_capabilities(&self) -> RuntimeCapabilityFlags {
-        let mut runtume_capabilities = RuntimeCapabilityFlags::empty();
+    pub fn target_capabilities(&self) -> TargetCapabilityFlags {
+        let mut capabilities = TargetCapabilityFlags::empty();
         if self.contains(RuntimeFeatureFlags::UseOfDynamicBool) {
-            runtume_capabilities |= RuntimeCapabilityFlags::ForwardBranching;
+            capabilities |= TargetCapabilityFlags::Adaptive;
         }
         if self.contains(RuntimeFeatureFlags::UseOfDynamicInt) {
-            runtume_capabilities |= RuntimeCapabilityFlags::IntegerComputations;
+            capabilities |= TargetCapabilityFlags::IntegerComputations;
         }
         if self.contains(RuntimeFeatureFlags::UseOfDynamicPauli) {
-            runtume_capabilities |= RuntimeCapabilityFlags::IntegerComputations;
+            capabilities |= TargetCapabilityFlags::IntegerComputations;
         }
         if self.contains(RuntimeFeatureFlags::UseOfDynamicRange) {
-            runtume_capabilities |= RuntimeCapabilityFlags::IntegerComputations;
+            capabilities |= TargetCapabilityFlags::IntegerComputations;
         }
         if self.contains(RuntimeFeatureFlags::UseOfDynamicDouble) {
-            runtume_capabilities |= RuntimeCapabilityFlags::FloatingPointComputations;
+            capabilities |= TargetCapabilityFlags::FloatingPointComputations;
         }
         if self.contains(RuntimeFeatureFlags::UseOfDynamicQubit) {
-            runtume_capabilities |= RuntimeCapabilityFlags::HigherLevelConstructs;
+            capabilities |= TargetCapabilityFlags::HigherLevelConstructs;
         }
         if self.contains(RuntimeFeatureFlags::UseOfDynamicBigInt) {
-            runtume_capabilities |= RuntimeCapabilityFlags::HigherLevelConstructs;
+            capabilities |= TargetCapabilityFlags::HigherLevelConstructs;
         }
         if self.contains(RuntimeFeatureFlags::UseOfDynamicString) {
-            runtume_capabilities |= RuntimeCapabilityFlags::HigherLevelConstructs;
+            capabilities |= TargetCapabilityFlags::HigherLevelConstructs;
         }
         if self.contains(RuntimeFeatureFlags::UseOfDynamicallySizedArray) {
-            runtume_capabilities |= RuntimeCapabilityFlags::HigherLevelConstructs;
+            capabilities |= TargetCapabilityFlags::HigherLevelConstructs;
         }
         if self.contains(RuntimeFeatureFlags::UseOfDynamicUdt) {
-            runtume_capabilities |= RuntimeCapabilityFlags::HigherLevelConstructs;
+            capabilities |= TargetCapabilityFlags::HigherLevelConstructs;
         }
         if self.contains(RuntimeFeatureFlags::UseOfDynamicArrowFunction) {
-            runtume_capabilities |= RuntimeCapabilityFlags::HigherLevelConstructs;
+            capabilities |= TargetCapabilityFlags::HigherLevelConstructs;
         }
         if self.contains(RuntimeFeatureFlags::UseOfDynamicArrowOperation) {
-            runtume_capabilities |= RuntimeCapabilityFlags::HigherLevelConstructs;
+            capabilities |= TargetCapabilityFlags::HigherLevelConstructs;
         }
         if self.contains(RuntimeFeatureFlags::CallToCyclicFunctionWithDynamicArg) {
-            runtume_capabilities |= RuntimeCapabilityFlags::HigherLevelConstructs;
+            capabilities |= TargetCapabilityFlags::HigherLevelConstructs;
         }
         if self.contains(RuntimeFeatureFlags::CyclicOperationSpec) {
-            runtume_capabilities |= RuntimeCapabilityFlags::HigherLevelConstructs;
+            capabilities |= TargetCapabilityFlags::HigherLevelConstructs;
         }
         if self.contains(RuntimeFeatureFlags::CallToCyclicOperation) {
-            runtume_capabilities |= RuntimeCapabilityFlags::HigherLevelConstructs;
+            capabilities |= TargetCapabilityFlags::HigherLevelConstructs;
         }
         if self.contains(RuntimeFeatureFlags::CallToDynamicCallee) {
-            runtume_capabilities |= RuntimeCapabilityFlags::HigherLevelConstructs;
+            capabilities |= TargetCapabilityFlags::HigherLevelConstructs;
         }
         if self.contains(RuntimeFeatureFlags::CallToUnresolvedCallee) {
-            runtume_capabilities |= RuntimeCapabilityFlags::HigherLevelConstructs;
+            capabilities |= TargetCapabilityFlags::HigherLevelConstructs;
         }
         if self.contains(RuntimeFeatureFlags::MeasurementWithinDynamicScope) {
-            runtume_capabilities |= RuntimeCapabilityFlags::ForwardBranching;
+            capabilities |= TargetCapabilityFlags::Adaptive;
         }
         if self.contains(RuntimeFeatureFlags::UseOfDynamicIndex) {
-            runtume_capabilities |= RuntimeCapabilityFlags::HigherLevelConstructs;
+            capabilities |= TargetCapabilityFlags::HigherLevelConstructs;
         }
         if self.contains(RuntimeFeatureFlags::ReturnWithinDynamicScope) {
-            runtume_capabilities |= RuntimeCapabilityFlags::ForwardBranching;
+            capabilities |= TargetCapabilityFlags::Adaptive;
         }
         if self.contains(RuntimeFeatureFlags::LoopWithDynamicCondition) {
-            runtume_capabilities |= RuntimeCapabilityFlags::BackwardsBranching;
+            capabilities |= TargetCapabilityFlags::BackwardsBranching;
         }
         if self.contains(RuntimeFeatureFlags::UseOfClosure) {
-            runtume_capabilities |= RuntimeCapabilityFlags::HigherLevelConstructs;
+            capabilities |= TargetCapabilityFlags::HigherLevelConstructs;
         }
-        runtume_capabilities
+        capabilities
     }
 }
diff --git a/library/std/convert.qs b/library/std/convert.qs
index f0dd3710..a2b3659b 100644
--- a/library/std/convert.qs
+++ b/library/std/convert.qs
@@ -28,7 +28,6 @@ namespace Microsoft.Quantum.Convert {
     /// # Output
     /// A `Bool` representing the `input`.
     @Config(Adaptive)
-    @Config(Unrestricted)
     function ResultAsBool(input : Result) : Bool {
         input == One
     }
@@ -44,7 +43,6 @@ namespace Microsoft.Quantum.Convert {
     /// # Output
     /// A `Result` representing the `input`.
     @Config(Adaptive)
-    @Config(Unrestricted)
     function BoolAsResult(input : Bool) : Result {
         if input { One } else { Zero }
     }
@@ -171,7 +169,6 @@ namespace Microsoft.Quantum.Convert {
     /// let int1 = ResultArrayAsInt([One,Zero])
     /// ```
     @Config(Adaptive)
-    @Config(Unrestricted)
     function ResultArrayAsInt(results : Result[]) : Int {
         let nBits = Length(results);
         Fact(nBits < 64, $"`Length(bits)` must be less than 64, but was {nBits}.");
@@ -197,7 +194,6 @@ namespace Microsoft.Quantum.Convert {
     /// # Output
     /// A `Bool[]` representing the `input`.
     @Config(Adaptive)
-    @Config(Unrestricted)
     function ResultArrayAsBoolArray(input : Result[]) : Bool[] {
         mutable output = [];
         for r in input {
@@ -218,7 +214,6 @@ namespace Microsoft.Quantum.Convert {
     /// # Output
     /// A `Result[]` representing the `input`.
     @Config(Adaptive)
-    @Config(Unrestricted)
     function BoolArrayAsResultArray(input : Bool[]) : Result[] {
         mutable output = [];
         for b in input {
diff --git a/library/std/diagnostics.qs b/library/std/diagnostics.qs
index 147adc33..669e1853 100644
--- a/library/std/diagnostics.qs
+++ b/library/std/diagnostics.qs
@@ -69,13 +69,11 @@ namespace Microsoft.Quantum.Diagnostics {
         body intrinsic;
     }
 
-    @Config(Adaptive)
     @Config(Unrestricted)
     operation CheckZero(qubit : Qubit) : Bool {
         body intrinsic;
     }
 
-    @Config(Adaptive)
     @Config(Unrestricted)
     operation CheckAllZero(qubits : Qubit[]) : Bool {
         for q in qubits {
@@ -122,7 +120,6 @@ namespace Microsoft.Quantum.Diagnostics {
     /// Operation defining the expected behavior for the operation under test.
     /// # Output
     /// True if operations are equal, false otherwise.
-    @Config(Adaptive)
     @Config(Unrestricted)
     operation CheckOperationsAreEqual(
         nQubits : Int,
diff --git a/library/std/internal.qs b/library/std/internal.qs
index 35b79131..55e3d066 100644
--- a/library/std/internal.qs
+++ b/library/std/internal.qs
@@ -132,7 +132,6 @@ namespace Microsoft.Quantum.Intrinsic {
     }
 
     @Config(Adaptive)
-    @Config(Unrestricted)
     internal operation AND(control1 : Qubit, control2 : Qubit, target : Qubit) : Unit is Adj {
         body ... {
             __quantum__qis__ccx__body(control1, control2, target);
diff --git a/library/std/intrinsic.qs b/library/std/intrinsic.qs
index e89a9a26..82d0adc5 100644
--- a/library/std/intrinsic.qs
+++ b/library/std/intrinsic.qs
@@ -219,7 +219,6 @@ namespace Microsoft.Quantum.Intrinsic {
     /// Measure([PauliZ], [qubit]);
     /// ```
     @Config(Adaptive)
-    @Config(Unrestricted)
     operation M(qubit : Qubit) : Result {
         __quantum__qis__m__body(qubit)
     }
@@ -292,7 +291,6 @@ namespace Microsoft.Quantum.Intrinsic {
     /// If the basis array and qubit array are different lengths, then the
     /// operation will fail.
     @Config(Adaptive)
-    @Config(Unrestricted)
     operation Measure(bases : Pauli[], qubits : Qubit[]) : Result {
         if Length(bases) != Length(qubits) {
             fail "Arrays 'bases' and 'qubits' must be of the same length.";
diff --git a/library/std/measurement.qs b/library/std/measurement.qs
index d23c6b18..70c7facc 100644
--- a/library/std/measurement.qs
+++ b/library/std/measurement.qs
@@ -147,7 +147,6 @@ namespace Microsoft.Quantum.Measurement {
     /// This operation resets its input register to the |00...0> state,
     /// suitable for releasing back to a target machine.
     @Config(Adaptive)
-    @Config(Unrestricted)
     operation MeasureInteger(target : Qubit[]) : Int {
         let nBits = Length(target);
         Fact(nBits < 64, $"`Length(target)` must be less than 64, but was {nBits}.");
diff --git a/library/std/random.qs b/library/std/random.qs
index 00509e97..f28f9e13 100644
--- a/library/std/random.qs
+++ b/library/std/random.qs
@@ -24,7 +24,6 @@ namespace Microsoft.Quantum.Random {
     /// ```qsharp
     /// let roll = DrawRandomInt(1, 6);
     /// ```
-    @Config(Adaptive)
     @Config(Unrestricted)
     operation DrawRandomInt(min : Int, max : Int) : Int {
         body intrinsic;
@@ -51,7 +50,6 @@ namespace Microsoft.Quantum.Random {
     /// ```qsharp
     /// let angle = DrawRandomDouble(0.0, 2.0 * PI());
     /// ```
-    @Config(Adaptive)
     @Config(Unrestricted)
     operation DrawRandomDouble(min : Double, max : Double) : Double {
         body intrinsic;
diff --git a/library/std/re.qs b/library/std/re.qs
index 3f0cdc2c..af29c0c0 100644
--- a/library/std/re.qs
+++ b/library/std/re.qs
@@ -33,8 +33,6 @@ namespace Microsoft.Quantum.ResourceEstimation {
     /// needs to be executed in order to collect and cache estimates.
     /// `false` indicates if cached estimates have been incorporated into the overall costs
     /// and the code fragment should be skipped.
-    @Config(Adaptive)
-    @Config(Unrestricted)
     function BeginEstimateCaching(name : String, variant : Int) : Bool {
         body intrinsic;
     }
diff --git a/library/std/unstable_arithmetic_internal.qs b/library/std/unstable_arithmetic_internal.qs
index 31eda303..c30155cd 100644
--- a/library/std/unstable_arithmetic_internal.qs
+++ b/library/std/unstable_arithmetic_internal.qs
@@ -244,13 +244,9 @@ namespace Microsoft.Quantum.Unstable.Arithmetic {
     ///   [arXiv:1212.5069](https://arxiv.org/abs/1212.5069)
     ///   doi:10.1103/PhysRevA.87.022328
     @Config(Adaptive)
-    @Config(Unrestricted)
     internal operation ApplyAndAssuming0Target(control1 : Qubit, control2 : Qubit, target : Qubit) : Unit is Adj {
         // NOTE: Eventually this operation will be public and intrinsic.
         body (...) {
-            if not CheckZero(target) {
-                fail "ApplyAndAssuming0Target expects `target` to be in |0> state.";
-            }
             CCNOT(control1, control2, target);
         }
         adjoint (...) {
diff --git a/library/std/unstable_table_lookup.qs b/library/std/unstable_table_lookup.qs
index a3ee0622..7c3b9dd9 100644
--- a/library/std/unstable_table_lookup.qs
+++ b/library/std/unstable_table_lookup.qs
@@ -44,7 +44,6 @@ namespace Microsoft.Quantum.Unstable.TableLookup {
     /// [3] [arXiv:2211.01133](https://arxiv.org/abs/2211.01133)
     ///     "Space-time optimized table lookup"
     @Config(Adaptive)
-    @Config(Unrestricted)
     operation Select(
         data : Bool[][],
         address : Qubit[],
@@ -98,8 +97,6 @@ namespace Microsoft.Quantum.Unstable.TableLookup {
         }
     }
 
-    @Config(Adaptive)
-    @Config(Unrestricted)
     internal operation SinglyControlledSelect(
         ctl : Qubit,
         data : Bool[][],
@@ -169,7 +166,6 @@ namespace Microsoft.Quantum.Unstable.TableLookup {
     /// - [arXiv:1905.07682](https://arxiv.org/abs/1905.07682)
     ///   "Windowed arithmetic"
     @Config(Adaptive)
-    @Config(Unrestricted)
     internal operation Unlookup(
         lookup : (Bool[][], Qubit[], Qubit[]) => Unit,
         data : Bool[][],
diff --git a/pip/qsharp/_native.pyi b/pip/qsharp/_native.pyi
index 8c5afcdf..2a4d8487 100644
--- a/pip/qsharp/_native.pyi
+++ b/pip/qsharp/_native.pyi
@@ -2,22 +2,14 @@
 # Licensed under the MIT License.
 
 from enum import Enum
-from typing import Any, Callable, ClassVar, Tuple, Optional, Dict, List
+from typing import Any, Callable, ClassVar, Optional, Dict, List
 
 class TargetProfile:
     """
     A Q# target profile.
 
-    The target is the hardware or simulator which will be used to run the Q# program.
-    The target profile is a description of a target's capabilities.
-    """
-
-    Adaptive: ClassVar[Any]
-    """
-    Target supports the core set of adaptive.
-
-    This option maps to the Adaptive Profile as defined by the QIR specification
-    without any extensions.
+    A target profile describes the capabilities of the hardware or simulator
+    which will be used to run the Q# program.
     """
 
     Base: ClassVar[Any]
@@ -28,6 +20,15 @@ class TargetProfile:
     This option maps to the Base Profile as defined by the QIR specification.
     """
 
+    Quantinuum: ClassVar[Any]
+    """
+    Target supports Quantinuum profile.
+
+    This profile includes all of the required Adaptive Profile
+    capabilities, as well as the optional integer computation and qubit
+    reset capabilities, as defined by the QIR specification.
+    """
+
     Unrestricted: ClassVar[Any]
     """
     Describes the unrestricted set of capabilities required to run any Q# program.
diff --git a/pip/qsharp/_qsharp.py b/pip/qsharp/_qsharp.py
index 1cff0699..75d148bb 100644
--- a/pip/qsharp/_qsharp.py
+++ b/pip/qsharp/_qsharp.py
@@ -24,9 +24,9 @@ class Config:
     """
 
     def __init__(self, target_profile: TargetProfile, language_features: List[str]):
-        if target_profile == TargetProfile.Adaptive:
-            self._config = {"targetProfile": "adaptive"}
-            warn("The adaptive target profile is a preview feature.")
+        if target_profile == TargetProfile.Quantinuum:
+            self._config = {"targetProfile": "quantinuum"}
+            warn("The Quantinuum target profile is a preview feature.")
             warn("Functionality may be incomplete or incorrect.")
         elif target_profile == TargetProfile.Base:
             self._config = {"targetProfile": "base"}
diff --git a/pip/src/interpreter.rs b/pip/src/interpreter.rs
index 17db39e9..b56a2aaf 100644
--- a/pip/src/interpreter.rs
+++ b/pip/src/interpreter.rs
@@ -44,6 +44,7 @@ fn _native(py: Python, m: &PyModule) -> PyResult<()> {
     Ok(())
 }
 
+// This ordering must match the _native.pyi file.
 #[derive(Clone, Copy)]
 #[pyclass(unsendable)]
 /// A Q# target profile.
@@ -51,14 +52,16 @@ fn _native(py: Python, m: &PyModule) -> PyResult<()> {
 /// A target profile describes the capabilities of the hardware or simulator
 /// which will be used to run the Q# program.
 pub(crate) enum TargetProfile {
-    /// Target supports the core set of adaptive.
-    ///
-    /// This option maps to the Adaptive Profile as defined by the QIR specification without any extensions.
-    Adaptive,
     /// Target supports the minimal set of capabilities required to run a quantum program.
     ///
     /// This option maps to the Base Profile as defined by the QIR specification.
     Base,
+    /// Target supports Quantinuum profile.
+    ///
+    /// This profile includes all of the required Adaptive Profile
+    /// capabilities, as well as the optional integer computation and qubit
+    /// reset capabilities, as defined by the QIR specification.
+    Quantinuum,
     /// Target supports the full set of capabilities required to run any Q# program.
     ///
     /// This option maps to the Full Profile as defined by the QIR specification.
@@ -114,7 +117,7 @@ impl Interpreter {
         list_directory: Option<PyObject>,
     ) -> PyResult<Self> {
         let target = match target {
-            TargetProfile::Adaptive => Profile::Adaptive,
+            TargetProfile::Quantinuum => Profile::Quantinuum,
             TargetProfile::Base => Profile::Base,
             TargetProfile::Unrestricted => Profile::Unrestricted,
         };
diff --git a/playground/src/docs.tsx b/playground/src/docs.tsx
index 651e1395..bc951586 100644
--- a/playground/src/docs.tsx
+++ b/playground/src/docs.tsx
@@ -54,8 +54,8 @@ export function DocumentationDisplay(props: {
   const docsDiv = useRef<HTMLDivElement>(null);
 
   useEffect(() => {
-    if (!docsDiv.current) return;
-    docsDiv.current.innerHTML = props.documentation!.get(
+    if (!docsDiv.current || !props.documentation) return;
+    docsDiv.current.innerHTML = props.documentation.get(
       props.currentNamespace,
     )!;
     MathJax.typeset();
diff --git a/vscode/package.json b/vscode/package.json
index bd4281fe..db5b02ab 100644
--- a/vscode/package.json
+++ b/vscode/package.json
@@ -102,12 +102,12 @@
           "enum": [
             "unrestricted",
             "base",
-            "adaptive"
+            "quantinuum"
           ],
           "enumDescriptions": [
             "The set of all capabilities required to run any Q# program.",
             "The minimal set of capabilities required to run a quantum program. This option maps to the Base Profile as defined by the QIR specification.",
-            "The set of capabilities required to run an adaptive quantum program. This option maps to the Adaptive Profile as defined by the QIR specification."
+            "The Quantinuum target profile includes all of the required Adaptive Profile capabilities, as well as the optional integer computation and qubit reset capabilities, as defined by the QIR specification."
           ],
           "description": "Setting the target profile allows the Q# extension to generate programs that are compatible with a specific target. The target is the hardware or simulator which will be used to run the Q# program. The target profile is a description of a target's capabilities."
         },
diff --git a/vscode/src/config.ts b/vscode/src/config.ts
index 6b65bdf7..9177ef48 100644
--- a/vscode/src/config.ts
+++ b/vscode/src/config.ts
@@ -9,8 +9,8 @@ export function getTarget(): TargetProfile {
     .getConfiguration("Q#")
     .get<TargetProfile>("targetProfile", "unrestricted");
   switch (target) {
-    case "adaptive":
     case "base":
+    case "quantinuum":
     case "unrestricted":
       return target;
     default:
@@ -30,10 +30,10 @@ export async function setTarget(target: TargetProfile) {
 
 export function getTargetFriendlyName(targetProfile?: string) {
   switch (targetProfile) {
-    case "adaptive":
-      return "Q#: QIR adaptive";
     case "base":
       return "Q#: QIR base";
+    case "quantinuum":
+      return "Q#: QIR Quantinuum";
     case "unrestricted":
       return "Q#: unrestricted";
     default:
diff --git a/vscode/src/extension.ts b/vscode/src/extension.ts
index 9814c349..608cf15c 100644
--- a/vscode/src/extension.ts
+++ b/vscode/src/extension.ts
@@ -315,8 +315,8 @@ async function updateLanguageServiceProfile(languageService: ILanguageService) {
   const targetProfile = getTarget();
 
   switch (targetProfile) {
-    case "adaptive":
     case "base":
+    case "quantinuum":
     case "unrestricted":
       break;
     default:
diff --git a/vscode/src/qirGeneration.ts b/vscode/src/qirGeneration.ts
index 3ba1a039..870e7a78 100644
--- a/vscode/src/qirGeneration.ts
+++ b/vscode/src/qirGeneration.ts
@@ -34,7 +34,7 @@ export async function getQirForActiveWindow(): Promise<string> {
   const targetProfile = getTarget();
   const enablePreviewQirGen = getEnablePreviewQirGen();
   if (targetProfile !== "base") {
-    const allowed = targetProfile === "adaptive" && enablePreviewQirGen;
+    const allowed = targetProfile === "quantinuum" && enablePreviewQirGen;
     if (!allowed) {
       const result = await vscode.window.showWarningMessage(
         "Submitting to Azure is only supported when targeting the QIR base profile.",
diff --git a/vscode/src/statusbar.ts b/vscode/src/statusbar.ts
index f1feccc9..84960002 100644
--- a/vscode/src/statusbar.ts
+++ b/vscode/src/statusbar.ts
@@ -100,8 +100,8 @@ function registerTargetProfileCommand() {
 }
 
 const targetProfiles = [
-  { configName: "adaptive", uiText: "Q#: QIR adaptive" },
   { configName: "base", uiText: "Q#: QIR base" },
+  { configName: "quantinuum", uiText: "Q#: QIR Quantinuum" },
   { configName: "unrestricted", uiText: "Q#: unrestricted" },
 ];
 
@@ -109,22 +109,22 @@ function getTargetProfiles(): {
   configName: string;
   uiText: string;
 }[] {
-  const allow_adaptive = getEnableAdaptiveProfile();
-  if (allow_adaptive) {
+  const allow_quantinuum = getEnableAdaptiveProfile();
+  if (allow_quantinuum) {
     return targetProfiles;
   } else {
     return targetProfiles.filter(
-      (profile) => profile.configName !== "adaptive",
+      (profile) => profile.configName !== "quantinuum",
     );
   }
 }
 
 function getTargetProfileSetting(uiText: string): TargetProfile {
   switch (uiText) {
-    case "Q#: QIR adaptive":
-      return "adaptive";
     case "Q#: QIR base":
       return "base";
+    case "Q#: QIR Quantinuum":
+      return "quantinuum";
     case "Q#: unrestricted":
       return "unrestricted";
     default:
diff --git a/wasm/src/language_service.rs b/wasm/src/language_service.rs
index ee5a8313..01e53e07 100644
--- a/wasm/src/language_service.rs
+++ b/wasm/src/language_service.rs
@@ -489,7 +489,7 @@ serializable_type! {
         pub languageFeatures: Option<Vec<String>>
     },
     r#"export interface INotebookMetadata {
-        targetProfile?: "adaptive" | "base" | "unrestricted";
+        targetProfile?: "base" | "quantinuum" | "unrestricted";
         languageFeatures?: "v2-preview-syntax"[];
     }"#,
     INotebookMetadata
diff --git a/wasm/src/lib.rs b/wasm/src/lib.rs
index 3ec0d777..adac679b 100644
--- a/wasm/src/lib.rs
+++ b/wasm/src/lib.rs
@@ -457,5 +457,5 @@ pub fn generate_docs() -> Vec<IDocFile> {
 
 #[wasm_bindgen(typescript_custom_section)]
 const TARGET_PROFILE: &'static str = r#"
-export type TargetProfile = "adaptive" | "base" | "unrestricted";
+export type TargetProfile = "base" | "quantinuum" |"unrestricted";
 "#;
diff --git a/watch.mjs b/watch.mjs
index e44d0d9d..7706587d 100644
--- a/watch.mjs
+++ b/watch.mjs
@@ -46,7 +46,7 @@ const npmDir = join(thisDir, "npm", "qsharp");
 const isWin = process.platform === "win32";
 const npmCmd = isWin ? "npm.cmd" : "npm";
 
-function onRustChange() {
+function buildRust() {
   console.log("Compiling the .wasm module with wasm-pack");
 
   // This takes ~3-4 seconds on rebuild after some Rust changes. (Non-dev builds take ~15-20 seconds)
@@ -59,7 +59,7 @@ function onRustChange() {
   );
   console.log("wasm-pack done! ", result.stderr.toString());
 
-  console.log("Copying the wasm-pack ouput files to the npm package");
+  console.log("Copying the wasm-pack output files to the npm package");
   const npmLibDir = join(npmDir, "lib", "web");
 
   ["qsc_wasm_bg.wasm", "qsc_wasm.d.ts", "qsc_wasm.js"].forEach((file) =>
@@ -72,6 +72,24 @@ function onRustChange() {
   copyWasmToPlayground();
 }
 
+// Minor delay to ensure all changes flush to disk before starting a build if
+// saving multiple files close together (e.g. a formatter running over a directory)
+// or saving the same file multiple times (e.g. format-on-save)
+const buildDelayMs = 100;
+let buildPending = false;
+function onRustChange() {
+  if (buildPending) return; // Already queued
+  buildPending = true;
+  setTimeout(() => {
+    // The build task runs sychronously, so we can clear the timeout handle and
+    // run the build knowing that nothing will interleave with those operations
+    if (buildPending) {
+      buildPending = false;
+      buildRust();
+    }
+  }, buildDelayMs);
+}
+
 // Do an initial build
 onRustChange();
 


Test patch:
diff --git a/compiler/qsc/src/bin/memtest.rs b/compiler/qsc/src/bin/memtest.rs
index cdacebf9..05cb61bf 100644
--- a/compiler/qsc/src/bin/memtest.rs
+++ b/compiler/qsc/src/bin/memtest.rs
@@ -4,7 +4,7 @@
 //! Records the memory usage of the compiler.
 
 use qsc::{compile, CompileUnit};
-use qsc_frontend::compile::{PackageStore, RuntimeCapabilityFlags};
+use qsc_frontend::compile::{PackageStore, TargetCapabilityFlags};
 use std::{
     alloc::{GlobalAlloc, Layout, System},
     sync::atomic::{AtomicU64, Ordering},
@@ -48,7 +48,7 @@ static ALLOCATOR: AllocationCounter<System> = AllocationCounter::new(System);
 #[must_use]
 pub fn compile_stdlib() -> CompileUnit {
     let store = PackageStore::new(compile::core());
-    compile::std(&store, RuntimeCapabilityFlags::all())
+    compile::std(&store, TargetCapabilityFlags::all())
 }
 
 fn main() {
diff --git a/compiler/qsc/src/interpret/debug/tests.rs b/compiler/qsc/src/interpret/debug/tests.rs
index 87a7b0ab..3de86b72 100644
--- a/compiler/qsc/src/interpret/debug/tests.rs
+++ b/compiler/qsc/src/interpret/debug/tests.rs
@@ -7,7 +7,7 @@ use indoc::indoc;
 use miette::Result;
 use qsc_data_structures::language_features::LanguageFeatures;
 use qsc_eval::{output::CursorReceiver, val::Value};
-use qsc_frontend::compile::{RuntimeCapabilityFlags, SourceMap};
+use qsc_frontend::compile::{SourceMap, TargetCapabilityFlags};
 use qsc_passes::PackageType;
 use std::io::Cursor;
 
@@ -70,7 +70,7 @@ fn stack_traces_can_cross_eval_session_and_file_boundaries() {
         true,
         source_map,
         PackageType::Lib,
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         LanguageFeatures::default(),
     )
     .expect("Failed to compile base environment.");
@@ -145,7 +145,7 @@ fn stack_traces_can_cross_file_and_entry_boundaries() {
         true,
         source_map,
         PackageType::Exe,
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         LanguageFeatures::default(),
     )
     .expect("Failed to compile base environment.");
diff --git a/compiler/qsc/src/interpret/debugger_tests.rs b/compiler/qsc/src/interpret/debugger_tests.rs
index 33a9a275..d3e73953 100644
--- a/compiler/qsc/src/interpret/debugger_tests.rs
+++ b/compiler/qsc/src/interpret/debugger_tests.rs
@@ -8,7 +8,7 @@ use crate::line_column::Encoding;
 use qsc_data_structures::language_features::LanguageFeatures;
 use qsc_eval::{output::CursorReceiver, StepAction, StepResult};
 use qsc_fir::fir::StmtId;
-use qsc_frontend::compile::{RuntimeCapabilityFlags, SourceMap};
+use qsc_frontend::compile::{SourceMap, TargetCapabilityFlags};
 use std::io::Cursor;
 
 fn get_breakpoint_ids(debugger: &Debugger, path: &str) -> Vec<StmtId> {
@@ -131,7 +131,7 @@ mod given_debugger {
             let sources = SourceMap::new([("test".into(), STEPPING_SOURCE.into())], None);
             let mut debugger = Debugger::new(
                 sources,
-                RuntimeCapabilityFlags::all(),
+                TargetCapabilityFlags::all(),
                 Encoding::Utf8,
                 LanguageFeatures::default(),
             )?;
@@ -154,7 +154,7 @@ mod given_debugger {
             let sources = SourceMap::new([("test".into(), STEPPING_SOURCE.into())], None);
             let mut debugger = Debugger::new(
                 sources,
-                RuntimeCapabilityFlags::all(),
+                TargetCapabilityFlags::all(),
                 Encoding::Utf8,
                 LanguageFeatures::default(),
             )?;
@@ -173,7 +173,7 @@ mod given_debugger {
             let sources = SourceMap::new([("test".into(), STEPPING_SOURCE.into())], None);
             let mut debugger = Debugger::new(
                 sources,
-                RuntimeCapabilityFlags::all(),
+                TargetCapabilityFlags::all(),
                 Encoding::Utf8,
                 LanguageFeatures::default(),
             )?;
@@ -199,7 +199,7 @@ mod given_debugger {
             let sources = SourceMap::new([("test".into(), STEPPING_SOURCE.into())], None);
             let mut debugger = Debugger::new(
                 sources,
-                RuntimeCapabilityFlags::all(),
+                TargetCapabilityFlags::all(),
                 Encoding::Utf8,
                 LanguageFeatures::default(),
             )?;
diff --git a/compiler/qsc/src/interpret/tests.rs b/compiler/qsc/src/interpret/tests.rs
index f9fd21c3..b6c9efac 100644
--- a/compiler/qsc/src/interpret/tests.rs
+++ b/compiler/qsc/src/interpret/tests.rs
@@ -9,7 +9,7 @@ mod given_interpreter {
     use miette::Diagnostic;
     use qsc_data_structures::language_features::LanguageFeatures;
     use qsc_eval::{output::CursorReceiver, val::Value};
-    use qsc_frontend::compile::{RuntimeCapabilityFlags, SourceMap};
+    use qsc_frontend::compile::{SourceMap, TargetCapabilityFlags};
     use qsc_passes::PackageType;
     use std::{fmt::Write, io::Cursor, iter, str::from_utf8};
 
@@ -42,7 +42,7 @@ mod given_interpreter {
     mod without_sources {
         use expect_test::expect;
         use indoc::indoc;
-        use qsc_frontend::compile::RuntimeCapabilityFlags;
+        use qsc_frontend::compile::TargetCapabilityFlags;
 
         use super::*;
 
@@ -58,7 +58,7 @@ mod given_interpreter {
                     false,
                     SourceMap::default(),
                     PackageType::Lib,
-                    RuntimeCapabilityFlags::all(),
+                    TargetCapabilityFlags::all(),
                     LanguageFeatures::default(),
                 )
                 .expect("interpreter should be created");
@@ -523,8 +523,7 @@ mod given_interpreter {
                 "#]],
                 );
             }
-            let mut interpreter =
-                get_interpreter_with_capbilities(RuntimeCapabilityFlags::ForwardBranching);
+            let mut interpreter = get_interpreter_with_capbilities(TargetCapabilityFlags::Adaptive);
             let (result, output) = line(
                 &mut interpreter,
                 indoc! {r#"
@@ -555,8 +554,7 @@ mod given_interpreter {
                 "#]],
                 );
             }
-            let mut interpreter =
-                get_interpreter_with_capbilities(RuntimeCapabilityFlags::ForwardBranching);
+            let mut interpreter = get_interpreter_with_capbilities(TargetCapabilityFlags::Adaptive);
             let (result, output) = line(
                 &mut interpreter,
                 indoc! {r#"
@@ -620,7 +618,7 @@ mod given_interpreter {
                 true,
                 SourceMap::default(),
                 PackageType::Lib,
-                RuntimeCapabilityFlags::empty(),
+                TargetCapabilityFlags::empty(),
                 LanguageFeatures::default(),
             )
             .expect("interpreter should be created");
@@ -651,7 +649,7 @@ mod given_interpreter {
                 true,
                 SourceMap::default(),
                 PackageType::Lib,
-                RuntimeCapabilityFlags::empty(),
+                TargetCapabilityFlags::empty(),
                 LanguageFeatures::default(),
             )
             .expect("interpreter should be created");
@@ -718,7 +716,7 @@ mod given_interpreter {
                 true,
                 SourceMap::default(),
                 PackageType::Lib,
-                RuntimeCapabilityFlags::ForwardBranching,
+                TargetCapabilityFlags::Adaptive,
                 LanguageFeatures::default(),
             )
             .expect("interpreter should be created");
@@ -757,7 +755,7 @@ mod given_interpreter {
 
                 declare void @__quantum__qis__rz__body(double, %Qubit*)
 
-                attributes #0 = { "entry_point" "output_labeling_schema" "qir_profiles"="adaptive_profile" "required_num_qubits"="0" "required_num_results"="0" }
+                attributes #0 = { "entry_point" "output_labeling_schema" "qir_profiles"="adaptive_profile" "required_num_qubits"="1" "required_num_results"="0" }
                 attributes #1 = { "irreversible" }
 
                 ; module flags
@@ -778,7 +776,7 @@ mod given_interpreter {
                 true,
                 SourceMap::default(),
                 PackageType::Lib,
-                RuntimeCapabilityFlags::ForwardBranching,
+                TargetCapabilityFlags::Adaptive,
                 LanguageFeatures::default(),
             )
             .expect("interpreter should be created");
@@ -809,7 +807,7 @@ mod given_interpreter {
                 true,
                 SourceMap::default(),
                 PackageType::Lib,
-                RuntimeCapabilityFlags::empty(),
+                TargetCapabilityFlags::empty(),
                 LanguageFeatures::default(),
             )
             .expect("interpreter should be created");
@@ -876,7 +874,7 @@ mod given_interpreter {
                 true,
                 SourceMap::default(),
                 PackageType::Lib,
-                RuntimeCapabilityFlags::empty(),
+                TargetCapabilityFlags::empty(),
                 LanguageFeatures::default(),
             )
             .expect("interpreter should be created");
@@ -958,7 +956,7 @@ mod given_interpreter {
                 true,
                 SourceMap::default(),
                 PackageType::Lib,
-                RuntimeCapabilityFlags::empty(),
+                TargetCapabilityFlags::empty(),
                 LanguageFeatures::default(),
             )
             .expect("interpreter should be created");
@@ -985,7 +983,7 @@ mod given_interpreter {
                 true,
                 SourceMap::default(),
                 PackageType::Lib,
-                RuntimeCapabilityFlags::empty(),
+                TargetCapabilityFlags::empty(),
                 LanguageFeatures::default(),
             )
             .expect("interpreter should be created");
@@ -1072,7 +1070,7 @@ mod given_interpreter {
                 true,
                 SourceMap::default(),
                 PackageType::Lib,
-                RuntimeCapabilityFlags::empty(),
+                TargetCapabilityFlags::empty(),
                 LanguageFeatures::default(),
             )
             .expect("interpreter should be created");
@@ -1136,7 +1134,7 @@ mod given_interpreter {
                 true,
                 SourceMap::default(),
                 PackageType::Lib,
-                RuntimeCapabilityFlags::empty(),
+                TargetCapabilityFlags::empty(),
                 LanguageFeatures::default(),
             )
             .expect("interpreter should be created");
@@ -1241,7 +1239,7 @@ mod given_interpreter {
                 true,
                 SourceMap::default(),
                 PackageType::Lib,
-                RuntimeCapabilityFlags::empty(),
+                TargetCapabilityFlags::empty(),
                 LanguageFeatures::default(),
             )
             .expect("interpreter should be created");
@@ -1255,13 +1253,13 @@ mod given_interpreter {
             true,
             SourceMap::default(),
             PackageType::Lib,
-            RuntimeCapabilityFlags::all(),
+            TargetCapabilityFlags::all(),
             LanguageFeatures::default(),
         )
         .expect("interpreter should be created")
     }
 
-    fn get_interpreter_with_capbilities(capabilities: RuntimeCapabilityFlags) -> Interpreter {
+    fn get_interpreter_with_capbilities(capabilities: TargetCapabilityFlags) -> Interpreter {
         Interpreter::new(
             true,
             SourceMap::default(),
@@ -1356,7 +1354,7 @@ mod given_interpreter {
         use crate::line_column::Encoding;
         use expect_test::expect;
         use indoc::indoc;
-        use qsc_frontend::compile::{RuntimeCapabilityFlags, SourceMap};
+        use qsc_frontend::compile::{SourceMap, TargetCapabilityFlags};
         use qsc_passes::PackageType;
 
         #[test]
@@ -1374,7 +1372,7 @@ mod given_interpreter {
                 true,
                 sources,
                 PackageType::Exe,
-                RuntimeCapabilityFlags::all(),
+                TargetCapabilityFlags::all(),
                 LanguageFeatures::default(),
             )
             .expect("interpreter should be created");
@@ -1397,7 +1395,7 @@ mod given_interpreter {
                 true,
                 sources,
                 PackageType::Lib,
-                RuntimeCapabilityFlags::all(),
+                TargetCapabilityFlags::all(),
                 LanguageFeatures::default(),
             )
             .expect("interpreter should be created");
@@ -1424,7 +1422,7 @@ mod given_interpreter {
                 true,
                 sources,
                 PackageType::Lib,
-                RuntimeCapabilityFlags::all(),
+                TargetCapabilityFlags::all(),
                 LanguageFeatures::default(),
             )
             .expect("interpreter should be created");
@@ -1466,7 +1464,7 @@ mod given_interpreter {
             let sources = SourceMap::new(sources, None);
             let debugger = Debugger::new(
                 sources,
-                RuntimeCapabilityFlags::all(),
+                TargetCapabilityFlags::all(),
                 Encoding::Utf8,
                 LanguageFeatures::default(),
             )
@@ -1497,7 +1495,7 @@ mod given_interpreter {
                 true,
                 sources,
                 PackageType::Lib,
-                RuntimeCapabilityFlags::all(),
+                TargetCapabilityFlags::all(),
                 LanguageFeatures::default(),
             )
             .expect("interpreter should be created");
@@ -1528,7 +1526,7 @@ mod given_interpreter {
                 true,
                 sources,
                 PackageType::Lib,
-                RuntimeCapabilityFlags::all(),
+                TargetCapabilityFlags::all(),
                 LanguageFeatures::default(),
             )
             .expect("interpreter should be created");
diff --git a/compiler/qsc_circuit/src/operations/tests.rs b/compiler/qsc_circuit/src/operations/tests.rs
index f7dcefd6..94254aba 100644
--- a/compiler/qsc_circuit/src/operations/tests.rs
+++ b/compiler/qsc_circuit/src/operations/tests.rs
@@ -4,13 +4,13 @@
 use super::*;
 use expect_test::expect;
 use qsc_data_structures::{functors::FunctorApp, language_features::LanguageFeatures};
-use qsc_frontend::compile::{compile, core, std, PackageStore, RuntimeCapabilityFlags, SourceMap};
+use qsc_frontend::compile::{compile, core, std, PackageStore, SourceMap, TargetCapabilityFlags};
 use qsc_hir::hir::{Item, ItemKind};
 
 fn compile_one_operation(code: &str) -> (Item, String) {
     let core_pkg = core();
     let mut store = PackageStore::new(core_pkg);
-    let std = std(&store, RuntimeCapabilityFlags::empty());
+    let std = std(&store, TargetCapabilityFlags::empty());
     let std = store.insert(std);
 
     let sources = SourceMap::new([("test".into(), code.into())], None);
@@ -18,7 +18,7 @@ fn compile_one_operation(code: &str) -> (Item, String) {
         &store,
         &[std],
         sources,
-        RuntimeCapabilityFlags::empty(),
+        TargetCapabilityFlags::empty(),
         LanguageFeatures::default(),
     );
     let mut callables = unit.package.items.values().filter_map(|i| {
diff --git a/compiler/qsc_codegen/src/qir_base/tests.rs b/compiler/qsc_codegen/src/qir_base/tests.rs
index 84c332bf..4002d546 100644
--- a/compiler/qsc_codegen/src/qir_base/tests.rs
+++ b/compiler/qsc_codegen/src/qir_base/tests.rs
@@ -9,7 +9,7 @@ use std::sync::Arc;
 use expect_test::{expect, Expect};
 use indoc::indoc;
 use qsc_data_structures::language_features::LanguageFeatures;
-use qsc_frontend::compile::{self, compile, PackageStore, RuntimeCapabilityFlags, SourceMap};
+use qsc_frontend::compile::{self, compile, PackageStore, SourceMap, TargetCapabilityFlags};
 use qsc_passes::{run_core_passes, run_default_passes, PackageType};
 
 use crate::qir_base::generate_qir;
@@ -18,12 +18,12 @@ fn check(program: &str, expr: Option<&str>, expect: &Expect) {
     let mut core = compile::core();
     assert!(run_core_passes(&mut core).is_empty());
     let mut store = PackageStore::new(core);
-    let mut std = compile::std(&store, RuntimeCapabilityFlags::empty());
+    let mut std = compile::std(&store, TargetCapabilityFlags::empty());
     assert!(run_default_passes(
         store.core(),
         &mut std,
         PackageType::Lib,
-        RuntimeCapabilityFlags::empty()
+        TargetCapabilityFlags::empty()
     )
     .is_empty());
     let std = store.insert(std);
@@ -35,7 +35,7 @@ fn check(program: &str, expr: Option<&str>, expect: &Expect) {
         &store,
         &[std],
         sources,
-        RuntimeCapabilityFlags::empty(),
+        TargetCapabilityFlags::empty(),
         LanguageFeatures::default(),
     );
     assert!(unit.errors.is_empty(), "{:?}", unit.errors);
@@ -43,7 +43,7 @@ fn check(program: &str, expr: Option<&str>, expect: &Expect) {
         store.core(),
         &mut unit,
         PackageType::Exe,
-        RuntimeCapabilityFlags::empty()
+        TargetCapabilityFlags::empty()
     )
     .is_empty());
     let package = store.insert(unit);
diff --git a/compiler/qsc_codegen/src/qsharp/test_utils.rs b/compiler/qsc_codegen/src/qsharp/test_utils.rs
index 41a28a5f..2a8f8f29 100644
--- a/compiler/qsc_codegen/src/qsharp/test_utils.rs
+++ b/compiler/qsc_codegen/src/qsharp/test_utils.rs
@@ -9,7 +9,7 @@ use std::sync::Arc;
 use expect_test::Expect;
 use qsc_ast::{ast::Package, mut_visit::MutVisitor};
 use qsc_data_structures::{language_features::LanguageFeatures, span::Span};
-use qsc_frontend::compile::{self, compile, PackageStore, RuntimeCapabilityFlags, SourceMap};
+use qsc_frontend::compile::{self, compile, PackageStore, SourceMap, TargetCapabilityFlags};
 use qsc_hir::hir::PackageId;
 use qsc_passes::{run_core_passes, run_default_passes, PackageType};
 
@@ -31,12 +31,12 @@ pub(crate) fn get_compilation(sources: Option<SourceMap>) -> (PackageId, Package
     let mut core = compile::core();
     assert!(run_core_passes(&mut core).is_empty());
     let mut store = PackageStore::new(core);
-    let mut std = compile::std(&store, RuntimeCapabilityFlags::empty());
+    let mut std = compile::std(&store, TargetCapabilityFlags::empty());
     assert!(run_default_passes(
         store.core(),
         &mut std,
         PackageType::Lib,
-        RuntimeCapabilityFlags::empty()
+        TargetCapabilityFlags::empty()
     )
     .is_empty());
     let std = store.insert(std);
@@ -45,7 +45,7 @@ pub(crate) fn get_compilation(sources: Option<SourceMap>) -> (PackageId, Package
         &store,
         &[std],
         sources.unwrap_or_default(),
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         LanguageFeatures::empty(),
     );
     assert!(unit.errors.is_empty(), "{:?}", unit.errors);
@@ -53,7 +53,7 @@ pub(crate) fn get_compilation(sources: Option<SourceMap>) -> (PackageId, Package
         store.core(),
         &mut unit,
         PackageType::Lib,
-        RuntimeCapabilityFlags::all()
+        TargetCapabilityFlags::all()
     )
     .is_empty());
     let package_id = store.insert(unit);
diff --git a/compiler/qsc_eval/src/intrinsic/tests.rs b/compiler/qsc_eval/src/intrinsic/tests.rs
index 8b3f4582..30a3184a 100644
--- a/compiler/qsc_eval/src/intrinsic/tests.rs
+++ b/compiler/qsc_eval/src/intrinsic/tests.rs
@@ -18,7 +18,7 @@ use indoc::indoc;
 use num_bigint::BigInt;
 use qsc_data_structures::language_features::LanguageFeatures;
 use qsc_fir::fir;
-use qsc_frontend::compile::{self, compile, PackageStore, RuntimeCapabilityFlags, SourceMap};
+use qsc_frontend::compile::{self, compile, PackageStore, SourceMap, TargetCapabilityFlags};
 use qsc_lowerer::map_hir_package_to_fir;
 use qsc_passes::{run_core_passes, run_default_passes, PackageType};
 
@@ -151,13 +151,13 @@ fn check_intrinsic(file: &str, expr: &str, out: &mut impl Receiver) -> Result<Va
     let core_fir = qsc_lowerer::Lowerer::new().lower_package(&core.package);
     let mut store = PackageStore::new(core);
 
-    let mut std = compile::std(&store, RuntimeCapabilityFlags::all());
+    let mut std = compile::std(&store, TargetCapabilityFlags::all());
     assert!(std.errors.is_empty());
     assert!(run_default_passes(
         store.core(),
         &mut std,
         PackageType::Lib,
-        RuntimeCapabilityFlags::all()
+        TargetCapabilityFlags::all()
     )
     .is_empty());
     let std_fir = qsc_lowerer::Lowerer::new().lower_package(&std.package);
@@ -168,7 +168,7 @@ fn check_intrinsic(file: &str, expr: &str, out: &mut impl Receiver) -> Result<Va
         &store,
         &[std_id],
         sources,
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         LanguageFeatures::default(),
     );
     assert!(unit.errors.is_empty());
@@ -176,7 +176,7 @@ fn check_intrinsic(file: &str, expr: &str, out: &mut impl Receiver) -> Result<Va
         store.core(),
         &mut unit,
         PackageType::Lib,
-        RuntimeCapabilityFlags::all()
+        TargetCapabilityFlags::all()
     )
     .is_empty());
     let unit_fir = qsc_lowerer::Lowerer::new().lower_package(&unit.package);
diff --git a/compiler/qsc_eval/src/tests.rs b/compiler/qsc_eval/src/tests.rs
index 1fc6f67a..b130e8bd 100644
--- a/compiler/qsc_eval/src/tests.rs
+++ b/compiler/qsc_eval/src/tests.rs
@@ -18,7 +18,7 @@ use indoc::indoc;
 use qsc_data_structures::language_features::LanguageFeatures;
 use qsc_fir::fir::{self, ExecGraphNode, StmtId};
 use qsc_fir::fir::{PackageId, PackageStoreLookup};
-use qsc_frontend::compile::{self, compile, PackageStore, RuntimeCapabilityFlags, SourceMap};
+use qsc_frontend::compile::{self, compile, PackageStore, SourceMap, TargetCapabilityFlags};
 use qsc_lowerer::map_hir_package_to_fir;
 use qsc_passes::{run_core_passes, run_default_passes, PackageType};
 
@@ -50,13 +50,13 @@ fn check_expr(file: &str, expr: &str, expect: &Expect) {
     let core_fir = fir_lowerer.lower_package(&core.package);
     let mut store = PackageStore::new(core);
 
-    let mut std = compile::std(&store, RuntimeCapabilityFlags::all());
+    let mut std = compile::std(&store, TargetCapabilityFlags::all());
     assert!(std.errors.is_empty());
     assert!(run_default_passes(
         store.core(),
         &mut std,
         PackageType::Lib,
-        RuntimeCapabilityFlags::all()
+        TargetCapabilityFlags::all()
     )
     .is_empty());
     let std_fir = fir_lowerer.lower_package(&std.package);
@@ -67,7 +67,7 @@ fn check_expr(file: &str, expr: &str, expect: &Expect) {
         &store,
         &[std_id],
         sources,
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         LanguageFeatures::default(),
     );
     assert!(unit.errors.is_empty(), "{:?}", unit.errors);
@@ -75,7 +75,7 @@ fn check_expr(file: &str, expr: &str, expect: &Expect) {
         store.core(),
         &mut unit,
         PackageType::Lib,
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
     );
     assert!(pass_errors.is_empty(), "{pass_errors:?}");
     let unit_fir = fir_lowerer.lower_package(&unit.package);
@@ -116,13 +116,13 @@ fn check_partial_eval_stmt(
     let core_fir = qsc_lowerer::Lowerer::new().lower_package(&core.package);
     let mut store = PackageStore::new(core);
 
-    let mut std = compile::std(&store, RuntimeCapabilityFlags::all());
+    let mut std = compile::std(&store, TargetCapabilityFlags::all());
     assert!(std.errors.is_empty());
     assert!(run_default_passes(
         store.core(),
         &mut std,
         PackageType::Lib,
-        RuntimeCapabilityFlags::all()
+        TargetCapabilityFlags::all()
     )
     .is_empty());
     let std_fir = qsc_lowerer::Lowerer::new().lower_package(&std.package);
@@ -133,7 +133,7 @@ fn check_partial_eval_stmt(
         &store,
         &[std_id],
         sources,
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         LanguageFeatures::default(),
     );
     assert!(unit.errors.is_empty(), "{:?}", unit.errors);
@@ -141,7 +141,7 @@ fn check_partial_eval_stmt(
         store.core(),
         &mut unit,
         PackageType::Lib,
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
     );
     assert!(pass_errors.is_empty(), "{pass_errors:?}");
     let unit_fir = qsc_lowerer::Lowerer::new().lower_package(&unit.package);
diff --git a/compiler/qsc_frontend/src/compile/preprocess/tests.rs b/compiler/qsc_frontend/src/compile/preprocess/tests.rs
new file mode 100644
index 00000000..8feb47d0
--- /dev/null
+++ b/compiler/qsc_frontend/src/compile/preprocess/tests.rs
@@ -0,0 +1,134 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
+
+use qsc_ast::ast::{Attr, Expr, ExprKind, Ident, NodeId, Path};
+use qsc_data_structures::span::Span;
+
+use crate::compile::{preprocess::matches_config, TargetCapabilityFlags};
+
+fn named_attr(name: &str) -> Attr {
+    Attr {
+        name: Box::new(Ident {
+            name: name.into(),
+            span: Span::default(),
+            id: NodeId::default(),
+        }),
+        arg: Box::new(Expr {
+            id: NodeId::default(),
+            span: Span::default(),
+            kind: Box::new(ExprKind::Tuple(Box::new([]))),
+        }),
+        span: Span::default(),
+        id: NodeId::default(),
+    }
+}
+
+fn name_value_attr(name: &str, value: &str) -> Attr {
+    Attr {
+        name: Box::new(Ident {
+            name: name.into(),
+            span: Span::default(),
+            id: NodeId::default(),
+        }),
+        arg: Box::new(Expr {
+            id: NodeId::default(),
+            span: Span::default(),
+            kind: Box::new(ExprKind::Paren(Box::new(Expr {
+                id: NodeId::default(),
+                span: Span::default(),
+                kind: Box::new(ExprKind::Path(Box::new(Path {
+                    id: NodeId::default(),
+                    span: Span::default(),
+                    namespace: None,
+                    name: Box::new(Ident {
+                        name: value.into(),
+                        span: Span::default(),
+                        id: NodeId::default(),
+                    }),
+                }))),
+            }))),
+        }),
+        span: Span::default(),
+        id: NodeId::default(),
+    }
+}
+
+#[test]
+fn no_attrs_matches() {
+    assert!(matches_config(&[], TargetCapabilityFlags::empty()));
+}
+
+#[test]
+fn unknown_attrs_matches() {
+    assert!(matches_config(
+        &[Box::new(named_attr("unknown"))],
+        TargetCapabilityFlags::empty()
+    ));
+}
+
+#[test]
+fn none_attrs_matches_empty() {
+    assert!(matches_config(
+        &[Box::new(name_value_attr("Config", "Base"))],
+        TargetCapabilityFlags::empty()
+    ));
+}
+
+#[test]
+fn none_attrs_does_not_match_all() {
+    assert!(!matches_config(
+        &[Box::new(name_value_attr("Config", "Base"))],
+        TargetCapabilityFlags::all()
+    ));
+}
+
+#[test]
+fn none_attrs_does_not_match_adaptive() {
+    assert!(!matches_config(
+        &[Box::new(name_value_attr("Config", "Base"))],
+        TargetCapabilityFlags::Adaptive
+    ));
+}
+
+#[test]
+fn adaptive_attrs_does_not_match_empty() {
+    assert!(!matches_config(
+        &[Box::new(name_value_attr("Config", "Adaptive"))],
+        TargetCapabilityFlags::empty()
+    ));
+}
+
+#[test]
+fn integercomputations_attrs_does_not_match_empty() {
+    assert!(!matches_config(
+        &[Box::new(name_value_attr("Config", "IntegerComputations"))],
+        TargetCapabilityFlags::empty()
+    ));
+}
+
+#[test]
+fn floatingpointcomputations_attrs_does_not_match_empty() {
+    assert!(!matches_config(
+        &[Box::new(name_value_attr(
+            "Config",
+            "FloatingPointComputations"
+        ))],
+        TargetCapabilityFlags::empty()
+    ));
+}
+
+#[test]
+fn unrestricted_attrs_does_not_match_empty() {
+    assert!(!matches_config(
+        &[Box::new(name_value_attr("Config", "Unrestricted"))],
+        TargetCapabilityFlags::empty()
+    ));
+}
+
+#[test]
+fn unrestricted_attrs_matches_all() {
+    assert!(matches_config(
+        &[Box::new(name_value_attr("Config", "Unrestricted"))],
+        TargetCapabilityFlags::all()
+    ));
+}
diff --git a/compiler/qsc_frontend/src/compile/tests.rs b/compiler/qsc_frontend/src/compile/tests.rs
index b5f86a93..32c611a4 100644
--- a/compiler/qsc_frontend/src/compile/tests.rs
+++ b/compiler/qsc_frontend/src/compile/tests.rs
@@ -3,7 +3,7 @@
 
 #![allow(clippy::needless_raw_string_hashes)]
 
-use crate::compile::RuntimeCapabilityFlags;
+use crate::compile::TargetCapabilityFlags;
 
 use super::{compile, CompileUnit, Error, PackageStore, SourceMap};
 use expect_test::expect;
@@ -58,7 +58,7 @@ fn default_compile(sources: SourceMap) -> CompileUnit {
         &PackageStore::new(super::core()),
         &[],
         sources,
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         LanguageFeatures::default(),
     )
 }
@@ -440,7 +440,7 @@ fn package_dependency() {
         &store,
         &[],
         sources1,
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         LanguageFeatures::default(),
     );
     assert!(unit1.errors.is_empty(), "{:#?}", unit1.errors);
@@ -464,7 +464,7 @@ fn package_dependency() {
         &store,
         &[package1],
         sources2,
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         LanguageFeatures::default(),
     );
     assert!(unit2.errors.is_empty(), "{:#?}", unit2.errors);
@@ -513,7 +513,7 @@ fn package_dependency_internal_error() {
         &store,
         &[],
         sources1,
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         LanguageFeatures::default(),
     );
     assert!(unit1.errors.is_empty(), "{:#?}", unit1.errors);
@@ -537,7 +537,7 @@ fn package_dependency_internal_error() {
         &store,
         &[package1],
         sources2,
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         LanguageFeatures::default(),
     );
 
@@ -593,7 +593,7 @@ fn package_dependency_udt() {
         &store,
         &[],
         sources1,
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         LanguageFeatures::default(),
     );
     assert!(unit1.errors.is_empty(), "{:#?}", unit1.errors);
@@ -617,7 +617,7 @@ fn package_dependency_udt() {
         &store,
         &[package1],
         sources2,
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         LanguageFeatures::default(),
     );
     assert!(unit2.errors.is_empty(), "{:#?}", unit2.errors);
@@ -668,7 +668,7 @@ fn package_dependency_nested_udt() {
         &store,
         &[],
         sources1,
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         LanguageFeatures::default(),
     );
     assert!(unit1.errors.is_empty(), "{:#?}", unit1.errors);
@@ -697,7 +697,7 @@ fn package_dependency_nested_udt() {
         &store,
         &[package1],
         sources2,
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         LanguageFeatures::default(),
     );
     assert!(unit2.errors.is_empty(), "{:#?}", unit2.errors);
@@ -754,7 +754,7 @@ fn package_dependency_nested_udt() {
 #[test]
 fn std_dependency() {
     let mut store = PackageStore::new(super::core());
-    let std = store.insert(super::std(&store, RuntimeCapabilityFlags::all()));
+    let std = store.insert(super::std(&store, TargetCapabilityFlags::all()));
     let sources = SourceMap::new(
         [(
             "test".into(),
@@ -777,7 +777,7 @@ fn std_dependency() {
         &store,
         &[std],
         sources,
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         LanguageFeatures::default(),
     );
     assert!(unit.errors.is_empty(), "{:#?}", unit.errors);
@@ -786,7 +786,7 @@ fn std_dependency() {
 #[test]
 fn std_dependency_base_profile() {
     let mut store = PackageStore::new(super::core());
-    let std = store.insert(super::std(&store, RuntimeCapabilityFlags::empty()));
+    let std = store.insert(super::std(&store, TargetCapabilityFlags::empty()));
     let sources = SourceMap::new(
         [(
             "test".into(),
@@ -809,7 +809,7 @@ fn std_dependency_base_profile() {
         &store,
         &[std],
         sources,
-        RuntimeCapabilityFlags::empty(),
+        TargetCapabilityFlags::empty(),
         LanguageFeatures::default(),
     );
     assert!(unit.errors.is_empty(), "{:#?}", unit.errors);
@@ -818,7 +818,7 @@ fn std_dependency_base_profile() {
 #[test]
 fn introduce_prelude_ambiguity() {
     let mut store = PackageStore::new(super::core());
-    let std = store.insert(super::std(&store, RuntimeCapabilityFlags::all()));
+    let std = store.insert(super::std(&store, TargetCapabilityFlags::all()));
     let sources = SourceMap::new(
         [(
             "test".into(),
@@ -837,7 +837,7 @@ fn introduce_prelude_ambiguity() {
         &store,
         &[std],
         sources,
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         LanguageFeatures::default(),
     );
     let errors: Vec<Error> = unit.errors;
@@ -926,7 +926,7 @@ fn unimplemented_call_from_dependency_produces_error() {
         &store,
         &[],
         lib_sources,
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         LanguageFeatures::default(),
     );
     assert!(lib.errors.is_empty(), "{:#?}", lib.errors);
@@ -951,7 +951,7 @@ fn unimplemented_call_from_dependency_produces_error() {
         &store,
         &[lib],
         sources,
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         LanguageFeatures::default(),
     );
     expect![[r#"
@@ -1063,7 +1063,7 @@ fn unimplemented_attribute_avoids_ambiguous_error_with_duplicate_names_in_scope(
         &store,
         &[],
         lib_sources,
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         LanguageFeatures::default(),
     );
     assert!(lib.errors.is_empty(), "{:#?}", lib.errors);
@@ -1092,7 +1092,7 @@ fn unimplemented_attribute_avoids_ambiguous_error_with_duplicate_names_in_scope(
         &store,
         &[lib],
         sources,
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         LanguageFeatures::default(),
     );
     expect![[r#"
@@ -1121,7 +1121,7 @@ fn duplicate_intrinsic_from_dependency() {
         &store,
         &[],
         lib_sources,
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         LanguageFeatures::default(),
     );
     assert!(lib.errors.is_empty(), "{:#?}", lib.errors);
@@ -1144,7 +1144,7 @@ fn duplicate_intrinsic_from_dependency() {
         &store,
         &[lib],
         sources,
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         LanguageFeatures::default(),
     );
     expect![[r#"
@@ -1168,7 +1168,7 @@ fn duplicate_intrinsic_from_dependency() {
 #[test]
 fn reject_use_qubit_block_syntax_if_preview_feature_is_on() {
     let mut store = PackageStore::new(super::core());
-    let std = store.insert(super::std(&store, RuntimeCapabilityFlags::empty()));
+    let std = store.insert(super::std(&store, TargetCapabilityFlags::empty()));
     let sources = SourceMap::new(
         [(
             "test".into(),
@@ -1182,7 +1182,7 @@ fn reject_use_qubit_block_syntax_if_preview_feature_is_on() {
                             // we have the v2 preview syntax feature enabled
                             X(q);
                         };
-                        
+
                     }
                 }
             "}
@@ -1195,7 +1195,7 @@ fn reject_use_qubit_block_syntax_if_preview_feature_is_on() {
         &store,
         &[std],
         sources,
-        RuntimeCapabilityFlags::empty(),
+        TargetCapabilityFlags::empty(),
         LanguageFeatures::V2PreviewSyntax,
     );
     expect![[r#"
@@ -1224,7 +1224,7 @@ fn reject_use_qubit_block_syntax_if_preview_feature_is_on() {
 #[test]
 fn accept_use_qubit_block_syntax_if_preview_feature_is_off() {
     let mut store = PackageStore::new(super::core());
-    let std = store.insert(super::std(&store, RuntimeCapabilityFlags::empty()));
+    let std = store.insert(super::std(&store, TargetCapabilityFlags::empty()));
     let sources = SourceMap::new(
         [(
             "test".into(),
@@ -1250,7 +1250,7 @@ fn accept_use_qubit_block_syntax_if_preview_feature_is_off() {
         &store,
         &[std],
         sources,
-        RuntimeCapabilityFlags::empty(),
+        TargetCapabilityFlags::empty(),
         LanguageFeatures::default(),
     );
     assert!(unit.errors.is_empty(), "{:#?}", unit.errors);
diff --git a/compiler/qsc_frontend/src/incremental/tests.rs b/compiler/qsc_frontend/src/incremental/tests.rs
index d9ea8a47..a055b2a3 100644
--- a/compiler/qsc_frontend/src/incremental/tests.rs
+++ b/compiler/qsc_frontend/src/incremental/tests.rs
@@ -3,7 +3,7 @@
 
 use super::{Compiler, Increment};
 use crate::{
-    compile::{self, CompileUnit, PackageStore, RuntimeCapabilityFlags},
+    compile::{self, CompileUnit, PackageStore, TargetCapabilityFlags},
     incremental::Error,
 };
 use expect_test::{expect, Expect};
@@ -19,7 +19,7 @@ fn one_callable() {
     let mut compiler = Compiler::new(
         &store,
         vec![],
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         LanguageFeatures::default(),
     );
     let unit = compiler
@@ -127,7 +127,7 @@ fn one_statement() {
     let mut compiler = Compiler::new(
         &store,
         vec![],
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         LanguageFeatures::default(),
     );
     let unit = compiler
@@ -190,7 +190,7 @@ fn parse_error() {
     let mut compiler = Compiler::new(
         &store,
         vec![],
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         LanguageFeatures::default(),
     );
     let errors = compiler
@@ -235,7 +235,7 @@ fn conditional_compilation_not_available() {
     let mut compiler = Compiler::new(
         &store,
         vec![],
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         LanguageFeatures::default(),
     );
     let errors = compiler
@@ -260,12 +260,12 @@ fn conditional_compilation_not_available() {
 #[test]
 fn errors_across_multiple_lines() {
     let mut store = PackageStore::new(compile::core());
-    let std = compile::std(&store, RuntimeCapabilityFlags::all());
+    let std = compile::std(&store, TargetCapabilityFlags::all());
     let std_id = store.insert(std);
     let mut compiler = Compiler::new(
         &store,
         [std_id],
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         LanguageFeatures::default(),
     );
     let mut unit = CompileUnit::default();
@@ -334,7 +334,7 @@ fn continue_after_parse_error() {
     let mut compiler = Compiler::new(
         &store,
         vec![],
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         LanguageFeatures::default(),
     );
     let mut errors = Vec::new();
@@ -410,7 +410,7 @@ fn continue_after_lower_error() {
     let mut compiler = Compiler::new(
         &store,
         vec![],
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         LanguageFeatures::default(),
     );
     let mut unit = CompileUnit::default();
diff --git a/compiler/qsc_frontend/src/lower/tests.rs b/compiler/qsc_frontend/src/lower/tests.rs
index 1aa17cf9..0f63a88b 100644
--- a/compiler/qsc_frontend/src/lower/tests.rs
+++ b/compiler/qsc_frontend/src/lower/tests.rs
@@ -3,7 +3,7 @@
 
 #![allow(clippy::needless_raw_string_hashes)]
 
-use crate::compile::{self, compile, PackageStore, RuntimeCapabilityFlags, SourceMap};
+use crate::compile::{self, compile, PackageStore, SourceMap, TargetCapabilityFlags};
 use expect_test::{expect, Expect};
 use indoc::indoc;
 use qsc_data_structures::language_features::LanguageFeatures;
@@ -14,7 +14,7 @@ fn check_hir(input: &str, expect: &Expect) {
         &PackageStore::new(compile::core()),
         &[],
         sources,
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         LanguageFeatures::default(),
     );
     expect.assert_eq(&unit.package.to_string());
@@ -26,7 +26,7 @@ fn check_errors(input: &str, expect: &Expect) {
         &PackageStore::new(compile::core()),
         &[],
         sources,
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         LanguageFeatures::default(),
     );
 
@@ -106,23 +106,6 @@ fn test_target_profile_base_attr_allowed() {
     );
 }
 
-#[test]
-fn test_target_profile_full_attr_allowed() {
-    check_errors(
-        indoc! {"
-            namespace input {
-                @Config(Unrestricted)
-                operation Foo() : Unit {
-                    body ... {}
-                }
-            }
-        "},
-        &expect![[r#"
-            []
-        "#]],
-    );
-}
-
 #[test]
 fn test_target_profile_attr_wrong_args() {
     check_errors(
@@ -137,7 +120,7 @@ fn test_target_profile_attr_wrong_args() {
         &expect![[r#"
             [
                 InvalidAttrArgs(
-                    "Unrestricted or Base",
+                    "runtime capability",
                     Span {
                         lo: 29,
                         hi: 34,
diff --git a/compiler/qsc_frontend/src/resolve/tests.rs b/compiler/qsc_frontend/src/resolve/tests.rs
index da9dd59e..0969ddd5 100644
--- a/compiler/qsc_frontend/src/resolve/tests.rs
+++ b/compiler/qsc_frontend/src/resolve/tests.rs
@@ -6,7 +6,7 @@
 use super::{Error, Locals, Names, Res};
 use crate::{
     compile,
-    compile::RuntimeCapabilityFlags,
+    compile::TargetCapabilityFlags,
     resolve::{LocalKind, Resolver},
 };
 use expect_test::{expect, Expect};
@@ -104,7 +104,7 @@ fn compile(
 
     AstAssigner::new().visit_package(&mut package);
 
-    let mut cond_compile = compile::preprocess::Conditional::new(RuntimeCapabilityFlags::all());
+    let mut cond_compile = compile::preprocess::Conditional::new(TargetCapabilityFlags::all());
     cond_compile.visit_package(&mut package);
     let dropped_names = cond_compile.into_names();
 
@@ -1980,13 +1980,13 @@ fn multiple_definition_dropped_is_not_found() {
     check(
         indoc! {"
             namespace A {
-                @Config(Unrestricted)
+                @Config(Adaptive)
                 operation B() : Unit {}
                 @Config(Base)
                 operation B() : Unit {}
                 @Config(Base)
                 operation C() : Unit {}
-                @Config(Unrestricted)
+                @Config(Adaptive)
                 operation C() : Unit {}
             }
             namespace D {
@@ -2003,13 +2003,13 @@ fn multiple_definition_dropped_is_not_found() {
         "},
         &expect![[r#"
             namespace item0 {
-                @Config(Unrestricted)
+                @Config(Adaptive)
                 operation item1() : Unit {}
                 @Config(Base)
                 operation B() : Unit {}
                 @Config(Base)
                 operation C() : Unit {}
-                @Config(Unrestricted)
+                @Config(Adaptive)
                 operation item2() : Unit {}
             }
             namespace item3 {
@@ -2024,8 +2024,8 @@ fn multiple_definition_dropped_is_not_found() {
                 }
             }
 
-            // NotFound("B", Span { lo: 265, hi: 266 })
-            // NotFound("C", Span { lo: 278, hi: 279 })
+            // NotFound("B", Span { lo: 257, hi: 258 })
+            // NotFound("C", Span { lo: 270, hi: 271 })
         "#]],
     );
 }
diff --git a/compiler/qsc_linter/src/tests.rs b/compiler/qsc_linter/src/tests.rs
index 051db196..70c0c6ce 100644
--- a/compiler/qsc_linter/src/tests.rs
+++ b/compiler/qsc_linter/src/tests.rs
@@ -7,7 +7,7 @@ use crate::{
 };
 use expect_test::{expect, Expect};
 use qsc_data_structures::language_features::LanguageFeatures;
-use qsc_frontend::compile::{self, CompileUnit, PackageStore, RuntimeCapabilityFlags, SourceMap};
+use qsc_frontend::compile::{self, CompileUnit, PackageStore, SourceMap, TargetCapabilityFlags};
 use qsc_passes::PackageType;
 
 #[test]
@@ -162,14 +162,14 @@ fn hir_placeholder() {
 fn check(source: &str, expected: &Expect) {
     let source = wrap_in_namespace(source);
     let mut store = PackageStore::new(compile::core());
-    let std = store.insert(compile::std(&store, RuntimeCapabilityFlags::all()));
+    let std = store.insert(compile::std(&store, TargetCapabilityFlags::all()));
     let sources = SourceMap::new([("source.qs".into(), source.clone().into())], None);
     let (package, _) = qsc::compile::compile(
         &store,
         &[std],
         sources,
         PackageType::Exe,
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         LanguageFeatures::default(),
     );
 
diff --git a/compiler/qsc_partial_eval/tests/qubits.rs b/compiler/qsc_partial_eval/tests/qubits.rs
index a3eed5ac..db2c9e9e 100644
--- a/compiler/qsc_partial_eval/tests/qubits.rs
+++ b/compiler/qsc_partial_eval/tests/qubits.rs
@@ -50,6 +50,8 @@ fn qubit_ids_are_correct_for_allocate_use_release_one_qubit() {
             Instruction::Return,
         ],
     );
+    assert_eq!(program.num_qubits, 1);
+    assert_eq!(program.num_results, 0);
 }
 
 #[test]
@@ -97,6 +99,8 @@ fn qubit_ids_are_correct_for_allocate_use_release_multiple_qubits() {
             Instruction::Return,
         ],
     );
+    assert_eq!(program.num_qubits, 3);
+    assert_eq!(program.num_results, 0);
 }
 
 #[test]
@@ -144,6 +148,8 @@ fn qubit_ids_are_correct_for_allocate_use_release_one_qubit_multiple_times() {
             Instruction::Return,
         ],
     );
+    assert_eq!(program.num_qubits, 1);
+    assert_eq!(program.num_results, 0);
 }
 
 #[test]
@@ -207,4 +213,6 @@ fn qubit_ids_are_correct_for_allocate_use_release_multiple_qubits_interleaved()
             Instruction::Return,
         ],
     );
+    assert_eq!(program.num_qubits, 4);
+    assert_eq!(program.num_results, 0);
 }
diff --git a/compiler/qsc_partial_eval/tests/results.rs b/compiler/qsc_partial_eval/tests/results.rs
index 5676d3b0..64c3adf5 100644
--- a/compiler/qsc_partial_eval/tests/results.rs
+++ b/compiler/qsc_partial_eval/tests/results.rs
@@ -72,6 +72,8 @@ fn result_ids_are_correct_for_measuring_and_resetting_one_qubit() {
             Instruction::Return,
         ],
     );
+    assert_eq!(program.num_qubits, 1);
+    assert_eq!(program.num_results, 1);
 }
 
 #[test]
@@ -104,6 +106,8 @@ fn result_ids_are_correct_for_measuring_one_qubit() {
             Instruction::Return,
         ],
     );
+    assert_eq!(program.num_qubits, 1);
+    assert_eq!(program.num_results, 1);
 }
 
 #[test]
@@ -154,6 +158,8 @@ fn result_ids_are_correct_for_measuring_one_qubit_multiple_times() {
             Instruction::Return,
         ],
     );
+    assert_eq!(program.num_qubits, 1);
+    assert_eq!(program.num_results, 3);
 }
 
 #[test]
@@ -204,6 +210,8 @@ fn result_ids_are_correct_for_measuring_multiple_qubits() {
             Instruction::Return,
         ],
     );
+    assert_eq!(program.num_qubits, 3);
+    assert_eq!(program.num_results, 3);
 }
 
 #[test]
@@ -279,6 +287,8 @@ fn comparing_measurement_results_for_equality_adds_read_result_and_comparison_in
             Instruction::Return,
         ],
     );
+    assert_eq!(program.num_qubits, 2);
+    assert_eq!(program.num_results, 2);
 }
 
 #[test]
@@ -354,6 +364,8 @@ fn comparing_measurement_results_for_inequality_adds_read_result_and_comparison_
             Instruction::Return,
         ],
     );
+    assert_eq!(program.num_qubits, 2);
+    assert_eq!(program.num_results, 2);
 }
 
 #[test]
@@ -410,6 +422,8 @@ fn comparing_measurement_result_against_result_literal_for_equality_adds_read_re
             Instruction::Return,
         ],
     );
+    assert_eq!(program.num_qubits, 1);
+    assert_eq!(program.num_results, 1);
 }
 
 #[test]
@@ -466,4 +480,6 @@ fn comparing_measurement_result_against_result_literal_for_inequality_adds_read_
             Instruction::Return,
         ],
     );
+    assert_eq!(program.num_qubits, 1);
+    assert_eq!(program.num_results, 1);
 }
diff --git a/compiler/qsc_partial_eval/tests/test_utils.rs b/compiler/qsc_partial_eval/tests/test_utils.rs
index 2b749c0d..8141a210 100644
--- a/compiler/qsc_partial_eval/tests/test_utils.rs
+++ b/compiler/qsc_partial_eval/tests/test_utils.rs
@@ -4,7 +4,7 @@
 use qsc::{incremental::Compiler, PackageType};
 use qsc_data_structures::language_features::LanguageFeatures;
 use qsc_fir::fir::PackageStore;
-use qsc_frontend::compile::{PackageStore as HirPackageStore, RuntimeCapabilityFlags, SourceMap};
+use qsc_frontend::compile::{PackageStore as HirPackageStore, SourceMap, TargetCapabilityFlags};
 use qsc_lowerer::{map_hir_package_to_fir, Lowerer};
 use qsc_partial_eval::{partially_evaluate, ProgramEntry};
 use qsc_rca::{Analyzer, PackageStoreComputeProperties};
@@ -93,7 +93,7 @@ impl CompilationContext {
             true,
             source_map,
             PackageType::Exe,
-            RuntimeCapabilityFlags::all(),
+            TargetCapabilityFlags::all(),
             LanguageFeatures::default(),
         )
         .expect("should be able to create a new compiler");
diff --git a/compiler/qsc_passes/src/baseprofck/tests.rs b/compiler/qsc_passes/src/baseprofck/tests.rs
index fdba6f3b..9f87f983 100644
--- a/compiler/qsc_passes/src/baseprofck/tests.rs
+++ b/compiler/qsc_passes/src/baseprofck/tests.rs
@@ -6,19 +6,19 @@
 use expect_test::{expect, Expect};
 use indoc::indoc;
 use qsc_data_structures::language_features::LanguageFeatures;
-use qsc_frontend::compile::{self, compile, PackageStore, RuntimeCapabilityFlags, SourceMap};
+use qsc_frontend::compile::{self, compile, PackageStore, SourceMap, TargetCapabilityFlags};
 
 use crate::baseprofck::check_base_profile_compliance;
 
 fn check(expr: &str, expect: &Expect) {
     let mut store = PackageStore::new(compile::core());
-    let std = store.insert(compile::std(&store, RuntimeCapabilityFlags::all()));
+    let std = store.insert(compile::std(&store, TargetCapabilityFlags::all()));
     let sources = SourceMap::new([("test".into(), "".into())], Some(expr.into()));
     let unit = compile(
         &store,
         &[std],
         sources,
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         LanguageFeatures::default(),
     );
     assert!(unit.errors.is_empty(), "{:?}", unit.errors);
diff --git a/compiler/qsc_passes/src/borrowck/tests.rs b/compiler/qsc_passes/src/borrowck/tests.rs
index 42eeb594..c6c146f7 100644
--- a/compiler/qsc_passes/src/borrowck/tests.rs
+++ b/compiler/qsc_passes/src/borrowck/tests.rs
@@ -6,7 +6,7 @@
 use expect_test::{expect, Expect};
 use indoc::indoc;
 use qsc_data_structures::language_features::LanguageFeatures;
-use qsc_frontend::compile::{self, compile, PackageStore, RuntimeCapabilityFlags, SourceMap};
+use qsc_frontend::compile::{self, compile, PackageStore, SourceMap, TargetCapabilityFlags};
 use qsc_hir::visit::Visitor;
 
 use crate::borrowck::Checker;
@@ -18,7 +18,7 @@ fn check(expr: &str, expect: &Expect) {
         &store,
         &[],
         sources,
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         LanguageFeatures::default(),
     );
     assert!(unit.errors.is_empty(), "{:?}", unit.errors);
diff --git a/compiler/qsc_passes/src/callable_limits/tests.rs b/compiler/qsc_passes/src/callable_limits/tests.rs
index 0c82839c..5bd2a0cd 100644
--- a/compiler/qsc_passes/src/callable_limits/tests.rs
+++ b/compiler/qsc_passes/src/callable_limits/tests.rs
@@ -6,7 +6,7 @@
 use expect_test::{expect, Expect};
 use indoc::indoc;
 use qsc_data_structures::language_features::LanguageFeatures;
-use qsc_frontend::compile::{self, compile, PackageStore, RuntimeCapabilityFlags, SourceMap};
+use qsc_frontend::compile::{self, compile, PackageStore, SourceMap, TargetCapabilityFlags};
 use qsc_hir::visit::Visitor;
 
 use crate::callable_limits::CallableLimits;
@@ -18,7 +18,7 @@ fn check(file: &str, expect: &Expect) {
         &store,
         &[],
         sources,
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         LanguageFeatures::default(),
     );
     assert!(unit.errors.is_empty(), "{:?}", unit.errors);
diff --git a/compiler/qsc_passes/src/capabilitiesck/tests_adaptive.rs b/compiler/qsc_passes/src/capabilitiesck/tests_adaptive.rs
index 1a4d10bb..1f162693 100644
--- a/compiler/qsc_passes/src/capabilitiesck/tests_adaptive.rs
+++ b/compiler/qsc_passes/src/capabilitiesck/tests_adaptive.rs
@@ -15,10 +15,10 @@ use super::tests_common::{
     USE_DYNAMIC_QUBIT, USE_DYNAMIC_RANGE, USE_DYNAMIC_STRING, USE_DYNAMIC_UDT,
 };
 use expect_test::{expect, Expect};
-use qsc_frontend::compile::RuntimeCapabilityFlags;
+use qsc_frontend::compile::TargetCapabilityFlags;
 
 fn check_profile(source: &str, expect: &Expect) {
-    check(source, expect, RuntimeCapabilityFlags::ForwardBranching);
+    check(source, expect, TargetCapabilityFlags::Adaptive);
 }
 
 #[test]
diff --git a/compiler/qsc_passes/src/capabilitiesck/tests_adaptive_plus_integers.rs b/compiler/qsc_passes/src/capabilitiesck/tests_adaptive_plus_integers.rs
index 927c7a89..c38f8d39 100644
--- a/compiler/qsc_passes/src/capabilitiesck/tests_adaptive_plus_integers.rs
+++ b/compiler/qsc_passes/src/capabilitiesck/tests_adaptive_plus_integers.rs
@@ -17,13 +17,13 @@ use super::tests_common::{
     USE_DYNAMIC_QUBIT, USE_DYNAMIC_STRING, USE_DYNAMIC_UDT,
 };
 use expect_test::{expect, Expect};
-use qsc_frontend::compile::RuntimeCapabilityFlags;
+use qsc_frontend::compile::TargetCapabilityFlags;
 
 fn check_profile(source: &str, expect: &Expect) {
     check(
         source,
         expect,
-        RuntimeCapabilityFlags::ForwardBranching | RuntimeCapabilityFlags::IntegerComputations,
+        TargetCapabilityFlags::Adaptive | TargetCapabilityFlags::IntegerComputations,
     );
 }
 
diff --git a/compiler/qsc_passes/src/capabilitiesck/tests_base.rs b/compiler/qsc_passes/src/capabilitiesck/tests_base.rs
index 7126376f..8410b7e4 100644
--- a/compiler/qsc_passes/src/capabilitiesck/tests_base.rs
+++ b/compiler/qsc_passes/src/capabilitiesck/tests_base.rs
@@ -15,10 +15,10 @@ use super::tests_common::{
     USE_DYNAMIC_QUBIT, USE_DYNAMIC_RANGE, USE_DYNAMIC_STRING, USE_DYNAMIC_UDT,
 };
 use expect_test::{expect, Expect};
-use qsc_frontend::compile::RuntimeCapabilityFlags;
+use qsc_frontend::compile::TargetCapabilityFlags;
 
 fn check_profile(source: &str, expect: &Expect) {
-    check(source, expect, RuntimeCapabilityFlags::empty());
+    check(source, expect, TargetCapabilityFlags::empty());
 }
 
 #[test]
diff --git a/compiler/qsc_passes/src/capabilitiesck/tests_common.rs b/compiler/qsc_passes/src/capabilitiesck/tests_common.rs
index 9c91f954..b0b6fd9d 100644
--- a/compiler/qsc_passes/src/capabilitiesck/tests_common.rs
+++ b/compiler/qsc_passes/src/capabilitiesck/tests_common.rs
@@ -9,11 +9,11 @@ use crate::capabilitiesck::check_supported_capabilities;
 use qsc::{incremental::Compiler, PackageType};
 use qsc_data_structures::language_features::LanguageFeatures;
 use qsc_fir::fir::{Package, PackageId, PackageStore};
-use qsc_frontend::compile::{PackageStore as HirPackageStore, RuntimeCapabilityFlags, SourceMap};
+use qsc_frontend::compile::{PackageStore as HirPackageStore, SourceMap, TargetCapabilityFlags};
 use qsc_lowerer::{map_hir_package_to_fir, Lowerer};
 use qsc_rca::{Analyzer, PackageComputeProperties, PackageStoreComputeProperties};
 
-pub fn check(source: &str, expect: &Expect, capabilities: RuntimeCapabilityFlags) {
+pub fn check(source: &str, expect: &Expect, capabilities: TargetCapabilityFlags) {
     let compilation_context = CompilationContext::new(source);
     let (package, compute_properties) = compilation_context.get_package_compute_properties_tuple();
     let errors = check_supported_capabilities(package, compute_properties, capabilities);
@@ -46,7 +46,7 @@ impl CompilationContext {
             true,
             SourceMap::default(),
             PackageType::Lib,
-            RuntimeCapabilityFlags::all(),
+            TargetCapabilityFlags::all(),
             LanguageFeatures::default(),
         )
         .expect("should be able to create a new compiler");
diff --git a/compiler/qsc_passes/src/conjugate_invert/tests.rs b/compiler/qsc_passes/src/conjugate_invert/tests.rs
index 12a1887e..34c8898b 100644
--- a/compiler/qsc_passes/src/conjugate_invert/tests.rs
+++ b/compiler/qsc_passes/src/conjugate_invert/tests.rs
@@ -7,7 +7,7 @@
 use expect_test::{expect, Expect};
 use indoc::indoc;
 use qsc_data_structures::language_features::LanguageFeatures;
-use qsc_frontend::compile::{self, compile, PackageStore, RuntimeCapabilityFlags, SourceMap};
+use qsc_frontend::compile::{self, compile, PackageStore, SourceMap, TargetCapabilityFlags};
 use qsc_hir::{validate::Validator, visit::Visitor};
 
 use crate::conjugate_invert::invert_conjugate_exprs;
@@ -19,7 +19,7 @@ fn check(file: &str, expect: &Expect) {
         &store,
         &[],
         sources,
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         LanguageFeatures::default(),
     );
     assert!(unit.errors.is_empty(), "{:?}", unit.errors);
diff --git a/compiler/qsc_passes/src/entry_point/tests.rs b/compiler/qsc_passes/src/entry_point/tests.rs
index 9daed0bf..4639d431 100644
--- a/compiler/qsc_passes/src/entry_point/tests.rs
+++ b/compiler/qsc_passes/src/entry_point/tests.rs
@@ -7,7 +7,7 @@ use crate::entry_point::generate_entry_expr;
 use expect_test::{expect, Expect};
 use indoc::indoc;
 use qsc_data_structures::language_features::LanguageFeatures;
-use qsc_frontend::compile::{self, compile, PackageStore, RuntimeCapabilityFlags, SourceMap};
+use qsc_frontend::compile::{self, compile, PackageStore, SourceMap, TargetCapabilityFlags};
 
 fn check(file: &str, expr: &str, expect: &Expect) {
     let sources = SourceMap::new([("test".into(), file.into())], Some(expr.into()));
@@ -15,7 +15,7 @@ fn check(file: &str, expr: &str, expect: &Expect) {
         &PackageStore::new(compile::core()),
         &[],
         sources,
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         LanguageFeatures::default(),
     );
     assert!(unit.errors.is_empty(), "{:?}", unit.errors);
diff --git a/compiler/qsc_passes/src/logic_sep/tests.rs b/compiler/qsc_passes/src/logic_sep/tests.rs
index 64c6bd45..5a99cd52 100644
--- a/compiler/qsc_passes/src/logic_sep/tests.rs
+++ b/compiler/qsc_passes/src/logic_sep/tests.rs
@@ -6,7 +6,7 @@
 
 use expect_test::{expect, Expect};
 use qsc_data_structures::{language_features::LanguageFeatures, span::Span};
-use qsc_frontend::compile::{self, compile, PackageStore, RuntimeCapabilityFlags, SourceMap};
+use qsc_frontend::compile::{self, compile, PackageStore, SourceMap, TargetCapabilityFlags};
 use qsc_hir::{
     hir::{ExprKind, NodeId, Stmt},
     visit::{walk_stmt, Visitor},
@@ -28,12 +28,12 @@ impl<'a> Visitor<'a> for StmtSpans {
 
 fn check(block_str: &str, expect: &Expect) {
     let mut store = PackageStore::new(compile::core());
-    let std = store.insert(compile::std(&store, RuntimeCapabilityFlags::all()));
+    let std = store.insert(compile::std(&store, TargetCapabilityFlags::all()));
     let unit = compile(
         &store,
         &[std],
         SourceMap::new([], Some(block_str.into())),
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         LanguageFeatures::default(),
     );
     assert!(unit.errors.is_empty(), "{:?}", unit.errors);
diff --git a/compiler/qsc_passes/src/loop_unification/tests.rs b/compiler/qsc_passes/src/loop_unification/tests.rs
index 79cf44cf..9ccf984c 100644
--- a/compiler/qsc_passes/src/loop_unification/tests.rs
+++ b/compiler/qsc_passes/src/loop_unification/tests.rs
@@ -6,7 +6,7 @@
 use expect_test::{expect, Expect};
 use indoc::indoc;
 use qsc_data_structures::language_features::LanguageFeatures;
-use qsc_frontend::compile::{self, compile, PackageStore, RuntimeCapabilityFlags, SourceMap};
+use qsc_frontend::compile::{self, compile, PackageStore, SourceMap, TargetCapabilityFlags};
 use qsc_hir::{mut_visit::MutVisitor, validate::Validator, visit::Visitor};
 
 use crate::loop_unification::LoopUni;
@@ -18,7 +18,7 @@ fn check(file: &str, expect: &Expect) {
         &store,
         &[],
         sources,
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         LanguageFeatures::default(),
     );
     assert!(unit.errors.is_empty(), "{:?}", unit.errors);
diff --git a/compiler/qsc_passes/src/replace_qubit_allocation/tests.rs b/compiler/qsc_passes/src/replace_qubit_allocation/tests.rs
index 4c6594a0..42fa1be3 100644
--- a/compiler/qsc_passes/src/replace_qubit_allocation/tests.rs
+++ b/compiler/qsc_passes/src/replace_qubit_allocation/tests.rs
@@ -5,7 +5,7 @@ use crate::replace_qubit_allocation::ReplaceQubitAllocation;
 use expect_test::{expect, Expect};
 use indoc::indoc;
 use qsc_data_structures::language_features::LanguageFeatures;
-use qsc_frontend::compile::{self, compile, PackageStore, RuntimeCapabilityFlags, SourceMap};
+use qsc_frontend::compile::{self, compile, PackageStore, SourceMap, TargetCapabilityFlags};
 use qsc_hir::{mut_visit::MutVisitor, validate::Validator, visit::Visitor};
 
 fn check(file: &str, expect: &Expect) {
@@ -15,7 +15,7 @@ fn check(file: &str, expect: &Expect) {
         &store,
         &[],
         sources,
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         LanguageFeatures::default(),
     );
     assert!(unit.errors.is_empty(), "{:?}", unit.errors);
diff --git a/compiler/qsc_passes/src/spec_gen/tests.rs b/compiler/qsc_passes/src/spec_gen/tests.rs
index 43c8ac0f..3743801e 100644
--- a/compiler/qsc_passes/src/spec_gen/tests.rs
+++ b/compiler/qsc_passes/src/spec_gen/tests.rs
@@ -7,7 +7,7 @@
 use expect_test::{expect, Expect};
 use indoc::indoc;
 use qsc_data_structures::language_features::LanguageFeatures;
-use qsc_frontend::compile::{self, compile, PackageStore, RuntimeCapabilityFlags, SourceMap};
+use qsc_frontend::compile::{self, compile, PackageStore, SourceMap, TargetCapabilityFlags};
 use qsc_hir::{validate::Validator, visit::Visitor};
 
 use crate::spec_gen::generate_specs;
@@ -19,7 +19,7 @@ fn check(file: &str, expect: &Expect) {
         &store,
         &[],
         sources,
-        RuntimeCapabilityFlags::all(),
+        TargetCapabilityFlags::all(),
         LanguageFeatures::default(),
     );
     assert!(unit.errors.is_empty(), "{:?}", unit.errors);
diff --git a/compiler/qsc_rca/tests/callables.rs b/compiler/qsc_rca/tests/callables.rs
index 3ae340ee..adbe9d03 100644
--- a/compiler/qsc_rca/tests/callables.rs
+++ b/compiler/qsc_rca/tests/callables.rs
@@ -6,7 +6,7 @@
 pub mod test_utils;
 
 use expect_test::expect;
-use qsc::RuntimeCapabilityFlags;
+use qsc::TargetCapabilityFlags;
 use test_utils::{
     check_callable_compute_properties, check_last_statement_compute_properties, CompilationContext,
 };
@@ -200,7 +200,7 @@ fn check_rca_for_unrestricted_h() {
 
 #[test]
 fn check_rca_for_base_h() {
-    let compilation_context = CompilationContext::new(RuntimeCapabilityFlags::empty());
+    let compilation_context = CompilationContext::new(TargetCapabilityFlags::empty());
     check_callable_compute_properties(
         &compilation_context.fir_store,
         compilation_context.get_compute_properties(),
@@ -304,7 +304,7 @@ fn check_rca_for_unrestricted_r1() {
 
 #[test]
 fn check_rca_for_base_r1() {
-    let compilation_context = CompilationContext::new(RuntimeCapabilityFlags::empty());
+    let compilation_context = CompilationContext::new(TargetCapabilityFlags::empty());
     check_callable_compute_properties(
         &compilation_context.fir_store,
         compilation_context.get_compute_properties(),
@@ -420,7 +420,7 @@ fn check_rca_for_unrestricted_rx() {
 
 #[test]
 fn check_rca_for_base_rx() {
-    let compilation_context = CompilationContext::new(RuntimeCapabilityFlags::empty());
+    let compilation_context = CompilationContext::new(TargetCapabilityFlags::empty());
     check_callable_compute_properties(
         &compilation_context.fir_store,
         compilation_context.get_compute_properties(),
@@ -548,7 +548,7 @@ fn check_rca_for_unrestricted_rxx() {
 
 #[test]
 fn check_rca_for_base_rxx() {
-    let compilation_context = CompilationContext::new(RuntimeCapabilityFlags::empty());
+    let compilation_context = CompilationContext::new(TargetCapabilityFlags::empty());
     check_callable_compute_properties(
         &compilation_context.fir_store,
         compilation_context.get_compute_properties(),
@@ -676,7 +676,7 @@ fn check_rca_for_unrestricted_ry() {
 
 #[test]
 fn check_rca_for_base_ry() {
-    let compilation_context = CompilationContext::new(RuntimeCapabilityFlags::empty());
+    let compilation_context = CompilationContext::new(TargetCapabilityFlags::empty());
     check_callable_compute_properties(
         &compilation_context.fir_store,
         compilation_context.get_compute_properties(),
@@ -804,7 +804,7 @@ fn check_rca_for_unrestricted_ryy() {
 
 #[test]
 fn check_rca_for_base_ryy() {
-    let compilation_context = CompilationContext::new(RuntimeCapabilityFlags::empty());
+    let compilation_context = CompilationContext::new(TargetCapabilityFlags::empty());
     check_callable_compute_properties(
         &compilation_context.fir_store,
         compilation_context.get_compute_properties(),
@@ -932,7 +932,7 @@ fn check_rca_for_unrestricted_rz() {
 
 #[test]
 fn check_rca_for_base_rz() {
-    let compilation_context = CompilationContext::new(RuntimeCapabilityFlags::empty());
+    let compilation_context = CompilationContext::new(TargetCapabilityFlags::empty());
     check_callable_compute_properties(
         &compilation_context.fir_store,
         compilation_context.get_compute_properties(),
@@ -1060,7 +1060,7 @@ fn check_rca_for_unrestricted_rzz() {
 
 #[test]
 fn check_rca_for_base_rzz() {
-    let compilation_context = CompilationContext::new(RuntimeCapabilityFlags::empty());
+    let compilation_context = CompilationContext::new(TargetCapabilityFlags::empty());
     check_callable_compute_properties(
         &compilation_context.fir_store,
         compilation_context.get_compute_properties(),
@@ -1176,7 +1176,7 @@ fn check_rca_for_unrestricted_s() {
 
 #[test]
 fn check_rca_for_base_s() {
-    let compilation_context = CompilationContext::new(RuntimeCapabilityFlags::empty());
+    let compilation_context = CompilationContext::new(TargetCapabilityFlags::empty());
     check_callable_compute_properties(
         &compilation_context.fir_store,
         compilation_context.get_compute_properties(),
@@ -1268,7 +1268,7 @@ fn check_rca_for_unrestricted_t() {
 
 #[test]
 fn check_rca_for_base_t() {
-    let compilation_context = CompilationContext::new(RuntimeCapabilityFlags::empty());
+    let compilation_context = CompilationContext::new(TargetCapabilityFlags::empty());
     check_callable_compute_properties(
         &compilation_context.fir_store,
         compilation_context.get_compute_properties(),
@@ -1360,7 +1360,7 @@ fn check_rca_for_unrestricted_x() {
 
 #[test]
 fn check_rca_for_base_x() {
-    let compilation_context = CompilationContext::new(RuntimeCapabilityFlags::empty());
+    let compilation_context = CompilationContext::new(TargetCapabilityFlags::empty());
     check_callable_compute_properties(
         &compilation_context.fir_store,
         compilation_context.get_compute_properties(),
@@ -1452,7 +1452,7 @@ fn check_rca_for_unrestricted_y() {
 
 #[test]
 fn check_rca_for_base_y() {
-    let compilation_context = CompilationContext::new(RuntimeCapabilityFlags::empty());
+    let compilation_context = CompilationContext::new(TargetCapabilityFlags::empty());
     check_callable_compute_properties(
         &compilation_context.fir_store,
         compilation_context.get_compute_properties(),
@@ -1544,7 +1544,7 @@ fn check_rca_for_unrestricted_z() {
 
 #[test]
 fn check_rca_for_base_z() {
-    let compilation_context = CompilationContext::new(RuntimeCapabilityFlags::empty());
+    let compilation_context = CompilationContext::new(TargetCapabilityFlags::empty());
     check_callable_compute_properties(
         &compilation_context.fir_store,
         compilation_context.get_compute_properties(),
diff --git a/compiler/qsc_rca/tests/test_utils.rs b/compiler/qsc_rca/tests/test_utils.rs
index 9e5c7c2d..a0b2db0b 100644
--- a/compiler/qsc_rca/tests/test_utils.rs
+++ b/compiler/qsc_rca/tests/test_utils.rs
@@ -5,7 +5,7 @@ use expect_test::Expect;
 use qsc::incremental::Compiler;
 use qsc_data_structures::language_features::LanguageFeatures;
 use qsc_fir::fir::{ItemKind, LocalItemId, Package, PackageStore, StoreItemId};
-use qsc_frontend::compile::{PackageStore as HirPackageStore, RuntimeCapabilityFlags, SourceMap};
+use qsc_frontend::compile::{PackageStore as HirPackageStore, SourceMap, TargetCapabilityFlags};
 use qsc_lowerer::{map_hir_package_to_fir, Lowerer};
 use qsc_passes::PackageType;
 use qsc_rca::{Analyzer, ComputePropertiesLookup, PackageStoreComputeProperties};
@@ -19,7 +19,7 @@ pub struct CompilationContext {
 
 impl CompilationContext {
     #[must_use]
-    pub fn new(runtime_capabilities: RuntimeCapabilityFlags) -> Self {
+    pub fn new(runtime_capabilities: TargetCapabilityFlags) -> Self {
         let compiler = Compiler::new(
             true,
             SourceMap::default(),
@@ -68,7 +68,7 @@ impl CompilationContext {
 
 impl Default for CompilationContext {
     fn default() -> Self {
-        Self::new(RuntimeCapabilityFlags::all())
+        Self::new(TargetCapabilityFlags::all())
     }
 }
 
diff --git a/language_service/src/state/tests.rs b/language_service/src/state/tests.rs
index 99cbce86..483617f2 100644
--- a/language_service/src/state/tests.rs
+++ b/language_service/src/state/tests.rs
@@ -311,12 +311,12 @@ async fn rca_errors_are_reported_when_compilation_succeeds() {
     let mut updater = new_updater(&errors);
 
     updater.update_configuration(WorkspaceConfigurationUpdate {
-        target_profile: Some(Profile::Adaptive),
+        target_profile: Some(Profile::Quantinuum),
         package_type: Some(PackageType::Lib),
     });
 
     updater
-        .update_document("single/foo.qs", 1, "namespace Test { operation RcaCheck() : Int { use q = Qubit(); mutable x = 1; if MResetZ(q) == One { set x = 2; } x } }")
+        .update_document("single/foo.qs", 1, "namespace Test { operation RcaCheck() : Double { use q = Qubit(); mutable x = 1.0; if MResetZ(q) == One { set x = 2.0; } x } }")
         .await;
 
     // we expect two errors, one for `set x = 2` and one for `x`
@@ -332,20 +332,20 @@ async fn rca_errors_are_reported_when_compilation_succeeds() {
                     [
                         Pass(
                             CapabilitiesCk(
-                                UseOfDynamicInt(
+                                UseOfDynamicDouble(
                                     Span {
-                                        lo: 101,
-                                        hi: 110,
+                                        lo: 106,
+                                        hi: 117,
                                     },
                                 ),
                             ),
                         ),
                         Pass(
                             CapabilitiesCk(
-                                UseOfDynamicInt(
+                                UseOfDynamicDouble(
                                     Span {
-                                        lo: 114,
-                                        hi: 115,
+                                        lo: 121,
+                                        hi: 122,
                                     },
                                 ),
                             ),
diff --git a/pip/tests/test_interpreter.py b/pip/tests/test_interpreter.py
index e770450d..af76a540 100644
--- a/pip/tests/test_interpreter.py
+++ b/pip/tests/test_interpreter.py
@@ -274,45 +274,45 @@ def test_entry_expr_circuit() -> None:
 
 # this is by design
 def test_callables_failing_profile_validation_are_still_registered() -> None:
-    e = Interpreter(TargetProfile.Adaptive)
+    e = Interpreter(TargetProfile.Quantinuum)
     with pytest.raises(Exception) as excinfo:
         e.interpret(
-            "operation Foo() : Int { use q = Qubit(); mutable x = 1; if MResetZ(q) == One { set x = 2; } x }"
+            "operation Foo() : Double { use q = Qubit(); mutable x = 1.0; if MResetZ(q) == One { set x = 2.0; } x }"
         )
-    assert "Qsc.CapabilitiesCk.UseOfDynamicInt" in str(excinfo)
+    assert "Qsc.CapabilitiesCk.UseOfDynamicDouble" in str(excinfo)
     with pytest.raises(Exception) as excinfo:
         e.interpret("Foo()")
-    assert "Qsc.CapabilitiesCk.UseOfDynamicInt" in str(excinfo)
+    assert "Qsc.CapabilitiesCk.UseOfDynamicDouble" in str(excinfo)
 
 
 # this is by design
 def test_once_rca_validation_fails_following_calls_also_fail() -> None:
-    e = Interpreter(TargetProfile.Adaptive)
+    e = Interpreter(TargetProfile.Quantinuum)
     with pytest.raises(Exception) as excinfo:
         e.interpret(
-            "operation Foo() : Int { use q = Qubit(); mutable x = 1; if MResetZ(q) == One { set x = 2; } x }"
+            "operation Foo() : Double { use q = Qubit(); mutable x = 1.0; if MResetZ(q) == One { set x = 2.0; } x }"
         )
-    assert "Qsc.CapabilitiesCk.UseOfDynamicInt" in str(excinfo)
+    assert "Qsc.CapabilitiesCk.UseOfDynamicDouble" in str(excinfo)
     with pytest.raises(Exception) as excinfo:
         e.interpret("let x = 5;")
-    assert "Qsc.CapabilitiesCk.UseOfDynamicInt" in str(excinfo)
+    assert "Qsc.CapabilitiesCk.UseOfDynamicDouble" in str(excinfo)
 
 
 def test_adaptive_errors_are_raised_when_interpreting() -> None:
-    e = Interpreter(TargetProfile.Adaptive)
+    e = Interpreter(TargetProfile.Quantinuum)
     with pytest.raises(Exception) as excinfo:
         e.interpret(
-            "operation Foo() : Int { use q = Qubit(); mutable x = 1; if MResetZ(q) == One { set x = 2; } x }"
+            "operation Foo() : Double { use q = Qubit(); mutable x = 1.0; if MResetZ(q) == One { set x = 2.0; } x }"
         )
-    assert "Qsc.CapabilitiesCk.UseOfDynamicInt" in str(excinfo)
+    assert "Qsc.CapabilitiesCk.UseOfDynamicDouble" in str(excinfo)
 
 
 def test_adaptive_errors_are_raised_from_entry_expr() -> None:
-    e = Interpreter(TargetProfile.Adaptive)
+    e = Interpreter(TargetProfile.Quantinuum)
     e.interpret("use q = Qubit();")
     with pytest.raises(Exception) as excinfo:
-        e.run("{mutable x = 1; if MResetZ(q) == One { set x = 2; }}")
-    assert "Qsc.CapabilitiesCk.UseOfDynamicInt" in str(excinfo)
+        e.run("{mutable x = 1.0; if MResetZ(q) == One { set x = 2.0; }}")
+    assert "Qsc.CapabilitiesCk.UseOfDynamicDouble" in str(excinfo)
 
 
 def test_adaptive_qir_can_be_generated() -> None:
@@ -332,7 +332,7 @@ def test_adaptive_qir_can_be_generated() -> None:
             }
         }
         """
-    e = Interpreter(TargetProfile.Adaptive)
+    e = Interpreter(TargetProfile.Quantinuum)
     e.interpret(adaptive_input)
     qir = e.qir("Test.Main()")
     assert qir == dedent(
@@ -350,7 +350,7 @@ def test_adaptive_qir_can_be_generated() -> None:
 
         declare void @__quantum__qis__rz__body(double, %Qubit*)
 
-        attributes #0 = { "entry_point" "output_labeling_schema" "qir_profiles"="adaptive_profile" "required_num_qubits"="0" "required_num_results"="0" }
+        attributes #0 = { "entry_point" "output_labeling_schema" "qir_profiles"="adaptive_profile" "required_num_qubits"="1" "required_num_results"="0" }
         attributes #1 = { "irreversible" }
 
         ; module flags