Microsoft Q# output to WPF or Windows Form - quantum-computing

It is possible to interface a Q# class with a Windows Form or a WPF? The examples Microsoft provide in their Quantum Development Tool Kit seem only to interface with a Console.

Microsoft Quantum Development Kit relies on .NET to run, so it should work with anything that uses .NET. Majority of the Q# samples use .NET Core, but PythonInterop sample uses .NET Standard instead of .NET Core, so Quantum Development Kit can be used from Framework-only projects as well.
We haven't tried WPF or Windows Forms, though. In the libraries and samples repository, the sample H2SimulationGUI which requires visualization uses the Electron framework to do it.

Related

How to develop OSX application using Visual studio for Mac preview

I have .Net Winform project(c#) working in windows.Now,i want to do same project, to work as OSX App in Mac. As per my understanding Microsoft recently launched Visual studio for Mac preview and also it support OSX app development using Xamarin.Mac and also it support .Netcore .
Instead of creating Osx app from scratch,i need to reuse the code which is available in .net winform project.
can i develop UI application using .netcore project? I think .netframework and .netcore more or less same.can i port .netframework to .netcore project and create osx app ?
or
can i use xamarin.mac and reuse the .netframework c# code to create osx app?
I am new to this,so kindly suggest the best way to create OSX app using Visual studio for Mac preview. (Basically i need Tabel view,form controls and graph(there i use zedgraph).Is these view are available here.
In general, the "standard" way of developing cross platform applications is to separate as much of your logic as possible into shared libraries of some type and create "thin" UIs specific to each platform.
Depending on your need, you could easily make that shared code netstandard/PCL/etc compatible and share between platforms or just recompile the project in each solution.
NSTableView will likely solve your needs, but expect it to be significantly more primitive that what you are used to on Windows. Graph controls don't come built in, so you'll need to find a vendor that ships Cocoa controls or draw them yourself.
Here is the quickstart documentation.
Xamarin.Forms support for macOS is coming in the future, currently earmarked for Q2 this year.

UI development for windows (desktop + web application) and windows CE

I am working on a project where there is requirement of GUI to be created in Silverlight. Some key requirements are:
Extremely rich GUI
Real time visualization process graphics
Support multiple themes
Support different display size
Support charting / trending controls
Same functionality for Desktop / Web using same code base
Same functionality to be available on embedded controller (based on Windows CE)
I understand that using Silverlight we can have same codebase for desktop / web applications. However challenge is to have the Silverlight application (windows and/or web) for Windows CE. I would like to understand what is the best way to implement Silverlight application on Windows CE with as much code reuse as possible.
I would appreciate if you could provide some inputs on what should our architecture approach be for this application development. Also, please let me know if you need more inputs on the requirement side...
"Silverlight" for Windows Embedded (SWE) is a bad name. It's not really what most would call Silverlight. It's simply a XAML-based engine that you can use Blend to develop for. For Windows CE, you must use C++ to develop for SWE. You cannot reuse SWE assemblies in other Silverlight projects. You cannot use other Silverlight assemblies in an SWE project. Your XAML itself will probably have some reusability, but XAML sharing from a code perspective is a challenge in its own right.

Question regarding WPf/Silverlight/Windows Phone7 Developemt

I have experience coding in C# (console and Windows Form applications). For something to do in my free time, I've been intending to pick up another language, and have my sights on something thats a little more content rich. However, I'm confused about the following:
Windows Forms are used to develop GUI applications for windows. What is WPF and how is it different from Windows Forms
Does Windows Phone development use C#, or exclusively Silverlight? Or does it just use the .NET framework, and you can use either of the two?
Adding to other answer(s):
WPF uses an XML-based markup called XAML to describe the UI, like HTML does for a web page. The XAML file is paired with a "code-behind" (.cs or .vb) file that is compiled together when the app is built. Adding an XML element to the XAML file is equvalient to declaring an object in the code-behind file. For many classes, you can choose to do one or the other.
Use can use C# or VB.NET language to write Windows Phone apps (although currently only C# is available in the free Visual Studio Express that comes with the Windows phone tools on App Hub). Silverlight is a subset of the .NET Framework, whose classes can be used to write phone apps. You can also use the XNA libraries to develop phone applications.
I HIGHLY recommend Charles Petzolds free ebook for more. He does a great job of explaining this in the first couple chapters: http://charlespetzold.com/phone/index.html
Hope that helps!
Win Forms are a light object oriented wrapper around the basic Win32 GDI primitives.
WPF and Silverlight do their own rendering, don't use GDI and are built on XML-based layout and the MIL.
Windows Phone Development uses Silverlight with C#. The WP7 version of Silverlight runs on a modified version of Silverlight 3, which in itself uses a modified/minified .NET framework. So WP7 development uses all of what you mentioned in question 2.
I can't give a much better answer than #jeffmaphone for question 1, so please look at his response.
Windows Phone 7 uses Silverlight for the UI but the code can be C# or VB. This page of Code Samples for Windows Phone has both but:
In order to build and run Visual Basic samples, you must install additional developer tools. For more information, see Installing Windows Phone Developer Tools.
For more information see the Windows Phone 7 Developer Guide
1) Windows Forms is one method to develop GUI apps for Windows, WPF is another (for Vista, 7 and XP SP2). In general, Windows Forms is great for simple, quick and dirty applications, while WPF works well for more complex and flashy applications.
2) Windows Phone uses Silverlight for non-game applications and XNA for games. In both cases, you can use C# as the logic layer. In other words, C# code decides where to put things in the UI, while Silverlight or XNA are different ways of talking to a display.
Be careful about searching for Silverlight tutorials, because not all of Silverlight is on the phone.
Here are my suggestions:
1) Check this discussion :WPF versus Winforms
2)Generally Windows Phone 7 supports two frameworks for developing applications– Silverlight and XNA. Check MSDN for reference:
The Silverlight and XNA Frameworks for Windows Phone
Features Supported in Silverlight for Windows Phone
PS: One of the best resource for Silverlight development is the official Silverlight web site: http://www.silverlight.net/

which one to choose, Codejocks Xtreme Toolkit or Xtreme Suite?

I am new in programming and it may look naive to some of you, but I am a little bit curious why Toolkit Pro is needed if Suite Pro exist. Although Toolkit is specificly for MFC, Suite Pro can be also used in VC++ development. If we would like to use VC++ to develop a product, which one is more suitable? If we use MFC in the developing, does it mean Toolkit will be the only choice?
Thanks in advance for your explanation.
I guess they using at different application scenarios. Toolkit Pro for native MFC application, if your application is already developed with VC++ & MFC, use Toolkit Pro can better with your existing applications are combined together. Otherwise you can consider using Suite Pro. I only used Toolkit Pro at MFC application.
Suite Pro is for ActiveX environments, where you can use it in VB 6 (Legacy) or NET language which supports ActiveX objects - such as C#, VB.NET WinForms and using ActiveX.
Toolkit Pro is for native MFC C++ environment.
A couple of things that separate the two products is implementation. While some bits of Suite Pro (ActiveX COM) might in fact work in C++, the classes are not always interchangeable.
For example, both products have an evaluation edition on Codejock.com. Inside the package are sample solutions which show ways to impliment Codejock controls. Looking between versions, usage is different.
Codejock also features usage examples in the features tour (click features tour to see example) sections of their product pages on their site- sometimes showing three sets of instructions, for each of MFC, ActiveX and C#.
I would like to note that, if you review the features tours and have JavaScript disabled, you will not see code examples in the non-JS version of the tour.

Can you build an entire application in Silverlight?

Is it possible to build a good medium to full sized application using just silverlight as a host?
A few things that would be needed:
- dynamic pages (one silverlight "screen" can switch between screens, like a normal app.
- similar to a java applet which launches from the browser
I see that Telerik sells RadControls for WPF...but this is only useful (to me) if Silverlight can be a rich client platform through the web.
Although still a somewhat immature platform, Silverlight 2.0 supports many of the features that I would expect from a platform needed to create full sized applications.
Data access through web services and local data/object query support with Linq
Many feature rich controls such as datagrid, treeview, etc
A very usable subset of the CLR (common language runtime)
Access to restricted local storage on the client machine
It is cross platform
There are already some great add-ons, like Telerik and the Silverlight Control Toolkit
For your specific scenario, Microsoft has published a tutorial on Multi-page Applications
Absolutely. I've been looking into this and believe that it's as easy to do in Silverlight as it is in any other language. Remember that Silverlight 2 uses C# 3.0 and from that you can build anything that's not included in the Silverlight version of the CLR. Also, the fact that Microsoft gives you access to the .NET source code means that you can compile the missing parts of the .NET libraries with your application. (No idea about the licensing issues with that though.)
I've seen a presentation of a full featured CRM application two days ago. Although it's still alpha: It looks and feels like any office application. I don't know details but for me it's a proof of concept.

Resources